From c83782437330809cbc530f03c8cdcd644f86b3f8 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 27 Sep 2019 10:37:41 -0600 Subject: [PATCH] Update registrations.php --- app/registrations/registrations.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/registrations/registrations.php b/app/registrations/registrations.php index 64ef5dbb4a..67ee17307f 100644 --- a/app/registrations/registrations.php +++ b/app/registrations/registrations.php @@ -145,14 +145,14 @@ //get the vendor $vendor = device::get_vendor_by_agent($row['agent']); //prepare and send the command - if (strlen($vendor) > 0 && strlen($profile) > 0 && strlen($user) > 0) { + if (strlen($profile) > 0 && strlen($user) > 0) { if ($action == "unregister") { $command = "sofia profile ".$profile." flush_inbound_reg ".$user." reboot"; } - if ($action == "provision" && strlen($host) > 0) { + if (strlen($vendor) > 0 && $action == "provision" && strlen($host) > 0) { $command = "lua app.lua event_notify ".$profile." check_sync ".$user." ".$vendor." ".$host; } - if ($action == "reboot" && strlen($host) > 0) { + if (strlen($vendor) > 0 && $action == "reboot" && strlen($host) > 0) { $command = "lua app.lua event_notify ".$profile." reboot ".$user." ".$vendor." ".$host; } $response = event_socket_request($fp, "api ".$command);