From e0b37ae834b27d8966d6c0344818bbe8cde38cb6 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 5 Aug 2022 13:19:35 -0600 Subject: [PATCH] When call goes to voicemail mark it as missed. Add additional labels and change isset answer_stamp to use billsec greater than zero. --- app/xml_cdr/resources/classes/xml_cdr.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 146d680b31..fafa686416 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -375,18 +375,26 @@ if (!class_exists('xml_cdr')) { //set missed calls if (isset($xml->variables->missed_call)) { + //marked as missed $missed_call = $xml->variables->missed_call; } elseif (isset($xml->variables->fax_success)) { + //fax server $missed_call = 'false'; } elseif ($xml->variables->hangup_cause = 'LOSE_RACE') { + //ring group or multi destination bridge statement $missed_call = 'false'; } elseif ($xml->variables->hangup_cause = 'NO_ANSWER' && isset($xml->variables->originating_leg_uuid)) { + //ring group or multi destination bridge statement $missed_call = 'false'; } - elseif (isset($xml->variables->answer_stamp)) { + elseif (substr($xml->variables->destination_number, 0, 3) == '*99') { + //voicemail + $missed_call = 'false'; + } + elseif (isset($xml->variables->billsec) && $xml->variables->billsec > 0) { //answered call $missed_call = 'false'; }