Update dialplan_outbound_add.php
This commit is contained in:
parent
d3faaf1396
commit
b43d871cb0
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
Portions created by the Initial Developer are Copyright (C) 2008-2016
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -26,16 +26,20 @@
|
||||||
Riccardo Granchi <riccardo.granchi@nems.it>
|
Riccardo Granchi <riccardo.granchi@nems.it>
|
||||||
Gill Abada <ga@steadfasttelecom.com>
|
Gill Abada <ga@steadfasttelecom.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
include "root.php";
|
||||||
if (permission_exists('outbound_route_add')) {
|
require_once "resources/require.php";
|
||||||
//access granted
|
require_once "resources/check_auth.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('outbound_route_add')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
|
|
@ -154,7 +158,7 @@ else {
|
||||||
}
|
}
|
||||||
|
|
||||||
//process the http form values
|
//process the http form values
|
||||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
//check for all required data
|
//check for all required data
|
||||||
if (strlen($gateway) == 0) { $msg .= $text['message-provide'].": ".$text['label-gateway-name']."<br>\n"; }
|
if (strlen($gateway) == 0) { $msg .= $text['message-provide'].": ".$text['label-gateway-name']."<br>\n"; }
|
||||||
//if (strlen($gateway_2) == 0) { $msg .= "Please provide: Alternat 1<br>\n"; }
|
//if (strlen($gateway_2) == 0) { $msg .= "Please provide: Alternat 1<br>\n"; }
|
||||||
|
|
@ -179,7 +183,7 @@ else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(trim($_POST['dialplan_expression']))> 0) {
|
if (strlen(trim($_POST['dialplan_expression'])) > 0) {
|
||||||
|
|
||||||
$tmp_array = explode("\n", $_POST['dialplan_expression']);
|
$tmp_array = explode("\n", $_POST['dialplan_expression']);
|
||||||
|
|
||||||
|
|
@ -551,6 +555,13 @@ else {
|
||||||
} //end for each
|
} //end for each
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update the dialplan xml
|
||||||
|
$dialplans = new dialplan;
|
||||||
|
$dialplans->source = "details";
|
||||||
|
$dialplans->destination = "database";
|
||||||
|
$dialplans->uuid = $dialplan_uuid;
|
||||||
|
$dialplans->xml();
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
$cache->delete("dialplan:".$dialplan_context);
|
$cache->delete("dialplan:".$dialplan_context);
|
||||||
|
|
@ -1026,4 +1037,4 @@ function type_onchange(dialplan_detail_type) {
|
||||||
|
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue