From 74d034d7a941347981b0c060587bb8721b8d4263 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 4 Aug 2022 18:37:14 -0600 Subject: [PATCH] Work on missed_call field. --- app/xml_cdr/xml_cdr_inc.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index 7af4f44d6b..7a3810723f 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -45,7 +45,6 @@ //get post or get variables from http if (count($_REQUEST) > 0) { $cdr_id = $_REQUEST["cdr_id"]; - $missed = $_REQUEST["missed"]; $direction = $_REQUEST["direction"]; $caller_id_name = $_REQUEST["caller_id_name"]; $caller_id_number = $_REQUEST["caller_id_number"]; @@ -242,6 +241,7 @@ $sql .= "c.hangup_cause, \n"; $sql .= "c.duration, \n"; $sql .= "c.billmsec, \n"; + $sql .= "c.missed_call, \n"; $sql .= "c.record_path, \n"; $sql .= "c.record_name, \n"; $sql .= "c.xml_cdr_uuid, \n"; @@ -300,10 +300,6 @@ $sql .= "and false "; } } - if ($missed == true) { - $sql .= "and missed_call = 1 \n"; - $sql .= "and hangup_cause <> 'LOSE_RACE' "; - } if (strlen($start_epoch) > 0 && strlen($stop_epoch) > 0) { $sql .= "and start_epoch between :start_epoch and :stop_epoch \n"; $parameters['start_epoch'] = $start_epoch; @@ -470,8 +466,7 @@ $sql .= "and (answer_stamp is not null and bridge_uuid is null) "; break; case 'missed': - $sql .= "and missed_call = '1' "; - $sql .= "and hangup_cause <> 'LOSE_RACE' "; + $sql .= "and missed_call = true "; break; case 'cancelled': if ($direction == 'inbound' || $direction == 'local' || $call_result == 'missed') {