From 87a707388956f79fa96f44147eb8438f1adafd32 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 1 Jun 2020 16:13:40 -0600 Subject: [PATCH] If you don't have xml_cdr_lose_race permission then hide the call. --- app/xml_cdr/resources/classes/xml_cdr.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index fc2d416f1d..614062045a 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -954,6 +954,9 @@ if (!class_exists('xml_cdr')) { $sql .= "filter ( \n"; $sql .= " where c.extension_uuid = e.extension_uuid \n"; $sql .= " and missed_call = true \n"; + if (!permission_exists('xml_cdr_lose_race')) { + $sql .= " and hangup_cause <> 'LOSE_RACE' \n"; + } if ($this->include_internal) { $sql .= " and (direction = 'inbound' or direction = 'local') "; } else { @@ -1007,6 +1010,9 @@ if (!class_exists('xml_cdr')) { $sql .= "count(*) \n"; $sql .= "filter ( \n"; $sql .= " where c.extension_uuid = e.extension_uuid \n"; + if (!permission_exists('xml_cdr_lose_race')) { + $sql .= " and hangup_cause <> 'LOSE_RACE' \n"; + } if ($this->include_internal) { $sql .= " and (direction = 'inbound' or direction = 'local') \n"; }