From a5f658f75bddfbb89dae35a0d2ad760a2880b91c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 24 Jul 2018 16:36:45 -0500 Subject: [PATCH] Update gateway_edit.php --- app/gateways/gateway_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index b109ff50b3..58e5eb2bb8 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -246,8 +246,12 @@ save_gateway_xml(); //clear the cache + $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')); } + } $cache = new cache; - $cache->delete("configuration:sofia.conf:".$_SESSION['domain_name']); + $cache->delete("configuration:sofia.conf:".$hostname); //rescan the external profile to look for new or stopped gateways //create the event socket connection