MAC detection for some Grandstream phones (#2486)
Some GS models send the Mac address in the user agent
This commit is contained in:
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue