Update xml_cdr.php

This commit is contained in:
FusionPBX 2017-10-20 17:54:49 -06:00 committed by GitHub
parent d500708a92
commit 0ab3fcaff4
1 changed files with 18 additions and 1 deletions

View File

@ -418,9 +418,26 @@ if (!class_exists('xml_cdr')) {
$recording = $parts[3]; $recording = $parts[3];
$record_path = dirname($recording); $record_path = dirname($recording);
$record_name = basename($recording); $record_name = basename($recording);
}
$record_length = urldecode($xml->variables->duration); $record_length = urldecode($xml->variables->duration);
} }
}
elseif (strlen($xml->variables->bridge) > 0) {
$commands = explode(",", urldecode($xml->variables->bridge));
foreach ($commands as $command) {
$cmd = explode("=", $command);
if ($cmd[0] == "api_on_answer") {
$a = explode("]", $cmd[1]);
$command = str_replace("'", "", $a[0]);
$parts = explode(" ", $command);
if ($parts[0] == "uuid_record") {
$recording = $parts[3];
$record_path = dirname($recording);
$record_name = basename($recording);
$record_length = urldecode($xml->variables->duration);
}
}
}
}
//add the call recording //add the call recording
if (isset($record_path) && isset($record_name) && file_exists($record_path.'/'.$record_name) && $record_length > 0) { if (isset($record_path) && isset($record_name) && file_exists($record_path.'/'.$record_name) && $record_length > 0) {