Update v_xml_cdr_import.php

This commit is contained in:
FusionPBX 2018-05-19 16:59:57 -06:00 committed by GitHub
parent 463454d714
commit 02a8464327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 3 deletions

View File

@ -353,13 +353,28 @@
} }
if (!isset($record_name)) { if (!isset($record_name)) {
$bridge_uuid = urldecode($xml->variables->bridge_uuid); $bridge_uuid = urldecode($xml->variables->bridge_uuid);
$record_path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day; $path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if (file_exists($record_path.'/'.$bridge_uuid.'.wav')) { if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
$record_path = $path;
$record_name = $bridge_uuid.'.wav'; $record_name = $bridge_uuid.'.wav';
$record_length = urldecode($xml->variables->duration);
} elseif (file_exists($record_path.'/'.$bridge_uuid.'.mp3')) { } elseif (file_exists($record_path.'/'.$bridge_uuid.'.mp3')) {
$record_path = $path;
$record_name = $bridge_uuid.'.mp3'; $record_name = $bridge_uuid.'.mp3';
$record_length = urldecode($xml->variables->duration);
}
}
if (!isset($record_name)) {
$path = $_SESSION['switch']['recordings']['dir'].'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if (file_exists($path.'/'.$uuid.'.wav')) {
$record_path = $path;
$record_name = $uuid.'.wav';
$record_length = urldecode($xml->variables->duration);
} elseif (file_exists($record_path.'/'.$uuid.'.mp3')) {
$record_path = $path;
$record_name = $uuid.'.mp3';
$record_length = urldecode($xml->variables->duration);
} }
$record_length = urldecode($xml->variables->duration);
} }
//add the call recording //add the call recording