From 1b6bf49a62b8cb9a9f1a6b26e23da3882d60fd09 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 15 Jul 2023 23:43:19 -0600 Subject: [PATCH] Update xml_cdr_details.php --- app/xml_cdr/xml_cdr_details.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index 7e1765c378..b4a2512de2 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -158,7 +158,7 @@ $array["callflow"][0] = $tmp; } $x = 0; - if (is_array($array["callflow"])) foreach ($array["callflow"] as $row) { + if (!empty($array["callflow"])) foreach ($array["callflow"] as $row) { if ($x == 0) { $destination_number = urldecode($row["caller_profile"]["destination_number"]); $context = urldecode($row["caller_profile"]["context"]); @@ -168,12 +168,18 @@ $caller_id_number = urldecode($row["caller_profile"]["caller_id_number"]); $call_flow_summary[$x]["destination_number"] = urldecode($row["caller_profile"]["destination_number"]); - $tmp_start_stamp = urldecode($row["times"]["profile_created_time"]) / 1000000; + if (isset($row["times"]["profile_created_time"])) { + $tmp_start_stamp = urldecode($row["times"]["profile_created_time"]) / 1000000; + } if ($x == 0) { - $tmp_end_stamp = urldecode($row["times"]["hangup_time"]) / 1000000; + if (isset($row["times"]["hangup_time"])) { + $tmp_end_stamp = urldecode($row["times"]["hangup_time"]) / 1000000; + } } else { - $tmp_end_stamp = urldecode($row["times"]["transfer_time"]) / 1000000; + if (isset($row["times"]["transfer_time"])) { + $tmp_end_stamp = urldecode($row["times"]["transfer_time"]) / 1000000; + } } $call_flow_summary[$x]["start_stamp"] = date("Y-m-d H:i:s", (int) $tmp_start_stamp); $call_flow_summary[$x]["end_stamp"] = date("Y-m-d H:i:s", (int) $tmp_end_stamp);