Call flows make sure the dialplan detail is deleted.

This commit is contained in:
Mark Crane 2012-09-20 09:05:12 +00:00
parent 54e2f194de
commit bc7930f23f
1 changed files with 8 additions and 1 deletions

View File

@ -194,12 +194,19 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if ($action == "add" || $action == "update") {
//if the dialplan entry does not exist then add it
//delete the dialplan
$sql = "delete from v_dialplans ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' ";
$db->query(check_sql($sql));
//delete the dialplan details
$sql = "delete from v_dialplan_details ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
$db->query($sql);
unset($sql);
//add the dialplan entry
$dialplan_name = $call_flow_name;
$dialplan_order ='333';