From 8b0065e4117c8e7db5bc83240a93249d6bb59f3e Mon Sep 17 00:00:00 2001 From: Digital Daz Date: Sat, 7 Feb 2015 18:20:03 +0000 Subject: [PATCH] Allow other modules callerID prefixes to propagate down if prefix is not populated. eg Destinations prefix. --- resources/switch.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/resources/switch.php b/resources/switch.php index e300a3ac6d..91c28406fa 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -2735,18 +2735,20 @@ if (!function_exists('save_call_center_xml')) { $dialplan->dialplan_detail_add(); unset($dialplan); - $dialplan = new dialplan; - $dialplan->domain_uuid = $domain_uuid; - $dialplan->dialplan_uuid = $dialplan_uuid; - $dialplan->dialplan_detail_tag = 'action'; //condition, action, antiaction - $dialplan->dialplan_detail_type = 'set'; - $dialplan->dialplan_detail_data = "effective_caller_id_name=".$queue_cid_prefix."-\${caller_id_name}"; - $dialplan->dialplan_detail_break = ''; - $dialplan->dialplan_detail_inline = ''; - $dialplan->dialplan_detail_group = '2'; - $dialplan->dialplan_detail_order = '040'; - $dialplan->dialplan_detail_add(); - unset($dialplan); + if (strlen($queue_cid_prefix) > 0) { + $dialplan = new dialplan; + $dialplan->domain_uuid = $domain_uuid; + $dialplan->dialplan_uuid = $dialplan_uuid; + $dialplan->dialplan_detail_tag = 'action'; //condition, action, antiaction + $dialplan->dialplan_detail_type = 'set'; + $dialplan->dialplan_detail_data = "effective_caller_id_name=".$queue_cid_prefix."-\${caller_id_name}"; + $dialplan->dialplan_detail_break = ''; + $dialplan->dialplan_detail_inline = ''; + $dialplan->dialplan_detail_group = '2'; + $dialplan->dialplan_detail_order = '040'; + $dialplan->dialplan_detail_add(); + unset($dialplan); + } $dialplan = new dialplan; $dialplan->domain_uuid = $domain_uuid;