Update destination_edit.php
This commit is contained in:
parent
a03812c3f0
commit
77bdca8a6e
|
|
@ -93,7 +93,6 @@
|
|||
$destination_caller_id_number = check_str($_POST["destination_caller_id_number"]);
|
||||
$destination_cid_name_prefix = check_str($_POST["destination_cid_name_prefix"]);
|
||||
$destination_context = check_str($_POST["destination_context"]);
|
||||
$destination_action = check_str($_POST["destination_action"]);
|
||||
$fax_uuid = check_str($_POST["fax_uuid"]);
|
||||
$destination_enabled = check_str($_POST["destination_enabled"]);
|
||||
$destination_description = check_str($_POST["destination_description"]);
|
||||
|
|
@ -112,8 +111,16 @@
|
|||
$destination_app = $destination_array[0];
|
||||
$destination_data = $destination_array[1];
|
||||
unset($_POST["destination_action"]);
|
||||
//get the alternate destination app and data
|
||||
$destination_alternate_array = explode(":", $_POST["destination_alternate_action"], 2);
|
||||
$destination_alternate_app = $destination_alternate_array[0];
|
||||
$destination_alternate_data = $destination_alternate_array[1];
|
||||
unset($_POST["destination_alternate_action"]);
|
||||
//set the application and data
|
||||
$_POST["destination_app"] = $destination_app;
|
||||
$_POST["destination_data"] = $destination_data;
|
||||
$_POST["destination_alternate_app"] = $destination_alternate_app;
|
||||
$_POST["destination_alternate_data"] = $destination_alternate_data;
|
||||
//unset the db_destination_number
|
||||
unset($_POST["db_destination_number"]);
|
||||
}
|
||||
|
|
@ -244,6 +251,10 @@
|
|||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"call_direction=inbound\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_uuid=".$_SESSION['domain_uuid']."\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_name=".$_SESSION['domain_name']."\" inline=\"true\"/>\n";
|
||||
if (strlen($destination_alternate_app) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"hangup_after_bridge=true\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"continue_on_fail=true\" inline=\"true\"/>\n";
|
||||
}
|
||||
if (strlen($destination_cid_name_prefix) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"effective_caller_id_name=".$destination_cid_name_prefix."#\${caller_id_name}\" inline=\"true\"/>\n";
|
||||
}
|
||||
|
|
@ -268,6 +279,9 @@
|
|||
$dialplan["dialplan_xml"] .= " <action application=\"sleep\" data=\"3000\"/>\n";
|
||||
}
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"".$destination_app."\" data=\"".$destination_data."\"/>\n";
|
||||
if (strlen($destination_alternate_app) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"".$destination_alternate_app."\" data=\"".$destination_alternate_data."\"/>\n";
|
||||
}
|
||||
$dialplan["dialplan_xml"] .= " </condition>\n";
|
||||
$dialplan["dialplan_xml"] .= "</extension>\n";
|
||||
}
|
||||
|
|
@ -629,6 +643,8 @@
|
|||
$destination_context = $row["destination_context"];
|
||||
$destination_app = $row["destination_app"];
|
||||
$destination_data = $row["destination_data"];
|
||||
$destination_alternate_app = $row["destination_alternate_app"];
|
||||
$destination_alternate_data = $row["destination_alternate_data"];
|
||||
$fax_uuid = $row["fax_uuid"];
|
||||
$destination_enabled = $row["destination_enabled"];
|
||||
$destination_description = $row["destination_description"];
|
||||
|
|
@ -838,6 +854,9 @@
|
|||
echo "<td class='vtable' align='left'>\n";
|
||||
$destination_action = $destination_app.":".$destination_data;
|
||||
echo $destination->select('dialplan', 'destination_action', $destination_action);
|
||||
echo "<br />\n";
|
||||
$destination_alternate_action = $destination_alternate_app.":".$destination_alternate_data;
|
||||
echo $destination->select('dialplan', 'destination_alternate_action', $destination_alternate_action);
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue