diff --git a/resources/switch.php b/resources/switch.php
index cdd2302cb7..03b10b3236 100644
--- a/resources/switch.php
+++ b/resources/switch.php
@@ -375,36 +375,40 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
//select_type can be ivr, dialplan, or call_center_contact
global $config, $db, $domain_uuid;
+ //remove special characters from the name
+ $select_id = str_replace("]", "", $select_name);
+ $select_id = str_replace("[", "_", $select_id);
+
if (if_group("superadmin")) {
echo "\n";
echo "\n";
@@ -414,7 +418,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
$selection_found = false;
if (if_group("superadmin")) {
- echo "