Support upcoming change in freeswitch - bridge_uuid changes to bridge_uuids array (#6531)
This commit is contained in:
parent
21b639cd8e
commit
a3811128af
|
|
@ -428,6 +428,11 @@ if (!class_exists('xml_cdr')) {
|
||||||
$missed_call = 'true';
|
$missed_call = 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//get the last bridge_uuid from the call to preserve previous behavior
|
||||||
|
foreach ($xml->variables->bridge_uuids as $bridge) {
|
||||||
|
$last_bridge = urldecode($bridge);
|
||||||
|
}
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
$uuid = urldecode($xml->variables->uuid);
|
$uuid = urldecode($xml->variables->uuid);
|
||||||
$this->array[$key]['xml_cdr_uuid'] = $uuid;
|
$this->array[$key]['xml_cdr_uuid'] = $uuid;
|
||||||
|
|
@ -442,7 +447,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
$this->array[$key]['caller_destination'] = $caller_destination;
|
$this->array[$key]['caller_destination'] = $caller_destination;
|
||||||
$this->array[$key]['accountcode'] = urldecode($xml->variables->accountcode);
|
$this->array[$key]['accountcode'] = urldecode($xml->variables->accountcode);
|
||||||
$this->array[$key]['default_language'] = urldecode($xml->variables->default_language);
|
$this->array[$key]['default_language'] = urldecode($xml->variables->default_language);
|
||||||
$this->array[$key]['bridge_uuid'] = urldecode($xml->variables->bridge_uuid);
|
$this->array[$key]['bridge_uuid'] = urldecode($xml->variables->bridge_uuid) ?: $last_bridge;
|
||||||
//$this->array[$key]['digits_dialed'] = urldecode($xml->variables->digits_dialed);
|
//$this->array[$key]['digits_dialed'] = urldecode($xml->variables->digits_dialed);
|
||||||
$this->array[$key]['sip_hangup_disposition'] = urldecode($xml->variables->sip_hangup_disposition);
|
$this->array[$key]['sip_hangup_disposition'] = urldecode($xml->variables->sip_hangup_disposition);
|
||||||
$this->array[$key]['pin_number'] = urldecode($xml->variables->pin_number);
|
$this->array[$key]['pin_number'] = urldecode($xml->variables->pin_number);
|
||||||
|
|
@ -678,7 +683,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isset($record_name)) {
|
if (!isset($record_name)) {
|
||||||
$bridge_uuid = urldecode($xml->variables->bridge_uuid);
|
$bridge_uuid = urldecode($xml->variables->bridge_uuid) ?: $last_bridge;
|
||||||
$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($path.'/'.$bridge_uuid.'.wav')) {
|
if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
|
||||||
$record_path = $path;
|
$record_path = $path;
|
||||||
|
|
@ -705,7 +710,7 @@ if (!class_exists('xml_cdr')) {
|
||||||
|
|
||||||
//last check
|
//last check
|
||||||
if (!isset($record_name) || is_null ($record_name) || (strlen($record_name) == 0)) {
|
if (!isset($record_name) || is_null ($record_name) || (strlen($record_name) == 0)) {
|
||||||
$bridge_uuid = urldecode($xml->variables->bridge_uuid);
|
$bridge_uuid = urldecode($xml->variables->bridge_uuid) ?: $last_bridge ;
|
||||||
$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($path.'/'.$bridge_uuid.'.wav')) {
|
if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
|
||||||
$record_path = $path;
|
$record_path = $path;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue