From 2d4c65abee10ce1173e4a8fbcd32a43e855d3e79 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 19 Nov 2021 15:47:54 -0700 Subject: [PATCH] Simplify missed call handling. --- app/xml_cdr/resources/classes/xml_cdr.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 4b68d68ada..9e2499777a 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -340,14 +340,12 @@ if (!class_exists('xml_cdr')) { } //set missed calls - $missed_call = 'false'; - if ($xml->variables->missed_call == 'true') { - $missed_call = 'true'; + if (isset($xml->variables->answer_stamp) && isset($xml->variables->bridge_uuid)) { + //answered call + $missed_call = 'false'; } - elseif ($xml->variables->cc_side != "agent" && strlen($xml->variables->originating_leg_uuid) == 0 && $xml->variables->call_direction != 'outbound' && strlen($xml->variables->answer_stamp) == 0) { - $missed_call = 'true'; - } - elseif ($xml->variables->voicemail_action == "save" && strlen($xml->variables->bridge_uuid) > 0) { + else { + //missed call $missed_call = 'true'; }