From 35c139ddb81bf1e9544216798bad854a13a0cb90 Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Tue, 11 Apr 2017 16:04:10 -0400 Subject: [PATCH] Yet another ip phone reporting MAC in the UserAgent (#2492) --- app/provision/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/provision/index.php b/app/provision/index.php index 56c36de16e..7e23564206 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -87,6 +87,11 @@ $mac = substr($_SERVER['HTTP_USER_AGENT'],-12); $mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac); } + //Audiocodes: $_SERVER['HTTP_USER_AGENT'] = "AUDC-IPPhone/2.2.8.61 (440HDG-Rev0; 00908F602AAC)" + if (substr($_SERVER['HTTP_USER_AGENT'],0,12) == "AUDC-IPPhone") { + $mac = substr($_SERVER['HTTP_USER_AGENT'],-13); + $mac = preg_replace("#[^a-fA-F0-9./]#", "", $mac); + } } //prepare the mac address