From d2decc727a8595a51897f3804f4033ec880fe4d1 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 9 Jul 2014 07:36:13 +0000 Subject: [PATCH] Set the domain info once per inbound route dialplan --- resources/switch.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/switch.php b/resources/switch.php index cee1477a80..93c1c71710 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -2194,6 +2194,7 @@ function save_dialplan_xml() { foreach ($result as &$row) { $tmp = ""; $tmp .= "\n"; + $first_action = true; $dialplan_continue = ''; if ($row['dialplan_continue'] == "true") { @@ -2411,10 +2412,13 @@ function save_dialplan_xml() { if ($ent['dialplan_detail_tag'] == "action") { //set the domain info for the public context if ($row['dialplan_context'] == "public") { - $tmp .= " \n"; - $tmp .= " \n"; - $tmp .= " \n"; - $tmp .= " \n"; + if ($first_action) { + $tmp .= " \n"; + $tmp .= " \n"; + $tmp .= " \n"; + $tmp .= " \n"; + $first_action = false; + } } //get the action inline attribute $action_inline = '';