Update providers.php
This commit is contained in:
@@ -640,9 +640,10 @@ if (!class_exists('providers')) {
|
|||||||
//get the hostname
|
//get the hostname
|
||||||
if ($fp) { $sip_profile_hostname = event_socket_request($fp, 'api switchname'); }
|
if ($fp) { $sip_profile_hostname = event_socket_request($fp, 'api switchname'); }
|
||||||
|
|
||||||
//delete each gateway
|
|
||||||
$gateways = $this->gateways($provider);
|
//delete outbound routes
|
||||||
foreach ($gateways as $row) {
|
$outbound_routes = $this->outbound_routes($provider);
|
||||||
|
foreach ($outbound_routes as $row) {
|
||||||
//delete child data
|
//delete child data
|
||||||
$sql = "delete from v_dialplan_details ";
|
$sql = "delete from v_dialplan_details ";
|
||||||
$sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."'; ";
|
$sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."'; ";
|
||||||
@@ -654,7 +655,11 @@ if (!class_exists('providers')) {
|
|||||||
$sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."'; ";
|
$sql .= "where dialplan_uuid = '".$row['dialplan_uuid']."'; ";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
//delete each gateway
|
||||||
|
$gateways = $this->gateways($provider);
|
||||||
|
foreach ($gateways as $row) {
|
||||||
//stop the gateway
|
//stop the gateway
|
||||||
$cmd = "sofia profile ".$sip_profile_name." killgw ".$row['uuid'];
|
$cmd = "sofia profile ".$sip_profile_name." killgw ".$row['uuid'];
|
||||||
if ($fp) { event_socket_request($fp, "api ".$cmd); }
|
if ($fp) { event_socket_request($fp, "api ".$cmd); }
|
||||||
|
|||||||
Reference in New Issue
Block a user