Use last_bridge_hangup_cause to determine status

This commit is contained in:
FusionPBX 2023-12-27 11:37:36 -07:00 committed by GitHub
parent 4919633568
commit 7de2ae0d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -507,7 +507,7 @@ if (!class_exists('xml_cdr')) {
//call center
$missed_call = 'false';
}
if (isset($xml->variables->cc_side) && $xml->variables->cc_side == 'member'
if (isset($xml->variables->cc_side) && $xml->variables->cc_side == 'member'
&& isset($xml->variables->cc_cause) && $xml->variables->cc_cause == 'cancel') {
//call center
$missed_call = 'true';
@ -580,6 +580,9 @@ if (!class_exists('xml_cdr')) {
if (in_array($xml->variables->hangup_cause, $failed_array)) {
$status = 'failed';
}
if (!isset($status) && in_array($xml->variables->last_bridge_hangup_cause, $failed_array)) {
$status = 'failed';
}
//set the provider id
if (isset($xml->variables->provider_uuid)) {
@ -1992,3 +1995,4 @@ if (!class_exists('xml_cdr')) {
}
?>