CDR: Restore call recording download.

This commit is contained in:
fusionate 2023-06-06 16:29:09 +00:00
parent f86abd84c4
commit 28ebdbc722
No known key found for this signature in database
1 changed files with 6 additions and 5 deletions

View File

@ -1359,7 +1359,7 @@ if (!class_exists('xml_cdr')) {
return; return;
} }
//ob_clean(); ob_clean();
$fd = fopen($record_file, "rb"); $fd = fopen($record_file, "rb");
if ($_GET['t'] == "bin") { if ($_GET['t'] == "bin") {
header("Content-Type: application/force-download"); header("Content-Type: application/force-download");
@ -1382,14 +1382,15 @@ if (!class_exists('xml_cdr')) {
if ($_GET['t'] == "bin") { if ($_GET['t'] == "bin") {
header("Content-Length: ".filesize($record_file)); header("Content-Length: ".filesize($record_file));
} }
//ob_clean(); ob_clean();
//fpassthru($fd);
//content-range //content-range
if (isset($_SERVER['HTTP_RANGE']) && $_GET['t'] != "bin") { if (isset($_SERVER['HTTP_RANGE']) && $_GET['t'] != "bin") {
$this->range_download($record_file); $this->range_download($record_file);
} }
fpassthru($fd);
} //end download method } //end download method
/* /*