diff --git a/app/call_centers/call_center_agent_delete.php b/app/call_centers/call_center_agent_delete.php index ecbdd74ff6..d7703ec81f 100644 --- a/app/call_centers/call_center_agent_delete.php +++ b/app/call_centers/call_center_agent_delete.php @@ -86,6 +86,7 @@ if (count($_GET)>0) { //synchronize configuration save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); //redirect the browser $_SESSION["message"] = $text['message-delete']; diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 5ff7915723..e72dc42c19 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -264,6 +264,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //syncrhonize configuration save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); $_SESSION["message"] = $text['message-add']; header("Location: call_center_agents.php"); @@ -291,7 +292,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //syncrhonize configuration - save_call_center_xml(); + save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); $_SESSION["message"] = $text['message-update']; header("Location: call_center_agents.php"); diff --git a/app/call_centers/call_center_queue_delete.php b/app/call_centers/call_center_queue_delete.php index bad7ad96cc..5abb84093f 100644 --- a/app/call_centers/call_center_queue_delete.php +++ b/app/call_centers/call_center_queue_delete.php @@ -87,9 +87,11 @@ if (strlen($id) > 0) { //clear the cache $cache = new cache; $cache->delete("dialplan:".$_SESSION["context"]); + remove_config_from_cache('configuration:callcenter.conf'); //synchronize configuration save_dialplan_xml(); + save_call_center_xml(); //apply settings reminder $_SESSION["reload_xml"] = true; diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index 05f82c1580..e37cf5f245 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -257,6 +257,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //syncrhonize the configuration save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); //delete the dialplan context from memcache $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); @@ -326,6 +327,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //synchronize the configuration save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); //clear the cache $cache = new cache; @@ -393,6 +395,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //syncrhonize configuration save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); } //redirect diff --git a/app/call_centers/call_center_tier_edit.php b/app/call_centers/call_center_tier_edit.php index 5f25536092..a8c5d2d4ac 100644 --- a/app/call_centers/call_center_tier_edit.php +++ b/app/call_centers/call_center_tier_edit.php @@ -111,7 +111,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //syncrhonize configuration - save_call_center_xml(); + save_call_center_xml(); + remove_config_from_cache('configuration:callcenter.conf'); //look up queue uuid by queue name (ugh) $sql = "select call_center_queue_uuid from v_call_center_queues where queue_name = '".$queue_name."'"; diff --git a/resources/switch.php b/resources/switch.php index a37727a9d6..e4eb04c532 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -158,6 +158,15 @@ function byte_convert($bytes, $decimals = 2) { return $formattedbytes; } +function remove_config_from_cache($name) { + $cache = new cache; + $cache->delete($name); + $hostname = trim(event_socket_request_cmd('api switchname')); + if($hostname){ + $cache->delete($name . ':' . $hostname); + } +} + function ListFiles($dir) { if($dh = opendir($dir)) { $files = Array();