mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-01 01:33:49 +00:00
MAC detection for some Grandstream phones (#2486)
Some GS models send the Mac address in the user agent
This commit is contained in:
committed by
FusionPBX
parent
189578e982
commit
a78eaacbcb
@@ -82,6 +82,11 @@
|
||||
$mac = substr($_SERVER['HTTP_USER_AGENT'],-14);
|
||||
$mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac);
|
||||
}
|
||||
//Grandstream: $_SERVER['HTTP_USER_AGENT'] = "Grandstream Model HW GXP2135 SW 1.0.7.97 DevId 000b828aa872"
|
||||
if (substr($_SERVER['HTTP_USER_AGENT'],0,11) == "Grandstream") {
|
||||
$mac = substr($_SERVER['HTTP_USER_AGENT'],-12);
|
||||
$mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac);
|
||||
}
|
||||
}
|
||||
|
||||
//prepare the mac address
|
||||
|
||||
Reference in New Issue
Block a user