Yet another ip phone reporting MAC in the UserAgent (#2492)

This commit is contained in:
Luis Daniel Lucio Quiroz
2017-04-11 16:04:10 -04:00
committed by FusionPBX
parent fff424a9b9
commit 35c139ddb8

View File

@@ -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