Support upcoming change in freeswitch - bridge_uuid changes to bridge_uuids array (#6531)

This commit is contained in:
demonspork 2023-01-27 11:18:35 -06:00 committed by GitHub
parent 21b639cd8e
commit a3811128af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -427,6 +427,11 @@ if (!class_exists('xml_cdr')) {
//missed call
$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
$uuid = urldecode($xml->variables->uuid);
@ -442,7 +447,7 @@ if (!class_exists('xml_cdr')) {
$this->array[$key]['caller_destination'] = $caller_destination;
$this->array[$key]['accountcode'] = urldecode($xml->variables->accountcode);
$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]['sip_hangup_disposition'] = urldecode($xml->variables->sip_hangup_disposition);
$this->array[$key]['pin_number'] = urldecode($xml->variables->pin_number);
@ -678,7 +683,7 @@ if (!class_exists('xml_cdr')) {
}
}
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;
if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
$record_path = $path;
@ -705,7 +710,7 @@ if (!class_exists('xml_cdr')) {
//last check
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;
if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
$record_path = $path;