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 = '';