Add 'check voicemail' option to the destination select list and move info, hangup and answer to advanced which only users in the superadmin group can see.
This commit is contained in:
parent
d089f7ded0
commit
b1f6136b6d
|
|
@ -1423,6 +1423,26 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
if ($select_type == "dialplan" || $select_type == "ivr") {
|
||||
//set the default value
|
||||
$selected = '';
|
||||
//check voicemail
|
||||
if ($select_type == "dialplan") {
|
||||
if ($select_value == "transfer:*98 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='transfer:*98 XML ".$_SESSION["context"]."' $selected>check voicemail</option>\n";
|
||||
}
|
||||
if ($select_type == "ivr") {
|
||||
if ($select_value == "menu-exec-app:transfer *98 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='menu-exec-app:transfer *98 XML ".$_SESSION["context"]."' $selected>check voicemail</option>\n";
|
||||
}
|
||||
//company directory
|
||||
if ($select_type == "dialplan") {
|
||||
if ($select_value == "transfer:*411 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='transfer:*411 XML ".$_SESSION["context"]."' $selected>company directory</option>\n";
|
||||
}
|
||||
if ($select_type == "ivr") {
|
||||
if ($select_value == "menu-exec-app:transfer *411 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='menu-exec-app:transfer *411 XML ".$_SESSION["context"]."' $selected>company directory</option>\n";
|
||||
}
|
||||
//advanced
|
||||
if (if_group("superadmin")) {
|
||||
//answer
|
||||
if ($select_value == "answer") { $selected = "selected='selected'"; }
|
||||
if ($select_type == "dialplan") {
|
||||
|
|
@ -1447,17 +1467,6 @@ function switch_select_destination($select_type, $select_label, $select_name, $s
|
|||
if ($select_type == "ivr") {
|
||||
echo " <option value='menu-exec-app:info' $selected>info</option>\n";
|
||||
}
|
||||
//company directory
|
||||
if ($select_type == "dialplan") {
|
||||
if ($select_value == "transfer:*411 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='transfer:*411 XML ".$_SESSION["context"]."' $selected>company directory</option>\n";
|
||||
}
|
||||
if ($select_type == "ivr") {
|
||||
if ($select_value == "menu-exec-app:transfer *411 XML ".$_SESSION["context"]) { $selected = "selected='selected'"; }
|
||||
echo " <option value='menu-exec-app:transfer *411 XML ".$_SESSION["context"]."' $selected>company directory</option>\n";
|
||||
}
|
||||
//advanced
|
||||
if (if_group("superadmin")) {
|
||||
//bridge
|
||||
if ($select_value == "bridge") { $selected = "selected='selected'"; }
|
||||
if ($select_type == "dialplan") {
|
||||
|
|
@ -2428,7 +2437,7 @@ function save_dialplan_xml() {
|
|||
mkdir($_SESSION['switch']['dialplan']['dir']."/".$row['dialplan_context'],0755,true);
|
||||
}
|
||||
if ($row['dialplan_context'] == "public") {
|
||||
if (count($_SESSION['domains']) > 1) {
|
||||
if (count($_SESSION['domains']) > 1 && strlen($row['domain_uuid']) > 0) {
|
||||
if (!is_dir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
mkdir($_SESSION['switch']['dialplan']['dir']."/public/".$_SESSION['domains'][$row['domain_uuid']]['domain_name'],0755,true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue