Clear memcache as needed.

This commit is contained in:
Mark Crane
2013-01-16 00:26:48 +00:00
parent 6cc270827f
commit 751b1c721c
40 changed files with 404 additions and 131 deletions
@@ -170,6 +170,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize the configuration //syncrhonize the configuration
save_call_center_xml(); save_call_center_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the user //redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_center_queues.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=call_center_queues.php\">\n";
@@ -209,6 +216,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize the configuration //syncrhonize the configuration
save_call_center_xml(); save_call_center_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the user //redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_center_queue.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=call_center_queue.php\">\n";
+7
View File
@@ -77,6 +77,13 @@ if (strlen($id)>0) {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+7
View File
@@ -339,6 +339,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the browser //redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=call_flows.php\">\n";
@@ -87,7 +87,7 @@ include "root.php";
//delete extension from memcache //delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) { if ($fp) {
$switch_cmd .= "memcache delete directory:".$this->extension."@".$this->domain_name; $switch_cmd = "memcache delete directory:".$this->extension."@".$this->domain_name;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
@@ -113,7 +113,7 @@ include "root.php";
//delete extension from memcache //delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) { if ($fp) {
$switch_cmd .= "memcache delete directory:".$this->extension."@".$this->domain_name; $switch_cmd = "memcache delete directory:".$this->extension."@".$this->domain_name;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
@@ -330,7 +330,7 @@ include "root.php";
//delete extension from memcache //delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) { if ($fp) {
$switch_cmd .= "memcache delete directory:".$this->extension."@".$this->domain_name; $switch_cmd = "memcache delete directory:".$this->extension."@".$this->domain_name;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
@@ -72,6 +72,13 @@ if (strlen($id)>0) {
$db->query($sql); $db->query($sql);
unset($sql); unset($sql);
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//syncrhonize configuration //syncrhonize configuration
save_dialplan_xml(); save_dialplan_xml();
@@ -264,6 +264,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "and dialplan_uuid = '$dialplan_uuid' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
$db->query($sql); $db->query($sql);
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//save the xml //save the xml
save_dialplan_xml(); save_dialplan_xml();
+8
View File
@@ -83,6 +83,14 @@ if (strlen($id)>0) {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+23 -28
View File
@@ -217,20 +217,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$dialplan_detail_group = '2'; $dialplan_detail_group = '2';
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data); dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
//save the xml
save_dialplan_xml();
//apply settings reminder
$_SESSION["reload_xml"] = true;
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-add']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($action == "add") } //if ($action == "add")
if ($action == "update") { if ($action == "update") {
@@ -285,21 +271,30 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "and dialplan_uuid = '$dialplan_uuid' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
$db->query($sql); $db->query($sql);
//save the xml
save_dialplan_xml();
//apply settings reminder
$_SESSION["reload_xml"] = true;
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($action == "update") } //if ($action == "update")
//save the xml
save_dialplan_xml();
//apply settings reminder
$_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($_POST["persistformvar"] != "true") } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
+15 -7
View File
@@ -240,13 +240,21 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
require_once "includes/header.php"; //delete the dialplan context from memcache
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n"; $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
echo "<div align='center'>\n"; if ($fp) {
echo "Update Complete\n"; $switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
echo "</div>\n"; $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
require_once "includes/footer.php"; }
return;
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
?><script type="text/javascript"> ?><script type="text/javascript">
+7
View File
@@ -136,6 +136,13 @@ else {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the user //redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
switch ($app_uuid) { switch ($app_uuid) {
+7
View File
@@ -78,6 +78,13 @@ if (strlen($dialplan_uuid)>0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+6
View File
@@ -56,6 +56,12 @@ if (strlen($id)>0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+14 -1
View File
@@ -134,6 +134,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
@@ -166,8 +173,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
require_once "includes/header.php"; //delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
echo "Update Complete\n"; echo "Update Complete\n";
+7
View File
@@ -176,6 +176,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$dialplan_context."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
@@ -563,6 +563,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//commit the atomic transaction //commit the atomic transaction
$count = $db->exec("COMMIT;"); //returns affected rows $count = $db->exec("COMMIT;"); //returns affected rows
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:public@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
@@ -553,14 +553,15 @@ else {
unset($action_data); unset($action_data);
} //if strlen } //if strlen
} //end for each } //end for each
//synchronize the xml config
save_dialplan_xml();
//changes in the dialplan may affect routes in the hunt groups
save_hunt_group_xml();
} }
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$dialplan_context."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
+1 -1
View File
@@ -550,7 +550,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//delete extension from memcache //delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) { if ($fp) {
$switch_cmd .= "memcache delete directory:".$extension."@".$_SESSION['domain_name']; $switch_cmd = "memcache delete directory:".$extension."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
+7
View File
@@ -87,6 +87,13 @@ else {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd .= "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+10
View File
@@ -124,12 +124,14 @@ else {
//set the variables //set the variables
$user_uuid = check_str($_REQUEST["user_uuid"]); $user_uuid = check_str($_REQUEST["user_uuid"]);
$fax_uuid = check_str($_REQUEST["id"]); $fax_uuid = check_str($_REQUEST["id"]);
//delete the group from the users //delete the group from the users
$sql = "delete from v_fax_users "; $sql = "delete from v_fax_users ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and fax_uuid = '".$fax_uuid."' "; $sql .= "and fax_uuid = '".$fax_uuid."' ";
$sql .= "and user_uuid = '".$user_uuid."' "; $sql .= "and user_uuid = '".$user_uuid."' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
//redirect the browser //redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n";
@@ -159,6 +161,7 @@ else {
$sql_insert .= "'".$user_uuid."' "; $sql_insert .= "'".$user_uuid."' ";
$sql_insert .= ")"; $sql_insert .= ")";
$db->exec($sql_insert); $db->exec($sql_insert);
//redirect the browser //redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fax_edit.php?id=$fax_uuid\">\n";
@@ -453,6 +456,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd .= "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the browser //redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fax.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fax.php\">\n";
+7
View File
@@ -247,6 +247,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the user //redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n";
+7
View File
@@ -67,6 +67,13 @@ if (strlen($id)>0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+9 -2
View File
@@ -41,15 +41,22 @@ if (count($_GET)>0) {
if (strlen($id)>0) { if (strlen($id)>0) {
//delete the data //delete the data
$sql = ""; $sql = "delete from v_dialplan_details ";
$sql .= "delete from v_dialplan_details ";
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and dialplan_detail_uuid = '$id' "; $sql .= "and dialplan_detail_uuid = '$id' ";
$sql .= "and dialplan_uuid = '$dialplan_uuid' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
$db->query($sql); $db->query($sql);
unset($sql); unset($sql);
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+14
View File
@@ -115,6 +115,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo_edit.php?id=".$dialplan_uuid."\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo_edit.php?id=".$dialplan_uuid."\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
@@ -140,6 +147,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo_edit.php?id=".$dialplan_uuid."\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo_edit.php?id=".$dialplan_uuid."\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
+14
View File
@@ -120,6 +120,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
@@ -146,6 +153,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=fifo.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
+7 -2
View File
@@ -40,8 +40,6 @@ else {
$text[$key] = $value[$_SESSION['domain']['language']['code']]; $text[$key] = $value[$_SESSION['domain']['language']['code']];
} }
if (strlen($_GET["id"])>0) { if (strlen($_GET["id"])>0) {
//set the variable //set the variable
$id = check_str($_GET["id"]); $id = check_str($_GET["id"]);
@@ -98,6 +96,13 @@ if (strlen($_GET["id"])>0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the gateways from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete configuration:sofia.conf";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//rescan the sip profile to look for new or stopped gateways //rescan the sip profile to look for new or stopped gateways
//create the event socket connection and send a command //create the event socket connection and send a command
if (!$fp) { if (!$fp) {
+7
View File
@@ -240,6 +240,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//delete the sip profiles from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete configuration:sofia.conf";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//rescan the external profile to look for new or stopped gateways //rescan the external profile to look for new or stopped gateways
//create the event socket connection //create the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
+20 -1
View File
@@ -35,7 +35,7 @@ else {
} }
if (count($_GET)>0) { if (count($_GET)>0) {
$id = $_GET["id"]; $id = check_str($_GET["id"]);
} }
//delete the extension //delete the extension
@@ -52,6 +52,25 @@ if (count($_GET)>0) {
unset($prep_statement, $sql); unset($prep_statement, $sql);
} }
//get the extension
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and extension_uuid = '$id' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$extension = $row["extension"];
}
unset ($prep_statement);
//delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete directory:".$extension."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the user //redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=index.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=index.php\">\n";
+21 -1
View File
@@ -109,6 +109,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
} }
//update the extension //update the extension
if ($action == "update" && permission_exists('extension_edit')) { if ($action == "update" && permission_exists('extension_edit')) {
$sql = "update v_extensions set "; $sql = "update v_extensions set ";
@@ -124,6 +125,26 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
} }
//get the extension
$sql = "select * from v_extensions ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and extension_uuid = '$extension_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$extension = $row["extension"];
}
unset ($prep_statement);
//delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete directory:".$extension."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//show the action and redirect the user //show the action and redirect the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=index.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=index.php\">\n";
@@ -166,7 +187,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$password = $row["password"]; $password = $row["password"];
$vm_password = $row["vm_password"]; $vm_password = $row["vm_password"];
$vm_password = str_replace("#", "", $vm_password); //preserves leading zeros $vm_password = str_replace("#", "", $vm_password); //preserves leading zeros
} }
unset ($prep_statement); unset ($prep_statement);
} }
+7
View File
@@ -91,6 +91,13 @@ if (strlen($id)>0) {
//synchronize the xml config //synchronize the xml config
save_hunt_group_xml(); save_hunt_group_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+7
View File
@@ -254,6 +254,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_hunt_group_xml(); save_hunt_group_xml();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//rediret the user //rediret the user
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=hunt_groups.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=hunt_groups.php\">\n";
+12 -20
View File
@@ -208,31 +208,23 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n";
echo "Add Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} }
//update the data //update the data
if ($action == "update" && permission_exists('ivr_menu_edit')) { if ($action == "update" && permission_exists('ivr_menu_edit')) {
//run the update method in the ivr menu class //run the update method in the ivr menu class
$ivr->ivr_menu_uuid = $ivr_menu_uuid; $ivr->ivr_menu_uuid = $ivr_menu_uuid;
$ivr->update(); $ivr->update();
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} }
//redirect the user
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ivr_menus.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //if ($_POST["persistformvar"] != "true") } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
@@ -346,6 +346,13 @@ require_once "includes/classes/switch_dialplan.php";
$database->fields['ivr_menu_option_description'] = $this->ivr_menu_option_description; $database->fields['ivr_menu_option_description'] = $this->ivr_menu_option_description;
$database->add(); $database->add();
} }
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd .= "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
public function update() { public function update() {
@@ -690,25 +697,32 @@ require_once "includes/classes/switch_dialplan.php";
$database->delete(); $database->delete();
} }
//delete child data //delete child data
$database->table = "v_ivr_menu_options"; $database->table = "v_ivr_menu_options";
$database->where[0]['name'] = 'domain_uuid'; $database->where[0]['name'] = 'domain_uuid';
$database->where[0]['value'] = $this->domain_uuid; $database->where[0]['value'] = $this->domain_uuid;
$database->where[0]['operator'] = '='; $database->where[0]['operator'] = '=';
$database->where[1]['name'] = 'ivr_menu_uuid'; $database->where[1]['name'] = 'ivr_menu_uuid';
$database->where[1]['value'] = $this->ivr_menu_uuid; $database->where[1]['value'] = $this->ivr_menu_uuid;
$database->where[1]['operator'] = '='; $database->where[1]['operator'] = '=';
$database->delete(); $database->delete();
//delete parent data //delete parent data
$database->table = "v_ivr_menus"; $database->table = "v_ivr_menus";
$database->where[0]['name'] = 'domain_uuid'; $database->where[0]['name'] = 'domain_uuid';
$database->where[0]['value'] = $this->domain_uuid; $database->where[0]['value'] = $this->domain_uuid;
$database->where[0]['operator'] = '='; $database->where[0]['operator'] = '=';
$database->where[1]['name'] = 'ivr_menu_uuid'; $database->where[1]['name'] = 'ivr_menu_uuid';
$database->where[1]['value'] = $this->ivr_menu_uuid; $database->where[1]['value'] = $this->ivr_menu_uuid;
$database->where[1]['operator'] = '='; $database->where[1]['operator'] = '=';
$database->delete(); $database->delete();
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//commit the transaction //commit the transaction
//$count = $database->db->exec("COMMIT;"); //$count = $database->db->exec("COMMIT;");
+12
View File
@@ -59,28 +59,40 @@ else {
$dialplan_uuid = $row["dialplan_uuid"]; $dialplan_uuid = $row["dialplan_uuid"];
} }
unset ($prep_statement); unset ($prep_statement);
//delete from the ring groups table //delete from the ring groups table
$sql = "delete from v_ring_groups "; $sql = "delete from v_ring_groups ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and ring_group_uuid = '".$id."' "; $sql .= "and ring_group_uuid = '".$id."' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
//delete from the ring group extensions table //delete from the ring group extensions table
$sql = "delete from v_ring_group_extensions "; $sql = "delete from v_ring_group_extensions ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and ring_group_uuid = '".$id."' "; $sql .= "and ring_group_uuid = '".$id."' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
//delete from the dialplan //delete from the dialplan
$sql = "delete from v_dialplans "; $sql = "delete from v_dialplans ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and dialplan_uuid = '".$dialplan_uuid."' "; $sql .= "and dialplan_uuid = '".$dialplan_uuid."' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
unset($sql); unset($sql);
//save the xml //save the xml
save_dialplan_xml(); save_dialplan_xml();
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the user //redirect the user
+7
View File
@@ -273,6 +273,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
} }
} }
//delete the dialplan context from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//redirect the browser //redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=ring_groups_edit.php?id=$ring_group_uuid\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=ring_groups_edit.php?id=$ring_group_uuid\">\n";
+6
View File
@@ -63,6 +63,12 @@ if (strlen($id)>0) {
//apply settings reminder //apply settings reminder
$_SESSION["reload_xml"] = true; $_SESSION["reload_xml"] = true;
//delete the sip profiles from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete configuration:sofia.conf";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
} }
//redirect the browser //redirect the browser
+33 -31
View File
@@ -74,39 +74,42 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//add or update the database //add or update the database
if ($_POST["persistformvar"] != "true") { if ($_POST["persistformvar"] != "true") {
if ($action == "add") { //add the sip profile
$sql = "insert into v_sip_profiles "; if ($action == "add") {
$sql .= "("; $sql = "insert into v_sip_profiles ";
$sql .= "sip_profile_uuid, "; $sql .= "(";
$sql .= "sip_profile_name, "; $sql .= "sip_profile_uuid, ";
$sql .= "sip_profile_description "; $sql .= "sip_profile_name, ";
$sql .= ")"; $sql .= "sip_profile_description ";
$sql .= "values "; $sql .= ")";
$sql .= "("; $sql .= "values ";
$sql .= "'".uuid()."', "; $sql .= "(";
$sql .= "'$sip_profile_name', "; $sql .= "'".uuid()."', ";
$sql .= "'$sip_profile_description' "; $sql .= "'$sip_profile_name', ";
$sql .= ")"; $sql .= "'$sip_profile_description' ";
$db->exec(check_sql($sql)); $sql .= ")";
unset($sql); $db->exec(check_sql($sql));
unset($sql);
} //if ($action == "add")
require_once "includes/header.php"; //update the sip profile
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles.php\">\n"; if ($action == "update") {
echo "<div align='center'>\n"; $sql = "update v_sip_profiles set ";
echo "Add Complete\n"; $sql .= "sip_profile_name = '$sip_profile_name', ";
echo "</div>\n"; $sql .= "sip_profile_description = '$sip_profile_description' ";
require_once "includes/footer.php"; $sql .= "where sip_profile_uuid = '$sip_profile_uuid'";
return; $db->exec(check_sql($sql));
} //if ($action == "add") unset($sql);
} //if ($action == "update")
if ($action == "update") { //delete the sip profiles from memcache
$sql = "update v_sip_profiles set "; $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
$sql .= "sip_profile_name = '$sip_profile_name', "; if ($fp) {
$sql .= "sip_profile_description = '$sip_profile_description' "; $switch_cmd = "memcache delete configuration:sofia.conf";
$sql .= "where sip_profile_uuid = '$sip_profile_uuid'"; $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
$db->exec(check_sql($sql)); }
unset($sql);
//redirect the browser
require_once "includes/header.php"; require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles.php\">\n"; echo "<meta http-equiv=\"refresh\" content=\"2;url=sip_profiles.php\">\n";
echo "<div align='center'>\n"; echo "<div align='center'>\n";
@@ -114,7 +117,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</div>\n"; echo "</div>\n";
require_once "includes/footer.php"; require_once "includes/footer.php";
return; return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true") } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
+15 -7
View File
@@ -475,13 +475,21 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
require_once "includes/header.php"; //delete the dialplan context from memcache
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1\">\n"; $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
echo "<div align='center'>\n"; if ($fp) {
echo "".$text['confirm-update-complete']."\n"; $switch_cmd = "memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name'];
echo "</div>\n"; $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
require_once "includes/footer.php"; }
return;
//redirect the browser
require_once "includes/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update-complete']."\n";
echo "</div>\n";
require_once "includes/footer.php";
return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
+3 -3
View File
@@ -386,13 +386,13 @@ include "root.php";
function generate_xml($single=1){ function generate_xml($single=1){
//switch_account_code!! How should we be passing this?? //switch_account_code!! How should we be passing this??
if ($this->enabled== "false" || !$this->enabled) { if ($this->enabled== "false" || !$this->enabled) {
return false;//This the best way?? return false;//This the best way??
} }
$this->vm_password = str_replace("#", "", $this->vm_password); //preserves leading zeros//**Generic Validation! $this->vm_password = str_replace("#", "", $this->vm_password); //preserves leading zeros//**Generic Validation!
/*if(!in_array($this->vm_enabled,array("false","true"))) {//**Generic Validation! /*if(!in_array($this->vm_enabled,array("false","true"))) {//**Generic Validation!
$this->vm_enabled = "true"; $this->vm_enabled = "true";
} }