Update gateway_delete.php

This commit is contained in:
FusionPBX
2019-02-05 10:15:26 -07:00
committed by GitHub
parent 84856c91da
commit f2135f0231
+4 -6
View File
@@ -85,13 +85,11 @@ if (strlen($_GET["id"])>0) {
//syncrhonize configuration //syncrhonize configuration
save_gateway_xml(); save_gateway_xml();
//delete the gateways from memcache //clear the cache
$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) { $hostname = trim(event_socket_request($fp, 'api switchname'));
$hostname = trim(event_socket_request($fp, 'api switchname')); $cache = new cache;
$switch_cmd = "memcache delete configuration:sofia.conf:".$hostname; $cache->delete("configuration:sofia.conf:".$hostname);
$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