Seperate Cisco 7940/7960 from Cisco SPA so that both can work with check-sync for reboot and reprovision.
This commit is contained in:
@@ -54,6 +54,9 @@ else {
|
|||||||
if (preg_replace('/^.*?(cisco).*$/i', '$1', strtolower($agent)) == "cisco") {
|
if (preg_replace('/^.*?(cisco).*$/i', '$1', strtolower($agent)) == "cisco") {
|
||||||
$vendor = "cisco";
|
$vendor = "cisco";
|
||||||
}
|
}
|
||||||
|
if (preg_replace('/^.*?(cisco\/spa).*$/i', '$1', strtolower($agent)) == "cisco/spa") {
|
||||||
|
$vendor = "cisco-spa";
|
||||||
|
}
|
||||||
if (preg_replace('/^.*?(grandstream).*$/i', '$1', strtolower($agent)) == "grandstream") {
|
if (preg_replace('/^.*?(grandstream).*$/i', '$1', strtolower($agent)) == "grandstream") {
|
||||||
$vendor = "grandstream";
|
$vendor = "grandstream";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,16 @@
|
|||||||
|
|
||||||
--cisco
|
--cisco
|
||||||
if (vendor == "cisco") then
|
if (vendor == "cisco") then
|
||||||
|
if (command == "reboot") then
|
||||||
|
event:addHeader('event-string', 'check-sync');
|
||||||
|
end
|
||||||
|
if (command == "check_sync") then
|
||||||
|
event:addHeader('event-string', 'check-sync');
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--cisco-spa
|
||||||
|
if (vendor == "cisco-spa") then
|
||||||
if (command == "reboot") then
|
if (command == "reboot") then
|
||||||
event:addHeader('event-string', 'reboot=true');
|
event:addHeader('event-string', 'reboot=true');
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user