From 28f94e1268619bb07a78b40600504fa7c85b5cfa Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 19 Nov 2024 13:45:39 -0700 Subject: [PATCH] Fix ring group missed call to show in CDR --- app/xml_cdr/resources/classes/xml_cdr.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 8ae6de023c..952765b72b 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -484,10 +484,6 @@ if (!class_exists('xml_cdr')) { } //set missed calls - if (isset($xml->variables->missed_call)) { - //marked as missed - $missed_call = $xml->variables->missed_call; - } if (isset($call_direction) && $call_direction == 'inbound' && isset($xml->variables->hangup_cause) && $xml->variables->hangup_cause == 'ORIGINATOR_CANCEL') { @@ -526,6 +522,10 @@ if (!class_exists('xml_cdr')) { //voicemail $missed_call = 'true'; } + if (isset($xml->variables->missed_call) && $xml->variables->missed_call == 'true') { + //marked as missed + $missed_call = 'true'; + } //read the bridge statement variables if (isset($xml->variables->last_app)) { @@ -579,9 +579,6 @@ if (!class_exists('xml_cdr')) { if ($xml->variables->hangup_cause == 'NO_ANSWER') { $status = 'no_answer'; } - if ($missed_call == 'true') { - $status = 'missed'; - } if (substr($destination_number, 0, 3) == '*99') { $status = 'voicemail'; } @@ -606,6 +603,9 @@ if (!class_exists('xml_cdr')) { if (!isset($status) && $xml->variables->billsec == 0) { $status = 'no_answer'; } + if ($missed_call == 'true') { + $status = 'missed'; + } //set the key $key = 'xml_cdr';