Prerelease 02.10.2017
Remove old SEPxxx.conf.XML fron tftpd add device from HotLine Registry. add Adv. Button Line configuration.
This commit is contained in:
parent
0dc0ef3e3c
commit
5bfa3bc930
|
@ -2,4 +2,6 @@ http://usecallmanager.nz/sepmac-cnf-xml.html
|
||||||
http://usecallmanager.nz/line-keys-xml.html
|
http://usecallmanager.nz/line-keys-xml.html
|
||||||
http://usecallmanager.nz/user-locale.html
|
http://usecallmanager.nz/user-locale.html
|
||||||
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+79x1+xml+configuration+files+for+SIP
|
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+79x1+xml+configuration+files+for+SIP
|
||||||
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+7970+SIP
|
https://www.voip-info.org/wiki/view/Asterisk+phone+cisco+7970+SIP
|
||||||
|
https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cuipph/all_models/xsi/8_5_1/xsi_dev_guide/xmlobjects.html
|
||||||
|
https://habrahabr.ru/post/176019/
|
|
@ -20,7 +20,8 @@
|
||||||
* ? Dial Templates - Hoto IT Include in XML.Config ???????
|
* ? Dial Templates - Hoto IT Include in XML.Config ???????
|
||||||
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; templet )
|
* - Dial Templates in device Configuration ( Enabled / inheret / Disabled ; templet )
|
||||||
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
* - WiFi Config (Bulk Deployment Utility for Cisco 7921, 7925, 7926)?????
|
||||||
* - Change internal use Field to _Field (new fiture support in chan_sccp )
|
* + Change internal use Field to _Field (new fiture support in chan_sccp )
|
||||||
|
* + Delete phone XML
|
||||||
* + Change Installer ?? (test )
|
* + Change Installer ?? (test )
|
||||||
* + DND Mode
|
* + DND Mode
|
||||||
* - suport kvstore ?????
|
* - suport kvstore ?????
|
||||||
|
@ -581,12 +582,14 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
if (!(strpos($idv, 'SEP') === false)) {
|
if (!(strpos($idv, 'SEP') === false)) {
|
||||||
$this->sccp_save_db('sccpdevice', array('name' => $idv), 'delete', "name");
|
$this->sccp_save_db('sccpdevice', array('name' => $idv), 'delete', "name");
|
||||||
$this->sccp_save_db("sccpbuttons", array(), 'delete', '', $idv);
|
$this->sccp_save_db("sccpbuttons", array(), 'delete', '', $idv);
|
||||||
|
$this->sccp_delete_device_XML($idv); // Концы в вводу !!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array('status' => true, 'table_reload' => true, 'message' => 'HW is Delete ! ');
|
return array('status' => true, 'table_reload' => true, 'message' => 'HW is Delete ! ');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'create_hw_tftp':
|
case 'create_hw_tftp':
|
||||||
|
$this->sccp_delete_device_XML('all'); // Концы в вводу !!
|
||||||
$this->sccp_create_tftp_XML();
|
$this->sccp_create_tftp_XML();
|
||||||
$models = $this->get_db_SccpTableData("SccpDevice");
|
$models = $this->get_db_SccpTableData("SccpDevice");
|
||||||
foreach ($models as $data) {
|
foreach ($models as $data) {
|
||||||
|
@ -742,12 +745,26 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$dev_id['description'] = $staus[$id_name]['descr'];
|
$dev_id['description'] = $staus[$id_name]['descr'];
|
||||||
$dev_id['status'] = $staus[$id_name]['status'];
|
$dev_id['status'] = $staus[$id_name]['status'];
|
||||||
$dev_id['address'] = $staus[$id_name]['address'];
|
$dev_id['address'] = $staus[$id_name]['address'];
|
||||||
|
$dev_id['new_hw'] = 'N';
|
||||||
|
$staus[$id_name]['news'] ='N';
|
||||||
} else {
|
} else {
|
||||||
$dev_id['description'] = '- -';
|
$dev_id['description'] = '- -';
|
||||||
$dev_id['status'] = 'no connect';
|
$dev_id['status'] = 'no connect';
|
||||||
$dev_id['address'] = '- -';
|
$dev_id['address'] = '- -';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Array ( [name] => SEP0004F2EDCBFD [mac] => SEP0004F2EDCBFD [type] => 7937 [button] => line,7818,default )
|
||||||
|
foreach ($staus as $dev_ids) {
|
||||||
|
$id_name = $dev_ids['name'];
|
||||||
|
if (empty($dev_ids['news'])) {
|
||||||
|
$dev_data = $this->sccp_getdevice_info($id_name);
|
||||||
|
$dev_schema = $this-> getSccp_model_information('byciscoid', false, "all", array('model' =>$dev_data['SCCP_Vendor']['model_id']));
|
||||||
|
|
||||||
|
$result[] = array('name' => $id_name, 'mac' => $id_name, 'button' => '---', 'type' => $dev_schema[0]['model'], 'new_hw' => 'Y',
|
||||||
|
'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
break;
|
break;
|
||||||
|
@ -1001,6 +1018,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$cmd_list = array('get_softkey' => array('cmd' => "sccp show softkeyssets", 'param' => ''),
|
$cmd_list = array('get_softkey' => array('cmd' => "sccp show softkeyssets", 'param' => ''),
|
||||||
'get_version' => array('cmd' => "sccp show version", 'param' => ''),
|
'get_version' => array('cmd' => "sccp show version", 'param' => ''),
|
||||||
'get_device' => array('cmd' => "sccp show devices", 'param' => ''),
|
'get_device' => array('cmd' => "sccp show devices", 'param' => ''),
|
||||||
|
'get_dev_info' => array('cmd' => "sccp show device", 'param' => 'name'),
|
||||||
'get_hints' => array('cmd' => "core show hints", 'param' => ''),
|
'get_hints' => array('cmd' => "core show hints", 'param' => ''),
|
||||||
'sccp_reload' => array('cmd' => "sccp reload force", 'param' => ''),
|
'sccp_reload' => array('cmd' => "sccp reload force", 'param' => ''),
|
||||||
'reset_phone' => array('cmd' => "sccp reset ", 'param' => 'name'), // Жесткая перезагрузка
|
'reset_phone' => array('cmd' => "sccp reset ", 'param' => 'name'), // Жесткая перезагрузка
|
||||||
|
@ -1013,7 +1031,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$id_param = $cmd_list[$id_cmd]['param'];
|
$id_param = $cmd_list[$id_cmd]['param'];
|
||||||
if (!empty($id_param)) {
|
if (!empty($id_param)) {
|
||||||
if (!empty($params[$id_param])) {
|
if (!empty($params[$id_param])) {
|
||||||
$result = $astman->Command($cmd_list[$id_cmd]['cmd'] . $params[$id_param]);
|
$result = $astman->Command($cmd_list[$id_cmd]['cmd'] .' '. $params[$id_param]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $astman->Command($cmd_list[$id_cmd]['cmd']);
|
$result = $astman->Command($cmd_list[$id_cmd]['cmd']);
|
||||||
|
@ -1052,6 +1070,31 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public function sccp_getdevice_info($dev_id) {
|
||||||
|
if (empty($dev_id)) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
$res = $this->sccp_core_comands(array('cmd' => 'get_dev_info', 'name' => $dev_id));
|
||||||
|
$res1 = str_replace(array("\r\n", "\r", "\n"), ';', strip_tags((string)$res['data']));
|
||||||
|
if (strpos($res1,'MAC-Address')) {
|
||||||
|
$res2 = substr($res1,0,strpos($res1,'+--- Buttons '));
|
||||||
|
$res1 = explode(';',substr($res2,strpos($res2,'MAC-Address')));
|
||||||
|
foreach ($res1 as $data ){
|
||||||
|
if (!empty($data)) {
|
||||||
|
$tmp = explode(':',$data);
|
||||||
|
$data_key =str_replace(array(" ", "-", "\t"), '_', trim($tmp[0]));
|
||||||
|
$res3[$data_key] =$tmp[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$res1 = $res3['Skinny_Phone_Type'];
|
||||||
|
$res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')'));
|
||||||
|
return $res3;
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function sccp_list_hints() {
|
public function sccp_list_hints() {
|
||||||
$ast_out = $this->sccp_core_comands(array('cmd' => 'get_hints'));
|
$ast_out = $this->sccp_core_comands(array('cmd' => 'get_hints'));
|
||||||
$ast_out = preg_split("/[\n]/", $ast_out['data']);
|
$ast_out = preg_split("/[\n]/", $ast_out['data']);
|
||||||
|
@ -2035,6 +2078,27 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return time();
|
return time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sccp_delete_device_XML($dev_id = '') {
|
||||||
|
if (empty($dev_id)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($dev_id =='all') {
|
||||||
|
$xml_name = $this->sccppath["tftp_path"] . '/SEP*.cnf.xml';
|
||||||
|
array_map("unlink", glob($xml_name));
|
||||||
|
} else {
|
||||||
|
if (!strpos($dev_id,'SEP')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$xml_name = $this->sccppath["tftp_path"] . '/' . $dev_id . '.cnf.xml';
|
||||||
|
if (file_exists($xml_name)) {
|
||||||
|
unlink($xml_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function sccp_create_sccp_init() {
|
function sccp_create_sccp_init() {
|
||||||
// Make sccp.conf data
|
// Make sccp.conf data
|
||||||
// [general]
|
// [general]
|
||||||
|
@ -2051,6 +2115,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
case "netlang": // Remove Key
|
case "netlang": // Remove Key
|
||||||
case "devlang":
|
case "devlang":
|
||||||
case "tftp_path":
|
case "tftp_path":
|
||||||
|
case "sccp_comatable":
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->sccp_conf_init['general'][$key] = $value['data'];
|
$this->sccp_conf_init['general'][$key] = $value['data'];
|
||||||
|
@ -2154,6 +2219,21 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
$sel_inf .= ", '0' as 'validate'";
|
$sel_inf .= ", '0' as 'validate'";
|
||||||
}
|
}
|
||||||
switch ($get) {
|
switch ($get) {
|
||||||
|
case "byciscoid":
|
||||||
|
if (!empty($filter)) {
|
||||||
|
if (!empty($filter['model'])) {
|
||||||
|
if (strpos($filter['model'],'loadInformation')) {
|
||||||
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` =" . $filter['model'] . ") ORDER BY model ";
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (`loadinformationid` ='loadInformation" . $filter['model'] . "') ORDER BY model ";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// $sql = "SELECT ".$filter['model'];
|
||||||
|
$sql = "SELECT " . $sel_inf . " FROM sccpdevmodel ORDER BY model ";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "byid":
|
case "byid":
|
||||||
if (!empty($filter)) {
|
if (!empty($filter)) {
|
||||||
if (!empty($filter['model'])) {
|
if (!empty($filter['model'])) {
|
||||||
|
|
90
conf/SEP0000000000.cnf.xml_7940_template
Normal file
90
conf/SEP0000000000.cnf.xml_7940_template
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<device>
|
||||||
|
<sshUserId>cisco</sshUserId>
|
||||||
|
<sshPassword>cisco</sshPassword>
|
||||||
|
<deviceProtocol>SCCP</deviceProtocol>
|
||||||
|
<devicePool>
|
||||||
|
<dateTimeSetting>
|
||||||
|
<name>Netherlands</name>
|
||||||
|
<dateTemplate>D-M-YA</dateTemplate>
|
||||||
|
<timeZone>W. Europe Standard/Daylight Time</timeZone>
|
||||||
|
<ntps>
|
||||||
|
<ntp>
|
||||||
|
<name>x.x.x.x</name>
|
||||||
|
<ntpMode>Unicast</ntpMode>
|
||||||
|
</ntp>
|
||||||
|
</ntps>
|
||||||
|
</dateTimeSetting>
|
||||||
|
<callManagerGroup>
|
||||||
|
<members>
|
||||||
|
<member priority="0">
|
||||||
|
<callManager>
|
||||||
|
<ports>
|
||||||
|
<ethernetPhonePort>2000</ethernetPhonePort>
|
||||||
|
</ports>
|
||||||
|
<processNodeName>x.x.x.x</processNodeName>
|
||||||
|
</callManager>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</callManagerGroup>
|
||||||
|
<srstInfo>
|
||||||
|
<name>Enable</name>
|
||||||
|
<srstOption>Enable</srstOption>
|
||||||
|
<userModifiable>true</userModifiable>
|
||||||
|
<ipAddr1>x.x.x.x</ipAddr1>
|
||||||
|
<port1>2000</port1>
|
||||||
|
<ipAddr2/>
|
||||||
|
<port2>2000</port2>
|
||||||
|
<ipAddr3/>
|
||||||
|
<port3>2000</port3>
|
||||||
|
</srstInfo>
|
||||||
|
</devicePool>
|
||||||
|
<loadInformation>P00308010100</loadInformation>
|
||||||
|
<vendorConfig>
|
||||||
|
<disableSpeaker>false</disableSpeaker>
|
||||||
|
<disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
|
||||||
|
<forwardingDelay>1</forwardingDelay>
|
||||||
|
<pcPort>0</pcPort>
|
||||||
|
<settingsAccess>1</settingsAccess>
|
||||||
|
<garp>0</garp>
|
||||||
|
<voiceVlanAccess>0</voiceVlanAccess>
|
||||||
|
<videoCapability>0</videoCapability>
|
||||||
|
<autoSelectLineEnable>0</autoSelectLineEnable>
|
||||||
|
<webAccess>0</webAccess>
|
||||||
|
<daysDisplayNotActive>1,7</daysDisplayNotActive>
|
||||||
|
<displayOnTime>08:30</displayOnTime>
|
||||||
|
<displayOnDuration>11:30</displayOnDuration>
|
||||||
|
<displayIdleTimeout>01:00</displayIdleTimeout>
|
||||||
|
</vendorConfig>
|
||||||
|
<userLocale>
|
||||||
|
<name>Dutch_Netherlands</name>
|
||||||
|
<langCode>nl</langCode>
|
||||||
|
<winCharSet>iso-8859-1</winCharSet>
|
||||||
|
</userLocale>
|
||||||
|
<networkLocale>Netherlands</networkLocale>
|
||||||
|
<networkLocaleInfo>
|
||||||
|
<name/>
|
||||||
|
<uid>64</uid>
|
||||||
|
<version>4.0(1)</version>
|
||||||
|
</networkLocaleInfo>
|
||||||
|
<deviceSecurityMode>1</deviceSecurityMode>
|
||||||
|
<idleTimeout>3600</idleTimeout>
|
||||||
|
<authenticationURL>http://x.x.x.x/cisco_menu/authentication.php</authenticationURL>
|
||||||
|
<idleURL>http://x.x.x.x/cisco_menu/idle.php</idleURL>
|
||||||
|
<informationURL>http://x.x.x.x/cisco_menu/help/help.php</informationURL>
|
||||||
|
<messagesURL/>
|
||||||
|
<proxyServerURL/>
|
||||||
|
<servicesURL>http://x.x.x.x/cisco_menu/menu.php</servicesURL>
|
||||||
|
<directoryURL>http://x.x.x.x/cisco_menu/directory/menu.php</directoryURL>
|
||||||
|
<dscpForSCCPPhoneConfig>104</dscpForSCCPPhoneConfig>
|
||||||
|
<dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
|
||||||
|
<dscpForCm2Dvce>184</dscpForCm2Dvce>
|
||||||
|
<transportLayerProtocol>4</transportLayerProtocol>
|
||||||
|
<capfAuthMode>0</capfAuthMode>
|
||||||
|
<capfList>
|
||||||
|
<capf>
|
||||||
|
<phonePort>3804</phonePort>
|
||||||
|
</capf>
|
||||||
|
</capfList>
|
||||||
|
<encrConfig>false</encrConfig>
|
||||||
|
</device>
|
|
@ -407,6 +407,30 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
||||||
|
<item type="HLP" id="2">
|
||||||
|
<name>Help_id2</name><label>HELP SCCP HotLine</label>
|
||||||
|
<element type='p'>Setting the hotline Feature on a device, will make it connect to a predefined extension as soon as the Receiver
|
||||||
|
is picked up or the "New Call" Button is pressed. No number has to be given. This works even on devices which have
|
||||||
|
no entry in the config file or realtime database.</element>
|
||||||
|
<element type='h4'>The hotline function can be used in :</element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>First time configuration</col><col>This will make it easier to register new devices and assign numbers</col></row>
|
||||||
|
<row><col>At a door</col><col>Where you want people to be able to only call one number</col></row>
|
||||||
|
<row><col>For unprovisioned phones</col><col>To only be able to call the helpdesk to get their phone set up</col></row>
|
||||||
|
</element>
|
||||||
|
<element type='p'> </element>
|
||||||
|
<element type='h3'>Be careful with this function. Especially not to the internet. So i would restring the deny/permit to 'internal' by default in that case. </element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>Alow =</col><col>Specify a list of your networks, for example: 192.168.1.0</col></row>
|
||||||
|
<row><col>deny =</col><col>0.0.0.0/0.0.0.0</col></row>
|
||||||
|
<row><col>permit =</col><col>internal</col></row>
|
||||||
|
<row><col>hotline_context =</col><col>sccp</col></row>
|
||||||
|
<row><col>hotline_label = </col><col>hotline</col></row>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
||||||
<default>no</default>
|
<default>no</default>
|
||||||
<button value="yes">Enabled</button>
|
<button value="yes">Enabled</button>
|
||||||
|
@ -421,10 +445,18 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="2"><label>Hotline Label</label>
|
||||||
|
<input>
|
||||||
|
<name>hotline_label</name>
|
||||||
|
<default>Hot Line</default>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>Hotline Label: The label on the device</help>
|
||||||
|
</item>
|
||||||
<item type="IE" id="3"><label>Hotline Context</label>
|
<item type="IE" id="3"><label>Hotline Context</label>
|
||||||
<input>
|
<input>
|
||||||
<name>hotline_context</name>
|
<name>hotline_context</name>
|
||||||
<default>defauly</default>
|
<default>default</default>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
||||||
|
@ -574,6 +606,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>The MAC address of the phone</help>
|
<help>The MAC address of the phone</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="SDM-remove" id="2" seq="99">
|
||||||
|
<label>Type</label>
|
||||||
|
<name>type</name>
|
||||||
|
<default>7911</default>
|
||||||
|
<select name="model" dataid="dns" dataval="buttons">model</select>
|
||||||
|
<options disabled="true"></options>
|
||||||
|
<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="IE" id="2" seq="99">
|
<item type="IE" id="2" seq="99">
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<input>
|
<input>
|
||||||
|
|
|
@ -408,6 +408,30 @@ and open the template in the editor.
|
||||||
</item>
|
</item>
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
||||||
|
<item type="HLP" id="2">
|
||||||
|
<name>Help_id2</name><label>HELP SCCP HotLine</label>
|
||||||
|
<element type='p'>Setting the hotline Feature on a device, will make it connect to a predefined extension as soon as the Receiver
|
||||||
|
is picked up or the "New Call" Button is pressed. No number has to be given. This works even on devices which have
|
||||||
|
no entry in the config file or realtime database.</element>
|
||||||
|
<element type='h4'>The hotline function can be used in :</element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>First time configuration</col><col>This will make it easier to register new devices and assign numbers</col></row>
|
||||||
|
<row><col>At a door</col><col>Where you want people to be able to only call one number</col></row>
|
||||||
|
<row><col>For unprovisioned phones</col><col>To only be able to call the helpdesk to get their phone set up</col></row>
|
||||||
|
</element>
|
||||||
|
<element type='p'> </element>
|
||||||
|
<element type='h3'>Be careful with this function. Especially not to the internet. So i would restring the deny/permit to 'internal' by default in that case. </element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>Alow =</col><col>Specify a list of your networks, for example: 192.168.1.0</col></row>
|
||||||
|
<row><col>deny =</col><col>0.0.0.0/0.0.0.0</col></row>
|
||||||
|
<row><col>permit =</col><col>internal</col></row>
|
||||||
|
<row><col>hotline_context =</col><col>sccp</col></row>
|
||||||
|
<row><col>hotline_label = </col><col>hotline</col></row>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
</item>
|
||||||
|
|
||||||
|
|
||||||
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
||||||
<default>no</default>
|
<default>no</default>
|
||||||
<button value="yes">Enabled</button>
|
<button value="yes">Enabled</button>
|
||||||
|
@ -422,10 +446,19 @@ and open the template in the editor.
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="2"><label>Hotline Label</label>
|
||||||
|
<input>
|
||||||
|
<name>hotline_label</name>
|
||||||
|
<default>Hot Line</default>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>Hotline Label: The label on the device</help>
|
||||||
|
</item>
|
||||||
|
|
||||||
<item type="IE" id="3"><label>Hotline Context</label>
|
<item type="IE" id="3"><label>Hotline Context</label>
|
||||||
<input>
|
<input>
|
||||||
<name>hotline_context</name>
|
<name>hotline_context</name>
|
||||||
<default>defauly</default>
|
<default>default</default>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
||||||
|
@ -575,6 +608,16 @@ and open the template in the editor.
|
||||||
</input>
|
</input>
|
||||||
<help>The MAC address of the phone</help>
|
<help>The MAC address of the phone</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="SDM-remove" id="2" seq="99">
|
||||||
|
<label>Type</label>
|
||||||
|
<name>type</name>
|
||||||
|
<default>7911</default>
|
||||||
|
<select name="model" dataid="dns" dataval="buttons">model</select>
|
||||||
|
<options disabled="true"></options>
|
||||||
|
<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="IE" id="2" seq="99">
|
<item type="IE" id="2" seq="99">
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<input>
|
<input>
|
||||||
|
|
|
@ -31,7 +31,8 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</page_group>
|
</page_group>
|
||||||
|
|
||||||
<page_group name="sccp_general">
|
<page_group name="sccp_general">
|
||||||
<label>SCCP Server config</label>
|
<label>SCCP Server config</label>
|
||||||
|
|
||||||
<item type="IE" id="2"><label>SCCP Server Name</label>
|
<item type="IE" id="2"><label>SCCP Server Name</label>
|
||||||
<input>
|
<input>
|
||||||
<name>servername</name>
|
<name>servername</name>
|
||||||
|
@ -407,6 +408,29 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</item>
|
</item>
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
<page_group name="sccp_hotline_config"><label>SCCP Line config</label>
|
||||||
|
<item type="HLP" id="2">
|
||||||
|
<name>Help_id2</name><label>HELP SCCP HotLine</label>
|
||||||
|
<element type='p'>Setting the hotline Feature on a device, will make it connect to a predefined extension as soon as the Receiver
|
||||||
|
is picked up or the "New Call" Button is pressed. No number has to be given. This works even on devices which have
|
||||||
|
no entry in the config file or realtime database.</element>
|
||||||
|
<element type='h4'>The hotline function can be used in :</element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>First time configuration</col><col>This will make it easier to register new devices and assign numbers</col></row>
|
||||||
|
<row><col>At a door</col><col>Where you want people to be able to only call one number</col></row>
|
||||||
|
<row><col>For unprovisioned phones</col><col>To only be able to call the helpdesk to get their phone set up</col></row>
|
||||||
|
</element>
|
||||||
|
<element type='p'> </element>
|
||||||
|
<element type='h3'>Be careful with this function. Especially not to the internet. So i would restring the deny/permit to 'internal' by default in that case. </element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>Alow =</col><col>Specify a list of your networks, for example: 192.168.1.0</col></row>
|
||||||
|
<row><col>deny =</col><col>0.0.0.0/0.0.0.0</col></row>
|
||||||
|
<row><col>permit =</col><col>internal</col></row>
|
||||||
|
<row><col>hotline_context =</col><col>sccp</col></row>
|
||||||
|
<row><col>hotline_label = </col><col>hotline</col></row>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
</item>
|
||||||
|
|
||||||
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
<item type="IS" id="1"><name>hotline_enabled</name> <label>Hotline</label>
|
||||||
<default>no</default>
|
<default>no</default>
|
||||||
<button value="yes">Enabled</button>
|
<button value="yes">Enabled</button>
|
||||||
|
@ -421,10 +445,18 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
<help>Hotline Extension: The number that gets called when a hotline is picked up. hint</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="IE" id="2"><label>Hotline Label</label>
|
||||||
|
<input>
|
||||||
|
<name>hotline_label</name>
|
||||||
|
<default>Hot Line</default>
|
||||||
|
<class>sccp-custom</class>
|
||||||
|
</input>
|
||||||
|
<help>Hotline Label: The label on the device</help>
|
||||||
|
</item>
|
||||||
<item type="IE" id="3"><label>Hotline Context</label>
|
<item type="IE" id="3"><label>Hotline Context</label>
|
||||||
<input>
|
<input>
|
||||||
<name>hotline_context</name>
|
<name>hotline_context</name>
|
||||||
<default>defauly</default>
|
<default>default</default>
|
||||||
<class>sccp-custom</class>
|
<class>sccp-custom</class>
|
||||||
</input>
|
</input>
|
||||||
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
<help>Hotline Context: This is the context through which the phone will connect. It should probably match your other contest. The default is "from-internal" but "from-internal-xfer" would also make sense by limiting the options for the person using the phone.</help>
|
||||||
|
@ -574,6 +606,16 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</input>
|
</input>
|
||||||
<help>The MAC address of the phone</help>
|
<help>The MAC address of the phone</help>
|
||||||
</item>
|
</item>
|
||||||
|
<item type="SDM-remove" id="2" seq="99">
|
||||||
|
<label>Type</label>
|
||||||
|
<name>type</name>
|
||||||
|
<default>7911</default>
|
||||||
|
<select name="model" dataid="dns" dataval="buttons">model</select>
|
||||||
|
<options disabled="true"></options>
|
||||||
|
<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="IE" id="2" seq="99">
|
<item type="IE" id="2" seq="99">
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<input>
|
<input>
|
||||||
|
@ -863,6 +905,30 @@ and open the template in the editor. Base Version before all crash :-)
|
||||||
</page_group>
|
</page_group>
|
||||||
<page_group name="sccp_dp_templet">
|
<page_group name="sccp_dp_templet">
|
||||||
<label>Device Templet Function</label>
|
<label>Device Templet Function</label>
|
||||||
|
<item type="HLP" id="2">
|
||||||
|
<label>HELP SCCP Server Name</label>
|
||||||
|
<name>Help_id1</name>
|
||||||
|
<element type='p'>Specifies a pattern to match dialed digits against. Note: TEMPLATE must be in uppercase.</element>
|
||||||
|
<element type='h4'>Rules:</element>
|
||||||
|
<element type='table'>
|
||||||
|
<row><col>match:</col><col>Pattern to match, consists of one or more elements</col></row>
|
||||||
|
<row><col>0 1 2 3 4 5 6 7 8 9</col><col>Match digit</col></row>
|
||||||
|
<row><col>.</col><col>Match one digit, # or *</col></row>
|
||||||
|
<row><col>*</col><col>Match zero or more digits, # or *</col></row>
|
||||||
|
<row><col>\*</col><col>Match a literal *</col></row>
|
||||||
|
<row><col>,</col><col>Play secondary dial-tone specified by tone</col></row>
|
||||||
|
<row><col>timeout:</col><col>Number of seconds to wait for more digits if this pattern matches</col></row>
|
||||||
|
<row><col>line:</col><col>Only apply template to the specified line (optional)</col></row>
|
||||||
|
<row><col>rewrite:</col><col>Rewrite the matched digits before dialing, consists of one or more elements (optional)</col></row>
|
||||||
|
<row><col>0 1 2 3 4 5 6 7 8 9</col><col>Replace with digit</col></row>
|
||||||
|
<row><col>%0</col><col>The entire match</col></row>
|
||||||
|
<row><col>%1 %2 %3 %4 %5</col><col>Replace with group of digits matched, grouping is done by consecutive literal digit or . elements</col></row>
|
||||||
|
<row><col>%%</col><col>A literal %</col></row>
|
||||||
|
<row><col>.</col><col>Each . is replaced by the digit that was matched by the corresponding . in the pattern</col></row>
|
||||||
|
<row><col>tone:</col><col>Secondary dial-tone to play when a , is matched, up to 3 can be specified (optional)</col></row>
|
||||||
|
</element>
|
||||||
|
</item>
|
||||||
|
|
||||||
<item type="ITED" id="1" seq="0">
|
<item type="ITED" id="1" seq="0">
|
||||||
<name>dialtemplete</name>
|
<name>dialtemplete</name>
|
||||||
<default>*/10/*</default>
|
<default>*/10/*</default>
|
||||||
|
|
|
@ -6,6 +6,17 @@
|
||||||
*/
|
*/
|
||||||
$def_val = null;
|
$def_val = null;
|
||||||
$dev_id = null;
|
$dev_id = null;
|
||||||
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
|
$dev_id = $_REQUEST['new_id'];
|
||||||
|
$val = str_replace('SEP', '', $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['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
// print_r($_REQUEST);
|
// print_r($_REQUEST);
|
||||||
//
|
//
|
||||||
|
|
|
@ -31,6 +31,15 @@ if (!empty($_REQUEST['id'])) {
|
||||||
}
|
}
|
||||||
$show_buttons = $max_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->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $val));
|
||||||
|
$max_buttons = $dev_schema[0]['buttons'];
|
||||||
|
$show_buttons = $max_buttons;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form autocomplete="off" name="frm_editbutons" id="frm_editbutons" class="fpbx-submit" action="" method="post" data-id="hw_edit">
|
<form autocomplete="off" name="frm_editbutons" id="frm_editbutons" class="fpbx-submit" action="" method="post" data-id="hw_edit">
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* * Input element Select SLS - System Language
|
* * Input element Select SLS - System Language
|
||||||
* Input element Select SDM - Model List
|
* Input element Select SDM - Model List
|
||||||
* SDE - Extension List
|
* SDE - Extension List
|
||||||
|
* Help elemen HLP - Help Element
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$npref = $form_prefix.'_';
|
$npref = $form_prefix.'_';
|
||||||
|
@ -494,17 +495,25 @@ foreach ($items as $child) {
|
||||||
<i class="fa fa-question-circle fpbx-help-icon" data-for="<?php echo $res_id; ?>"></i>
|
<i class="fa fa-question-circle fpbx-help-icon" data-for="<?php echo $res_id; ?>"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9"><div class = "lnet form-group form-inline" data-nextid=1> <?php
|
<div class="col-md-9"><div class = "lnet form-group form-inline" data-nextid=1> <?php
|
||||||
echo '<select name="'.$res_id.'" class="'. $child->class . '" id="' . $res_id . '">';
|
echo '<select name="'.$res_id.'" class="'. $child->class . '" id="' . $res_id . '"';
|
||||||
if (!empty($fvalues[$res_n])) {
|
if (isset($child->options)){
|
||||||
if (!empty($fvalues[$res_n]['data'])) {
|
foreach ($child->options->attributes() as $optkey =>$optval){
|
||||||
$child->value = $fvalues[$res_n]['data'];
|
echo ' '.$optkey.'="'.$optval.'"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo '>';
|
||||||
|
|
||||||
$fld = (string)$child->select['name'];
|
$fld = (string)$child->select['name'];
|
||||||
$flv = (string)$child->select;
|
$flv = (string)$child->select;
|
||||||
$flk = (string)$child->select['dataid'];
|
$flk = (string)$child->select['dataid'];
|
||||||
$flkv= (string)$child->select['dataval'];
|
$flkv= (string)$child->select['dataval'];
|
||||||
$key = (string)$child->default;
|
$key = (string)$child->default;
|
||||||
|
if (!empty($fvalues[$res_n])) {
|
||||||
|
if (!empty($fvalues[$res_n]['data'])) {
|
||||||
|
$child->value = $fvalues[$res_n]['data'];
|
||||||
|
$key = $fvalues[$res_n]['data'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($select_opt as $data) {
|
foreach ($select_opt as $data) {
|
||||||
echo '<option value="' . $data[$fld] . '"';
|
echo '<option value="' . $data[$fld] . '"';
|
||||||
|
@ -636,6 +645,53 @@ foreach ($items as $child) {
|
||||||
echo '<!-- END '.$res_id.' -->';
|
echo '<!-- END '.$res_id.' -->';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($child['type'] == 'HLP' ) {
|
||||||
|
$res_n = (string)$child ->name;
|
||||||
|
$res_id = $npref.$res_n;
|
||||||
|
if (empty($child->class)) {
|
||||||
|
$child->class = 'form-control';
|
||||||
|
}
|
||||||
|
echo '<!-- Begin '.$child->label.' -->';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading"><?php echo _($child->label);?>
|
||||||
|
<a data-toggle="collapse" href="<?php echo '#'.$res_id;?>"><i class="fa fa-plus pull-right"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body collapse" id="<?php echo $res_id;?>">
|
||||||
|
<?php
|
||||||
|
foreach ($child->xpath('element') as $value) {
|
||||||
|
switch ($value['type']){
|
||||||
|
case 'p':
|
||||||
|
case 'h1':
|
||||||
|
case 'h2':
|
||||||
|
case 'h3':
|
||||||
|
case 'h4':
|
||||||
|
echo '<'.$value['type'].'>'._((string)$value).'</'.$value['type'].'>';
|
||||||
|
break;
|
||||||
|
case 'table':
|
||||||
|
echo '<'.$value['type'].' class="table" >';
|
||||||
|
foreach ($value->xpath('row') as $trow) {
|
||||||
|
echo '<tr>';
|
||||||
|
foreach ($trow->xpath('col') as $tcol) {
|
||||||
|
echo '<td>'.$tcol.'</td>';
|
||||||
|
}
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
echo '</'.$value['type'].'>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
echo '<!-- END '.$child->label.' -->';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,13 @@
|
||||||
<script>
|
<script>
|
||||||
function DispayDeviceActionsKeyFormatter(value, row, index) {
|
function DispayDeviceActionsKeyFormatter(value, row, index) {
|
||||||
var exp_model = '';
|
var exp_model = '';
|
||||||
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco&id=' + row['name'] + '"><i class="fa fa-pencil"></i></a> \n';
|
if (row['new_hw'] == "Y") {
|
||||||
exp_model += '</a> <a class="btn-item-delete" data-for="hardware" data-id="' + row['name'] + '"><i class="fa fa-trash"></i></a>';
|
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco&new_id=' + row['name'] + '&type='+ row['type']+'"><i class="fa fa-pencil"></i></a> \n';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
exp_model += '<a href="?display=sccp_phone&tech_hardware=cisco&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;
|
return exp_model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue