From 4c34f3d4beeb4d4d5b49de30226432f32bd65581 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 17 Apr 2020 12:53:50 -0600 Subject: [PATCH] Update xml_cdr.php --- app/xml_cdr/resources/classes/xml_cdr.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 8f15e920c8..3880ab4591 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -303,6 +303,14 @@ if (!class_exists('xml_cdr')) { $destination_number = urldecode($xml->variables->last_sent_callee_id_number); } + //remove the provider prefix + if (isset($xml->variables->provider_prefix) && isset($destination_number)) { + $provider_prefix = $xml->variables->provider_prefix; + if ($provider_prefix == substr($destination_number, 0, strlen($provider_prefix))) { + $destination_number = substr($destination_number, strlen($provider_prefix), strlen($destination_number)); + } + } + //set missed calls $missed_call = 'false'; if ($xml->variables->call_direction == 'local' || $xml->variables->call_direction == 'inbound') {