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 " \n"; //onchange='changeToInput".$select_id."(this);' if (strlen($select_value) > 0) { if ($select_type == "ivr") { echo " \n"; @@ -425,7 +429,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s } } else { - echo " \n"; } echo " \n"; @@ -675,6 +679,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s } unset ($prep_statement); */ + //list extensions $sql = "select * from v_extensions "; $sql .= "where domain_uuid = '$domain_uuid' "; @@ -690,7 +695,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s $extension = $row["extension"]; $context = $row["user_context"]; $description = $row["description"]; - if ("transfer ".$extension." XML ".$context == $select_value || "transfer:".$extension." XML ".$context == $select_value || "user/$extension@".$_SESSION['domains'][$domain_uuid]['domain_name'] == $select_value) { + if ("menu-exec-app:transfer ".$extension." XML ".$context == $select_value || "transfer:".$extension." XML ".$context == $select_value || "user/$extension@".$_SESSION['domains'][$domain_uuid]['domain_name'] == $select_value) { if ($select_type == "ivr") { echo " \n"; } @@ -1551,7 +1556,7 @@ function switch_select_destination($select_type, $select_label, $select_name, $s echo " \n"; if (if_group("superadmin")) { - echo ""; + echo ""; } }