Update the memcache reference to use the new cache PHP class.
This commit is contained in:
parent
495f4a0226
commit
bee6b9ae5e
|
|
@ -49,41 +49,37 @@ else {
|
|||
|
||||
//delete the extension
|
||||
if (strlen($id)>0) {
|
||||
//read the call_block_number
|
||||
$sql = " select c.call_block_number, d.domain_name from v_call_block as c ";
|
||||
$sql .= "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and c.call_block_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
if ($result_count > 0) {
|
||||
$call_block_number = $result[0]["call_block_number"];
|
||||
$domain_name = $result[0]["domain_name"];
|
||||
|
||||
//read the call_block_number
|
||||
$sql = " select c.call_block_number, d.domain_name from v_call_block as c ";
|
||||
$sql .= "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and c.call_block_uuid = '$id' ";
|
||||
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
$result_count = count($result);
|
||||
if ($result_count > 0) {
|
||||
$call_block_number = $result[0]["call_block_number"];
|
||||
$domain_name = $result[0]["domain_name"];
|
||||
|
||||
//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 app:call_block:".$domain_name.":".$call_block_number;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
}
|
||||
unset ($prep_statement, $sql);
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("app:call_block:".$domain_name.":".$call_block_number);
|
||||
}
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
$sql = "delete from v_call_block ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and call_block_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
//delete the call block
|
||||
$sql = "delete from v_call_block ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql .= "and call_block_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
}
|
||||
|
||||
|
||||
$_SESSION["message"] = $text['label-delete-complete'];
|
||||
header("Location: call_block.php");
|
||||
return;
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['label-delete-complete'];
|
||||
header("Location: call_block.php");
|
||||
return;
|
||||
|
||||
?>
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is FusionPBX
|
||||
The Original Code is FusionPBX
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -158,7 +158,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
return;
|
||||
} //if ($action == "add")
|
||||
|
||||
if ($action == "update") {
|
||||
if ($action == "update") {
|
||||
$sql = " select c.call_block_number, d.domain_name from v_call_block as c ";
|
||||
$sql .= "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid ";
|
||||
$sql .= "where c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
|
|
@ -172,12 +172,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$call_block_number = $result[0]["call_block_number"];
|
||||
$domain_name = $result[0]["domain_name"];
|
||||
|
||||
//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 app:call_block:".$domain_name.":".$call_block_number;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("app:call_block:".$domain_name.":".$call_block_number);
|
||||
}
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ if (strlen($id) > 0) {
|
|||
$db->query($sql);
|
||||
unset($sql);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("memcache delete dialplan:".$_SESSION["context"]);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
||||
|
|
@ -92,8 +96,8 @@ if (strlen($id) > 0) {
|
|||
$_SESSION["reload_xml"] = true;
|
||||
}
|
||||
|
||||
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
header("Location: call_center_queues.php");
|
||||
return;
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
header("Location: call_center_queues.php");
|
||||
return;
|
||||
?>
|
||||
|
|
@ -283,12 +283,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//syncrhonize the configuration
|
||||
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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("memcache delete dialplan:".$_SESSION["context"]);
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
} //if ($action == "update")
|
||||
|
|
|
|||
|
|
@ -342,12 +342,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
//delete the cache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "memcache delete dialplan:".$call_flow_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("memcache delete dialplan:".$call_flow_context);
|
||||
|
||||
//set the message
|
||||
if ($action == "add") {
|
||||
|
|
|
|||
|
|
@ -372,12 +372,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
|
||||
//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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("memcache delete directory:".$extension."@".$_SESSION['domain_name']);
|
||||
|
||||
//redirect the user
|
||||
$_SESSION["message"] = $text['confirm-update'];
|
||||
|
|
|
|||
|
|
@ -78,12 +78,9 @@ if (strlen($id)>0) {
|
|||
$db->query($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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_dialplan_xml();
|
||||
|
|
|
|||
|
|
@ -259,12 +259,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$sql .= "and dialplan_uuid = '$dialplan_uuid' ";
|
||||
$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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("memcache delete dialplan:".$_SESSION["context"]."@".$_SESSION['domain_name']);
|
||||
|
||||
//save the xml
|
||||
save_dialplan_xml();
|
||||
|
|
|
|||
|
|
@ -84,18 +84,15 @@ if (strlen($id)>0) {
|
|||
//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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$_SESSION["message"] = $text['confirm-delete'];
|
||||
header("Location: conferences.php");
|
||||
return;
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['confirm-delete'];
|
||||
header("Location: conferences.php");
|
||||
return;
|
||||
|
||||
?>
|
||||
|
|
@ -279,15 +279,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
header("Location: conferences.php");
|
||||
return;
|
||||
//redirect the browser
|
||||
header("Location: conferences.php");
|
||||
return;
|
||||
|
||||
} //if ($_POST["persistformvar"] != "true")
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -93,12 +93,9 @@ else {
|
|||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
//clear 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:".$destination_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$destination_context);
|
||||
|
||||
//redirect the user
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2013-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2013-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
|
|||
|
|
@ -100,14 +100,11 @@ else {
|
|||
//strip duplicate contexts
|
||||
$dialplan_contexts = array_unique($dialplan_contexts, SORT_STRING);
|
||||
|
||||
//delete the dialplan contexts from memcache
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
if (sizeof($dialplan_contexts) > 0) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
foreach($dialplan_contexts as $dialplan_context) {
|
||||
$switch_cmd = "memcache delete dialplan:".$dialplan_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
foreach($dialplan_contexts as $dialplan_context) {
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010-2014
|
||||
Copyright (C) 2010-2015
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
|
|||
|
|
@ -647,12 +647,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//commit the atomic transaction
|
||||
$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";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:public");
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ else {
|
|||
//show the header
|
||||
require_once "resources/header.php";
|
||||
$document['title'] = $text['title-dialplan-outbound-add'];
|
||||
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//get the http post values and set theme as php variables
|
||||
|
|
@ -62,11 +61,11 @@ else {
|
|||
$gateway = check_str($_POST["gateway"]);
|
||||
$limit = check_str($_POST["limit"]);
|
||||
$accountcode = check_str($_POST["accountcode"]);
|
||||
|
||||
$toll_allow_enable = check_str($_POST["toll_allow_enabled"]);
|
||||
|
||||
//set default to enabled
|
||||
if (strlen($toll_allow_enable) == 0) { $toll_allow_enable = "false"; }
|
||||
|
||||
|
||||
//set the default type
|
||||
$gateway_type = 'gateway';
|
||||
$gateway_2_type = 'gateway';
|
||||
|
|
@ -265,13 +264,13 @@ else {
|
|||
$label = $dialplan_expression;
|
||||
$abbrv = filename_safe($dialplan_expression);
|
||||
}
|
||||
|
||||
|
||||
// Use as outbound prefix all digits beetwen ^ and first (
|
||||
$tmp_prefix = preg_replace("/^\^(\d{1,})\(.*/", "$1", $dialplan_expression);
|
||||
$tmp_prefix == $dialplan_expression
|
||||
? $outbound_prefix = ""
|
||||
: $outbound_prefix = $tmp_prefix;
|
||||
|
||||
|
||||
if ($gateway_type == "gateway") {
|
||||
$dialplan_name = $gateway_name.".".$abbrv;
|
||||
$action_data = "sofia/gateway/".$gateway_uuid."/".$prefix_number."\$1";
|
||||
|
|
@ -532,19 +531,17 @@ else {
|
|||
} //end for each
|
||||
}
|
||||
|
||||
//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;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
|
||||
//synchronize the xml config
|
||||
save_dialplan_xml();
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3");
|
||||
return;
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3");
|
||||
return;
|
||||
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,24 @@ else {
|
|||
}
|
||||
|
||||
//check for the id
|
||||
if (count($_GET)>0) {
|
||||
$id = $_GET["id"];
|
||||
if (count($_GET) > 0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
if (strlen($id)>0) {
|
||||
if (strlen($id) > 0) {
|
||||
|
||||
//get the user_context
|
||||
$sql = "select extension, user_context from v_extensions ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['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"];
|
||||
$user_context = $row["user_context"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//delete the extension
|
||||
$sql = "delete from v_extensions ";
|
||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||
|
|
@ -60,17 +74,20 @@ else {
|
|||
$prep_statement->execute();
|
||||
unset($prep_statement, $sql);
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$extension."@".$user_context);
|
||||
|
||||
//synchronize configuration
|
||||
if (is_readable($_SESSION['switch']['extensions']['dir'])) {
|
||||
require_once "app/extensions/resources/classes/extension.php";
|
||||
$extension = new extension;
|
||||
$extension->xml();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
header("Location: extensions.php");
|
||||
return;
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
header("Location: extensions.php");
|
||||
return;
|
||||
|
||||
?>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2008-2014 All Rights Reserved.
|
||||
Copyright (C) 2008-2015 All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
|
|
@ -659,12 +659,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$ext = new extension;
|
||||
}
|
||||
|
||||
//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."@".$user_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$extension."@".$user_context);
|
||||
}
|
||||
|
||||
//show the action and redirect the user
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -46,7 +46,7 @@ else {
|
|||
}
|
||||
|
||||
//delete the fax extension
|
||||
if (strlen($fax_uuid)>0) {
|
||||
if (strlen($fax_uuid) > 0) {
|
||||
|
||||
//get the dialplan uuid
|
||||
$sql = "select * from v_fax ";
|
||||
|
|
@ -87,12 +87,9 @@ else {
|
|||
//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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -516,12 +516,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//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"];
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//redirect the browser
|
||||
if ($action == "update" && permission_exists('fax_extension_edit')) {
|
||||
|
|
|
|||
|
|
@ -273,12 +273,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//synchronize the xml config
|
||||
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"];
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//redirect the user
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -71,12 +71,9 @@ else {
|
|||
}
|
||||
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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$extension."@".$_SESSION['domain_name']);
|
||||
|
||||
//redirect the user
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2008-2012 All Rights Reserved.
|
||||
Copyright (C) 2008-2015 All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
|
|
@ -147,12 +147,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
}
|
||||
}
|
||||
|
||||
//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);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("directory:".$extension."@".$_SESSION['domain_name']);
|
||||
|
||||
//set message and redirect user
|
||||
if ($action == "add") {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -40,9 +40,10 @@ else {
|
|||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
|
||||
if (count($_GET) > 0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
//get the id
|
||||
if (count($_GET) > 0) {
|
||||
$id = check_str($_GET["id"]);
|
||||
}
|
||||
|
||||
if (strlen($id) > 0) {
|
||||
//include the ivr menu class
|
||||
|
|
@ -56,12 +57,9 @@ if (strlen($id) > 0) {
|
|||
//synchronize the xml config
|
||||
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"];
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -229,12 +229,9 @@ 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"];
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//redirect the user
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -95,12 +95,9 @@ else {
|
|||
//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:".$ring_group_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$ring_group_context);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2010-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2010-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -290,12 +290,9 @@ else {
|
|||
//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:".$ring_group_context;
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$ring_group_context);
|
||||
|
||||
//set the message
|
||||
if ($action == "add") {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -45,6 +45,20 @@ if (count($_GET)>0) {
|
|||
}
|
||||
|
||||
if (strlen($id)>0) {
|
||||
|
||||
//get the details fo the sip profile
|
||||
$sql = "select * from v_sip_profiles ";
|
||||
$sql .= "where sip_profile_uuid = '$id' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll();
|
||||
foreach ($result as &$row) {
|
||||
$sip_profile_name = $row["sip_profile_name"];
|
||||
$sip_profile_hostname = $row["sip_profile_hostname"];
|
||||
$sip_profile_description = $row["sip_profile_description"];
|
||||
}
|
||||
unset ($prep_statement);
|
||||
|
||||
//delete the sip profile settings
|
||||
$sql = "delete from v_sip_profile_settings ";
|
||||
$sql .= "where sip_profile_uuid = '$id' ";
|
||||
|
|
@ -69,12 +83,18 @@ if (strlen($id)>0) {
|
|||
//apply settings reminder
|
||||
$_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);
|
||||
//get the hostname
|
||||
if ($sip_profile_name == nul) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "hostname";
|
||||
$sip_profile_name = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:sofia.conf:".$sip_profile_name);
|
||||
}
|
||||
|
||||
//redirect the browser
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -123,13 +123,19 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
unset($sql);
|
||||
} //if ($action == "update")
|
||||
|
||||
//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:$sip_profile_hostname";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
//get the hostname
|
||||
if ($sip_profile_name == nul) {
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_cmd = "hostname";
|
||||
$sip_profile_hostname = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
}
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("configuration:sofia.conf:".$sip_profile_hostname);
|
||||
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: sip_profiles.php");
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -514,12 +514,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
//synchronize the xml config
|
||||
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"];
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['confirm-update-complete'];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2015
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
|
|||
Loading…
Reference in New Issue