Update registrations.php

This commit is contained in:
FusionPBX 2019-09-27 10:37:41 -06:00 committed by GitHub
parent 9f132593cb
commit c837824373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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);