From 30e0ef26fe49b01f81b08ccee864964309fd6ddc Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Mon, 16 Mar 2015 17:46:34 +0000 Subject: [PATCH] Sometimes the Yealink fails to provide the 'p' therefor filter only for 'vp530'. --- app/provision/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/provision/index.php b/app/provision/index.php index bc08ad8145..c983a265d6 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -47,7 +47,7 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0); //set the http user agent //$_SERVER['HTTP_USER_AGENT'] = "Yealink SIP-T38G 38.70.0.125 00:15:65:00:00:00"; //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,6)) == "vp530p") { + if (strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,7)) == "yealink" || strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,5)) == "vp530") { $mac = substr($_SERVER['HTTP_USER_AGENT'],-17); $mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac); }