Make sure * is escaped for call flows in the dialplan. Also make sure the dialplan destination number is updated for changes to the extension number and for the feature code.
This commit is contained in:
parent
d875cb085d
commit
54e2f194de
|
|
@ -195,15 +195,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
if ($action == "add" || $action == "update") {
|
||||
|
||||
//if the dialplan entry does not exist then add it
|
||||
$sql = "select count(*) as num_rows from v_dialplans ";
|
||||
$sql = "delete from v_dialplans ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($row['num_rows'] == 0) {
|
||||
//create the dialplan entry for fax
|
||||
$db->query(check_sql($sql));
|
||||
|
||||
//add the dialplan entry
|
||||
$dialplan_name = $call_flow_name;
|
||||
$dialplan_order ='333';
|
||||
$dialplan_context = $call_flow_context;
|
||||
|
|
@ -278,7 +275,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$dialplan->dialplan_uuid = $dialplan_uuid;
|
||||
$dialplan->dialplan_detail_tag = 'condition'; //condition, action, antiaction
|
||||
$dialplan->dialplan_detail_type = 'destination_number';
|
||||
$dialplan->dialplan_detail_data = '^'.$call_flow_extension.'$';
|
||||
$dialplan->dialplan_detail_data = '^'.str_replace('*', '\*', $call_flow_extension).'$';
|
||||
//$dialplan->dialplan_detail_break = '';
|
||||
//$dialplan->dialplan_detail_inline = '';
|
||||
$dialplan->dialplan_detail_group = '2';
|
||||
|
|
@ -334,8 +331,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
//redirect the browser
|
||||
require_once "includes/header.php";
|
||||
|
|
|
|||
Loading…
Reference in New Issue