diff --git a/app/provision/index.php b/app/provision/index.php index 68a6eeb00c..6b1578d63e 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -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") {