mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
committed by
GitHub
parent
2d933a60ee
commit
5cc9f93be8
@@ -136,6 +136,13 @@
|
||||
$device_address = substr($_SERVER['HTTP_USER_AGENT'],-14);
|
||||
$device_address = preg_replace("#[^a-fA-F0-9./]#", "", $device_address);
|
||||
}
|
||||
|
||||
//Snom: $userAgent = "Mozilla/4.0 (compatible; snomD785-SIP 10.1.169.16 2010.12-00001-gd311851f1 (Feb 25 2019 - 14:19:43) 00041396D9B4 SXM:0 UXM:0 UXMC:0)"
|
||||
if (substr($_SERVER['HTTP_USER_AGENT'],25,4) == "snom") {
|
||||
$snom_ua = explode(" ", $_SERVER['HTTP_USER_AGENT']);
|
||||
$device_address = $snom_ua[10];
|
||||
$device_address = preg_replace("#[^a-fA-F0-9./]#", "", $device_address);
|
||||
}
|
||||
|
||||
//Yealink: 17 digit mac appended to the user agent, so check for a space exactly 17 digits before the end.
|
||||
if (strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,7)) == "yealink" || strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,5)) == "vp530") {
|
||||
|
||||
Reference in New Issue
Block a user