Add. Support remote reboot Panasonic devices. (#2326)

Tested with Panasonic KX-TGP500 Firmware 22.90
User agent string `Panasonic_KX-TGP500B09/22.90 (<MAC>)`
This commit is contained in:
Alexey Melnichuk 2017-01-31 10:35:24 +03:00 committed by FusionPBX
parent ee65f04ef3
commit 080763cee7
2 changed files with 14 additions and 2 deletions

View File

@ -154,8 +154,9 @@ include "root.php";
if (preg_match('/^es\d\d\d.*$/i', $agent)) { if (preg_match('/^es\d\d\d.*$/i', $agent)) {
return "escene"; return "escene";
} }
} if (preg_match('/^.*?panasonic.*$/i', $agent)) {
return "panasonic";
}
// unknown vendor // unknown vendor
return ""; return "";
} }

View File

@ -124,6 +124,7 @@
event:addHeader('event-string', 'check-sync;reboot=false'); event:addHeader('event-string', 'check-sync;reboot=false');
end end
end end
--snom --snom
if (vendor == "snom") then if (vendor == "snom") then
if (command == "reboot") then if (command == "reboot") then
@ -134,6 +135,16 @@
end end
end end
--panasonic
if (vendor == "panasonic") then
if (command == "reboot") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
if (command == "check_sync") then
event:addHeader('event-string', 'check-sync;reboot=true');
end
end
--send the event --send the event
event:fire(); event:fire();