- ADD SIP TFTP
- Activate Dial Template
This commit is contained in:
parent
f98e7fb774
commit
f75a486701
|
@ -23,6 +23,7 @@
|
||||||
* + Dial Templates + Configuration
|
* + Dial Templates + Configuration
|
||||||
* + Dial Templates in Global Configuration ( Enabled / Disabled ; default template )
|
* + Dial Templates in Global Configuration ( Enabled / Disabled ; default template )
|
||||||
* ? Dial Templates - Howto IT Include in XML.Config ???????
|
* ? Dial Templates - Howto IT Include in XML.Config ???????
|
||||||
|
* + Dial Templates - SIP Device
|
||||||
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; template )
|
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; template )
|
||||||
|
|
||||||
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
||||||
|
@ -58,6 +59,7 @@
|
||||||
* + Create ATADefault.cnf.xml
|
* + Create ATADefault.cnf.xml
|
||||||
* - Create Second line Use MAC AABBCCDDEEFF rotation MAC BBCCDDEEFF01 (ATA 187 )
|
* - Create Second line Use MAC AABBCCDDEEFF rotation MAC BBCCDDEEFF01 (ATA 187 )
|
||||||
* + Add SEP, ATA, VG prefix.
|
* + Add SEP, ATA, VG prefix.
|
||||||
|
* + Add Cisco SIP device Tftp config.
|
||||||
* - VG248 ports start with VGXXXXXXXXXXXX0.
|
* - VG248 ports start with VGXXXXXXXXXXXX0.
|
||||||
* * I think this file should be split in 3 parts (as in Model-View-Controller(MVC))
|
* * I think this file should be split in 3 parts (as in Model-View-Controller(MVC))
|
||||||
* * XML/Database Parts -> Model directory
|
* * XML/Database Parts -> Model directory
|
||||||
|
@ -477,10 +479,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
"name" => _("SCCP Device Keyset"),
|
"name" => _("SCCP Device Keyset"),
|
||||||
"page" => 'views/advserver.keyset.php'
|
"page" => 'views/advserver.keyset.php'
|
||||||
),
|
),
|
||||||
// "sccpdialplan" => array(
|
"sccpdialplan" => array(
|
||||||
// "name" => _("SCCP Dial Plan information"),
|
"name" => _("SIP Dial Plan information"),
|
||||||
// "page" => 'views/advserver.dialtemplate.php'
|
"page" => 'views/advserver.dialtemplate.php'
|
||||||
// )
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -506,7 +508,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
// print_r($inputform);
|
// print_r($inputform);
|
||||||
if (empty($this->pagedata)) {
|
if (empty($this->pagedata)) {
|
||||||
switch ($inputform) {
|
switch ($inputform) {
|
||||||
case cisco:
|
case "cisco":
|
||||||
$this->pagedata = array(
|
$this->pagedata = array(
|
||||||
"general" => array(
|
"general" => array(
|
||||||
"name" => _("Device configuration"),
|
"name" => _("Device configuration"),
|
||||||
|
@ -524,8 +526,25 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case "cisco-sip":
|
||||||
|
$this->pagedata = array(
|
||||||
|
"general" => array(
|
||||||
|
"name" => _("Sip device configuration"),
|
||||||
|
"page" => 'views/form.addsdevice.php'
|
||||||
|
),
|
||||||
|
"buttons" => array(
|
||||||
|
"name" => _("Sip device Buttons"),
|
||||||
|
"page" => 'views/form.sbuttons.php'
|
||||||
|
));
|
||||||
|
// if ($this->sccpvalues['sccp_compatible']['data'] < '433') {
|
||||||
|
// $this->pagedata["sccpcodec"] = array(
|
||||||
|
// "name" => _("Device SCCP Codec"),
|
||||||
|
// "page" => 'views/server.codec.php'
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
|
||||||
case r_user:
|
case "r_user":
|
||||||
$this->pagedata = array(
|
$this->pagedata = array(
|
||||||
"general" => array(
|
"general" => array(
|
||||||
"name" => _("Rouming User configuration"),
|
"name" => _("Rouming User configuration"),
|
||||||
|
@ -548,6 +567,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
"sccpdevice" => array(
|
"sccpdevice" => array(
|
||||||
"name" => _("SCCP Phone"),
|
"name" => _("SCCP Phone"),
|
||||||
"page" => 'views/hardware.phone.php'
|
"page" => 'views/hardware.phone.php'
|
||||||
|
),
|
||||||
|
"sipdevice" => array(
|
||||||
|
"name" => _("SIP CISCO Phone"),
|
||||||
|
"page" => 'views/hardware.sphone.php'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
@ -605,6 +628,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
case 'backupsettings':
|
case 'backupsettings':
|
||||||
case 'savesettings':
|
case 'savesettings':
|
||||||
case 'save_hardware':
|
case 'save_hardware':
|
||||||
|
case 'save_sip_hardware':
|
||||||
case 'save_ruser':
|
case 'save_ruser':
|
||||||
case 'save_dialplan_template':
|
case 'save_dialplan_template':
|
||||||
case 'delete_hardware':
|
case 'delete_hardware':
|
||||||
|
@ -654,6 +678,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
||||||
return array('status' => true, 'message' => $msg, 'reload' => true);
|
return array('status' => true, 'message' => $msg, 'reload' => true);
|
||||||
break;
|
break;
|
||||||
|
case 'save_sip_hardware':
|
||||||
case 'save_hardware':
|
case 'save_hardware':
|
||||||
$this->save_hw_phone($request);
|
$this->save_hw_phone($request);
|
||||||
// return array('status' => true, 'href' => 'config.php?display=sccp_phone', 'reload' => true);
|
// return array('status' => true, 'href' => 'config.php?display=sccp_phone', 'reload' => true);
|
||||||
|
@ -669,9 +694,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return array('status' => false, 'message' => print_r($res));
|
return array('status' => false, 'message' => print_r($res));
|
||||||
break;
|
break;
|
||||||
/* !TODO!: -TODO-: dialplan templates should be removed (only required for very old devices (like ATA) */
|
/* !TODO!: -TODO-: dialplan templates should be removed (only required for very old devices (like ATA) */
|
||||||
// ------------------------------- Old deviece suport - In the development---
|
// ------------------------------- Old + Sip deviece suport - In the development---
|
||||||
case 'save_dialplan_template':
|
case 'save_dialplan_template':
|
||||||
$res = $this->save_DialPlant($request);
|
$res = $this->save_DialPlan($request);
|
||||||
|
//public
|
||||||
if (empty($res)) {
|
if (empty($res)) {
|
||||||
return array('status' => true, 'search' => '?display=sccp_adv', 'hash' => 'sccpdialplan');
|
return array('status' => true, 'search' => '?display=sccp_adv', 'hash' => 'sccpdialplan');
|
||||||
} else {
|
} else {
|
||||||
|
@ -682,7 +708,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
case 'delete_dialplan':
|
case 'delete_dialplan':
|
||||||
if (!empty($request['dialplan'])) {
|
if (!empty($request['dialplan'])) {
|
||||||
$get_file = $request['dialplan'];
|
$get_file = $request['dialplan'];
|
||||||
$res = $this->del_DialPlant($get_file);
|
$res = $this->del_DialPlan($get_file);
|
||||||
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
||||||
return array('status' => true, 'message' => 'Dial Template has been deleted ! ', 'table_reload' => true);
|
return array('status' => true, 'message' => 'Dial Template has been deleted ! ', 'table_reload' => true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -717,6 +743,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
foreach ($models as $data) {
|
foreach ($models as $data) {
|
||||||
$ver_id = $this->sccp_create_device_XML($data['name']);
|
$ver_id = $this->sccp_create_device_XML($data['name']);
|
||||||
};
|
};
|
||||||
|
// !TODO!: -TODO-: Check SIP Suport Enabled
|
||||||
|
$this->sccp_create_xmlSoftkey(); // Create Softkey Sets for SIP
|
||||||
// !TODO!: -TODO-: Do these returned message strings work with i18n ?
|
// !TODO!: -TODO-: Do these returned message strings work with i18n ?
|
||||||
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
// !TODO!: It is necessary in the future to check, and replace all server responses on correct messages. Use _(msg)
|
||||||
return array('status' => true, 'message' => 'Create new config files (version:' . $ver_id . ')');
|
return array('status' => true, 'message' => 'Create new config files (version:' . $ver_id . ')');
|
||||||
|
@ -855,6 +883,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->sccp_create_sccp_init();
|
$this->sccp_create_sccp_init();
|
||||||
|
|
||||||
|
// !TODO!: -TODO-: Check SIP Suport Enabled
|
||||||
|
$this->sccp_create_xmlSoftkey();
|
||||||
|
|
||||||
$msg = print_r($this->srvinterface->sccp_core_commands(array('cmd' => 'sccp_reload')), 1);
|
$msg = print_r($this->srvinterface->sccp_core_commands(array('cmd' => 'sccp_reload')), 1);
|
||||||
|
|
||||||
return array('status' => true, 'table_reload' => true);
|
return array('status' => true, 'table_reload' => true);
|
||||||
|
@ -906,7 +938,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return $result;
|
return $result;
|
||||||
break;
|
break;
|
||||||
case 'getPhoneGrid':
|
case 'getPhoneGrid':
|
||||||
$result = $this->dbinterface->get_db_SccpTableData('SccpDevice');
|
$cmd_type = !empty($request['type']) ? $request['type'] : '';
|
||||||
|
|
||||||
|
$result = $this->dbinterface->get_db_SccpTableData('SccpDevice', array('type'=>$cmd_type));
|
||||||
|
if ($cmd_type == 'cisco-sip'){
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
$staus = $this->srvinterface->sccp_get_active_device();
|
$staus = $this->srvinterface->sccp_get_active_device();
|
||||||
if (empty($result)) {
|
if (empty($result)) {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
@ -990,7 +1027,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
// Get Model Buttons info
|
// Get Model Buttons info
|
||||||
$res = array();
|
$res = array();
|
||||||
|
|
||||||
$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
// $lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
||||||
$max_btn = ((!empty($get_settings['buttonscount']) ? $get_settings['buttonscount'] : 100));
|
$max_btn = ((!empty($get_settings['buttonscount']) ? $get_settings['buttonscount'] : 100));
|
||||||
$last_btn = $max_btn;
|
$last_btn = $max_btn;
|
||||||
for ($it = $max_btn; $it >= 0; $it--) {
|
for ($it = $max_btn; $it >= 0; $it--) {
|
||||||
|
@ -1106,6 +1143,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$name_dev = '';
|
$name_dev = '';
|
||||||
$db_field = $this->dbinterface->get_db_SccpTableData("get_colums_sccpdevice");
|
$db_field = $this->dbinterface->get_db_SccpTableData("get_colums_sccpdevice");
|
||||||
$hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid'];
|
$hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid'];
|
||||||
|
$hw_type = (empty($get_settings['sccp_device_typeid'])) ? 'sccpdevice' : $get_settings['sccp_device_typeid'];
|
||||||
$update_hw = ($hw_id == 'new') ? 'update' : 'clear';
|
$update_hw = ($hw_id == 'new') ? 'update' : 'clear';
|
||||||
$hw_prefix = 'SEP';
|
$hw_prefix = 'SEP';
|
||||||
if (!empty($get_settings[$hdr_prefix . 'type'])) {
|
if (!empty($get_settings[$hdr_prefix . 'type'])) {
|
||||||
|
@ -1162,6 +1200,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$value = $get_settings[$hdr_prefix . 'netlang'] . ':' . $get_settings[$hdr_prefix . 'devlang'];
|
$value = $get_settings[$hdr_prefix . 'netlang'] . ':' . $get_settings[$hdr_prefix . 'devlang'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// case '_json':
|
||||||
|
// foreach ($get_settings[$hdr_arprefix . $key.'_sip'] as $vkey => $vval) {
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
//
|
||||||
default :
|
default :
|
||||||
if (!empty($get_settings[$hdr_prefix . $key])) {
|
if (!empty($get_settings[$hdr_prefix . $key])) {
|
||||||
$value = $get_settings[$hdr_prefix . $key];
|
$value = $get_settings[$hdr_prefix . $key];
|
||||||
|
@ -1217,7 +1260,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$this->dbinterface->sccp_save_db("sccpdevice", $save_settings, 'replace');
|
$this->dbinterface->sccp_save_db("sccpdevice", $save_settings, 'replace');
|
||||||
|
|
||||||
// Get Model Buttons info
|
// Get Model Buttons info
|
||||||
$save_buttons = $this-> get_buttons_phone($get_settings,$name_dev, 'sccpdevice');
|
// $save_buttons = $this-> get_buttons_phone($get_settings,$name_dev, 'sccpdevice');
|
||||||
|
$save_buttons = $this-> get_buttons_phone($get_settings,$name_dev, $hw_type);
|
||||||
|
|
||||||
// Sace Buttons config
|
// Sace Buttons config
|
||||||
$this->dbinterface->sccp_save_db("sccpbuttons", $save_buttons, $update_hw, '', $name_dev);
|
$this->dbinterface->sccp_save_db("sccpbuttons", $save_buttons, $update_hw, '', $name_dev);
|
||||||
|
@ -1714,15 +1758,25 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Soft Key
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
function sccp_create_xmlSoftkey(){
|
||||||
|
foreach ($this->srvinterface->sccp_list_keysets() as $keyl => $vall) {
|
||||||
|
$this->xmlinterface->create_xmlSoftkeyset($this->sccp_conf_init,$this->sccppath,$keyl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DialPlan
|
* DialPlan
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function get_DialPlanList() {
|
function get_DialPlanList() {
|
||||||
$dir = $this->sccppath["tftp_DP"] . '/*.xml';
|
$dir = $this->sccppath["tftp_dialplan"] . '/dial*.xml';
|
||||||
$base_len = strlen($this->sccppath["tftp_DP"]) + 1;
|
$base_len = strlen($this->sccppath["tftp_dialplan"]) + 1;
|
||||||
$res = glob($dir);
|
$res = glob($dir);
|
||||||
$dp_list = array();
|
$dp_list = array();
|
||||||
foreach ($res as $key => $value) {
|
foreach ($res as $key => $value) {
|
||||||
|
@ -1733,7 +1787,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_DialPlan($get_file) {
|
function get_DialPlan($get_file) {
|
||||||
$file = $this->sccppath["tftp_DP"] . '/' . $get_file . '.xml';
|
$file = $this->sccppath["tftp_dialplan"] . '/' . $get_file . '.xml';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
// $load_xml_data = simplexml_load_file($file);
|
// $load_xml_data = simplexml_load_file($file);
|
||||||
|
|
||||||
|
@ -1748,7 +1802,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
|
|
||||||
function del_DialPlan($get_file) {
|
function del_DialPlan($get_file) {
|
||||||
if (!empty($get_file)) {
|
if (!empty($get_file)) {
|
||||||
$file = $this->sccppath["tftp_DP"] . '/' . $get_file . '.xml';
|
$file = $this->sccppath["tftp_dialplan"] . '/' . $get_file . '.xml';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
$res = unlink($file);
|
$res = unlink($file);
|
||||||
}
|
}
|
||||||
|
@ -1757,53 +1811,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
}
|
}
|
||||||
|
|
||||||
function save_DialPlan($get_settings) {
|
function save_DialPlan($get_settings) {
|
||||||
$xmlstr = "<DIALTEMPLATE>\n";
|
|
||||||
$dialFelds = array('match', 'timeout', 'rewrite', 'tone'); //str -to lo !
|
$confDir = $this->sccppath["tftp_dialplan"];
|
||||||
|
return $this->xmlinterface->save_DialPlan($confDir, $get_settings);
|
||||||
$hdr_prefix = 'sccp_dial_';
|
|
||||||
$hdr_arprefix = 'sccp_dial-ar_';
|
|
||||||
$save_data = array();
|
|
||||||
$integer_msg = _("%s must be a non-negative integer");
|
|
||||||
$errors = array();
|
|
||||||
foreach ($get_settings[$hdr_arprefix . 'dialtemplate'] as $key => $value) {
|
|
||||||
$xmlstr .= '<TEMPLATE';
|
|
||||||
if (!empty($value['match'])) {
|
|
||||||
foreach ($dialFelds as $fld) {
|
|
||||||
if (isset($value[$fld])) {
|
|
||||||
if ($value[$fld] == 'empty' || $value[$fld] == '') {
|
|
||||||
//
|
|
||||||
} else {
|
|
||||||
$xmlstr .= ' ' . $fld . '="' . (string) $value[$fld] . '"';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$errors = array('Fields need to match !!');
|
|
||||||
}
|
|
||||||
$xmlstr .= "/>\n";
|
|
||||||
}
|
|
||||||
$xmlstr .= '</DIALTEMPLATE>';
|
|
||||||
if (!empty($get_settings['idtemplate'])) {
|
|
||||||
if ($get_settings['idtemplate'] == '*new*') {
|
|
||||||
if (!empty($get_settings[$hdr_prefix . 'dialtemplate_name'])) {
|
|
||||||
$put_file = (string) $get_settings[$hdr_prefix . 'dialtemplate_name'];
|
|
||||||
} else {
|
|
||||||
$errors = array('Fields Dial Plan Name is requered !!');
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
$put_file = (string) $get_settings['idtemplate'];
|
|
||||||
} else {
|
|
||||||
$errors = array('Fields Dial Plan Name is requered !!');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($errors)) {
|
|
||||||
// $put_file = 'test';
|
|
||||||
$put_file = str_replace(array("\n", "\r", "\t", "/", "\\", ".", ","), '', $put_file);
|
|
||||||
$file = $this->sccppath["tftp_DP"] . '/' . $put_file . '.xml';
|
|
||||||
file_put_contents($file, $xmlstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $errors;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1907,33 +1917,38 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
if (empty($dev_id)) {
|
if (empty($dev_id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$sccp_native = true;
|
||||||
|
$data_value = array();
|
||||||
|
$dev_line_data = null;
|
||||||
|
|
||||||
$dev_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
$dev_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
||||||
|
// Support Cisco Sip Device
|
||||||
|
if (!empty($dev_config['type'])) {
|
||||||
|
if (strpos($dev_config['type'],'sip') !== false) {
|
||||||
|
$sccp_native = false;
|
||||||
|
$data_tmp =$this->sipconfigs->getSipConfig();
|
||||||
|
$dev_ext_config = $this->dbinterface->get_db_SccpTableData("SccpDevice", array('name' => $dev_id, 'fields'=>'sip_ext'));
|
||||||
|
$data_value = array_merge($data_value, $dev_ext_config, $data_tmp);
|
||||||
|
$data_tmp = explode(';',$dev_ext_config['sip_lines']);
|
||||||
|
foreach ($data_tmp as $value) {
|
||||||
|
$tmp_line = explode(',',$value);
|
||||||
|
if ($tmp_line[0] == 'line') {
|
||||||
|
$dev_line_data= $this->sipconfigs->get_db_sip_TableData('DeviceById',array('id'=>$tmp_line[1]));
|
||||||
|
if (!empty($dev_line_data)) {
|
||||||
|
$data_value['siplines'][] = $dev_line_data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return print_r($dev_line_data,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
foreach ($this->sccpvalues as $key => $value) {
|
foreach ($this->sccpvalues as $key => $value) {
|
||||||
$data_value[$key] = $value['data'];
|
$data_value[$key] = $value['data'];
|
||||||
}
|
}
|
||||||
$data_value['ntp_timezone_id'] = $this->extconfigs->getextConfig('sccp_timezone', $data_value['ntp_timezone']);
|
$data_value['ntp_timezone_id'] = $this->extconfigs->getextConfig('sccp_timezone', $data_value['ntp_timezone']);
|
||||||
$data_value['server_if_list'] = $this->getIP_information2('ip4');
|
$data_value['server_if_list'] = $this->getIP_information2('ip4');
|
||||||
$dev_config['tftp_path'] = $this->sccppath["tftp_path"];
|
$dev_config = array_merge($dev_config, $this->sccppath);
|
||||||
$dev_config['tftp_firmware'] = '';
|
$dev_config['tftp_firmware'] = '';
|
||||||
/* if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
|
||||||
if ( $this->sccpvalues['tftp_rewrite']['data'] == 'internal' ) {
|
|
||||||
$dir_list = $this->find_all_files($dev_config['tftp_path'], $dev_config['loadimage']);
|
|
||||||
foreach ($dir_list as $filek){
|
|
||||||
if (!empty($filek)) {
|
|
||||||
$fnd_path= '';
|
|
||||||
$fnd_path = str_replace($dev_config['tftp_path'],'',$filek);
|
|
||||||
$fnd_path = substr($fnd_path,1,strpos($fnd_path, $dev_config['loadimage'])-1);
|
|
||||||
if (!empty($fnd_path)) {
|
|
||||||
$dev_config['tftp_firmware'] = $fnd_path;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$dev_config['addon_info'] = array();
|
$dev_config['addon_info'] = array();
|
||||||
if (!empty($dev_config['addon'])) {
|
if (!empty($dev_config['addon'])) {
|
||||||
$hw_addon = explode(',', $dev_config['addon']);
|
$hw_addon = explode(',', $dev_config['addon']);
|
||||||
|
@ -1942,9 +1957,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$dev_config['addon_info'][$key] = $hw_data[0]['loadimage'];
|
$dev_config['addon_info'][$key] = $hw_data[0]['loadimage'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// return print_r($dev_config,true);
|
||||||
|
|
||||||
$lang_data = $this->extconfigs->getextConfig('sccp_lang');
|
$lang_data = $this->extconfigs->getextConfig('sccp_lang');
|
||||||
// return $this->sccppath["tftp_path_store"];
|
if (!$sccp_native) {
|
||||||
|
return $this->xmlinterface->create_SEP_SIP_XML($this->sccppath["tftp_path_store"], $data_value, $dev_config, $dev_id, $lang_data);
|
||||||
|
}
|
||||||
return $this->xmlinterface->create_SEP_XML($this->sccppath["tftp_path_store"], $data_value, $dev_config, $dev_id, $lang_data);
|
return $this->xmlinterface->create_SEP_XML($this->sccppath["tftp_path_store"], $data_value, $dev_config, $dev_id, $lang_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2068,10 +2086,16 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$search_mode = '';
|
$search_mode = '';
|
||||||
if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
if (!empty($this->sccpvalues['tftp_rewrite'])) {
|
||||||
$search_mode = $this->sccpvalues['tftp_rewrite']['data'];
|
$search_mode = $this->sccpvalues['tftp_rewrite']['data'];
|
||||||
if ($search_mode == 'pro') {
|
switch ($search_mode) {
|
||||||
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
case 'pro':
|
||||||
} else {
|
case 'on':
|
||||||
$dir_list = $this->find_all_files($dir, $file_ext);
|
case 'internal':
|
||||||
|
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
||||||
|
break;
|
||||||
|
case 'off':
|
||||||
|
default: // Place in root TFTP dir
|
||||||
|
$dir_list = $this->find_all_files($dir, $file_ext);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
$dir_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
||||||
|
@ -2084,7 +2108,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$raw_settings[$i]['validate'] = '-;-';
|
$raw_settings[$i]['validate'] = '-;-';
|
||||||
if (!empty($raw_settings[$i]['loadimage'])) {
|
if (!empty($raw_settings[$i]['loadimage'])) {
|
||||||
$raw_settings[$i]['validate'] = 'no;';
|
$raw_settings[$i]['validate'] = 'no;';
|
||||||
if ((strtolower($raw_settings[$i]['vendor'] == 'cisco')) || !empty($dir_list)) {
|
if (((strtolower($raw_settings[$i]['vendor']) == 'cisco') || (strtolower($raw_settings[$i]['vendor']) == 'cisco-sip')) && !empty($dir_list) ){
|
||||||
foreach ($dir_list as $filek) {
|
foreach ($dir_list as $filek) {
|
||||||
switch ($search_mode) {
|
switch ($search_mode) {
|
||||||
case 'pro':
|
case 'pro':
|
||||||
|
|
|
@ -49,17 +49,59 @@ class dbinterface {
|
||||||
$sql = "SELECT * FROM `sccpline` ORDER BY `name`";
|
$sql = "SELECT * FROM `sccpline` ORDER BY `name`";
|
||||||
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT * FROM `sccpline` WHERE `name`=" . $data['name'];
|
$sql = "SELECT * FROM `sccpline` WHERE `name`='" . $data['name']. "'";;
|
||||||
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "SccpDevice":
|
case "SccpDevice":
|
||||||
// $sql = "SELECT * FROM `sccpdeviceconfig` ORDER BY `name`";
|
$filtred ='';
|
||||||
$sql = "select `name`,`name` as `mac`, `type`, `button`, `addon`, `_description` as description from `sccpdeviceconfig` ORDER BY `name`";
|
$singlrow = false;
|
||||||
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
if (empty($data['fields'])) {
|
||||||
|
$fld = '`name`,`name` as `mac`, `type`, `button`, `addon`, `_description` as description';
|
||||||
|
} else {
|
||||||
|
switch ($data['fields']) {
|
||||||
|
case "all":
|
||||||
|
$fld ='*';
|
||||||
|
break;
|
||||||
|
case "sip_ext":
|
||||||
|
$fld ='button as sip_lines, description as description, addon';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$fld = $data['fields'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($data['name'])) {
|
||||||
|
$filtred = "`name`='" . $data['name']. "'";;
|
||||||
|
$singlrow = true;
|
||||||
|
}
|
||||||
|
if (!empty($data['type'])) {
|
||||||
|
switch ($data['type']) {
|
||||||
|
case "cisco-sip":
|
||||||
|
$filtred = "`TYPE` LIKE '%-sip'";
|
||||||
|
break;
|
||||||
|
case "cisco":
|
||||||
|
default:
|
||||||
|
$filtred = "`TYPE` not LIKE '%-sip'";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($filtred)) {
|
||||||
|
$sql = "SELECT ". $fld ." FROM `sccpdeviceconfig` ORDER BY `name`";
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT ". $fld ." FROM `sccpdeviceconfig` WHERE ".$filtred." ORDER BY `name`";
|
||||||
|
}
|
||||||
|
if ($singlrow) {
|
||||||
|
$raw_settings = sql($sql, "getRow", DB_FETCHMODE_ASSOC);
|
||||||
|
} else {
|
||||||
|
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "HWSipDevice":
|
||||||
|
$raw_settings = $this->getDb_model_info($get = "sipphones", $format_list = "model");
|
||||||
break;
|
break;
|
||||||
case "HWDevice":
|
case "HWDevice":
|
||||||
$raw_settings = $this->getDb_model_info($get = "phones", $format_list = "model");
|
$raw_settings = $this->getDb_model_info($get = "ciscophones", $format_list = "model");
|
||||||
break;
|
break;
|
||||||
case "HWextension":
|
case "HWextension":
|
||||||
$raw_settings = $this->getDb_model_info($get = "extension", $format_list = "model");
|
$raw_settings = $this->getDb_model_info($get = "extension", $format_list = "model");
|
||||||
|
@ -169,6 +211,14 @@ class dbinterface {
|
||||||
case "enabled":
|
case "enabled":
|
||||||
case "phones":
|
case "phones":
|
||||||
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns > 0) and (enabled > 0) ORDER BY model ";
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns > 0) and (enabled > 0) ORDER BY model ";
|
||||||
|
// $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (enabled > 0) ORDER BY model ";
|
||||||
|
break;
|
||||||
|
case "ciscophones":
|
||||||
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns > 0) and (enabled > 0) AND `vendor` not LIKE '%-sip' ORDER BY model ";
|
||||||
|
// $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (enabled > 0) ORDER BY model ";
|
||||||
|
break;
|
||||||
|
case "sipphones":
|
||||||
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns > 0) and (enabled > 0) AND `vendor` LIKE '%-sip' ORDER BY model ";
|
||||||
// $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (enabled > 0) ORDER BY model ";
|
// $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (enabled > 0) ORDER BY model ";
|
||||||
break;
|
break;
|
||||||
case "all":
|
case "all":
|
||||||
|
|
|
@ -216,25 +216,25 @@ class extconfigs {
|
||||||
// global $amp_conf;
|
// global $amp_conf;
|
||||||
// *** Setings for Provision Sccp
|
// *** Setings for Provision Sccp
|
||||||
$adv_config = Array('tftproot' => '', 'firmware' => 'firmware', 'settings' => 'settings',
|
$adv_config = Array('tftproot' => '', 'firmware' => 'firmware', 'settings' => 'settings',
|
||||||
'locales' => 'locales', 'languages' => 'languages', 'templates' => 'templates');
|
'locales' => 'locales', 'languages' => 'languages', 'templates' => 'templates', 'dialplan' => 'dialplan', 'softkey' => 'softkey');
|
||||||
// 'pro' /tftpboot - root dir
|
// 'pro' /tftpboot - root dir
|
||||||
// /tftpboot/locales/locales/%Languge_name%
|
// /tftpboot/locales/locales/%Languge_name%
|
||||||
// /tftpboot/settings/XMLdefault.cnf.xml
|
// /tftpboot/settings/XMLdefault.cnf.xml
|
||||||
// /tftpboot/settings/SEP[MAC].cnf.xml
|
// /tftpboot/settings/SEP[MAC].cnf.xml
|
||||||
// /tftpboot/firmware/79xx/SCCPxxxx.loads
|
// /tftpboot/firmware/79xx/SCCPxxxx.loads
|
||||||
$adv_tree['pro'] = Array('templates' => 'tftproot', 'settings' => 'tftproot', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'locales');
|
$adv_tree['pro'] = Array('templates' => 'tftproot', 'settings' => 'tftproot', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'locales', 'dialplan' => 'tftproot', 'softkey' => 'tftproot');
|
||||||
|
|
||||||
// 'def' /tftpboot - root dir
|
// 'def' /tftpboot - root dir
|
||||||
// /tftpboot/languages/%Languge_name%
|
// /tftpboot/languages/%Languge_name%
|
||||||
// /tftpboot/XMLdefault.cnf.xml
|
// /tftpboot/XMLdefault.cnf.xml
|
||||||
// /tftpboot/SEP[MAC].cnf.xml
|
// /tftpboot/SEP[MAC].cnf.xml
|
||||||
// /tftpboot/SCCPxxxx.loads
|
// /tftpboot/SCCPxxxx.loads
|
||||||
$adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => '', 'firmware' => '', 'languages' => 'tftproot');
|
$adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => '', 'firmware' => '', 'languages' => 'tftproot','dialplan' => '', 'softkey' => '');
|
||||||
// $adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => '');
|
// $adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => '');
|
||||||
// $adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'tftproot');
|
// $adv_tree['def'] = Array('templates' => 'tftproot', 'settings' => '', 'locales' => 'tftproot', 'firmware' => 'tftproot', 'languages' => 'tftproot');
|
||||||
|
|
||||||
//* **************------ ****
|
//* **************------ ****
|
||||||
$base_tree = Array('tftp_templates' => 'templates', 'tftp_path_store' => 'settings', 'tftp_lang_path' => 'languages', 'tftp_firmware_path' => 'firmware');
|
$base_tree = Array('tftp_templates' => 'templates', 'tftp_path_store' => 'settings', 'tftp_lang_path' => 'languages', 'tftp_firmware_path' => 'firmware', 'tftp_dialplan' => 'dialplan', 'tftp_softkey' => 'softkey');
|
||||||
|
|
||||||
if (empty($confDir)) {
|
if (empty($confDir)) {
|
||||||
return array('error' => 'empty СonfDir');
|
return array('error' => 'empty СonfDir');
|
||||||
|
@ -309,7 +309,8 @@ class extconfigs {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print_r($base_config,1);
|
||||||
|
// die(print_r($base_config,1));
|
||||||
// $base_config['External_ini'] = $adv_config;
|
// $base_config['External_ini'] = $adv_config;
|
||||||
// $base_config['External_mode'] = $adv_tree_mode;
|
// $base_config['External_mode'] = $adv_tree_mode;
|
||||||
|
|
||||||
|
|
104
Sccp_manager.inc/sipconfigs.class.php
Normal file
104
Sccp_manager.inc/sipconfigs.class.php
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace FreePBX\modules\Sccp_manager;
|
||||||
|
|
||||||
|
class sipconfigs {
|
||||||
|
// protected $database;
|
||||||
|
// protected $freepbx;
|
||||||
|
|
||||||
|
public function __construct($parent_class = null) {
|
||||||
|
$this->paren_class = $parent_class;
|
||||||
|
// $freepbx
|
||||||
|
// $this->database = $freepbx->Database;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function info() {
|
||||||
|
$Ver = '13.0.4';
|
||||||
|
return Array('Version' => $Ver,
|
||||||
|
'about' => 'Sip Setings ver: ' . $Ver);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_db_sip_TableData($dataid, $data = array()) {
|
||||||
|
global $db;
|
||||||
|
if ($dataid == '') {
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
switch ($dataid) {
|
||||||
|
case "Device":
|
||||||
|
$sql = "SELECT * FROM sip ORDER BY `id`";
|
||||||
|
$tech = array();
|
||||||
|
try {
|
||||||
|
$raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC);
|
||||||
|
foreach ($raw_settings as $value) {
|
||||||
|
if (empty($tech[$value['id']]['id'])) {
|
||||||
|
$tech[$value['id']]['id']= $value['id'];
|
||||||
|
}
|
||||||
|
$tech[$value['id']][$value['keyword']]=$value['data'];
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return $tech;
|
||||||
|
case "DeviceById":
|
||||||
|
$sql = "SELECT keyword,data FROM sip WHERE id = ?";
|
||||||
|
$sth = $db->prepare($sql);
|
||||||
|
$tech = array();
|
||||||
|
try {
|
||||||
|
$id = $data['id'];
|
||||||
|
$sth->execute(array($id));
|
||||||
|
$tech = $sth->fetchAll(\PDO::FETCH_COLUMN | \PDO::FETCH_GROUP);
|
||||||
|
foreach ($tech as &$value) {
|
||||||
|
$value = $value[0];
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
return $tech;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSipConfig() {
|
||||||
|
$result = array();
|
||||||
|
$def_sip_proto = 'sip';
|
||||||
|
$def_proto = 'tcp';
|
||||||
|
$supp_proto = '';
|
||||||
|
|
||||||
|
$result['sipport'] = \FreePBX::Sipsettings()->getConfig('bindport');
|
||||||
|
$result['tlsport'] = \FreePBX::Sipsettings()->getConfig('tlsbindport');
|
||||||
|
$tmp_sipsetigs = \FreePBX::Sipsettings()->getChanSipSettings();
|
||||||
|
$tmp_sip_binds = \FreePBX::Sipsettings()->getBinds();
|
||||||
|
|
||||||
|
$tmp_bind_ip = !empty($tmp_sipsetigs['externhost_val']) ? $tmp_sipsetigs['externhost_val'] : '';
|
||||||
|
$tmp_bind_ip = !empty($tmp_sipsetigs['externip_val']) ? $tmp_sipsetigs['externip_val'] : $tmp_bind_ip;
|
||||||
|
$tmp_bind_ip = !empty($tmp_sipsetigs['bindaddr']) ? $tmp_sipsetigs['bindaddr'] : $tmp_bind_ip;
|
||||||
|
|
||||||
|
// $result['sipbind'] = $tmp_bind_ip;
|
||||||
|
if (empty($tmp_sip_binds[$def_sip_proto])){
|
||||||
|
$def_proto = 'pjsip';
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($tmp_sip_binds[$def_sip_proto] as $key => $value) {
|
||||||
|
if (empty($value[$def_proto])) {
|
||||||
|
$def_proto = 'udp';
|
||||||
|
$supp_proto = 'udp';
|
||||||
|
} else {
|
||||||
|
$supp_proto = !empty($value['udp']) ? 'tcp;udp' : 'tcp';
|
||||||
|
}
|
||||||
|
if (empty($def_key)) {
|
||||||
|
$def_key = $key;
|
||||||
|
}
|
||||||
|
if ($key != '0.0.0.0') {
|
||||||
|
$tmp_bind_ip = $key;
|
||||||
|
}
|
||||||
|
$result['sipbindport'] = $value[$def_proto];
|
||||||
|
}
|
||||||
|
$result['sipbind'] = $tmp_bind_ip;
|
||||||
|
$result['sipsuportproto'] = $supp_proto;
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,11 +18,11 @@ class xmlinterface {
|
||||||
private $val_null = 'NONE'; /// REPLACE to null Field
|
private $val_null = 'NONE'; /// REPLACE to null Field
|
||||||
|
|
||||||
public function __construct($parent_class = null) {
|
public function __construct($parent_class = null) {
|
||||||
$this->paren_class = $parent_class;
|
$this->paren_class = $parent_class;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function info() {
|
public function info() {
|
||||||
$Ver = '13.0.3';
|
$Ver = '13.0.4';
|
||||||
return Array('Version' => $Ver,
|
return Array('Version' => $Ver,
|
||||||
'about' => 'Create XML data interface ver: ' . $Ver);
|
'about' => 'Create XML data interface ver: ' . $Ver);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ class xmlinterface {
|
||||||
if (!empty($value['ip'])) {
|
if (!empty($value['ip'])) {
|
||||||
$ip_valid = true;
|
$ip_valid = true;
|
||||||
if (!empty($data_values['ccm_address'])) {
|
if (!empty($data_values['ccm_address'])) {
|
||||||
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false ) {
|
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false) {
|
||||||
// Skip
|
// Skip
|
||||||
} else {
|
} else {
|
||||||
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
||||||
|
@ -90,7 +90,6 @@ class xmlinterface {
|
||||||
$node = $xml_work->$value;
|
$node = $xml_work->$value;
|
||||||
unset($node[0][0]);
|
unset($node[0][0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
foreach ($def_xml_locale as $key) {
|
foreach ($def_xml_locale as $key) {
|
||||||
if (!empty($xml_work->$key)) {
|
if (!empty($xml_work->$key)) {
|
||||||
|
@ -137,7 +136,7 @@ class xmlinterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_SEP_XML($store_path = '', $data_values = array(), $dev_config = array(), $dev_id = '', $lang_info = array()) {
|
function create_SEP_XML($store_path = '', $data_values = array(), $dev_config = array(), $dev_id = '', $lang_info = array()) {
|
||||||
|
|
||||||
$var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',
|
$var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',
|
||||||
'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',
|
'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',
|
||||||
'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword', 'deviceProtocol' => 'dev_deviceProtocol',
|
'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword', 'deviceProtocol' => 'dev_deviceProtocol',
|
||||||
|
@ -146,7 +145,7 @@ class xmlinterface {
|
||||||
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
|
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
|
||||||
'phoneServices' => 'null', 'certHash' => 'null',
|
'phoneServices' => 'null', 'certHash' => 'null',
|
||||||
'deviceSecurityMode' => '1');
|
'deviceSecurityMode' => '1');
|
||||||
|
|
||||||
// $var_hw_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
// $var_hw_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
||||||
|
|
||||||
if (empty($dev_config)) {
|
if (empty($dev_config)) {
|
||||||
|
@ -199,14 +198,14 @@ class xmlinterface {
|
||||||
}
|
}
|
||||||
$xnode->name = $tz_id;
|
$xnode->name = $tz_id;
|
||||||
$xnode->dateTemplate = $data_values['dateformat'];
|
$xnode->dateTemplate = $data_values['dateformat'];
|
||||||
$xnode->timeZone = $TZdata['cisco_code'];
|
$xnode->timeZone = $TZdata['cisco_code'];
|
||||||
// $xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
|
// $xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
|
||||||
|
|
||||||
if ($data_values['ntp_config_enabled'] == 'yes') {
|
if ($data_values['ntp_config_enabled'] == 'yes') {
|
||||||
$xnode->ntps->ntp->name = $data_values['ntp_server'];
|
$xnode->ntps->ntp->name = $data_values['ntp_server'];
|
||||||
$xnode->ntps->ntp->ntpMode = $data_values['ntp_server_mode'];
|
$xnode->ntps->ntp->ntpMode = $data_values['ntp_server_mode'];
|
||||||
} else {
|
} else {
|
||||||
$xnode->ntps = '';
|
$xnode->ntps = null;
|
||||||
}
|
}
|
||||||
// Ntp Config
|
// Ntp Config
|
||||||
break;
|
break;
|
||||||
|
@ -248,48 +247,65 @@ class xmlinterface {
|
||||||
break;
|
break;
|
||||||
case 'callManagerGroup':
|
case 'callManagerGroup':
|
||||||
$xnode = &$xml_node->$dkey->members;
|
$xnode = &$xml_node->$dkey->members;
|
||||||
if ($data_values['bindaddr'] == '0.0.0.0') {
|
$bind_tmp = $this->get_server_sccp_bind($data_values);
|
||||||
$ifc = 0;
|
$ifc = 0;
|
||||||
foreach ($data_values['server_if_list'] as $value) {
|
foreach ($bind_tmp as $bind_value) {
|
||||||
|
$xnode_obj = clone $xnode->member;
|
||||||
if (!empty($value['ip'])) {
|
$xnode_obj['priority'] = $ifc;
|
||||||
$ip_valid = true;
|
$xnode_obj->callManager->name = $data_values['servername'];
|
||||||
if (!empty($data_values['ccm_address'])) {
|
$xnode_obj->callManager->ports->ethernetPhonePort = $bind_value['port'];
|
||||||
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false ) {
|
$xnode_obj->callManager->processNodeName = $bind_value['ip'];
|
||||||
// Skip
|
if ($ifc === 0) {
|
||||||
} else {
|
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
} else {
|
||||||
$ip_valid = false;
|
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!in_array($value['ip'], array('0.0.0.0', '127.0.0.1'), true) && ($ip_valid)) {
|
|
||||||
|
|
||||||
$xnode_obj = clone $xnode->member;
|
|
||||||
// $xnode_obj = $xnode -> member;
|
|
||||||
// $xnode_obj = $xnode -> addChild($xnode->member);
|
|
||||||
$xnode_obj['priority'] = $ifc;
|
|
||||||
//$xnode_obj = &$xnode -> member -> callManager;
|
|
||||||
$xnode_obj->callManager->name = $data_values['servername'];
|
|
||||||
$xnode_obj->callManager->ports->ethernetPhonePort = $data_values['port'];
|
|
||||||
$xnode_obj->callManager->processNodeName = $value['ip'];
|
|
||||||
if ($ifc === 0) {
|
|
||||||
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
|
|
||||||
} else {
|
|
||||||
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
|
|
||||||
}
|
|
||||||
$ifc ++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
$ifc ++;
|
||||||
$xnode->member['priority'] = '0';
|
|
||||||
$xnode_obj = &$xnode->member->callManager;
|
|
||||||
$xnode_obj->name = $data_values['servername'];
|
|
||||||
$xnode_obj->ports->ethernetPhonePort = $data_values['port'];
|
|
||||||
$xnode_obj->processNodeName = $data_values['bindaddr'];
|
|
||||||
}
|
}
|
||||||
break;
|
/* if ($data_values['bindaddr'] == '0.0.0.0') {
|
||||||
|
$ifc = 0;
|
||||||
|
foreach ($data_values['server_if_list'] as $value) {
|
||||||
|
|
||||||
|
if (!empty($value['ip'])) {
|
||||||
|
$ip_valid = true;
|
||||||
|
if (!empty($data_values['ccm_address'])) {
|
||||||
|
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false ) {
|
||||||
|
// Skip
|
||||||
|
} else {
|
||||||
|
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
||||||
|
$ip_valid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!in_array($value['ip'], array('0.0.0.0', '127.0.0.1'), true) && ($ip_valid)) {
|
||||||
|
|
||||||
|
$xnode_obj = clone $xnode->member;
|
||||||
|
// $xnode_obj = $xnode -> member;
|
||||||
|
// $xnode_obj = $xnode -> addChild($xnode->member);
|
||||||
|
$xnode_obj['priority'] = $ifc;
|
||||||
|
//$xnode_obj = &$xnode -> member -> callManager;
|
||||||
|
$xnode_obj->callManager->name = $data_values['servername'];
|
||||||
|
$xnode_obj->callManager->ports->ethernetPhonePort = $data_values['port'];
|
||||||
|
$xnode_obj->callManager->processNodeName = $value['ip'];
|
||||||
|
if ($ifc === 0) {
|
||||||
|
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
|
} else {
|
||||||
|
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
|
}
|
||||||
|
$ifc ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$xnode->member['priority'] = '0';
|
||||||
|
$xnode_obj = &$xnode->member->callManager;
|
||||||
|
$xnode_obj->name = $data_values['servername'];
|
||||||
|
$xnode_obj->ports->ethernetPhonePort = $data_values['port'];
|
||||||
|
$xnode_obj->processNodeName = $data_values['bindaddr'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
*
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
||||||
|
@ -300,7 +316,7 @@ class xmlinterface {
|
||||||
case 'loadInformation':
|
case 'loadInformation':
|
||||||
// Set Path Image ????
|
// Set Path Image ????
|
||||||
if (isset($dev_config["tftp_firmware"])) {
|
if (isset($dev_config["tftp_firmware"])) {
|
||||||
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["tftp_firmware"].$dev_config["loadimage"] : '';
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["tftp_firmware"] . $dev_config["loadimage"] : '';
|
||||||
} else {
|
} else {
|
||||||
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["loadimage"] : '';
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["loadimage"] : '';
|
||||||
}
|
}
|
||||||
|
@ -319,10 +335,10 @@ class xmlinterface {
|
||||||
break;
|
break;
|
||||||
case 'commonProfile':
|
case 'commonProfile':
|
||||||
$xml_node->phonePassword = $data_values['dev_sshPassword'];
|
$xml_node->phonePassword = $data_values['dev_sshPassword'];
|
||||||
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] =='on') || ($data_values['backgroundImageAccess'] =='true') ) ? 'true':'false';
|
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] == 'on') || ($data_values['backgroundImageAccess'] == 'true') ) ? 'true' : 'false';
|
||||||
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
|
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'userLocale':
|
case 'userLocale':
|
||||||
case 'networkLocaleInfo':
|
case 'networkLocaleInfo':
|
||||||
case 'networkLocale':
|
case 'networkLocale':
|
||||||
|
@ -336,19 +352,19 @@ class xmlinterface {
|
||||||
} else {
|
} else {
|
||||||
$lang = (empty($hwlang[1])) ? $data_values['devlang'] : $hwlang[1];
|
$lang = (empty($hwlang[1])) ? $data_values['devlang'] : $hwlang[1];
|
||||||
}
|
}
|
||||||
if (($lang != 'null') && (!empty($lang))) {
|
if (($lang != 'null') && (!empty($lang))) {
|
||||||
if ($key == 'networkLocale') {
|
if ($key == 'networkLocale') {
|
||||||
$xml_work->$key = $lang;
|
$xml_work->$key = $lang;
|
||||||
} else {
|
} else {
|
||||||
if (isset($lang_info[$lang])) {
|
if (isset($lang_info[$lang])) {
|
||||||
$xml_node->name = $lang_info[$lang]['locale'];
|
$xml_node->name = $lang_info[$lang]['locale'];
|
||||||
$xml_node->langCode = $lang_info[$lang]['code'];
|
$xml_node->langCode = $lang_info[$lang]['code'];
|
||||||
if ($key == 'userLocale') {
|
if ($key == 'userLocale') {
|
||||||
$xml_node->winCharSet = $lang_info[$lang]['codepage'];
|
$xml_node->winCharSet = $lang_info[$lang]['codepage'];
|
||||||
}
|
|
||||||
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
|
||||||
}
|
}
|
||||||
|
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$xml_work->$key = '';
|
$xml_work->$key = '';
|
||||||
}
|
}
|
||||||
|
@ -373,6 +389,461 @@ class xmlinterface {
|
||||||
return time();
|
return time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function get_server_sccp_bind($data_values = array()) {
|
||||||
|
$res = array();
|
||||||
|
|
||||||
|
if ($data_values['bindaddr'] == '0.0.0.0') {
|
||||||
|
$ifc = 0;
|
||||||
|
foreach ($data_values['server_if_list'] as $value) {
|
||||||
|
if (!empty($value['ip'])) {
|
||||||
|
$ip_valid = true;
|
||||||
|
if (!empty($data_values['ccm_address'])) {
|
||||||
|
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false) {
|
||||||
|
// Skip
|
||||||
|
} else {
|
||||||
|
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
||||||
|
$ip_valid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!in_array($value['ip'], array('0.0.0.0', '127.0.0.1'), true) && ($ip_valid)) {
|
||||||
|
$res[] = array('ip' => $value['ip'], 'port' => $data_values['port']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$res[0] = array('ip' => $data_values['bindaddr'], 'port' => $data_values['port']);
|
||||||
|
}
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function get_server_sip_bind($data_values = array()) {
|
||||||
|
$res = array();
|
||||||
|
|
||||||
|
if (!empty($data_values['sipbind']) and ( $data_values['sipbind'] != '0.0.0.0')) {
|
||||||
|
$res[0] = array('ip' => $data_values['sipbind'], 'port' => $data_values['sipbindport'], 'tlsport' => $data_values['tlsport'], 'proto' => $data_values['sipsuportproto']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ifc = 0;
|
||||||
|
foreach ($data_values['server_if_list'] as $value) {
|
||||||
|
if (!empty($value['ip'])) {
|
||||||
|
$ip_valid = true;
|
||||||
|
if (!empty($data_values['ccm_address'])) {
|
||||||
|
if (strpos($data_values['ccm_address'], 'internal') !== false || strpos($data_values['ccm_address'], '0.0.0.0') !== false) {
|
||||||
|
// Skip
|
||||||
|
} else {
|
||||||
|
if (strpos($data_values['ccm_address'], $value['ip']) === false) {
|
||||||
|
$ip_valid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!in_array($value['ip'], array('0.0.0.0', '127.0.0.1', $data_values['sipbind']), true) && ($ip_valid)) {
|
||||||
|
$res[] = array('ip' => $value['ip'], 'port' => $data_values['sipbindport'], 'tlsport' => $data_values['tlsport'], 'proto' => $data_values['sipsuportproto']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_SEP_SIP_XML($store_path = '', $data_values = array(), $dev_config = array(), $dev_id = '', $lang_info = array()) {
|
||||||
|
|
||||||
|
$var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',
|
||||||
|
'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',
|
||||||
|
'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword',
|
||||||
|
'phonePersonalization' => 'phonePersonalization'
|
||||||
|
);
|
||||||
|
$var_xml_sipProfile = array('phoneLabel' => 'description',
|
||||||
|
'transferOnhookEnabled' => 'transferOnhookEnabled', 'enableVad' => 'enableVad', 'voipControlPort' => 'sipport'
|
||||||
|
);
|
||||||
|
$var_xml_sipline = array('name' => 'account', 'featureLabel' => 'account', 'displayName' => 'callerid', 'contact' => 'account',
|
||||||
|
'authName' => 'account', 'authPassword' => 'secret');
|
||||||
|
$var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList' => 'null', 'mobility' => 'null',
|
||||||
|
'phoneServices' => 'null', 'certHash' => 'null', 'deviceProtocol' => 'SIP',
|
||||||
|
'deviceSecurityMode' => '1');
|
||||||
|
|
||||||
|
// $var_hw_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id));
|
||||||
|
|
||||||
|
if (empty($dev_config)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$data_path = $dev_config['tftp_path'];
|
||||||
|
|
||||||
|
if (empty($store_path) || empty($data_path) || empty($data_values) || empty($dev_id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($dev_config['nametemplate'])) {
|
||||||
|
$xml_template = $data_path . '/templates/' . $dev_config['nametemplate'];
|
||||||
|
if (!file_exists($xml_template)) {
|
||||||
|
$xml_template = $data_path . '/templates/SEP0000000000.cnf.xml_79df_sip_template';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$xml_template = $data_path . '/templates/SEP0000000000.cnf.xml_79df_sip_template';
|
||||||
|
}
|
||||||
|
$xml_name = $store_path . '/' . $dev_id . '.cnf.xml';
|
||||||
|
$sip_bind = $this->get_server_sip_bind($data_values);
|
||||||
|
|
||||||
|
if (file_exists($xml_template)) {
|
||||||
|
$xml_work = simplexml_load_file($xml_template);
|
||||||
|
|
||||||
|
foreach ($var_xml_general_vars as $key => $data) {
|
||||||
|
if (isset($xml_work->$key)) {
|
||||||
|
if ($data != 'null') {
|
||||||
|
$xml_work->$key = $data;
|
||||||
|
} else {
|
||||||
|
$node = $xml_work->$key;
|
||||||
|
unset($node[0][0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($xml_work as $key => $data) {
|
||||||
|
// Set System global Values
|
||||||
|
if (!empty($var_xml_general_fields[$key])) {
|
||||||
|
$xml_work->$key = $data_values[$var_xml_general_fields[$key]];
|
||||||
|
}
|
||||||
|
// Set section Values
|
||||||
|
$xml_node = $xml_work->$key;
|
||||||
|
switch ($key) {
|
||||||
|
case 'devicePool':
|
||||||
|
$xml_node = $xml_work->$key;
|
||||||
|
foreach ($xml_work->$key->children() as $dkey => $ddata) {
|
||||||
|
switch ($dkey) {
|
||||||
|
case 'dateTimeSetting':
|
||||||
|
$xnode = &$xml_node->$dkey;
|
||||||
|
$tz_id = $data_values['ntp_timezone'];
|
||||||
|
$TZdata = $data_values['ntp_timezone_id'];
|
||||||
|
if (empty($TZdata)) {
|
||||||
|
$TZdata = array('offset' => '0', 'daylight' => '', 'cisco_code' => 'Greenwich Standard Time');
|
||||||
|
}
|
||||||
|
// $xnode->name = $tz_id;
|
||||||
|
$xnode->dateTemplate = $data_values['dateformat'];
|
||||||
|
$xnode->timeZone = $TZdata['cisco_code'];
|
||||||
|
// $xnode->timeZone = $tz_id.' Standard'.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']).' Time';
|
||||||
|
|
||||||
|
if ($data_values['ntp_config_enabled'] == 'yes') {
|
||||||
|
$xnode->ntps->ntp->name = $data_values['ntp_server'];
|
||||||
|
$xnode->ntps->ntp->ntpMode = $data_values['ntp_server_mode'];
|
||||||
|
} else {
|
||||||
|
$xnode->ntps = null;
|
||||||
|
}
|
||||||
|
// Ntp Config
|
||||||
|
break;
|
||||||
|
/* case 'srstInfo':
|
||||||
|
if ($data_values['srst_Option'] == 'user') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$xnode = &$xml_node->$dkey;
|
||||||
|
$xnode->name = $data_values['srst_Name'];
|
||||||
|
$xnode->srstOption = $data_values['srst_Option'];
|
||||||
|
$xnode->userModifiable = $data_values['srst_userModifiable'];
|
||||||
|
$xnode->isSecure = $data_values['srst_isSecure'];
|
||||||
|
|
||||||
|
$srst_fld = array('srst_ip' => array('ipAddr', 'port'));
|
||||||
|
// $srst_fld = array('srst_ip' => array('ipAddr','port') , 'srst_sip' => array('sipIpAddr','sipPort') );
|
||||||
|
foreach ($srst_fld as $srst_pro => $srs_put) {
|
||||||
|
$srst_data = explode(';', $data_values[$srst_pro]);
|
||||||
|
$si = 1;
|
||||||
|
// $xnode['test'] = $srst_data[0];
|
||||||
|
foreach ($srst_data as $value) {
|
||||||
|
$srs_val = explode('/', $value);
|
||||||
|
$nod = $srs_put[0] . $si;
|
||||||
|
$xnode->$nod = $srs_val[0];
|
||||||
|
$nod = $srs_put[1] . $si;
|
||||||
|
$xnode->$nod = $srs_val[1];
|
||||||
|
$si ++;
|
||||||
|
}
|
||||||
|
while ($si < 4) {
|
||||||
|
$nod = $srs_put[0] . $si;
|
||||||
|
$xnode->$nod = '';
|
||||||
|
$nod = $srs_put[1] . $si;
|
||||||
|
$xnode->$nod = '';
|
||||||
|
$si ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'connectionMonitorDuration':
|
||||||
|
$xml_node->$dkey = strval(intval(intval($data_values['keepalive']) * 0.75));
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
case 'callManagerGroup':
|
||||||
|
$xnode = &$xml_node->$dkey->members;
|
||||||
|
$ifc = 0;
|
||||||
|
foreach ($sip_bind as $bind_value) {
|
||||||
|
$xnode_obj = clone $xnode->member;
|
||||||
|
$xnode_obj['priority'] = $ifc;
|
||||||
|
$xnode_obj->callManager->name = $data_values['servername'];
|
||||||
|
$xnode_obj->callManager->ports->sipPort = $bind_value['port'];
|
||||||
|
$xnode_obj->callManager->ports->securedSipPort = $bind_value['tlsport'];
|
||||||
|
$xnode_obj->callManager->processNodeName = $bind_value['ip'];
|
||||||
|
if ($ifc === 0) {
|
||||||
|
$this->replaceSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
|
} else {
|
||||||
|
$this->appendSimpleXmlNode($xnode->member, $xnode_obj);
|
||||||
|
}
|
||||||
|
$ifc ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
||||||
|
break;
|
||||||
|
case 'sipProfile':
|
||||||
|
$xml_node = $xml_work->$key;
|
||||||
|
foreach ($xml_work->$key->children() as $dkey => $ddata) {
|
||||||
|
if (!empty($var_xml_sipProfile[$dkey])) {
|
||||||
|
if (!empty($data_values[$var_xml_sipProfile[$dkey]])) {
|
||||||
|
$xml_node->$dkey = $data_values[$var_xml_sipProfile[$dkey]];
|
||||||
|
} else {
|
||||||
|
$xml_node->$dkey = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch ($dkey) {
|
||||||
|
case 'sipProxies':
|
||||||
|
$xnode = &$xml_node->$dkey;
|
||||||
|
$xnode->backupProxy = $sip_bind[0]['ip'];
|
||||||
|
$xnode->backupProxyPort = $sip_bind[0]['port'];
|
||||||
|
$xnode->emergencyProxy = $sip_bind[0]['ip'];
|
||||||
|
$xnode->emergencyProxyPort = $sip_bind[0]['port'];
|
||||||
|
$xnode->outboundProxy = $sip_bind[0]['ip'];
|
||||||
|
$xnode->outboundProxyPort = $sip_bind[0]['port'];
|
||||||
|
$xnode->registerWithProxy = "true";
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'sipLines':
|
||||||
|
$xnode = &$xml_node->$dkey;
|
||||||
|
$ifc = 0;
|
||||||
|
if (!empty($data_values['siplines'])) {
|
||||||
|
foreach ($data_values['siplines'] as $spkey => $spvalue) {
|
||||||
|
$xnode_obj = clone $xnode->line;
|
||||||
|
|
||||||
|
$xnode_obj['button'] = $ifc + 1;
|
||||||
|
$xnode_obj['lineIndex'] = $ifc + 1;
|
||||||
|
//$xnode_obj->proxy = $data_values['bindaddr'];
|
||||||
|
if ($xnode_obj->proxy != 'USECALLMANAGER') {
|
||||||
|
$xnode_obj->proxy = $sip_bind[0]['ip'];
|
||||||
|
$xnode_obj->port = $sip_bind[0]['port'];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($var_xml_sipline as $line_key => $line_val) {
|
||||||
|
$xnode_obj->$line_key = $spvalue[$line_val];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ifc === 0) {
|
||||||
|
$this->replaceSimpleXmlNode($xnode->line, $xnode_obj);
|
||||||
|
} else {
|
||||||
|
$this->appendSimpleXmlNode($xnode->line, $xnode_obj);
|
||||||
|
}
|
||||||
|
$ifc ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// $xnode = &$xml_node->$dkey->members;
|
||||||
|
//$xnode = null;
|
||||||
|
break;
|
||||||
|
case 'softKeyFile':
|
||||||
|
case 'dialTemplate': // Доработать !
|
||||||
|
$xml_ext_file = '';
|
||||||
|
$templet_path = (($dkey == 'softKeyFile') ? $dev_config['tftp_softkey'] : $dev_config['tftp_dialplan']);
|
||||||
|
$tmp_key = ($dkey == 'softKeyFile') ? 'softkeyset' : '_dialrules';
|
||||||
|
if (!empty($dev_config[$tmp_key])) {
|
||||||
|
$xml_ext_file = (($dkey == 'softKeyFile') ? 'softkey'.$dev_config[$tmp_key].'.xml' : $dev_config[$tmp_key].'.xml');
|
||||||
|
}
|
||||||
|
// $xml_node->$dkey = $templet_path . '/' . $xml_ext_file.'---'.$dev_config[$tmp_key];
|
||||||
|
// break;
|
||||||
|
if (empty($xml_ext_file) || !file_exists($templet_path . '/' . $xml_ext_file)) {
|
||||||
|
$xml_ext_file = (($dkey == 'softKeyFile') ? 'softkeydefault.xml' : 'dialplan.xml');
|
||||||
|
}
|
||||||
|
if (file_exists($templet_path . '/' . $xml_ext_file)) {
|
||||||
|
$xml_node->$dkey = $xml_ext_file;
|
||||||
|
} else {
|
||||||
|
$xml_node->$dkey = null;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'versionStamp':
|
||||||
|
$xml_work->$key = time();
|
||||||
|
break;
|
||||||
|
case 'loadInformation':
|
||||||
|
// Set Path Image ????
|
||||||
|
if (isset($dev_config["tftp_firmware"])) {
|
||||||
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["tftp_firmware"] . $dev_config["loadimage"] : '';
|
||||||
|
} else {
|
||||||
|
$xml_work->$key = (isset($dev_config["loadimage"])) ? $dev_config["loadimage"] : '';
|
||||||
|
}
|
||||||
|
// $xml_work->$key = $dev_config["loadimage"];
|
||||||
|
if (!empty($dev_config['addon'])) {
|
||||||
|
$xnode = $xml_work->addChild('addOnModules');
|
||||||
|
$ti = 1;
|
||||||
|
foreach ($dev_config['addon_info'] as $add_key => $add_val) {
|
||||||
|
$xnode_obj = $xnode->addChild('addOnModule');
|
||||||
|
$xnode_obj->addAttribute('idx', $ti);
|
||||||
|
$xnode_obj->addChild('loadInformation', $add_val);
|
||||||
|
$ti ++;
|
||||||
|
}
|
||||||
|
// $this->appendSimpleXmlNode($xml_work , $xnode_obj);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'commonProfile':
|
||||||
|
$xml_node->phonePassword = $data_values['dev_sshPassword'];
|
||||||
|
$xml_node->backgroundImageAccess = (($data_values['backgroundImageAccess'] == 'on') || ($data_values['backgroundImageAccess'] == 'true') ) ? 'true' : 'false';
|
||||||
|
$xml_node->callLogBlfEnabled = $data_values['callLogBlfEnabled'];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'userLocale':
|
||||||
|
case 'networkLocaleInfo':
|
||||||
|
case 'networkLocale':
|
||||||
|
$hwlang = '';
|
||||||
|
$lang = '';
|
||||||
|
if (!empty($dev_config["_hwlang"])) {
|
||||||
|
$hwlang = explode(':', $dev_config["_hwlang"]);
|
||||||
|
}
|
||||||
|
if (($key == 'networkLocaleInfo') || ($key == 'networkLocale')) {
|
||||||
|
$lang = (empty($hwlang[0])) ? $data_values['netlang'] : $hwlang[0];
|
||||||
|
} else {
|
||||||
|
$lang = (empty($hwlang[1])) ? $data_values['devlang'] : $hwlang[1];
|
||||||
|
}
|
||||||
|
if (($lang != 'null') && (!empty($lang))) {
|
||||||
|
if ($key == 'networkLocale') {
|
||||||
|
$xml_work->$key = $lang;
|
||||||
|
} else {
|
||||||
|
if (isset($lang_info[$lang])) {
|
||||||
|
$xml_node->name = $lang_info[$lang]['locale'];
|
||||||
|
$xml_node->langCode = $lang_info[$lang]['code'];
|
||||||
|
if ($key == 'userLocale') {
|
||||||
|
$xml_node->winCharSet = $lang_info[$lang]['codepage'];
|
||||||
|
}
|
||||||
|
$this->replaceSimpleXmlNode($xml_work->$key, $xml_node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$xml_work->$key = '';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Move all set to $var_xml_general_vars
|
||||||
|
// case 'mobility':
|
||||||
|
// case 'capfList':
|
||||||
|
// break;
|
||||||
|
// case 'phoneServices':
|
||||||
|
// break;
|
||||||
|
// $xml_work->$key = '';
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// print_r($xml_work);
|
||||||
|
$xml_work->asXml($xml_name); // Save
|
||||||
|
} else {
|
||||||
|
die('Error Hardware template :' . $xml_template . ' not found');
|
||||||
|
}
|
||||||
|
return time();
|
||||||
|
}
|
||||||
|
|
||||||
|
function save_DialPlan($confDir,$get_settings) {
|
||||||
|
$xmlstr = "<DIALTEMPLATE>\n";
|
||||||
|
$xmlstr .= "<versionStamp>".time()."</versionStamp>\n";
|
||||||
|
$dialFelds = array('match', 'timeout', 'rewrite', 'tone'); //str -to lo !
|
||||||
|
|
||||||
|
$hdr_prefix = 'sccp_dial_';
|
||||||
|
$hdr_arprefix = 'sccp_dial-ar_';
|
||||||
|
$save_data = array();
|
||||||
|
$integer_msg = _("%s must be a non-negative integer");
|
||||||
|
$errors = array();
|
||||||
|
foreach ($get_settings[$hdr_arprefix . 'dialtemplate'] as $key => $value) {
|
||||||
|
$xmlstr .= '<TEMPLATE';
|
||||||
|
if (!empty($value['match'])) {
|
||||||
|
foreach ($dialFelds as $fld) {
|
||||||
|
if (isset($value[$fld])) {
|
||||||
|
if ($value[$fld] == 'empty' || $value[$fld] == '') {
|
||||||
|
//
|
||||||
|
} else {
|
||||||
|
$xmlstr .= ' ' . $fld . '="' . (string) $value[$fld] . '"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$errors = array('Fields need to match !!');
|
||||||
|
}
|
||||||
|
$xmlstr .= "/>\n";
|
||||||
|
}
|
||||||
|
$xmlstr .= '</DIALTEMPLATE>';
|
||||||
|
if (!empty($get_settings['idtemplate'])) {
|
||||||
|
if ($get_settings['idtemplate'] == '*new*') {
|
||||||
|
if (!empty($get_settings[$hdr_prefix . 'dialtemplate_name'])) {
|
||||||
|
$put_file = (string) $get_settings[$hdr_prefix . 'dialtemplate_name'];
|
||||||
|
} else {
|
||||||
|
$errors = array('Fields Dial Plan Name is requered !!');
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
$put_file = (string) $get_settings['idtemplate'];
|
||||||
|
} else {
|
||||||
|
$errors = array('Fields Dial Plan Name is requered !!');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($errors)) {
|
||||||
|
// $put_file = 'test';
|
||||||
|
$put_file = str_replace(array("\n", "\r", "\t", "/", "\\", ".", ","), '', $put_file);
|
||||||
|
$file = $confDir . '/dial' . $put_file . '.xml';
|
||||||
|
file_put_contents($file, $xmlstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_xmlSoftkeyset($config, $confDir, $name) {
|
||||||
|
if (empty($config[$name])) {
|
||||||
|
if ($name =='default') {
|
||||||
|
$typeSoft = $confDir["tftp_templates"].'/SIPDefaultSoftKey.xml_template';
|
||||||
|
if(file_exists($typeSoft)){
|
||||||
|
$file = $confDir["tftp_softkey"] . '/softkey' . $name . '.xml';
|
||||||
|
if (!copy($typeSoft, $file)) {
|
||||||
|
return array('error'=>'Access error'.$name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array();
|
||||||
|
} else {
|
||||||
|
return array('error'=>'Invalid softkey Name'.$name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$errors = array();
|
||||||
|
$xmlstr = "<softKeyCfg>\n";
|
||||||
|
$xmlstr .= "<versionStamp>".time()."</versionStamp>\n";
|
||||||
|
// $xmlstr .= "<typeSoftKey></typeSoftKey>\n";
|
||||||
|
$typeSoft = $confDir["tftp_templates"].'/SIPTypeSoftKey.xml_template';
|
||||||
|
$read_soft = "";
|
||||||
|
if(file_exists($typeSoft)){
|
||||||
|
$f_read = fopen($typeSoft,'r');
|
||||||
|
while (!feof($f_read)) {
|
||||||
|
$read_soft .= fread($f_read, 8192);
|
||||||
|
}
|
||||||
|
fclose($f_read);
|
||||||
|
}
|
||||||
|
$xmlstr .= $read_soft;
|
||||||
|
// $xmlstr .= $read_soft."\n</typeSoftKey>\n";
|
||||||
|
$xmlstr .= " <softKeySets>\n";
|
||||||
|
foreach ($config[$name] as $key => $value) {
|
||||||
|
$xmlstr .=' <softKeySet id="'.$key.'">'."\n";
|
||||||
|
foreach (explode(",",$value) as $keyvalue ) {
|
||||||
|
$xmlstr .= ' <softKey keyID="'.$keyvalue.'" />'."\n";
|
||||||
|
}
|
||||||
|
$xmlstr .=" </softKeySet>\n";
|
||||||
|
}
|
||||||
|
$xmlstr .= " </softKeySets>\n";
|
||||||
|
|
||||||
|
$xmlstr .= '</softKeyCfg>';
|
||||||
|
if (empty($errors)) {
|
||||||
|
// $put_file = str_replace(array("\n", "\r", "\t", "/", "\\", ".", ","), '', $put_file);
|
||||||
|
$file = $confDir["tftp_softkey"] . '/softkey' . $name . '.xml';
|
||||||
|
file_put_contents($file, $xmlstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $errors;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private function replaceSimpleXmlNode($xml, $element = SimpleXMLElement) {
|
private function replaceSimpleXmlNode($xml, $element = SimpleXMLElement) {
|
||||||
$dom = dom_import_simplexml($xml);
|
$dom = dom_import_simplexml($xml);
|
||||||
$import = $dom->ownerDocument->importNode(
|
$import = $dom->ownerDocument->importNode(
|
||||||
|
|
|
@ -65,6 +65,9 @@ $(document).ready(function () {
|
||||||
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
||||||
snd_command = 'save_hardware';
|
snd_command = 'save_hardware';
|
||||||
}
|
}
|
||||||
|
if ($('.fpbx-submit').data('id') == "hw_sedit") {
|
||||||
|
snd_command = 'save_sip_hardware';
|
||||||
|
}
|
||||||
if ($('.fpbx-submit').data('id') == "ruser_edit") {
|
if ($('.fpbx-submit').data('id') == "ruser_edit") {
|
||||||
snd_command = 'save_ruser';
|
snd_command = 'save_ruser';
|
||||||
}
|
}
|
||||||
|
@ -103,6 +106,9 @@ $(document).ready(function () {
|
||||||
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
if ($('.fpbx-submit').data('id') == "hw_edit") {
|
||||||
snd_command = 'save_hardware';
|
snd_command = 'save_hardware';
|
||||||
}
|
}
|
||||||
|
if ($('.fpbx-submit').data('id') == "hw_sedit") {
|
||||||
|
snd_command = 'save_sip_hardware';
|
||||||
|
}
|
||||||
if ($('.fpbx-submit').data('id') == "ruser_edit") {
|
if ($('.fpbx-submit').data('id') == "ruser_edit") {
|
||||||
snd_command = 'save_ruser';
|
snd_command = 'save_ruser';
|
||||||
}
|
}
|
||||||
|
|
300
conf/SEP0000000000.cnf.xml_791x_sip_template
Normal file
300
conf/SEP0000000000.cnf.xml_791x_sip_template
Normal file
|
@ -0,0 +1,300 @@
|
||||||
|
<device>
|
||||||
|
<fullConfig>true</fullConfig>
|
||||||
|
<deviceProtocol>SIP</deviceProtocol>
|
||||||
|
<devicePool>
|
||||||
|
<dateTimeSetting>
|
||||||
|
<dateTemplate>D/M/Y</dateTemplate>
|
||||||
|
<timeZone></timeZone>
|
||||||
|
<ntps>
|
||||||
|
<ntp>
|
||||||
|
<name></name>
|
||||||
|
<ntpMode>unicast</ntpMode>
|
||||||
|
</ntp>
|
||||||
|
</ntps>
|
||||||
|
</dateTimeSetting>
|
||||||
|
<callManagerGroup>
|
||||||
|
<members>
|
||||||
|
<member priority="0">
|
||||||
|
<callManager>
|
||||||
|
<ports>
|
||||||
|
<sipPort>5060</sipPort>
|
||||||
|
<securedSipPort>5061</securedSipPort>
|
||||||
|
</ports>
|
||||||
|
<processNodeName></processNodeName>
|
||||||
|
</callManager>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</callManagerGroup>
|
||||||
|
</devicePool>
|
||||||
|
<sipProfile>
|
||||||
|
<sipProxies>
|
||||||
|
<registerWithProxy>true</registerWithProxy>
|
||||||
|
</sipProxies>
|
||||||
|
<sipCallFeatures>
|
||||||
|
<cnfJoinEnabled>true</cnfJoinEnabled>
|
||||||
|
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
|
||||||
|
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
|
||||||
|
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
|
||||||
|
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
|
||||||
|
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
|
||||||
|
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
|
||||||
|
<rfc2543Hold>false</rfc2543Hold>
|
||||||
|
<callHoldRingback>1</callHoldRingback>
|
||||||
|
<localCfwdEnable>true</localCfwdEnable>
|
||||||
|
<semiAttendedTransfer>true</semiAttendedTransfer>
|
||||||
|
<anonymousCallBlock>3</anonymousCallBlock>
|
||||||
|
<callerIdBlocking>3</callerIdBlocking>
|
||||||
|
<dndControl>0</dndControl>
|
||||||
|
<remoteCcEnable>true</remoteCcEnable>
|
||||||
|
<retainForwardInformation>false</retainForwardInformation>
|
||||||
|
<uriDialingDisplayPreference>1</uriDialingDisplayPreference>
|
||||||
|
</sipCallFeatures>
|
||||||
|
<sipStack>
|
||||||
|
<sipInviteRetx>6</sipInviteRetx>
|
||||||
|
<sipRetx>10</sipRetx>
|
||||||
|
<timerInviteExpires>180</timerInviteExpires>
|
||||||
|
<timerRegisterExpires>3600</timerRegisterExpires>
|
||||||
|
<timerRegisterDelta>5</timerRegisterDelta>
|
||||||
|
<timerKeepAliveExpires>120</timerKeepAliveExpires>
|
||||||
|
<timerSubscribeExpires>120</timerSubscribeExpires>
|
||||||
|
<timerSubscribeDelta>5</timerSubscribeDelta>
|
||||||
|
<timerT1>500</timerT1>
|
||||||
|
<timerT2>4000</timerT2>
|
||||||
|
<maxRedirects>70</maxRedirects>
|
||||||
|
<remotePartyID>true</remotePartyID>
|
||||||
|
<userInfo>Phone</userInfo>
|
||||||
|
</sipStack>
|
||||||
|
<autoAnswerTimer>1</autoAnswerTimer>
|
||||||
|
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
|
||||||
|
<autoAnswerOverride>true</autoAnswerOverride>
|
||||||
|
<transferOnhookEnabled>true</transferOnhookEnabled>
|
||||||
|
<enableVad>false</enableVad>
|
||||||
|
<preferredCodec>none</preferredCodec>
|
||||||
|
<dtmfAvtPayload>101</dtmfAvtPayload>
|
||||||
|
<dtmfDbLevel>3</dtmfDbLevel>
|
||||||
|
<dtmfOutofBand>avt</dtmfOutofBand>
|
||||||
|
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
|
||||||
|
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
|
||||||
|
<kpml>0</kpml>
|
||||||
|
<phoneLabel></phoneLabel>
|
||||||
|
<stutterMsgWaiting>0</stutterMsgWaiting>
|
||||||
|
<callStats>true</callStats>
|
||||||
|
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
|
||||||
|
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
|
||||||
|
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
|
||||||
|
<startMediaPort>16384</startMediaPort>
|
||||||
|
<stopMediaPort>32766</stopMediaPort>
|
||||||
|
<natEnabled>false</natEnabled>
|
||||||
|
<natReceivedProcessing>false</natReceivedProcessing>
|
||||||
|
<natAddress></natAddress>
|
||||||
|
<sipLines>
|
||||||
|
<line button="1" lineIndex="1">
|
||||||
|
<featureID>9</featureID>
|
||||||
|
<featureLabel></featureLabel>
|
||||||
|
<proxy>USECALLMANAGER</proxy>
|
||||||
|
<port>5060</port>
|
||||||
|
<name></name>
|
||||||
|
<displayName></displayName>
|
||||||
|
<autoAnswer>
|
||||||
|
<autoAnswerEnabled>0</autoAnswerEnabled>
|
||||||
|
</autoAnswer>
|
||||||
|
<callWaiting>3</callWaiting>
|
||||||
|
<authName></authName>
|
||||||
|
<authPassword></authPassword>
|
||||||
|
<contact></contact>
|
||||||
|
<sharedLine>false</sharedLine>
|
||||||
|
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
|
||||||
|
<messageWaitingAMWI>0</messageWaitingAMWI>
|
||||||
|
<messagesNumber></messagesNumber>
|
||||||
|
<ringSettingIdle>4</ringSettingIdle>
|
||||||
|
<ringSettingActive>5</ringSettingActive>
|
||||||
|
<forwardCallInfoDisplay>
|
||||||
|
<callerName>true</callerName>
|
||||||
|
<callerNumber>true</callerNumber>
|
||||||
|
<redirectedNumber>false</redirectedNumber>
|
||||||
|
<dialedNumber>true</dialedNumber>
|
||||||
|
</forwardCallInfoDisplay>
|
||||||
|
<maxNumCalls>5</maxNumCalls>
|
||||||
|
<busyTrigger>4</busyTrigger>
|
||||||
|
</line>
|
||||||
|
</sipLines>
|
||||||
|
<externalNumberMask></externalNumberMask>
|
||||||
|
<voipControlPort>5060</voipControlPort>
|
||||||
|
<dscpForAudio>184</dscpForAudio>
|
||||||
|
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
|
||||||
|
<dialTemplate></dialTemplate>
|
||||||
|
<softKeyFile></softKeyFile>
|
||||||
|
</sipProfile>
|
||||||
|
<MissedCallLoggingOption>1</MissedCallLoggingOption>
|
||||||
|
<featurePolicyFile></featurePolicyFile>
|
||||||
|
<commonProfile>
|
||||||
|
<phonePassword></phonePassword>
|
||||||
|
<backgroundImageAccess>true</backgroundImageAccess>
|
||||||
|
<callLogBlfEnabled>2</callLogBlfEnabled>
|
||||||
|
</commonProfile>
|
||||||
|
<vendorConfig>
|
||||||
|
<defaultWallpaperFile></defaultWallpaperFile>
|
||||||
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
|
||||||
|
<enableMuteFeature>false</enableMuteFeature>
|
||||||
|
<enableGroupListen>true</enableGroupListen>
|
||||||
|
<holdResumeKey>1</holdResumeKey>
|
||||||
|
<recentsSoftKey>1</recentsSoftKey>
|
||||||
|
<dfBit>1</dfBit>
|
||||||
|
<pcPort>0</pcPort>
|
||||||
|
<spanToPCPort>1</spanToPCPort>
|
||||||
|
<garp>0</garp>
|
||||||
|
<rtcp>1</rtcp>
|
||||||
|
<videoRtcp>1</videoRtcp>
|
||||||
|
<voiceVlanAccess>0</voiceVlanAccess>
|
||||||
|
<videoCapability>1</videoCapability>
|
||||||
|
<hideVideoByDefault>0</hideVideoByDefault>
|
||||||
|
<separateMute>0</separateMute>
|
||||||
|
<ciscoCamera>1</ciscoCamera>
|
||||||
|
<usb1>1</usb1>
|
||||||
|
<usb2>1</usb2>
|
||||||
|
<usbClasses>0,1,2</usbClasses>
|
||||||
|
<sdio>1</sdio>
|
||||||
|
<wifi>1</wifi>
|
||||||
|
<bluetooth>1</bluetooth>
|
||||||
|
<bluetoothProfile>0,1</bluetoothProfile>
|
||||||
|
<btpbap>0</btpbap>
|
||||||
|
<bthfu>0</bthfu>
|
||||||
|
<ehookEnable>0</ehookEnable>
|
||||||
|
<autoSelectLineEnable>1</autoSelectLineEnable>
|
||||||
|
<autoCallSelect>1</autoCallSelect>
|
||||||
|
<incomingCallToastTimer>10</incomingCallToastTimer>
|
||||||
|
<dialToneFromReleaseKey>0</dialToneFromReleaseKey>
|
||||||
|
<joinAndDirectTransferPolicy>0</joinAndDirectTransferPolicy>
|
||||||
|
<minimumRingVolume></minimumRingVolume>
|
||||||
|
<simplifiedNewCall>0</simplifiedNewCall>
|
||||||
|
<actionableAlert>0</actionableAlert>
|
||||||
|
<showCallHistoryForSelectedLine>0</showCallHistoryForSelectedLine>
|
||||||
|
<kemOneColumn>0</kemOneColumn>
|
||||||
|
<lineMode>0</lineMode>
|
||||||
|
<allCallsOnPrimary>0</allCallsOnPrimary>
|
||||||
|
<softKeyControl>0</softKeyControl>
|
||||||
|
<settingsAccess>1</settingsAccess>
|
||||||
|
<webProtocol>0</webProtocol>
|
||||||
|
<webAccess>0</webAccess>
|
||||||
|
<webAdmin>1</webAdmin>
|
||||||
|
<adminPassword></adminPassword>
|
||||||
|
<sshAccess>0</sshAccess>
|
||||||
|
<detectCMConnectionFailure>0</detectCMConnectionFailure>
|
||||||
|
<g722CodecSupport>1</g722CodecSupport>
|
||||||
|
<handsetWidebandEnable>2</handsetWidebandEnable>
|
||||||
|
<headsetWidebandEnable>2</headsetWidebandEnable>
|
||||||
|
<headsetWidebandUIControl>1</headsetWidebandUIControl>
|
||||||
|
<handsetWidebandUIControl>1</handsetWidebandUIControl>
|
||||||
|
<daysDisplayNotActive>1,7</daysDisplayNotActive>
|
||||||
|
<displayOnTime>08:00</displayOnTime>
|
||||||
|
<displayOnDuration>10:00</displayOnDuration>
|
||||||
|
<displayIdleTimeout>00:10</displayIdleTimeout>
|
||||||
|
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
|
||||||
|
<displayRefreshRate>0</displayRefreshRate>
|
||||||
|
<daysBacklightNotActive>1,7</daysBacklightNotActive>
|
||||||
|
<backlightOnTime>08:00</backlightOnTime>
|
||||||
|
<backlightOnDuration>10:00</backlightOnDuration>
|
||||||
|
<backlightIdleTimeout>00:10</backlightIdleTimeout>
|
||||||
|
<backlightOnWhenIncomingCall>1</backlightOnWhenIncomingCall>
|
||||||
|
<recordingTone>0</recordingTone>
|
||||||
|
<recordingToneLocalVolume>100</recordingToneLocalVolume>
|
||||||
|
<recordingToneRemoteVolume>50</recordingToneRemoteVolume>
|
||||||
|
<recordingToneDuration></recordingToneDuration>
|
||||||
|
<moreKeyReversionTimer>5</moreKeyReversionTimer>
|
||||||
|
<peerFirmwareSharing>0</peerFirmwareSharing>
|
||||||
|
<loadServer></loadServer>
|
||||||
|
<problemReportUploadURL></problemReportUploadURL>
|
||||||
|
<enableCdpSwPort>1</enableCdpSwPort>
|
||||||
|
<enableCdpPcPort>0</enableCdpPcPort>
|
||||||
|
<enableLldpSwPort>1</enableLldpSwPort>
|
||||||
|
<enableLldpPcPort>0</enableLldpPcPort>
|
||||||
|
<cdpEnable>true</cdpEnable>
|
||||||
|
<outOfRangeAlert>0</outOfRangeAlert>
|
||||||
|
<scanningMode>2</scanningMode>
|
||||||
|
<applicationURL></applicationURL>
|
||||||
|
<appButtonTimer>0</appButtonTimer>
|
||||||
|
<appButtonPriority>0</appButtonPriority>
|
||||||
|
<specialNumbers></specialNumbers>
|
||||||
|
<sendKeyAction>0</sendKeyAction>
|
||||||
|
<powerOffWhenCharging>0</powerOffWhenCharging>
|
||||||
|
<homeScreen>0</homeScreen>
|
||||||
|
<accessContacts>1</accessContacts>
|
||||||
|
<accessFavorites>1</accessFavorites>
|
||||||
|
<accessVoicemail>1</accessVoicemail>
|
||||||
|
<accessApps>1</accessApps>
|
||||||
|
</vendorConfig>
|
||||||
|
<versionStamp>d902ed5a-c1e5-4233-b1d6-a960d53d1c3a</versionStamp>
|
||||||
|
<loadInformation></loadInformation>
|
||||||
|
<phoneServices useHTTPS="false">
|
||||||
|
<provisioning>2</provisioning>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Missed Calls</name>
|
||||||
|
<url>Application:Cisco/MissedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Received Calls</name>
|
||||||
|
<url>Application:Cisco/ReceivedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Placed Calls</name>
|
||||||
|
<url>Application:Cisco/PlacedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="2" category="0">
|
||||||
|
<name>Voicemail</name>
|
||||||
|
<url>Application:Cisco/Voicemail</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
</phoneServices>
|
||||||
|
<userLocale>
|
||||||
|
<name></name>
|
||||||
|
<uid>1</uid>
|
||||||
|
<langCode></langCode>
|
||||||
|
<version></version>
|
||||||
|
<winCharSet>utf-8</winCharSet>
|
||||||
|
</userLocale>
|
||||||
|
<networkLocale></networkLocale>
|
||||||
|
<networkLocaleInfo>
|
||||||
|
<name></name>
|
||||||
|
<version></version>
|
||||||
|
</networkLocaleInfo>
|
||||||
|
<deviceSecurityMode>1</deviceSecurityMode>
|
||||||
|
<idleTimeout>0</idleTimeout>
|
||||||
|
<authenticationURL></authenticationURL>
|
||||||
|
<messagesURL></messagesURL>
|
||||||
|
<servicesURL></servicesURL>
|
||||||
|
<directoryURL></directoryURL>
|
||||||
|
<idleURL></idleURL>
|
||||||
|
<informationURL></informationURL>
|
||||||
|
<proxyServerURL></proxyServerURL>
|
||||||
|
<secureAuthenticationURL></secureAuthenticationURL>
|
||||||
|
<secureMessagesURL></secureMessagesURL>
|
||||||
|
<secureServicesURL></secureServicesURL>
|
||||||
|
<secureDirectoryURL></secureDirectoryURL>
|
||||||
|
<secureInformationURL></secureInformationURL>
|
||||||
|
<secureIdleURL></secureIdleURL>
|
||||||
|
<transportLayerProtocol>1</transportLayerProtocol>
|
||||||
|
<TLSResumptionTimer>3600</TLSResumptionTimer>
|
||||||
|
<phonePersonalization>1</phonePersonalization>
|
||||||
|
<autoCallPickupEnable>true</autoCallPickupEnable>
|
||||||
|
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
|
||||||
|
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
|
||||||
|
<dndCallAlert>1</dndCallAlert>
|
||||||
|
<dndReminderTimer>5</dndReminderTimer>
|
||||||
|
<advertiseG722Codec>1</advertiseG722Codec>
|
||||||
|
<rollover>0</rollover>
|
||||||
|
<joinAcrossLines>0</joinAcrossLines>
|
||||||
|
<capfAuthMode>0</capfAuthMode>
|
||||||
|
<capfList></capfList>
|
||||||
|
<certHash></certHash>
|
||||||
|
<encrConfig>false</encrConfig>
|
||||||
|
<sshUserId></sshUserId>
|
||||||
|
<sshPassword></sshPassword>
|
||||||
|
</device>
|
255
conf/SEP0000000000.cnf.xml_79df_sip_template
Normal file
255
conf/SEP0000000000.cnf.xml_79df_sip_template
Normal file
|
@ -0,0 +1,255 @@
|
||||||
|
<device>
|
||||||
|
<fullConfig>true</fullConfig>
|
||||||
|
<deviceProtocol>SIP</deviceProtocol>
|
||||||
|
<devicePool>
|
||||||
|
<dateTimeSetting>
|
||||||
|
<dateTemplate>D/M/Y</dateTemplate>
|
||||||
|
<timeZone></timeZone>
|
||||||
|
<ntps>
|
||||||
|
<ntp>
|
||||||
|
<name></name>
|
||||||
|
<ntpMode>unicast</ntpMode>
|
||||||
|
</ntp>
|
||||||
|
</ntps>
|
||||||
|
</dateTimeSetting>
|
||||||
|
<callManagerGroup>
|
||||||
|
<members>
|
||||||
|
<member priority="0">
|
||||||
|
<callManager>
|
||||||
|
<ports>
|
||||||
|
<sipPort>5060</sipPort>
|
||||||
|
<securedSipPort>5061</securedSipPort>
|
||||||
|
</ports>
|
||||||
|
<processNodeName></processNodeName>
|
||||||
|
</callManager>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</callManagerGroup>
|
||||||
|
</devicePool>
|
||||||
|
<sipProfile>
|
||||||
|
<sipProxies>
|
||||||
|
<registerWithProxy>true</registerWithProxy>
|
||||||
|
<backupProxy>$ASTERISK</backupProxy>
|
||||||
|
<backupProxyPort>5060</backupProxyPort>
|
||||||
|
<emergencyProxy>$ASTERISK</emergencyProxy>
|
||||||
|
<emergencyProxyPort>5060</emergencyProxyPort>
|
||||||
|
<outboundProxy>$ASTERISK</outboundProxy>
|
||||||
|
<outboundProxyPort>5060</outboundProxyPort>
|
||||||
|
</sipProxies>
|
||||||
|
<sipCallFeatures>
|
||||||
|
<cnfJoinEnabled>true</cnfJoinEnabled>
|
||||||
|
<callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
|
||||||
|
<callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
|
||||||
|
<callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
|
||||||
|
<callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
|
||||||
|
<meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
|
||||||
|
<abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
|
||||||
|
<rfc2543Hold>false</rfc2543Hold>
|
||||||
|
<callHoldRingback>1</callHoldRingback>
|
||||||
|
<localCfwdEnable>true</localCfwdEnable>
|
||||||
|
<semiAttendedTransfer>true</semiAttendedTransfer>
|
||||||
|
<anonymousCallBlock>3</anonymousCallBlock>
|
||||||
|
<callerIdBlocking>3</callerIdBlocking>
|
||||||
|
<dndControl>0</dndControl>
|
||||||
|
<remoteCcEnable>true</remoteCcEnable>
|
||||||
|
<retainForwardInformation>false</retainForwardInformation>
|
||||||
|
</sipCallFeatures>
|
||||||
|
<sipStack>
|
||||||
|
<sipInviteRetx>6</sipInviteRetx>
|
||||||
|
<sipRetx>10</sipRetx>
|
||||||
|
<timerInviteExpires>180</timerInviteExpires>
|
||||||
|
<timerRegisterExpires>3600</timerRegisterExpires>
|
||||||
|
<timerRegisterDelta>5</timerRegisterDelta>
|
||||||
|
<timerKeepAliveExpires>120</timerKeepAliveExpires>
|
||||||
|
<timerSubscribeExpires>120</timerSubscribeExpires>
|
||||||
|
<timerSubscribeDelta>5</timerSubscribeDelta>
|
||||||
|
<timerT1>500</timerT1>
|
||||||
|
<timerT2>4000</timerT2>
|
||||||
|
<maxRedirects>70</maxRedirects>
|
||||||
|
<remotePartyID>true</remotePartyID>
|
||||||
|
<userInfo>Phone</userInfo>
|
||||||
|
</sipStack>
|
||||||
|
<autoAnswerTimer>1</autoAnswerTimer>
|
||||||
|
<autoAnswerAltBehavior>false</autoAnswerAltBehavior>
|
||||||
|
<autoAnswerOverride>true</autoAnswerOverride>
|
||||||
|
<transferOnhookEnabled>true</transferOnhookEnabled>
|
||||||
|
<enableVad>false</enableVad>
|
||||||
|
<preferredCodec>g711alaw</preferredCodec>
|
||||||
|
<dtmfAvtPayload>101</dtmfAvtPayload>
|
||||||
|
<dtmfDbLevel>3</dtmfDbLevel>
|
||||||
|
<dtmfOutofBand>avt</dtmfOutofBand>
|
||||||
|
<alwaysUsePrimeLine>false</alwaysUsePrimeLine>
|
||||||
|
<alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
|
||||||
|
<kpml>0</kpml>
|
||||||
|
<phoneLabel></phoneLabel>
|
||||||
|
<stutterMsgWaiting>0</stutterMsgWaiting>
|
||||||
|
<callStats>true</callStats>
|
||||||
|
<offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
|
||||||
|
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
|
||||||
|
<disableLocalSpeedDialConfig>false</disableLocalSpeedDialConfig>
|
||||||
|
<startMediaPort>16384</startMediaPort>
|
||||||
|
<stopMediaPort>32766</stopMediaPort>
|
||||||
|
<natEnabled>false</natEnabled>
|
||||||
|
<natReceivedProcessing>false</natReceivedProcessing>
|
||||||
|
<natAddress></natAddress>
|
||||||
|
<sipLines>
|
||||||
|
<line button="1" lineIndex="1">
|
||||||
|
<featureID>9</featureID>
|
||||||
|
<featureLabel></featureLabel>
|
||||||
|
<proxy>USECALLMANAGER</proxy>
|
||||||
|
<port>5060</port>
|
||||||
|
<name></name>
|
||||||
|
<displayName></displayName>
|
||||||
|
<autoAnswer>
|
||||||
|
<autoAnswerEnabled>0</autoAnswerEnabled>
|
||||||
|
</autoAnswer>
|
||||||
|
<callWaiting>3</callWaiting>
|
||||||
|
<authName></authName>
|
||||||
|
<authPassword></authPassword>
|
||||||
|
<contact></contact>
|
||||||
|
<sharedLine>false</sharedLine>
|
||||||
|
<messageWaitingLampPolicy>3</messageWaitingLampPolicy>
|
||||||
|
<messageWaitingAMWI>0</messageWaitingAMWI>
|
||||||
|
<messagesNumber></messagesNumber>
|
||||||
|
<ringSettingIdle>4</ringSettingIdle>
|
||||||
|
<ringSettingActive>5</ringSettingActive>
|
||||||
|
<forwardCallInfoDisplay>
|
||||||
|
<callerName>true</callerName>
|
||||||
|
<callerNumber>true</callerNumber>
|
||||||
|
<redirectedNumber>false</redirectedNumber>
|
||||||
|
<dialedNumber>true</dialedNumber>
|
||||||
|
</forwardCallInfoDisplay>
|
||||||
|
<maxNumCalls>5</maxNumCalls>
|
||||||
|
<busyTrigger>4</busyTrigger>
|
||||||
|
</line>
|
||||||
|
</sipLines>
|
||||||
|
<externalNumberMask></externalNumberMask>
|
||||||
|
<voipControlPort>5060</voipControlPort>
|
||||||
|
<dscpForAudio>184</dscpForAudio>
|
||||||
|
<ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
|
||||||
|
<dialTemplate></dialTemplate>
|
||||||
|
<softKeyFile></softKeyFile>
|
||||||
|
</sipProfile>
|
||||||
|
<MissedCallLoggingOption>1</MissedCallLoggingOption>
|
||||||
|
<commonProfile>
|
||||||
|
<phonePassword></phonePassword>
|
||||||
|
<backgroundImageAccess>true</backgroundImageAccess>
|
||||||
|
<callLogBlfEnabled>2</callLogBlfEnabled>
|
||||||
|
</commonProfile>
|
||||||
|
<vendorConfig>
|
||||||
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
|
||||||
|
<enableMuteFeature>false</enableMuteFeature>
|
||||||
|
<enableGroupListen>true</enableGroupListen>
|
||||||
|
<pcPort>0</pcPort>
|
||||||
|
<spanToPCPort>1</spanToPCPort>
|
||||||
|
<garp>0</garp>
|
||||||
|
<rtcp>1</rtcp>
|
||||||
|
<voiceVlanAccess>0</voiceVlanAccess>
|
||||||
|
<videoCapability>1</videoCapability>
|
||||||
|
<ehookEnable>0</ehookEnable>
|
||||||
|
<autoSelectLineEnable>1</autoSelectLineEnable>
|
||||||
|
<autoCallSelect>1</autoCallSelect>
|
||||||
|
<minimumRingVolume></minimumRingVolume>
|
||||||
|
<settingsAccess>1</settingsAccess>
|
||||||
|
<webProtocol>0</webProtocol>
|
||||||
|
<webAccess>0</webAccess>
|
||||||
|
<sshAccess>0</sshAccess>
|
||||||
|
<detectCMConnectionFailure>0</detectCMConnectionFailure>
|
||||||
|
<g722CodecSupport>1</g722CodecSupport>
|
||||||
|
<handsetWidebandEnable>2</handsetWidebandEnable>
|
||||||
|
<headsetWidebandEnable>2</headsetWidebandEnable>
|
||||||
|
<headsetWidebandUIControl>1</headsetWidebandUIControl>
|
||||||
|
<handsetWidebandUIControl>1</handsetWidebandUIControl>
|
||||||
|
<daysDisplayNotActive>1,7</daysDisplayNotActive>
|
||||||
|
<displayOnTime>08:00</displayOnTime>
|
||||||
|
<displayOnDuration>10:00</displayOnDuration>
|
||||||
|
<displayIdleTimeout>00:10</displayIdleTimeout>
|
||||||
|
<displayOnWhenIncomingCall>1</displayOnWhenIncomingCall>
|
||||||
|
<displayRefreshRate>0</displayRefreshRate>
|
||||||
|
<recordingTone>0</recordingTone>
|
||||||
|
<recordingToneLocalVolume>100</recordingToneLocalVolume>
|
||||||
|
<recordingToneRemoteVolume>50</recordingToneRemoteVolume>
|
||||||
|
<recordingToneDuration></recordingToneDuration>
|
||||||
|
<moreKeyReversionTimer>5</moreKeyReversionTimer>
|
||||||
|
<peerFirmwareSharing>0</peerFirmwareSharing>
|
||||||
|
<loadServer></loadServer>
|
||||||
|
<enableCdpSwPort>1</enableCdpSwPort>
|
||||||
|
<enableCdpPcPort>0</enableCdpPcPort>
|
||||||
|
<enableLldpSwPort>1</enableLldpSwPort>
|
||||||
|
<enableLldpPcPort>0</enableLldpPcPort>
|
||||||
|
</vendorConfig>
|
||||||
|
<versionStamp>d902ed5a-c1e5-4233-b1d6-a960d53d1c3a</versionStamp>
|
||||||
|
<loadInformation></loadInformation>
|
||||||
|
<phoneServices useHTTPS="false">
|
||||||
|
<provisioning>2</provisioning>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Missed Calls</name>
|
||||||
|
<url>Application:Cisco/MissedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Received Calls</name>
|
||||||
|
<url>Application:Cisco/ReceivedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="1" category="0">
|
||||||
|
<name>Placed Calls</name>
|
||||||
|
<url>Application:Cisco/PlacedCalls</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
<phoneService type="2" category="0">
|
||||||
|
<name>Voicemail</name>
|
||||||
|
<url>Application:Cisco/Voicemail</url>
|
||||||
|
<vendor></vendor>
|
||||||
|
<version></version>
|
||||||
|
</phoneService>
|
||||||
|
</phoneServices>
|
||||||
|
<userLocale>
|
||||||
|
<name></name>
|
||||||
|
<uid>1</uid>
|
||||||
|
<langCode></langCode>
|
||||||
|
<version>10</version>
|
||||||
|
<winCharSet>utf-8</winCharSet>
|
||||||
|
</userLocale>
|
||||||
|
<networkLocale></networkLocale>
|
||||||
|
<networkLocaleInfo>
|
||||||
|
<name></name>
|
||||||
|
<version>10</version>
|
||||||
|
</networkLocaleInfo>
|
||||||
|
<deviceSecurityMode>1</deviceSecurityMode>
|
||||||
|
<idleTimeout>0</idleTimeout>
|
||||||
|
<authenticationURL></authenticationURL>
|
||||||
|
<messagesURL></messagesURL>
|
||||||
|
<servicesURL></servicesURL>
|
||||||
|
<directoryURL></directoryURL>
|
||||||
|
<idleURL></idleURL>
|
||||||
|
<informationURL></informationURL>
|
||||||
|
<proxyServerURL></proxyServerURL>
|
||||||
|
<secureAuthenticationURL></secureAuthenticationURL>
|
||||||
|
<secureMessagesURL></secureMessagesURL>
|
||||||
|
<secureServicesURL></secureServicesURL>
|
||||||
|
<secureDirectoryURL></secureDirectoryURL>
|
||||||
|
<secureInformationURL></secureInformationURL>
|
||||||
|
<secureIdleURL></secureIdleURL>
|
||||||
|
<transportLayerProtocol>1</transportLayerProtocol>
|
||||||
|
<TLSResumptionTimer>3600</TLSResumptionTimer>
|
||||||
|
<phonePersonalization>1</phonePersonalization>
|
||||||
|
<autoCallPickupEnable>true</autoCallPickupEnable>
|
||||||
|
<blfAudibleAlertSettingOfIdleStation>0</blfAudibleAlertSettingOfIdleStation>
|
||||||
|
<blfAudibleAlertSettingOfBusyStation>0</blfAudibleAlertSettingOfBusyStation>
|
||||||
|
<dndCallAlert>1</dndCallAlert>
|
||||||
|
<dndReminderTimer>5</dndReminderTimer>
|
||||||
|
<advertiseG722Codec>1</advertiseG722Codec>
|
||||||
|
<rollover>0</rollover>
|
||||||
|
<joinAcrossLines>0</joinAcrossLines>
|
||||||
|
<capfAuthMode>0</capfAuthMode>
|
||||||
|
<capfList></capfList>
|
||||||
|
<certHash></certHash>
|
||||||
|
<encrConfig>false</encrConfig>
|
||||||
|
<sshUserId></sshUserId>
|
||||||
|
<sshPassword></sshPassword>
|
||||||
|
</device>
|
201
conf/SIPDefaultSoftKey.xml_template
Normal file
201
conf/SIPDefaultSoftKey.xml_template
Normal file
|
@ -0,0 +1,201 @@
|
||||||
|
<softKeyCfg>
|
||||||
|
<versionStamp>0200d4f8-e302-4315-b91e-9490e0b37fc5</versionStamp>
|
||||||
|
<typeSoftKey>
|
||||||
|
<softKeyDef keyID="Undefined">
|
||||||
|
<tag>0</tag>
|
||||||
|
<eventID>0</eventID>
|
||||||
|
<helpID>0</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Redial">
|
||||||
|
<tag>1</tag>
|
||||||
|
<eventID>1</eventID>
|
||||||
|
<helpID>301</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="NewCall">
|
||||||
|
<tag>2</tag>
|
||||||
|
<eventID>2</eventID>
|
||||||
|
<helpID>302</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Hold">
|
||||||
|
<tag>3</tag>
|
||||||
|
<eventID>3</eventID>
|
||||||
|
<helpID>303</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Transfer">
|
||||||
|
<tag>4</tag>
|
||||||
|
<eventID>4</eventID>
|
||||||
|
<helpID>304</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="CFwdAll">
|
||||||
|
<tag>5</tag>
|
||||||
|
<eventID>5</eventID>
|
||||||
|
<helpID>305</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="<<">
|
||||||
|
<tag>8</tag>
|
||||||
|
<eventID>8</eventID>
|
||||||
|
<helpID>308</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="EndCall">
|
||||||
|
<tag>9</tag>
|
||||||
|
<eventID>9</eventID>
|
||||||
|
<helpID>309</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Resume">
|
||||||
|
<tag>10</tag>
|
||||||
|
<eventID>10</eventID>
|
||||||
|
<helpID>310</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Answer">
|
||||||
|
<tag>11</tag>
|
||||||
|
<eventID>11</eventID>
|
||||||
|
<helpID>311</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Confrn">
|
||||||
|
<tag>13</tag>
|
||||||
|
<eventID>13</eventID>
|
||||||
|
<helpID>313</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Park">
|
||||||
|
<tag>14</tag>
|
||||||
|
<eventID>14</eventID>
|
||||||
|
<helpID>314</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Join">
|
||||||
|
<tag>15</tag>
|
||||||
|
<eventID>15</eventID>
|
||||||
|
<helpID>315</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="MeetMe">
|
||||||
|
<tag>16</tag>
|
||||||
|
<eventID>16</eventID>
|
||||||
|
<helpID>316</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="PickUp">
|
||||||
|
<tag>17</tag>
|
||||||
|
<eventID>17</eventID>
|
||||||
|
<helpID>317</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="GPickUp">
|
||||||
|
<tag>18</tag>
|
||||||
|
<eventID>18</eventID>
|
||||||
|
<helpID>318</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="RmLstC">
|
||||||
|
<tag>57</tag>
|
||||||
|
<eventID>19</eventID>
|
||||||
|
<helpID>319</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="DND">
|
||||||
|
<tag>63</tag>
|
||||||
|
<eventID>69</eventID>
|
||||||
|
<helpID>369</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="CallBack">
|
||||||
|
<tag>65</tag>
|
||||||
|
<eventID>20</eventID>
|
||||||
|
<helpID>320</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="QRT">
|
||||||
|
<tag>75</tag>
|
||||||
|
<eventID>22</eventID>
|
||||||
|
<helpID>322</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="MCID">
|
||||||
|
<tag>76</tag>
|
||||||
|
<eventID>27</eventID>
|
||||||
|
<helpID>327</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Select">
|
||||||
|
<tag>78</tag>
|
||||||
|
<eventID>29</eventID>
|
||||||
|
<helpID>329</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="ConfList">
|
||||||
|
<tag>79</tag>
|
||||||
|
<eventID>30</eventID>
|
||||||
|
<helpID>330</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="iDivert">
|
||||||
|
<tag>80</tag>
|
||||||
|
<eventID>31</eventID>
|
||||||
|
<helpID>331</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="OPickUp">
|
||||||
|
<tag>91</tag>
|
||||||
|
<eventID>34</eventID>
|
||||||
|
<helpID>334</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="HLog">
|
||||||
|
<tag>92</tag>
|
||||||
|
<eventID>35</eventID>
|
||||||
|
<helpID>335</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="AbbrDial">
|
||||||
|
<tag>7740</tag>
|
||||||
|
<eventID>71</eventID>
|
||||||
|
<helpID>371</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Record">
|
||||||
|
<tag>7747</tag>
|
||||||
|
<eventID>74</eventID>
|
||||||
|
<helpID>374</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
</typeSoftKey>
|
||||||
|
<softKeySets>
|
||||||
|
<softKeySet id="On Hook">
|
||||||
|
<softKey keyID="Redial" />
|
||||||
|
<softKey keyID="NewCall" />
|
||||||
|
<softKey keyID="DND" />
|
||||||
|
<softKey keyID="CFwdAll" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Off Hook">
|
||||||
|
<softKey keyID="Redial" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
<softKey keyID="PickUp" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Off Hook With Feature">
|
||||||
|
<softKey keyID="Redial" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Digits After First">
|
||||||
|
<softKey keyID="<<" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Ring Out">
|
||||||
|
<softKey keyID="Undefined" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Connected">
|
||||||
|
<softKey keyID="Hold" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
<softKey keyID="Transfer" />
|
||||||
|
<softKey keyID="Confrn" />
|
||||||
|
<softKey keyID="ConfList" />
|
||||||
|
<softKey keyID="Park" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Connected No Feature">
|
||||||
|
<softKey keyID="Undefined" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Connected Transfer">
|
||||||
|
<softKey keyID="Undefined" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
<softKey keyID="Transfer" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Connected Conference">
|
||||||
|
<softKey keyID="Undefined" />
|
||||||
|
<softKey keyID="EndCall" />
|
||||||
|
<softKey keyID="Confrn" />
|
||||||
|
<softKey keyID="ConfList" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="On Hold">
|
||||||
|
<softKey keyID="Resume" />
|
||||||
|
<softKey keyID="NewCall" />
|
||||||
|
</softKeySet>
|
||||||
|
<softKeySet id="Ring In">
|
||||||
|
<softKey keyID="Answer" />
|
||||||
|
<softKey keyID="iDivert" />
|
||||||
|
</softKeySet>
|
||||||
|
</softKeySets>
|
||||||
|
</softKeyCfg>
|
142
conf/SIPTypeSoftKey.xml_template
Normal file
142
conf/SIPTypeSoftKey.xml_template
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
<typeSoftKey>
|
||||||
|
<softKeyDef keyID="Undefined">
|
||||||
|
<tag>0</tag>
|
||||||
|
<eventID>0</eventID>
|
||||||
|
<helpID>0</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Redial">
|
||||||
|
<tag>1</tag>
|
||||||
|
<eventID>1</eventID>
|
||||||
|
<helpID>301</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="NewCall">
|
||||||
|
<tag>2</tag>
|
||||||
|
<eventID>2</eventID>
|
||||||
|
<helpID>302</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Hold">
|
||||||
|
<tag>3</tag>
|
||||||
|
<eventID>3</eventID>
|
||||||
|
<helpID>303</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Transfer">
|
||||||
|
<tag>4</tag>
|
||||||
|
<eventID>4</eventID>
|
||||||
|
<helpID>304</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="CFwdAll">
|
||||||
|
<tag>5</tag>
|
||||||
|
<eventID>5</eventID>
|
||||||
|
<helpID>305</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="<<">
|
||||||
|
<tag>8</tag>
|
||||||
|
<eventID>8</eventID>
|
||||||
|
<helpID>308</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="EndCall">
|
||||||
|
<tag>9</tag>
|
||||||
|
<eventID>9</eventID>
|
||||||
|
<helpID>309</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Resume">
|
||||||
|
<tag>10</tag>
|
||||||
|
<eventID>10</eventID>
|
||||||
|
<helpID>310</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Answer">
|
||||||
|
<tag>11</tag>
|
||||||
|
<eventID>11</eventID>
|
||||||
|
<helpID>311</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Confrn">
|
||||||
|
<tag>13</tag>
|
||||||
|
<eventID>13</eventID>
|
||||||
|
<helpID>313</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Park">
|
||||||
|
<tag>14</tag>
|
||||||
|
<eventID>14</eventID>
|
||||||
|
<helpID>314</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Join">
|
||||||
|
<tag>15</tag>
|
||||||
|
<eventID>15</eventID>
|
||||||
|
<helpID>315</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="MeetMe">
|
||||||
|
<tag>16</tag>
|
||||||
|
<eventID>16</eventID>
|
||||||
|
<helpID>316</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="PickUp">
|
||||||
|
<tag>17</tag>
|
||||||
|
<eventID>17</eventID>
|
||||||
|
<helpID>317</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="GPickUp">
|
||||||
|
<tag>18</tag>
|
||||||
|
<eventID>18</eventID>
|
||||||
|
<helpID>318</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="RmLstC">
|
||||||
|
<tag>57</tag>
|
||||||
|
<eventID>19</eventID>
|
||||||
|
<helpID>319</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="DND">
|
||||||
|
<tag>63</tag>
|
||||||
|
<eventID>69</eventID>
|
||||||
|
<helpID>369</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="CallBack">
|
||||||
|
<tag>65</tag>
|
||||||
|
<eventID>20</eventID>
|
||||||
|
<helpID>320</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="QRT">
|
||||||
|
<tag>75</tag>
|
||||||
|
<eventID>22</eventID>
|
||||||
|
<helpID>322</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="MCID">
|
||||||
|
<tag>76</tag>
|
||||||
|
<eventID>27</eventID>
|
||||||
|
<helpID>327</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Select">
|
||||||
|
<tag>78</tag>
|
||||||
|
<eventID>29</eventID>
|
||||||
|
<helpID>329</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="ConfList">
|
||||||
|
<tag>79</tag>
|
||||||
|
<eventID>30</eventID>
|
||||||
|
<helpID>330</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="iDivert">
|
||||||
|
<tag>80</tag>
|
||||||
|
<eventID>31</eventID>
|
||||||
|
<helpID>331</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="OPickUp">
|
||||||
|
<tag>91</tag>
|
||||||
|
<eventID>34</eventID>
|
||||||
|
<helpID>334</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="HLog">
|
||||||
|
<tag>92</tag>
|
||||||
|
<eventID>35</eventID>
|
||||||
|
<helpID>335</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="AbbrDial">
|
||||||
|
<tag>7740</tag>
|
||||||
|
<eventID>71</eventID>
|
||||||
|
<helpID>371</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
<softKeyDef keyID="Record">
|
||||||
|
<tag>7747</tag>
|
||||||
|
<eventID>74</eventID>
|
||||||
|
<helpID>374</helpID>
|
||||||
|
</softKeyDef>
|
||||||
|
</typeSoftKey>
|
8
conf/dialplan.xml_template
Normal file
8
conf/dialplan.xml_template
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<dialTemplate>
|
||||||
|
<versionStamp>e68d54c1-0354-4b1a-aca4-adffc4b7de2f</versionStamp>
|
||||||
|
<TEMPLATE match="3.." timeout="1" />
|
||||||
|
<TEMPLATE match="..." timeout="2" />
|
||||||
|
<TEMPLATE match="......." timeout="2" />
|
||||||
|
<TEMPLATE match="0........" timeout="2" />
|
||||||
|
<TEMPLATE match="*" timeout="3" />
|
||||||
|
</dialTemplate>
|
|
@ -1418,10 +1418,10 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_new_template">
|
<page_group name="sccp_dp_new_template">
|
||||||
<item type="IE" id="1" seq="99">
|
<item type="IE" id="1" seq="99">
|
||||||
<label>Template Name</label>
|
<label>Template Name </label>
|
||||||
<input>
|
<input>
|
||||||
<name>dialtemplate_name</name>
|
<name>dialtemplate_name</name>
|
||||||
<default></default>
|
<default>name_ruls</default>
|
||||||
<class>form-control</class>
|
<class>form-control</class>
|
||||||
</input>
|
</input>
|
||||||
<help>Help.</help>
|
<help>Help.</help>
|
||||||
|
@ -1648,7 +1648,46 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</page_group>
|
</page_group>
|
||||||
|
<page_group name="sccp_hw_sip_dev">
|
||||||
|
<label>General Device configuration</label>
|
||||||
|
<item type="IE" id="1" seq="99">
|
||||||
|
<label>Device SEP ID.[XXXXXXXXXXXX]=MAC</label>
|
||||||
|
<input>
|
||||||
|
<name>mac</name>
|
||||||
|
<default>000000000</default>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX</help>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item type="SDMS" id="2" seq="99">
|
||||||
|
<label>Type</label>
|
||||||
|
<name>type</name>
|
||||||
|
<default>7911</default>
|
||||||
|
<select name="model" dataid="dns" dataval="buttons">model</select>
|
||||||
|
<class>hw_select sccp-custom</class>
|
||||||
|
<help>The type of phone: 7911, 7940, 7960, etc. Important note: the 'G' models are handled as the base model (e.g., 7962G is handled as 7962). In the Display mode, this field is read-only because the MAC address and the model number are a pair.</help>
|
||||||
|
</item>
|
||||||
|
<item type="SDE" id="3" seq="99">
|
||||||
|
<label>Addon</label>
|
||||||
|
<name>addon</name>
|
||||||
|
<default>NONE</default>
|
||||||
|
<select name="model" dataval="buttons">model</select>
|
||||||
|
<class>hw_select sccp-custom</class>
|
||||||
|
<help>Addon: Addons are model specific and only work with certain base phones. This phone model is identified as being a phone that does not accept sidecars. Update devmodel if this is not correct.</help>
|
||||||
|
</item>
|
||||||
|
</page_group>
|
||||||
|
|
||||||
|
<page_group name="sccp_hw_sip_conf">
|
||||||
|
<label>SIP Device config</label>
|
||||||
|
<item type="SLP" id="2" seq="99">
|
||||||
|
<label>Dial Templates</label>
|
||||||
|
<name>_dialrules</name>
|
||||||
|
<default>dialplan</default>
|
||||||
|
<select></select>
|
||||||
|
<help>Dial templates control what number patterns are valid and how many seconds to wait for extra digits before dialing. </help>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</page_group>
|
||||||
|
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -186,6 +186,7 @@ ri ^(ATA030204SCCP090202A.zup)$ firmware/ata186/\1
|
||||||
|
|
||||||
# Keep locales in a separate directory (optional)
|
# Keep locales in a separate directory (optional)
|
||||||
ri ^(.+)\/(.+-sccp.jar)$ languages/\1/\2
|
ri ^(.+)\/(.+-sccp.jar)$ languages/\1/\2
|
||||||
|
ri ^(.+)\/(.+-sip.jar)$ languages/\1/\2
|
||||||
ri ^(.+)\/(.+-dictionary.xml)$ languages/\1/\2
|
ri ^(.+)\/(.+-dictionary.xml)$ languages/\1/\2
|
||||||
ri ^(.+)\/(.+-dictionary-ext.xml)$ languages/\1/\2
|
ri ^(.+)\/(.+-dictionary-ext.xml)$ languages/\1/\2
|
||||||
ri ^(.+)\/(.+-tones.xml)$ languages/\1/\2
|
ri ^(.+)\/(.+-tones.xml)$ languages/\1/\2
|
||||||
|
|
11
install.php
11
install.php
|
@ -318,6 +318,9 @@ function Get_DB_config($sccp_compatible) {
|
||||||
'auto_logout' => array('create' => "ENUM('on','off') NULL DEFAULT 'off'", 'modify' => "ENUM('on','off')" ),
|
'auto_logout' => array('create' => "ENUM('on','off') NULL DEFAULT 'off'", 'modify' => "ENUM('on','off')" ),
|
||||||
'homedevice' => array('create' => "varchar(20) NOT NULL", 'modify' => "VARCHAR(20)" ),
|
'homedevice' => array('create' => "varchar(20) NOT NULL", 'modify' => "VARCHAR(20)" ),
|
||||||
'devicegroup' => array('create' => "varchar(7) NOT NULL", 'modify' => "VARCHAR(7)" ),
|
'devicegroup' => array('create' => "varchar(7) NOT NULL", 'modify' => "VARCHAR(7)" ),
|
||||||
|
),
|
||||||
|
'sccpbuttonconfig' => array(
|
||||||
|
'reftype' => array('create' => "enum('sccpdevice', 'sipdevice', 'sccpuser') NOT NULL default 'sccpdevice'", 'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser')" ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Hardware Mobile. Can switch Softwate to Hardware
|
// Hardware Mobile. Can switch Softwate to Hardware
|
||||||
|
@ -443,7 +446,7 @@ function InstallDB_Buttons() {
|
||||||
$sql = "DROP TABLE IF EXISTS `buttonconfig`;
|
$sql = "DROP TABLE IF EXISTS `buttonconfig`;
|
||||||
CREATE TABLE IF NOT EXISTS `sccpbuttonconfig` (
|
CREATE TABLE IF NOT EXISTS `sccpbuttonconfig` (
|
||||||
`ref` varchar(15) NOT NULL default '',
|
`ref` varchar(15) NOT NULL default '',
|
||||||
`reftype` enum('sccpdevice', 'sccpuser') NOT NULL default 'sccpdevice',
|
`reftype` enum('sccpdevice', 'sipdevice', 'sccpuser') NOT NULL default 'sccpdevice',
|
||||||
`instance` tinyint(4) NOT NULL default 0,
|
`instance` tinyint(4) NOT NULL default 0,
|
||||||
`buttontype` enum('line','speeddial','service','feature','empty') NOT NULL default 'line',
|
`buttontype` enum('line','speeddial','service','feature','empty') NOT NULL default 'line',
|
||||||
`name` varchar(36) default NULL,
|
`name` varchar(36) default NULL,
|
||||||
|
@ -690,8 +693,10 @@ function InstallDB_createButtonConfigTrigger() {
|
||||||
IF NEW.`buttontype` = 'line' THEN
|
IF NEW.`buttontype` = 'line' THEN
|
||||||
SET @line_x = SUBSTRING_INDEX(NEW.`name`,'!',1);
|
SET @line_x = SUBSTRING_INDEX(NEW.`name`,'!',1);
|
||||||
SET @line_x = SUBSTRING_INDEX(@line_x,'@',1);
|
SET @line_x = SUBSTRING_INDEX(@line_x,'@',1);
|
||||||
IF (SELECT COUNT(*) FROM `sccpline` WHERE `sccpline`.`name` = @line_x ) = 0 THEN
|
IF NEW.`reftype` != 'sipdevice' THEN
|
||||||
UPDATE `Foreign key contraint violated: line does not exist in sccpline` SET x=1;
|
IF (SELECT COUNT(*) FROM `sccpline` WHERE `sccpline`.`name` = @line_x ) = 0 THEN
|
||||||
|
UPDATE `Foreign key contraint violated: line does not exist in sccpline` SET x=1;
|
||||||
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END;";
|
END;";
|
||||||
|
|
|
@ -34,7 +34,9 @@
|
||||||
function DispayDPActionsKeyFormatter(value, row, index) {
|
function DispayDPActionsKeyFormatter(value, row, index) {
|
||||||
var exp_model = '';
|
var exp_model = '';
|
||||||
exp_model += '<a href="?display=sccp_adv&tech_hardware=dialplan&extdisplay=' + row['id'] + '"><i class="fa fa-pencil"></i></a> \n';
|
exp_model += '<a href="?display=sccp_adv&tech_hardware=dialplan&extdisplay=' + row['id'] + '"><i class="fa fa-pencil"></i></a> \n';
|
||||||
exp_model += '</a> <a class="btn-item-delete" data-for="dialplan" data-id="' + row['id'] + '"><i class="fa fa-trash"></i></a>';
|
if (row['id'] !== 'dialplan') {
|
||||||
|
exp_model += '</a> <a class="btn-item-delete" data-for="dialplan" data-id="' + row['id'] + '"><i class="fa fa-trash"></i></a>';
|
||||||
|
}
|
||||||
return exp_model;
|
return exp_model;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -7,6 +7,7 @@
|
||||||
$def_val = null;
|
$def_val = null;
|
||||||
$dev_id = null;
|
$dev_id = null;
|
||||||
$dev_new = null;
|
$dev_new = null;
|
||||||
|
$device_warning= null;
|
||||||
// Default value from Server setings
|
// Default value from Server setings
|
||||||
|
|
||||||
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $this->sccpvalues['netlang']['data'], "seq" => "99");
|
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $this->sccpvalues['netlang']['data'], "seq" => "99");
|
||||||
|
@ -32,6 +33,21 @@ if (!empty($_REQUEST['id'])) {
|
||||||
foreach ($db_res as $key => $val) {
|
foreach ($db_res as $key => $val) {
|
||||||
if (!empty($val)) {
|
if (!empty($val)) {
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
case 'type':
|
||||||
|
$tmp_raw = $this->getSccp_model_information('byid', TRUE, 'all', array('model'=>$val));
|
||||||
|
if (!empty($tmp_raw[0])) {
|
||||||
|
$tmp_raw = $tmp_raw[0];
|
||||||
|
}
|
||||||
|
if (!empty($tmp_raw['validate'])) {
|
||||||
|
$tmpar = explode(";",$tmp_raw['validate']);
|
||||||
|
if ($tmpar[0] != 'yes') {
|
||||||
|
$device_warning['Image'] = Array('Device firmware not found : '.$tmp_raw['loadimage']);
|
||||||
|
}
|
||||||
|
if ($tmpar[1] != 'yes') {
|
||||||
|
$device_warning['Template'] = Array('Missing device configuration template : '. $tmp_raw['nametemplate']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'name':
|
case 'name':
|
||||||
$key = 'mac';
|
$key = 'mac';
|
||||||
$val = str_replace(array('SEP','ATA','VG'), '', $val);
|
$val = str_replace(array('SEP','ATA','VG'), '', $val);
|
||||||
|
@ -53,7 +69,33 @@ if (!empty($_REQUEST['id'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
//print_r($db_res);
|
||||||
|
|
||||||
|
if (!empty($device_warning)) {
|
||||||
|
?>
|
||||||
|
<div class="fpbx-container container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="container">
|
||||||
|
<h2 style="border:2px solid Tomato;color:Tomato;" >Warning in the SCCP Device</h2>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<?php
|
||||||
|
foreach ($device_warning as $key => $value) {
|
||||||
|
echo '<h3>'.$key.'</h3>';
|
||||||
|
if (is_array($value)) {
|
||||||
|
echo '<li>'._(implode('</li><li>', $value)).'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li>'. _($value).'</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<form autocomplete="off" name="frm_adddevice" id="frm_adddevice" class="fpbx-submit" action="" method="post" data-id="hw_edit">
|
<form autocomplete="off" name="frm_adddevice" id="frm_adddevice" class="fpbx-submit" action="" method="post" data-id="hw_edit">
|
||||||
<input type="hidden" name="category" value="adddevice_form">
|
<input type="hidden" name="category" value="adddevice_form">
|
||||||
|
|
125
views/form.addsdevice.php
Normal file
125
views/form.addsdevice.php
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
$def_val = null;
|
||||||
|
$dev_id = null;
|
||||||
|
$dev_new = null;
|
||||||
|
$device_warning= null;
|
||||||
|
// Default value from Server setings
|
||||||
|
|
||||||
|
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $this->sccpvalues['netlang']['data'], "seq" => "99");
|
||||||
|
$def_val['devlang'] = array("keyword" => 'devlang', "data" => $this->sccpvalues['devlang']['data'], "seq" => "99");
|
||||||
|
$def_val['directed_pickup_context'] = array("keyword" => 'directed_pickup_context', "data" => $this->sccpvalues['directed_pickup_context']['data'], "seq" => "99");
|
||||||
|
|
||||||
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
|
$dev_id = $_REQUEST['new_id'];
|
||||||
|
$val = str_replace(array('SEP','ATA','VG'), '', $dev_id);
|
||||||
|
$val = implode('.',sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
|
||||||
|
$def_val['mac'] = array("keyword" => 'mac', "data" => $val, "seq" => "99");
|
||||||
|
$val = $_REQUEST['type'];
|
||||||
|
$def_val['type'] = array("keyword" => 'type', "data" => $val, "seq" => "99");
|
||||||
|
if (!empty($_REQUEST['addon'])) {
|
||||||
|
$def_val['addon'] = array("keyword" => 'type', "data" => $_REQUEST['addon'], "seq" => "99");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($_REQUEST['id'])) {
|
||||||
|
$dev_id = $_REQUEST['id'];
|
||||||
|
$dev_new = $dev_id;
|
||||||
|
$db_res = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
|
foreach ($db_res as $key => $val) {
|
||||||
|
if (!empty($val)) {
|
||||||
|
switch ($key) {
|
||||||
|
case 'type':
|
||||||
|
$tmp_raw = $this->getSccp_model_information('byid', TRUE, 'all', array('model'=>$val));
|
||||||
|
if (!empty($tmp_raw[0])) {
|
||||||
|
$tmp_raw = $tmp_raw[0];
|
||||||
|
}
|
||||||
|
if (!empty($tmp_raw['validate'])) {
|
||||||
|
$tmpar = explode(";",$tmp_raw['validate']);
|
||||||
|
if ($tmpar[0] != 'yes') {
|
||||||
|
$device_warning['Image'] = Array('Device firmware not found : '.$tmp_raw['loadimage']);
|
||||||
|
}
|
||||||
|
if ($tmpar[1] != 'yes') {
|
||||||
|
$device_warning['Template'] = Array('Missing device configuration template : '. $tmp_raw['nametemplate']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'name':
|
||||||
|
$key = 'mac';
|
||||||
|
$val = str_replace(array('SEP','ATA','VG'), '', $val);
|
||||||
|
$val = implode('.',sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format
|
||||||
|
break;
|
||||||
|
case '_hwlang':
|
||||||
|
$tmpar = explode(":",$val);
|
||||||
|
$def_val['netlang'] = array("keyword" => 'netlang', "data" => $tmpar[0], "seq" => "99");
|
||||||
|
$def_val['devlang'] = array("keyword" => 'devlang', "data" => $tmpar[1], "seq" => "99");
|
||||||
|
break;
|
||||||
|
// case 'permit':
|
||||||
|
// case 'deny':
|
||||||
|
// $def_val[$key . '_net'] = array("keyword" => $key, "data" => before('/', $val), "seq" => "99");
|
||||||
|
// $key = $key . '_mask';
|
||||||
|
// $val = after('/', $val);
|
||||||
|
// break;
|
||||||
|
}
|
||||||
|
$def_val[$key] = array("keyword" => $key, "data" => $val, "seq" => "99");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//print_r($db_res);
|
||||||
|
|
||||||
|
if (!empty($device_warning)) {
|
||||||
|
?>
|
||||||
|
<div class="fpbx-container container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="container">
|
||||||
|
<h2 style="border:2px solid Tomato;color:Tomato;" >Warning in the SCCP Device</h2>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<?php
|
||||||
|
foreach ($device_warning as $key => $value) {
|
||||||
|
echo '<h3>'.$key.'</h3>';
|
||||||
|
if (is_array($value)) {
|
||||||
|
echo '<li>'._(implode('</li><li>', $value)).'</li>';
|
||||||
|
} else {
|
||||||
|
echo '<li>'. _($value).'</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<form autocomplete="off" name="frm_adddevice" id="frm_adddevice" class="fpbx-submit" action="" method="post" data-id="hw_sedit">
|
||||||
|
<input type="hidden" name="category" value="adddevice_form">
|
||||||
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
|
<input type="hidden" name="sccp_device_typeid" value="sipdevice">
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (empty($dev_new)){
|
||||||
|
echo '<input type="hidden" name="sccp_deviceid" value="new">';
|
||||||
|
} else {
|
||||||
|
echo '<input type="hidden" name="sccp_deviceid" value="'.$dev_id.'">';
|
||||||
|
}
|
||||||
|
if (empty($dev_id)){
|
||||||
|
echo $this->ShowGroup('sccp_hw_sip_dev', 1, 'sccp_hw', $def_val);
|
||||||
|
} else {
|
||||||
|
echo $this->ShowGroup('sccp_hw_dev_edit', 1, 'sccp_hw', $def_val);
|
||||||
|
}
|
||||||
|
echo $this->ShowGroup('sccp_hw_dev2', 1, 'sccp_hw', $def_val);
|
||||||
|
echo $this->ShowGroup('sccp_hw_sip_conf', 1, 'sccp_hw', $def_val);
|
||||||
|
// echo $this->ShowGroup('sccp_hw_dev_advance', 1, 'sccp_hw', $def_val);
|
||||||
|
// echo $this->ShowGroup('sccp_hw_dev_softkey', 1, 'sccp_hw', $def_val);
|
||||||
|
// echo $this->ShowGroup('sccp_hw_dev_pickup', 1, 'sccp_hw', $def_val);
|
||||||
|
// echo $this->ShowGroup('sccp_hw_dev_conference', 1, 'sccp_hw', $def_val);
|
||||||
|
// echo $this->ShowGroup('sccp_hw_dev_network', 1, 'sccp_hw', $def_val);
|
||||||
|
?>
|
||||||
|
</form>
|
|
@ -16,7 +16,7 @@ if (!empty($_REQUEST['extdisplay'])) {
|
||||||
$dev_id = $_REQUEST['extdisplay'];
|
$dev_id = $_REQUEST['extdisplay'];
|
||||||
}
|
}
|
||||||
if ($dev_id != '*new*') {
|
if ($dev_id != '*new*') {
|
||||||
$list_data= $this->get_DialPlan($dev_id );
|
$list_data= $this->get_DialPlan($dev_id);
|
||||||
$data_s= '';
|
$data_s= '';
|
||||||
foreach ($list_data['template'] as $key => $value) {
|
foreach ($list_data['template'] as $key => $value) {
|
||||||
foreach ($dialFelds as $fld) {
|
foreach ($dialFelds as $fld) {
|
||||||
|
@ -37,7 +37,7 @@ if ($dev_id != '*new*') {
|
||||||
|
|
||||||
<form autocomplete="off" name="frm_editdialtemplate" id="frm_editbuttons" class="fpbx-submit" action="" method="post" data-id="dial_template">
|
<form autocomplete="off" name="frm_editdialtemplate" id="frm_editbuttons" class="fpbx-submit" action="" method="post" data-id="dial_template">
|
||||||
|
|
||||||
<input type="hidden" name="idtemplate" value="<?php echo $dev_id;?>">
|
<input type="hidden" name="idtemplate" value="<?php echo str_replace('dial','',$dev_id);?>">
|
||||||
<input type="hidden" name="Submit" value="Submit">
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
<?php
|
<?php
|
||||||
if ($dev_id == '*new*') {
|
if ($dev_id == '*new*') {
|
||||||
|
|
260
views/form.sbuttons.php
Normal file
260
views/form.sbuttons.php
Normal file
|
@ -0,0 +1,260 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
$forminfo =array(
|
||||||
|
array("name"=>"dev_buttons",label=>"Buttons Configuration"),
|
||||||
|
array("name"=>"button",label=>"Buttons ",help=>"help.")
|
||||||
|
);
|
||||||
|
//$buttons_type= array("empty","line","service","feature","speeddial");
|
||||||
|
// "feature","service" -- Add leter !
|
||||||
|
$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
|
||||||
|
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status");
|
||||||
|
|
||||||
|
//$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
||||||
|
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
||||||
|
//$hint_list = $this->dbinterface->get_db_SccpTableData('SccpExtension');
|
||||||
|
$hint_list = $this->get_hint_info(true,array('context'=>'park-hints')) ;
|
||||||
|
|
||||||
|
// print_r($lines_list);
|
||||||
|
$line_id =0;
|
||||||
|
$max_buttons =56;
|
||||||
|
$show_buttons =1;
|
||||||
|
//print_r($hint_list);
|
||||||
|
if (!empty($_REQUEST['id'])) {
|
||||||
|
$dev_id = $_REQUEST['id'];
|
||||||
|
$db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
||||||
|
$db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
||||||
|
$max_buttons = $db_device['buttons'];
|
||||||
|
if (!empty($db_device['addon_buttons'])){
|
||||||
|
$max_buttons += $db_device['addon_buttons'];
|
||||||
|
}
|
||||||
|
$show_buttons = $max_buttons;
|
||||||
|
}
|
||||||
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
|
$val = $_REQUEST['type'];
|
||||||
|
$dev_schema = $this-> getSccp_model_information('byid', false, "all", array('model' =>$val));
|
||||||
|
// $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $val));
|
||||||
|
$max_buttons = $dev_schema[0]['buttons'];
|
||||||
|
if (!empty($_REQUEST['addon'])) {
|
||||||
|
$val = $_REQUEST['addon'];
|
||||||
|
$dev_schema = $this-> getSccp_model_information('byid', false, "all", array('model' =>$val));
|
||||||
|
$max_buttons += $dev_schema[0]['buttons'];
|
||||||
|
}
|
||||||
|
$show_buttons = $max_buttons;
|
||||||
|
}
|
||||||
|
if (!empty($_REQUEST['ru_id'])) {
|
||||||
|
$dev_id = $_REQUEST['ru_id'];
|
||||||
|
$db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id));
|
||||||
|
$show_buttons = $max_buttons;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form autocomplete="off" name="frm_editbuttons" id="frm_editbuttons" class="fpbx-submit" action="" method="post" data-id="hw_sedit">
|
||||||
|
<input type="hidden" name="category" value="frm_editbuttons">
|
||||||
|
<input type="hidden" name="Submit" value="Submit">
|
||||||
|
<input type="hidden" name="buttonscount" value="<?php echo $max_buttons?>">
|
||||||
|
<div class="section-title" data-for="<?php echo $forminfo[0]['name'];?>">
|
||||||
|
<h3><i class="fa fa-minus"></i><?php echo _($forminfo[0]['label']) ?></h3>
|
||||||
|
</div>
|
||||||
|
<div class="section" data-id="<?php echo $forminfo[0]['name'];?>">
|
||||||
|
<div class="row"> <div class="form-group">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<label class="control-label">Help</label>
|
||||||
|
<i class="fa fa-question-circle fpbx-help-icon" data-for="frmbuttons"></i>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<span id="frmbuttons-help" class="help-block fpbx-help-block"><?php echo _("buttons come in the following flavours: <br>
|
||||||
|
<ul>
|
||||||
|
<li>empty: Empty button (no options)</li>
|
||||||
|
<li>line: Registers the line with identifier specified as [name]</li>
|
||||||
|
<li>silent: buttons equal 'Line' with out ring</li>
|
||||||
|
<li>monitor: buttons mode speeddial + show status</li>
|
||||||
|
<li>speeddial: Adds a speeddial with label [name] and [option1] as number Optionally, [option2] can be used to specify a hint by extension@context as usual.</li>
|
||||||
|
<li>service (not implemented): Adds a service url Feature buttons have an on/off status represented on the device with a tick-box and can be used to set the device in a particular state. Currently Possible [option1],[option2] combinations:</li>
|
||||||
|
<ul>
|
||||||
|
<li>privacy,callpresent = Make a private call, number is suppressed</li><li>privacy,hint = Make a private call, hint is suppressed</li><li>cfwdall,number = Forward all calls </li><li>cfwbusy,number = Forward on busy</li><li>
|
||||||
|
cfwnoaswer,number = Forward on no-answer (not implemented yet)<br> DND,busy = Do-not-disturb, return Busy signal to Caller <br> DND,silent = Do-not-disturb, return nothing to caller <br>
|
||||||
|
monitor = Record Calls using AutoMon (asterisk 1.6.x only)</li><li>devstate,custom_devstate = Device State Feature Button (asterisk 1.6.1 and up). custom_devstate is the name of the custom devicestate to be toggled (How to use devicestate)
|
||||||
|
hold = To be implemented</li><li>transfer = To be implemented</li><li>multiblink = To be implemented</li><li>mobility = To be implemented</li><li>conference = To be implemented</li>
|
||||||
|
</ui></ui>");?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div></div>
|
||||||
|
<?php
|
||||||
|
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++){
|
||||||
|
// print_r($db_buttons[$line_id]);
|
||||||
|
$show_form_mode = '';
|
||||||
|
$defaul_tv = (empty($db_buttons[$line_id])) ? "empty": $db_buttons[$line_id]['buttontype'];
|
||||||
|
$defaul_btn = (empty($db_buttons[$line_id])) ? "": $db_buttons[$line_id]['name'];
|
||||||
|
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',',$db_buttons[$line_id]['options']);
|
||||||
|
|
||||||
|
$show_form_mode = $defaul_tv;
|
||||||
|
$def_hint = ''; // Hint check Box
|
||||||
|
$def_hint_btn = ''; // Hint Combo Box
|
||||||
|
$def_silent = '';
|
||||||
|
$defaul_advline = '';
|
||||||
|
if (strpos($defaul_btn,'@') >0) {
|
||||||
|
$defaul_tv = 'adv.line';
|
||||||
|
$show_form_mode = 'adv.line';
|
||||||
|
$defaul_btn = strtok($defaul_btn,'@');
|
||||||
|
$defaul_advline = strtok('@');
|
||||||
|
}
|
||||||
|
if ($line_id == 0) {
|
||||||
|
$show_form_mode = 'line';
|
||||||
|
}
|
||||||
|
if (stripos($defaul_btn,'!') >0) {
|
||||||
|
$defaul_btn = strtok($defaul_btn,'!');
|
||||||
|
$defaul_tv = 'silent';
|
||||||
|
$def_silent = 'checked';
|
||||||
|
}
|
||||||
|
if ($defaul_tv == "feature") {
|
||||||
|
$defaul_ftr = $defaul_opt[0];
|
||||||
|
$defaul_fcod = (empty($defaul_opt[1])) ? '': $defaul_opt[1];
|
||||||
|
// print_r($defaul_fcod);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($defaul_opt as $data_i) {
|
||||||
|
if (strpos($data_i,'@')>0) {
|
||||||
|
$test_btn = strtok($data_i,'@');
|
||||||
|
$def_hint = 'checked';
|
||||||
|
$defaul_btn = $data_i;
|
||||||
|
$def_hint_btn = $data_i;
|
||||||
|
if ($test_btn == $defaul_opt[0]) {
|
||||||
|
foreach ($lines_list as $data){
|
||||||
|
if ($data['id']==$test_btn) {
|
||||||
|
$show_form_mode = 'line';
|
||||||
|
$defaul_tv = 'monitor';
|
||||||
|
$defaul_btn = $test_btn;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// print_r($def_hint_btn);
|
||||||
|
// print_r($defaul_opt);
|
||||||
|
|
||||||
|
echo '<!-- Begin button :'.$line_id.' -->';
|
||||||
|
echo '<div class="line_button element-container" '.(($line_id < $show_buttons)?"":"hidden ").'data-id="'.$line_id.'">';
|
||||||
|
// echo 'Mode : '.$show_form_mode. ' opt: ';
|
||||||
|
// print_r( $defaul_opt);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div class="row"> <div class="form-group">
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<label class="control-label" for="<?php echo $forminfo[1]['name'].$line_id; ?> "><?php echo _($forminfo[1]['label'].$line_id).(($line_id =="0")?' Default ':''); ?></label>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5">
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<!-- Line Type Select -->
|
||||||
|
<select class="form-control lineselect" data-id="<?php echo $line_id;?>" name="<?php echo $forminfo[1]['name'].$line_id.'_type';?>" >
|
||||||
|
<?php
|
||||||
|
if ($line_id == 0) {
|
||||||
|
echo '<option value="line" selected >DEF LINE</option>';
|
||||||
|
}else {
|
||||||
|
foreach ($buttons_type as $data){
|
||||||
|
$select = (($data == $defaul_tv)?"selected":"");
|
||||||
|
echo '<option value="'.$data.'" '.$select.' >'.$data.'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!-- if Line Type = feature Show Futures -->
|
||||||
|
<div class="col-xs-7">
|
||||||
|
<select class ="form-control linefeature_<?php echo $line_id.(($show_form_mode=='feature')?'':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_feature';?>" >
|
||||||
|
<?php
|
||||||
|
foreach ($feature_list as $fkey => $fval) {
|
||||||
|
$select = (($fkey == $defaul_ftr)?"selected":"");
|
||||||
|
echo '<option value="'.$fkey.'" '.$select.' >'.$fval.'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<!-- if Line Type = line Show SCCP Num -->
|
||||||
|
<select class ="form-control lineselect_<?php echo $line_id.(($show_form_mode=='line' || $show_form_mode=='adv.line')?'':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_line';?>" >
|
||||||
|
<?php
|
||||||
|
foreach ($lines_list as $data){
|
||||||
|
$select = (($data['id']==$defaul_btn)?"selected":"");
|
||||||
|
echo '<option value="'.$data['id'].'" '.$select.' >'.$data['id'].' / '.$data['callerid'].'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<!-- if Line Type = Othe Show Input -->
|
||||||
|
<div class="linevalue_<?php echo $line_id.(($show_form_mode=='speeddial')? '':' hidden');?>" >
|
||||||
|
<?php
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_input" name="'.$forminfo[1]['name'].$line_id.'_input" placeholder="Name" value="'.$db_buttons[$line_id]['name'].'" >';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<!-- if Line Type = speeddial Show Hint line -->
|
||||||
|
<div class="linespeed_<?php echo $line_id.(($show_form_mode=='speeddial')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
|
||||||
|
<?php
|
||||||
|
echo '<div class="col-xs-5">';
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_phone" name="'.$forminfo[1]['name'].$line_id.'_phone" placeholder="Phone" value="'.$defaul_opt[0].'">';
|
||||||
|
echo '</div><div class="col-xs-2 radioset" data-toggle="buttons">';
|
||||||
|
echo '<input class="form-control" type="checkbox" name="'.$forminfo[1]['name'].$line_id.'_hint" id="'.$forminfo[1]['name'].$line_id.'_hint" '.$def_hint.' value= "hint">';
|
||||||
|
echo '<label for="'.$forminfo[1]['name'].$line_id.'_hint">hints</label>';
|
||||||
|
echo '</div><div class="col-xs-5">';
|
||||||
|
|
||||||
|
echo '<select class="form-control" name="'.$forminfo[1]['name'].$line_id.'_hline" >';
|
||||||
|
|
||||||
|
foreach ($hint_list as $data){
|
||||||
|
$select = (($data['key']==$def_hint_btn)?"selected":"");
|
||||||
|
echo '<option value="'.$data['key'].'" '.$select.' >'.$data['exten'].' / '.$data['label'].'</option>';
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
echo '</div>';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="linefeature_<?php echo $line_id.(($show_form_mode=='feature')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
|
||||||
|
<div class="col-xs-5">
|
||||||
|
<?php
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_flabel" name="'.$forminfo[1]['name'].$line_id.'_flabel" placeholder="Display Label" value="'.$db_buttons[$line_id]['name'].'" >';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-5">
|
||||||
|
<?php
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_fvalue" name="'.$forminfo[1]['name'].$line_id.'_fvalue" placeholder="code" value="'.$defaul_fcod.'" >';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- if Line Type = Advanced Show Hint line -->
|
||||||
|
|
||||||
|
<div class="lineadv_<?php echo $line_id.(($show_form_mode=='adv.line')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
|
||||||
|
<div class="col-xs-5">
|
||||||
|
<?php
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_advline" name="'.$forminfo[1]['name'].$line_id.'_advline" placeholder="[+=][01]:[cidname]" value="'.$defaul_advline.'" >';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-5">
|
||||||
|
<?php
|
||||||
|
echo '<input class="form-control" type="text" id="'.$forminfo[1]['name'].$line_id.'_advopt" name="'.$forminfo[1]['name'].$line_id.'_advopt" placeholder="ButtonLabel,Options" value="'.$db_buttons[$line_id]['options'].'" >';
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
echo '<!-- End button :'.$line_id.' -->';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="section-butom" data-for="<?php echo $forminfo[0]['name'];?>">
|
||||||
|
<h3></h3>
|
||||||
|
</div>
|
|
@ -40,6 +40,7 @@ $extension_list = array();
|
||||||
$sofkey_list = array();
|
$sofkey_list = array();
|
||||||
$model_list = array();
|
$model_list = array();
|
||||||
$device_list = array();
|
$device_list = array();
|
||||||
|
$dialplan_list = array();
|
||||||
|
|
||||||
//$time_zone_name = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_timezone');
|
//$time_zone_name = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_timezone');
|
||||||
//$time_zone = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_time');
|
//$time_zone = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_time');
|
||||||
|
@ -403,9 +404,10 @@ foreach ($items as $child) {
|
||||||
*
|
*
|
||||||
* SLM - Music on hold
|
* SLM - Music on hold
|
||||||
* SLK - System KeySet
|
* SLK - System KeySet
|
||||||
|
* SLP - Dial Paterns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($child['type'] == 'SLD' || $child['type'] == 'SLM'|| $child['type'] == 'SLK' ) {
|
if ($child['type'] == 'SLD' || $child['type'] == 'SLM'|| $child['type'] == 'SLK'|| $child['type'] == 'SLP' ) {
|
||||||
// $value = $child -> select;
|
// $value = $child -> select;
|
||||||
$res_n = (string)$child ->name;
|
$res_n = (string)$child ->name;
|
||||||
$res_id = $npref.$res_n;
|
$res_id = $npref.$res_n;
|
||||||
|
@ -432,6 +434,15 @@ foreach ($items as $child) {
|
||||||
}
|
}
|
||||||
$select_opt= $sofkey_list;
|
$select_opt= $sofkey_list;
|
||||||
}
|
}
|
||||||
|
if ($child['type'] == 'SLP') {
|
||||||
|
if (empty($dialplan_list)) {
|
||||||
|
foreach (\FreePBX::Sccp_manager()->get_DialPlanList() as $tmpkey) {
|
||||||
|
$tmp_id = $tmpkey['id'];
|
||||||
|
$dialplan_list[$tmp_id] = $tmp_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$select_opt= $dialplan_list;
|
||||||
|
}
|
||||||
// if ($child['type'] == 'SLZ') {
|
// if ($child['type'] == 'SLZ') {
|
||||||
// $select_opt= $time_zone;
|
// $select_opt= $time_zone;
|
||||||
// }
|
// }
|
||||||
|
@ -631,11 +642,12 @@ foreach ($items as $child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Input element Select SDM - Model List
|
* Input element Select SDM - Model List
|
||||||
* SDE - Extension List
|
* SDMS - Sip model List
|
||||||
|
* SDE - Extension List
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($child['type'] == 'SDM' || $child['type'] == 'SDE' || $child['type'] == 'SDD') {
|
if ($child['type'] == 'SDM' || $child['type'] == 'SDMS' || $child['type'] == 'SDE' || $child['type'] == 'SDD') {
|
||||||
// $value = $child -> select;
|
// $value = $child -> select;
|
||||||
$res_n = (string)$child ->name;
|
$res_n = (string)$child ->name;
|
||||||
$res_id = $npref.$res_n;
|
$res_id = $npref.$res_n;
|
||||||
|
@ -655,6 +667,12 @@ foreach ($items as $child) {
|
||||||
}
|
}
|
||||||
$select_opt= $model_list;
|
$select_opt= $model_list;
|
||||||
}
|
}
|
||||||
|
if ($child['type'] == 'SDMS') {
|
||||||
|
if (empty($model_list)) {
|
||||||
|
$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWSipDevice");
|
||||||
|
}
|
||||||
|
$select_opt= $model_list;
|
||||||
|
}
|
||||||
if ($child['type'] == 'SDE') {
|
if ($child['type'] == 'SDE') {
|
||||||
if (empty($extension_list)) {
|
if (empty($extension_list)) {
|
||||||
$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension");
|
$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension");
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="display no-border">
|
<div class="display no-border">
|
||||||
<h1><?php echo _("Device Phone") ?></h1>
|
<h1><?php echo _("Device SCCP Phone") ?></h1>
|
||||||
<div id="toolbar-sccp-phone">
|
<div id="toolbar-sccp-phone">
|
||||||
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco"><i class="fa fa-plus"> </i><?php echo _("Add Device Phone") ?></a>
|
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco"><i class="fa fa-plus"> </i><?php echo _("Add Device Phone") ?></a>
|
||||||
<button id="remove-sccp-phone" class="btn btn-danger sccp_update btn-tab-select" data-id="delete_hardware" disabled>
|
<button id="remove-sccp-phone" class="btn btn-danger sccp_update btn-tab-select" data-id="delete_hardware" disabled>
|
||||||
|
|
87
views/hardware.sphone.php
Normal file
87
views/hardware.sphone.php
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* To change this license header, choose License Headers in Project Properties.
|
||||||
|
* To change this template file, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
// vim: set ai ts=4 sw=4 ft=phtml:
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="fpbx-container container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="display no-border">
|
||||||
|
<h1><?php echo _("Device SIP Phone") ?></h1>
|
||||||
|
<div id="toolbar-sccp-sphone">
|
||||||
|
<a class="btn btn-default" href="config.php?display=sccp_phone&tech_hardware=cisco-sip"><i class="fa fa-plus"> </i><?php echo _("Add Device Phone") ?></a>
|
||||||
|
<button id="remove-sccp-sphone" class="btn btn-danger sccp_update btn-tab-select" data-id="delete_hardware" disabled>
|
||||||
|
<i class="glyphicon glyphicon-remove"></i> <span><?php echo _('Delete') ?></span>
|
||||||
|
</button>
|
||||||
|
<button name="cr_sccp_sphone_xml" class="btn sccp_update btn-default" data-id="create-cnf">
|
||||||
|
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Create CNF') ?></span>
|
||||||
|
</button>
|
||||||
|
<button name="reset_sccp_sphone" class="btn sccp_update btn-default" data-id="reset_dev">
|
||||||
|
<i class="glyphicon glyphicon-ok"></i> <span><?php echo _('Reset Device') ?></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table data-cookie="true" data-cookie-id-table="sccp-sphone" data-url="ajax.php?module=sccp_manager&command=getPhoneGrid&type=cisco-sip" data-cache="false" data-show-refresh="true" data-toolbar="#toolbar-sip" data-maintain-selected="true" data-show-columns="true" data-show-toggle="true" data-toggle="table" data-pagination="true" data-search="true" class="table table-striped ext-list" id="table-sip" data-id="mac">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-checkbox="true"></th>
|
||||||
|
<th data-sortable="true" data-field="mac"><?php echo _('Device SEP ID') ?></th>
|
||||||
|
<th data-sortable="true" data-field="description"><?php echo _('Device Descriptions') ?></th>
|
||||||
|
<th data-sortable="true" data-formatter="DispayTypeFormatter" data-field="type"><?php echo _('Device type') ?></th>
|
||||||
|
<th data-sortable="false" data-field="button" data-formatter="LineFormatter"><?php echo _('Line') ?></th>
|
||||||
|
<th data-sortable="false" data-field="status"><?php echo _('Status') ?></th>
|
||||||
|
<th data-sortable="false" data-field="address"><?php echo _('Address') ?></th>
|
||||||
|
<th data-field="actions" data-formatter="DispayDeviceActionsKeyFormatterS"><?php echo _('Actions') ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function DispayDeviceActionsKeyFormatterS(value, row, index) {
|
||||||
|
var exp_model = '';
|
||||||
|
if (row['new_hw'] == "Y") {
|
||||||
|
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco-sip&new_id=' + row['name'] + '&type='+ row['type'];
|
||||||
|
if (row['addon'] !== null ) {
|
||||||
|
exp_model += '&addon='+ row['addon'];
|
||||||
|
}
|
||||||
|
exp_model += '"><i class="fa fa-pencil"></i></a> \n';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco-sip&id=' + row['name'] + '"><i class="fa fa-pencil"></i></a> \n';
|
||||||
|
exp_model += '</a> <a class="btn-item-delete" data-for="hardware" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
|
||||||
|
}
|
||||||
|
return exp_model;
|
||||||
|
}
|
||||||
|
|
||||||
|
function DispayTypeFormatterS(value, row, index) {
|
||||||
|
var exp_model = value;
|
||||||
|
if (row['addon'] !== null ) {
|
||||||
|
exp_model += ' + ' + row['addon'];
|
||||||
|
}
|
||||||
|
return exp_model;
|
||||||
|
|
||||||
|
}
|
||||||
|
function LineFormatterS(value, row, index) {
|
||||||
|
if (value === null) {
|
||||||
|
return '-- EMPTY --';
|
||||||
|
}
|
||||||
|
var data = value.split(";");
|
||||||
|
result = '';
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
var val = data[i].split(',');
|
||||||
|
if (val[0] === 'line') {
|
||||||
|
result = result + val[1] + '<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
|
@ -98,14 +98,31 @@ if ($mysql_info['Value'] <= '2000') {
|
||||||
'Step 2: And add the following line below [mysqld] as shown below <br> [mysql] <br>group_concat_max_len = 4096 or more',
|
'Step 2: And add the following line below [mysqld] as shown below <br> [mysql] <br>group_concat_max_len = 4096 or more',
|
||||||
'Step 3: Save and restart <br> systemctl restart mariadb.service<br> Or <br> service mysqld restart');
|
'Step 3: Save and restart <br> systemctl restart mariadb.service<br> Or <br> service mysqld restart');
|
||||||
}
|
}
|
||||||
//global $amp_conf;
|
global $amp_conf;
|
||||||
// ************************************************************************************
|
// ************************************************************************************
|
||||||
/*
|
|
||||||
|
//$tmp_data_list = $this->getSccp_model_information('enabled', $validate = TRUE);
|
||||||
|
//$tmp_data_list = $amp_conf;
|
||||||
|
//$tmp_data_list=FreePBX::create()->Sipsettings->getConfig('bindport');
|
||||||
|
// $tmp_data_list=FreePBX::Sipsettings()->getChanSipSettings();
|
||||||
|
// $tmp_data_list = \FreePBX::Sipsettings()->getSipPortOwner();
|
||||||
|
// $tmp_data_list=$this->dbinterface->get_db_SccpTableData('SccpExtension');
|
||||||
|
// $tmp_data_list=$this->dbinterface->get_db_SccpTableData('SccpDevice', array('type'=>'cisco-sip'));
|
||||||
|
// $tmp_data_list= FreePBX::Sipsettings()->getChanSipDefaults();
|
||||||
|
$file_ext = array('.loads', '.sbn', '.bin', '.zup');
|
||||||
|
$dir = '/tftpboot';
|
||||||
|
//$tmp_data_list = $this->find_all_files($dir, $file_ext, 'fileonly');
|
||||||
print_r("<br> Help Info:<br><pre>");
|
print_r("<br> Help Info:<br><pre>");
|
||||||
print_r("<br>");
|
print_r("<br>");
|
||||||
|
print_r($tmp_data_list);
|
||||||
|
//$tmp_data_list = FreePBX::Sipsettings()->getChanSipDefaults();
|
||||||
|
$tmp_data_list = FreePBX::Sipsettings()->getBinds();
|
||||||
|
// $tmp_data_list = \FreePBX::Sipsettings()->getSipPortOwner();
|
||||||
//print_r($buton_list);
|
//print_r($buton_list);
|
||||||
print_r("<br>");
|
print_r("<br>");
|
||||||
print_r($user_list);
|
print_r($this->sccp_conf_init);
|
||||||
|
//$tmp_data_list=$this->sipconfigs->get_db_sip_TableData('Device');
|
||||||
|
print_r($this->srvinterface->sccp_list_keysets());
|
||||||
print_r("<br>");
|
print_r("<br>");
|
||||||
// print_r("DIRECT START");
|
// print_r("DIRECT START");
|
||||||
// print_r($this->sccpvalues['ccm_address']);
|
// print_r($this->sccpvalues['ccm_address']);
|
||||||
|
@ -121,7 +138,7 @@ print_r("<br> Help Info:<br><pre>");
|
||||||
// print_r($this->srvinterface->t_get_meta_data());
|
// print_r($this->srvinterface->t_get_meta_data());
|
||||||
// print_r($this->sccp_metainfo);
|
// print_r($this->sccp_metainfo);
|
||||||
print("</pre>");
|
print("</pre>");
|
||||||
*/
|
/* */
|
||||||
// ************************************************************************************
|
// ************************************************************************************
|
||||||
|
|
||||||
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
||||||
|
|
Loading…
Reference in a new issue