Update v_xml_cdr_import.php

This commit is contained in:
FusionPBX
2018-05-19 16:59:24 -06:00
committed by GitHub
parent 3052fc774f
commit 8aca3d5728
+18 -3
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