From 60d4a7c1be8691f6ad667cc3d03acda81a940c04 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 20 Feb 2024 13:12:52 -0700 Subject: [PATCH] Use the call status missed to find missed calls --- app/xml_cdr/resources/dashboard/missed_calls.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/resources/dashboard/missed_calls.php b/app/xml_cdr/resources/dashboard/missed_calls.php index 7a97d9584d..293eccc203 100644 --- a/app/xml_cdr/resources/dashboard/missed_calls.php +++ b/app/xml_cdr/resources/dashboard/missed_calls.php @@ -30,6 +30,7 @@ //get the missed calls from call detail records $sql = "select \n"; + $sql .= " status, \n"; $sql .= " direction, \n"; $sql .= " to_char(timezone(:time_zone, start_stamp), '".(!empty($_SESSION['domain']['time_format']) && $_SESSION['domain']['time_format']['text'] == '12h' ? "DD Mon HH12:MI am" : "DD Mon HH24:MI")."') as start_date_time, \n"; $sql .= " caller_id_name, \n"; @@ -43,7 +44,7 @@ $sql .= " direction = 'inbound' \n"; $sql .= " or direction = 'local' \n"; $sql .= " ) \n"; - $sql .= " and (missed_call = true or bridge_uuid is null) "; + $sql .= " and (status = 'missed') "; $sql .= " and hangup_cause <> 'LOSE_RACE' "; if (!permission_exists('xml_cdr_domain')) { if (!empty($assigned_extensions)) { @@ -168,7 +169,7 @@ echo "\n"; echo "\n"; if ($theme_cdr_images_exist) { - $call_result = ($row['answer_stamp'] != '') ? 'voicemail' : 'cancelled'; + $call_result = $row['status']; if (isset($row['direction'])) { echo " \n"; } @@ -190,4 +191,4 @@ echo ""; echo "\n"; -?> \ No newline at end of file +?>