From b5c28011ce5161b1fc800ef7e6dd3f8c1cc450ad Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 6 Jun 2025 13:49:24 -0600 Subject: [PATCH] Check for Mitel in the user agent string --- app/provision/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/provision/index.php b/app/provision/index.php index bd610bc10a..1b062b5a35 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -104,8 +104,8 @@ //$_SERVER['HTTP_USER_AGENT'] = "Yealink SIP-T38G 38.70.0.125 00:15:65:00:00:00"; //$_SERVER['HTTP_USER_AGENT'] = "Yealink SIP-T56A 58.80.0.25 001565f429a4"; - //Aastra: $_SERVER['HTTP_USER_AGENT'] = "Aastra6731i MAC:00-08-5D-29-4C-6B V:3.3.1.4365-SIP" - if (substr($_SERVER['HTTP_USER_AGENT'],0,6) == "Aastra") { + //Mitel: HTTP_USER_AGENT 'Mitel6940 MAC:14-00-E9-29-4C-6B V:6.4.0.4006-SIP' or Aastra: 'Aastra6731i MAC:00-08-5D-29-4C-6B V:3.3.1.4365-SIP' + if (substr($_SERVER['HTTP_USER_AGENT'],0,5) == "Mitel" || substr($_SERVER['HTTP_USER_AGENT'],0,6) == "Aastra") { preg_match("/MAC:([A-F0-9-]{17})/", $_SERVER['HTTP_USER_AGENT'], $matches); $device_address = $matches[1]; $device_address = preg_replace("#[^a-fA-F0-9./]#", "", $device_address);