mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Escene provision (#1140)
* Add. Provision to Escene ES330/ES320 * Add. Look up Escene device by ext+domain. * Update Escene template. * Add. `provision` section in config. Found than ES330 some time hangup when it try get software/core and get error from fusion.
This commit is contained in:
committed by
FusionPBX
parent
170d4be4a1
commit
f1c31e0935
@@ -26,6 +26,7 @@
|
||||
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/functions/device_by.php";
|
||||
openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
|
||||
//set default variables
|
||||
@@ -38,6 +39,7 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
//define PHP variables from the HTTP values
|
||||
$mac = check_str($_REQUEST['mac']);
|
||||
$file = check_str($_REQUEST['file']);
|
||||
$ext = check_str($_REQUEST['ext']);
|
||||
//if (strlen(check_str($_REQUEST['template'])) > 0) {
|
||||
// $device_template = check_str($_REQUEST['template']);
|
||||
//}
|
||||
@@ -51,6 +53,20 @@ openlog("fusion-provisioning", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
}
|
||||
}
|
||||
|
||||
// Escence make request based on UserID for Memory keys
|
||||
/*
|
||||
The file name is fixed to `Account1_Extern.xml`.
|
||||
(Account1 is the first account you register)
|
||||
*/
|
||||
if(empty($mac) && !empty($ext)){
|
||||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
$device = device_by_ext($db, $ext, $domain_name);
|
||||
if(($device !== false)&&($device['device_vendor']=='escene')){
|
||||
$mac = $device['device_mac_address'];
|
||||
}
|
||||
}
|
||||
|
||||
//check alternate MAC source
|
||||
if (empty($mac)){
|
||||
//set the http user agent
|
||||
|
||||
Reference in New Issue
Block a user