mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
prepare provisioning for gigaset templates (#3053)
This commit is contained in:
committed by
FusionPBX
parent
45cce55fdf
commit
8d3a25eeb4
@@ -119,6 +119,24 @@ include "root.php";
|
|||||||
case "0C383E":
|
case "0C383E":
|
||||||
$device_vendor = "fanvil";
|
$device_vendor = "fanvil";
|
||||||
break;
|
break;
|
||||||
|
case "7c2f80":
|
||||||
|
$device_vendor = "gigaset";
|
||||||
|
break;
|
||||||
|
case "14b370":
|
||||||
|
$device_vendor = "gigaset";
|
||||||
|
break;
|
||||||
|
case "002104":
|
||||||
|
$device_vendor = "gigaset";
|
||||||
|
break;
|
||||||
|
case "bcc342":
|
||||||
|
$device_vendor = "panasonic";
|
||||||
|
break;
|
||||||
|
case "080023":
|
||||||
|
$device_vendor = "panasonic";
|
||||||
|
break;
|
||||||
|
case "0080f0":
|
||||||
|
$device_vendor = "panasonic";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$device_vendor = "";
|
$device_vendor = "";
|
||||||
}
|
}
|
||||||
@@ -166,6 +184,9 @@ include "root.php";
|
|||||||
if (preg_match('/^.*?panasonic.*$/i', $agent)) {
|
if (preg_match('/^.*?panasonic.*$/i', $agent)) {
|
||||||
return "panasonic";
|
return "panasonic";
|
||||||
}
|
}
|
||||||
|
if (preg_replace('/^.*?(N510).*$/i', '$1', $agent) == "n510") {
|
||||||
|
return "gigaset";
|
||||||
|
}
|
||||||
if (preg_match('/^.*?htek.*$/i', $agent)) {
|
if (preg_match('/^.*?htek.*$/i', $agent)) {
|
||||||
return "htek";
|
return "htek";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ include "root.php";
|
|||||||
case "yealink":
|
case "yealink":
|
||||||
$mac = strtolower($mac);
|
$mac = strtolower($mac);
|
||||||
break;
|
break;
|
||||||
|
case "gigaset":
|
||||||
|
$mac = strtoupper($mac);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$mac = strtolower($mac);
|
$mac = strtolower($mac);
|
||||||
}
|
}
|
||||||
@@ -1192,9 +1195,17 @@ include "root.php";
|
|||||||
|
|
||||||
//set the mac address in the correct format
|
//set the mac address in the correct format
|
||||||
$mac = $this->format_mac($mac, $device_vendor);
|
$mac = $this->format_mac($mac, $device_vendor);
|
||||||
|
|
||||||
|
// set date/time for versioning provisioning templates
|
||||||
|
if (strlen($_SESSION['provision']['version_format']['text']) > 0) {
|
||||||
|
$time = date($_SESSION['provision']['version_format']['text']);
|
||||||
|
} else {
|
||||||
|
$time = date("dmyHi");
|
||||||
|
}
|
||||||
|
|
||||||
//replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number
|
//replace the variables in the template in the future loop through all the line numbers to do a replace for each possible line number
|
||||||
$view->assign("mac" , $mac);
|
$view->assign("mac" , $mac);
|
||||||
|
$view->assign("time" , $time);
|
||||||
$view->assign("label", $device_label);
|
$view->assign("label", $device_label);
|
||||||
$view->assign("device_label", $device_label);
|
$view->assign("device_label", $device_label);
|
||||||
$view->assign("firmware_version", $device_firmware_version);
|
$view->assign("firmware_version", $device_firmware_version);
|
||||||
|
|||||||
Reference in New Issue
Block a user