From 59997c9aa0604e578297b6dbd81d24f283bd6c34 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Thu, 5 Oct 2017 11:36:18 +0300 Subject: [PATCH] Prerelease 05.10.2017 ADD Config SRST Options. --- Sccp_manager.class.php | 80 +++- assets/js/sccp_manager.js | 6 +- conf/Sccp.class.php | 59 ++- conf/Sccp.class.php.v11 | 60 ++- conf/sccpgeneral.xml | 73 ++- conf/sccpgeneral.xml.v0 | 951 -------------------------------------- conf/sccpgeneral.xml.v11 | 70 +++ views/form.adddevice.php | 17 +- views/form.buttons.php | 14 +- views/formShow.php | 6 +- views/hardware.phone.php | 16 +- views/server.advanced.php | 19 + views/server.setting.php | 3 +- 13 files changed, 390 insertions(+), 984 deletions(-) delete mode 100644 conf/sccpgeneral.xml.v0 create mode 100644 views/server.advanced.php diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 3676476..f0bcebf 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -23,7 +23,9 @@ * + Change internal use Field to _Field (new fiture support in chan_sccp ) * + Delete phone XML * + Change Installer ?? (test ) - * - Auto Addons! + * + SRST Config + * - Failover config + * + Auto Addons! * + DND Mode * + secondary_dialtone_digits = "" line config * + secondary_dialtone_tone = 0x22 line config @@ -43,6 +45,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { // const General - sccp.conf[%keyset%] = '5'; NAME space // const General - sccp.conf[%keyset%] = '6'; data // const General - default.xml = '10'; +// const General - teplet.xml = '20'; // const General - system_path = '2'; // const General - don't store = '99'; @@ -63,6 +66,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { "dateformat" => 'D.M.Y', "disallow" => 'all', "allow" => 'alaw;ulaw', "devicetable" => 'sccpdevice', + "hotline_enabled" => 'no', + "hotline_context" => 'default', + "hotline_extension" => '*60', + "hotline_label" => 'hotline', "linetable" => 'sccpline', "tftp_path" => '/tftpboot' ); @@ -365,6 +372,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { "name" => _("SCCP Codec"), "page" => 'views/server.codec.php' ), + "sccpadv" => array( + "name" => _("Advanced SCCP Settings"), + "page" => 'views/server.advanced.php' + ), ); foreach ($this->pagedata as &$page) { @@ -548,6 +559,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { } $this->save_submit($request); $this->sccp_db_save_setting(); +// $this->sccp_create_sccp_init(); + $res = $this->sccp_core_comands(array('cmd' => 'sccp_reload')); $msg = 'Config Saved: ' . $res['Response'] . '. Info :' . $res['data']; // needreload(); @@ -586,6 +599,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $this->sccp_save_db('sccpdevice', array('name' => $idv), 'delete', "name"); $this->sccp_save_db("sccpbuttons", array(), 'delete', '', $idv); $this->sccp_delete_device_XML($idv); // Концы в вводу !! +// $this->sccp_core_comands(array('cmd' => 'reload_phone', 'name' => $idv)); + $this->sccp_core_comands(array('cmd' => 'reset_phone', 'name' => $idv)); } } return array('status' => true, 'table_reload' => true, 'message' => 'HW is Delete ! '); @@ -761,10 +776,14 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $id_name = $dev_ids['name']; if (empty($dev_ids['news'])) { $dev_data = $this->sccp_getdevice_info($id_name); + $dev_addon= $dev_data['SCCP_Vendor']['model_addon']; + if (empty($dev_addon)) { + $dev_addon = null; + } $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'] ); + 'description' => '*NEW* '.$dev_ids['descr'], 'status' => '*NEW* '.$dev_ids['status'], 'address' => $dev_ids['address'], + 'addon' => $dev_addon); } } @@ -941,7 +960,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $this->sccp_create_device_XML($name_dev); // sccp restart // $this->sccp_core_comands(array('cmd'=>'reset_phone', 'name' => $name_dev)); - $this->sccp_core_comands(array('cmd' => 'reload_phone', 'name' => $name_dev)); +// +// $this->sccp_core_comands(array('cmd' => 'reset_phone', 'name' => $idv)); + if ($hw_id == 'new') { + $this->sccp_core_comands(array('cmd' => 'reset_phone', 'name' => $name_dev)); + } else { + $this->sccp_core_comands(array('cmd' => 'reload_phone', 'name' => $name_dev)); + } // die(); return $save_settings; } @@ -1004,8 +1029,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { if (!empty($save_settings)) { $this->sccp_db_save_setting($save_settings); $this->getSccpSettingsDB(); // Overwrite Exist - $this->sccp_create_sccp_init(); +// $this->sccp_create_sccp_init(); } + $this->sccp_create_sccp_init(); // Rewrite Config. $save_settings[] = array('status' => true); return $save_settings; } @@ -1090,8 +1116,14 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $res3[$data_key] =$tmp[1]; } } + $res1 = $res3['Skinny_Phone_Type']; - $res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')')); + if (!empty($res3['Addons'])) { + $res2 = $res3['Addons']; + } else { + $res2 = ''; + } + $res3['SCCP_Vendor']= Array('vendor' => strtok($res1,' '),'model' => strtok('('), 'model_id' => strtok(')'), 'vendor_addon' => strtok($res2,' '), 'model_addon' => strtok(' ')); return $res3; } else { return array(); @@ -1976,10 +2008,40 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { // Ntp Config break; case 'srstInfo': - $xml_node->$dkey = ''; + if ($this->sccpvalues['srst_Option']['data'] == 'user') { + break; + } + $xnode = &$xml_node->$dkey; + $xnode -> name = $this->sccpvalues['srst_Name']['data']; + $xnode -> srstOption = $this->sccpvalues['srst_Option']['data']; + $xnode -> userModifiable = $this->sccpvalues['srst_userModifiable']['data']; + $xnode -> isSecure = $this->sccpvalues['srst_isSecure']['data']; + + $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(';', $this->sccpvalues[$srst_pro]['data']); + $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 = $this->sccpvalues['keepalive']['data']; + $xml_node->$dkey = strval(intval(intval($this->sccpvalues['keepalive']['data'])* 0.75)); break; case 'callManagerGroup': $xnode = &$xml_node->$dkey->members; @@ -2153,7 +2215,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { break; case "SccpDevice": // $sql = "SELECT * FROM `sccpdeviceconfig` ORDER BY `name`"; - $sql = "select `name`,`name` as `mac`, `type`, `button` from `sccpdeviceconfig` ORDER BY `name`"; + $sql = "select `name`,`name` as `mac`, `type`, `button`, `addon` from `sccpdeviceconfig` ORDER BY `name`"; $raw_settings = sql($sql, "getAll", DB_FETCHMODE_ASSOC); break; case "HWDevice": diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js index d1ad65f..19d9495 100644 --- a/assets/js/sccp_manager.js +++ b/assets/js/sccp_manager.js @@ -618,6 +618,7 @@ function add_dynamic_input(pe, pclass, vdefault) { // We'd like a new one, please. pcls = pe.data('for'); pname = pe.data('id'); + pmax = pe.data('max'); jdata = JSON.parse(hex2bin(pe.data('json'))); var last = $("."+pcls+":last"), @@ -633,8 +634,9 @@ function add_dynamic_input(pe, pclass, vdefault) { html += " "+ jdata[key]['nameseparator'] + " "; } html += "\n"; - - last.after(html); + if (pmax >= nextid) { + last.after(html); + } } function del_dynamic_table(pe, pclass, vdefault) { diff --git a/conf/Sccp.class.php b/conf/Sccp.class.php index a04c5fa..15f688d 100644 --- a/conf/Sccp.class.php +++ b/conf/Sccp.class.php @@ -192,8 +192,65 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tt = _("Digits to indicate an external line to user (secondary dialtone) Sample 9 or 8 (max 9 digits)"); $tmparr['secondary_dialtone_digits'] = array('prompttext' => _('Secondary dialtone digits'), 'value' => '', 'tt' => $tt, 'level' => 1); + unset($select); + $select[] = array( 'value' => '0x21', 'text' => 'Inside Dial Tone'); + $select[] = array( 'value' => '0x22', 'text' => 'Outside Dial Tone'); + $select[] = array( 'value' => '0x23', 'text' => 'Line Busy Tone'); + $select[] = array( 'value' => '0x24', 'text' => 'Alerting Tone'); + $select[] = array( 'value' => '0x25', 'text' => 'Reorder Tone'); + $select[] = array( 'value' => '0x26', 'text' => 'Recorder Warning Tone'); + $select[] = array( 'value' => '0x27', 'text' => 'Recorder Detected Tone'); + $select[] = array( 'value' => '0x28', 'text' => 'Reverting Tone'); + $select[] = array( 'value' => '0x29', 'text' => 'Receiver OffHook Tone'); + $select[] = array( 'value' => '0x2A', 'text' => 'Partial Dial Tone'); + $select[] = array( 'value' => '0x2B', 'text' => 'No Such Number Tone'); + $select[] = array( 'value' => '0x2C', 'text' => 'Busy Verification Tone'); + $select[] = array( 'value' => '0x2D', 'text' => 'Call Waiting Tone'); + $select[] = array( 'value' => '0x2E', 'text' => 'Confirmation Tone'); + $select[] = array( 'value' => '0x2F', 'text' => 'Camp On Indication Tone'); + $select[] = array( 'value' => '0x30', 'text' => 'Recall Dial Tone'); + $select[] = array( 'value' => '0x31', 'text' => 'Zip Zip'); + $select[] = array( 'value' => '0x32', 'text' => 'Zip'); + $select[] = array( 'value' => '0x33', 'text' => 'Beep Bonk'); + $select[] = array( 'value' => '0x34', 'text' => 'Music Tone'); + $select[] = array( 'value' => '0x35', 'text' => 'Hold Tone'); + $select[] = array( 'value' => '0x36', 'text' => 'Test Tone'); + $select[] = array( 'value' => '0x37', 'text' => 'DT Monitor Warning Tone'); + $select[] = array( 'value' => '0x40', 'text' => 'Add Call Waiting'); + $select[] = array( 'value' => '0x41', 'text' => 'Priority Call Wait'); + $select[] = array( 'value' => '0x42', 'text' => 'Recall Dial'); + $select[] = array( 'value' => '0x43', 'text' => 'Barg In'); + $select[] = array( 'value' => '0x44', 'text' => 'Distinct Alert'); + $select[] = array( 'value' => '0x45', 'text' => 'Priority Alert'); + $select[] = array( 'value' => '0x46', 'text' => 'Reminder Ring'); + $select[] = array( 'value' => '0x47', 'text' => 'Precedence RingBank'); + $select[] = array( 'value' => '0x48', 'text' => 'Pre-EmptionTone'); + $select[] = array( 'value' => '0x67', 'text' => '2105 HZ'); + $select[] = array( 'value' => '0x68', 'text' => '2600 HZ'); + $select[] = array( 'value' => '0x69', 'text' => '440 HZ'); + $select[] = array( 'value' => '0x6A', 'text' => '300 HZ'); + $select[] = array( 'value' => '0x77', 'text' => 'MLPP Pala'); + $select[] = array( 'value' => '0x78', 'text' => 'MLPP Ica'); + $select[] = array( 'value' => '0x79', 'text' => 'MLPP Vca'); + $select[] = array( 'value' => '0x7A', 'text' => 'MLPP Bpa'); + $select[] = array( 'value' => '0x7B', 'text' => 'MLPP Bnea'); + $select[] = array( 'value' => '0x7C', 'text' => 'MLPP Upa'); + $select[] = array( 'value' => '0x7F', 'text' => 'No Tone'); + $select[] = array( 'value' => '0x80', 'text' => 'Meetme Greeting Tone'); + $select[] = array( 'value' => '0x81', 'text' => 'Meetme Number Invalid Tone'); + $select[] = array( 'value' => '0x82', 'text' => 'Meetme Number Failed Tone'); + $select[] = array( 'value' => '0x83', 'text' => 'Meetme Enter Pin Tone'); + $select[] = array( 'value' => '0x84', 'text' => 'Meetme Invalid Pin Tone'); + $select[] = array( 'value' => '0x85', 'text' => 'Meetme Failed Pin Tone'); + $select[] = array( 'value' => '0x86', 'text' => 'Meetme CFB Failed Tone'); + $select[] = array( 'value' => '0x87', 'text' => 'Meetme Enter Access Code Tone'); + $select[] = array( 'value' => '0x88', 'text' => 'Meetme Access Code Invalid Tone'); + $select[] = array( 'value' => '0x89', 'text' => 'Meetme Access Code Failed Tone'); + $select[] = array('value' => 'yes', 'text' => 'Yes'); + $select[] = array('value' => 'no', 'text' => 'No'); + $tt = _("Outside dialtone frequency (defaul 0x22)"); - $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1); + $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'select'); unset($select); $select[] = array('value' => 'yes', 'text' => 'Yes'); diff --git a/conf/Sccp.class.php.v11 b/conf/Sccp.class.php.v11 index 5679e2f..303dcdc 100644 --- a/conf/Sccp.class.php.v11 +++ b/conf/Sccp.class.php.v11 @@ -199,8 +199,66 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tt = _("Digits to indicate an external line to user (secondary dialtone) Sample 9 or 8 (max 9 digits)"); $tmparr['secondary_dialtone_digits'] = array('prompttext' => _('Secondary dialtone digits'), 'value' => '', 'tt' => $tt, 'level' => 1); + unset($select); + $select[] = array( 'value' => '0x21', 'text' => 'Inside Dial Tone'); + $select[] = array( 'value' => '0x22', 'text' => 'Outside Dial Tone'); + $select[] = array( 'value' => '0x23', 'text' => 'Line Busy Tone'); + $select[] = array( 'value' => '0x24', 'text' => 'Alerting Tone'); + $select[] = array( 'value' => '0x25', 'text' => 'Reorder Tone'); + $select[] = array( 'value' => '0x26', 'text' => 'Recorder Warning Tone'); + $select[] = array( 'value' => '0x27', 'text' => 'Recorder Detected Tone'); + $select[] = array( 'value' => '0x28', 'text' => 'Reverting Tone'); + $select[] = array( 'value' => '0x29', 'text' => 'Receiver OffHook Tone'); + $select[] = array( 'value' => '0x2A', 'text' => 'Partial Dial Tone'); + $select[] = array( 'value' => '0x2B', 'text' => 'No Such Number Tone'); + $select[] = array( 'value' => '0x2C', 'text' => 'Busy Verification Tone'); + $select[] = array( 'value' => '0x2D', 'text' => 'Call Waiting Tone'); + $select[] = array( 'value' => '0x2E', 'text' => 'Confirmation Tone'); + $select[] = array( 'value' => '0x2F', 'text' => 'Camp On Indication Tone'); + $select[] = array( 'value' => '0x30', 'text' => 'Recall Dial Tone'); + $select[] = array( 'value' => '0x31', 'text' => 'Zip Zip'); + $select[] = array( 'value' => '0x32', 'text' => 'Zip'); + $select[] = array( 'value' => '0x33', 'text' => 'Beep Bonk'); + $select[] = array( 'value' => '0x34', 'text' => 'Music Tone'); + $select[] = array( 'value' => '0x35', 'text' => 'Hold Tone'); + $select[] = array( 'value' => '0x36', 'text' => 'Test Tone'); + $select[] = array( 'value' => '0x37', 'text' => 'DT Monitor Warning Tone'); + $select[] = array( 'value' => '0x40', 'text' => 'Add Call Waiting'); + $select[] = array( 'value' => '0x41', 'text' => 'Priority Call Wait'); + $select[] = array( 'value' => '0x42', 'text' => 'Recall Dial'); + $select[] = array( 'value' => '0x43', 'text' => 'Barg In'); + $select[] = array( 'value' => '0x44', 'text' => 'Distinct Alert'); + $select[] = array( 'value' => '0x45', 'text' => 'Priority Alert'); + $select[] = array( 'value' => '0x46', 'text' => 'Reminder Ring'); + $select[] = array( 'value' => '0x47', 'text' => 'Precedence RingBank'); + $select[] = array( 'value' => '0x48', 'text' => 'Pre-EmptionTone'); + $select[] = array( 'value' => '0x67', 'text' => '2105 HZ'); + $select[] = array( 'value' => '0x68', 'text' => '2600 HZ'); + $select[] = array( 'value' => '0x69', 'text' => '440 HZ'); + $select[] = array( 'value' => '0x6A', 'text' => '300 HZ'); + $select[] = array( 'value' => '0x77', 'text' => 'MLPP Pala'); + $select[] = array( 'value' => '0x78', 'text' => 'MLPP Ica'); + $select[] = array( 'value' => '0x79', 'text' => 'MLPP Vca'); + $select[] = array( 'value' => '0x7A', 'text' => 'MLPP Bpa'); + $select[] = array( 'value' => '0x7B', 'text' => 'MLPP Bnea'); + $select[] = array( 'value' => '0x7C', 'text' => 'MLPP Upa'); + $select[] = array( 'value' => '0x7F', 'text' => 'No Tone'); + $select[] = array( 'value' => '0x80', 'text' => 'Meetme Greeting Tone'); + $select[] = array( 'value' => '0x81', 'text' => 'Meetme Number Invalid Tone'); + $select[] = array( 'value' => '0x82', 'text' => 'Meetme Number Failed Tone'); + $select[] = array( 'value' => '0x83', 'text' => 'Meetme Enter Pin Tone'); + $select[] = array( 'value' => '0x84', 'text' => 'Meetme Invalid Pin Tone'); + $select[] = array( 'value' => '0x85', 'text' => 'Meetme Failed Pin Tone'); + $select[] = array( 'value' => '0x86', 'text' => 'Meetme CFB Failed Tone'); + $select[] = array( 'value' => '0x87', 'text' => 'Meetme Enter Access Code Tone'); + $select[] = array( 'value' => '0x88', 'text' => 'Meetme Access Code Invalid Tone'); + $select[] = array( 'value' => '0x89', 'text' => 'Meetme Access Code Failed Tone'); + $select[] = array('value' => 'yes', 'text' => 'Yes'); + $select[] = array('value' => 'no', 'text' => 'No'); + $tt = _("Outside dialtone frequency (defaul 0x22)"); - $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1); + $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'select'); + unset($select); diff --git a/conf/sccpgeneral.xml b/conf/sccpgeneral.xml index bd1f29a..997ab5f 100644 --- a/conf/sccpgeneral.xml +++ b/conf/sccpgeneral.xml @@ -888,9 +888,7 @@ and open the template in the editor. Base Version before all crash :-) The audio strem will be open in the progress and connected state. Valid options: none, progress, offhook, dial, ringout. Default may be Progress. - - - + @@ -946,4 +944,73 @@ and open the template in the editor. Base Version before all crash :-) + + + + Help_srst + You can also configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + This proves especially useful in a remote site configuration where the phones and Asterisk are connected over a WAN network. + SRST provides users with fallback support for the IP phones that cannot access the primary, secondary, or tertiary Asterisk Node in the CallManager List because + of an Asterisk Node failure or loss of connectivity across the WAN. For the remote sites attached to multiple-service routers across the WAN, + SRST ensures that your remote users receive continuous (although minimal) service by providing call handling support directly from the SRST router. + + When IP phones lose contact with primary, secondary, and tertiary Asterisk Nodes (CM's), they must establish a connection to a local + SRST router to sustain the call-processing capability necessary to place and receive calls. + The IP phone retains the IP address of the local SRST router as a default router in the Network Configuration area of the Settings menu. + The Settings menu supports a maximum of five default router entries; however, the cnf.xml accommodates a maximum of three entries. + When a secondary Asterisk Node is not available on the network, the local SRST Router's IP address is retained as the standby + connection for Asterisk Node during normal operation. + + + + srst_Option + no + + + + You enabled configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + + srst_userModifiable + false + + + The user can change the personal SRST configuration on the device + + srst_isSecure + false + + + The user can change the personal SRST configuration on the device + + + + + + srst_Name + Enable + + You enabled configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + + + + + srst_ip + 3 + / + + + + Help. + + + + srst_sip + 3 + / + + + + Help. + + diff --git a/conf/sccpgeneral.xml.v0 b/conf/sccpgeneral.xml.v0 deleted file mode 100644 index bb8f313..0000000 --- a/conf/sccpgeneral.xml.v0 +++ /dev/null @@ -1,951 +0,0 @@ - - - - - - - - dev_sshUserId - cisco - - Help. - - - - dev_sshPassword - cisco - - Help. - - - - dev_deviceProtocol - SCCP - - Help. - - - - - - - - - servername - Vt - - Servername: This is the type of server - usually, it will be Asterisk. - - - - bindaddr - 0.0.0.0 - sccp-custom - - - port - 2000 - sccp-custom - - Bind Address: The address to bind to for SCCP. In general, it should be set to '0.0.0.0'. If you find problems with one-way audio, you can set this to a specific address in the server. Note that '127.0.0.1' is always wrong here. - : - - - - externip - - sccp-custom - - - External IP Address of the firewall, required in case the PBX is running on a seperate host behind it. IP Address that we're going to notify in RTP media stream as the pbx source address. - / - - - - keepalive - 60 - sccp-custom - number - - - Time between Keep Alive checks. Valid range is 60-300 seconds. After much trial-and-error, the minimum (60) seems to work just fine. - - debug - none - - - - - - Debug: Enable debugging level in SCCP module. - - - - - - permit - 0.0.0.0/0.0.0.0 - - - - Alow network settings. Blank fields will be ignored used Network 0.0.0.0. - - - - - deny - 0.0.0.0/0.0.0.0 - - - - All RFC 1918 addresses are local networks. Should always be at least '0.0.0.0/0.0.0.0'. - - - - - localnet - 0.0.0.0/0.0.0.0 - - - - Local network settings. Blank fields will be ignored used Network 0.0.0.0. - - - - - - language - English - - SCCP Language: This is the language for your hints and other features of the phone. If you don't have any languages installed or are using a single language, you can leave this blank. - - - netlang - English_United_States - - The Network locales allows the phone to play tones (ringing, busy etc.) native to the phone's country. - - - devlang - Russian_Russia - - The user locale allows the phone to display text (menu items, soft keys etc.) native to the phone's language. - - - - - - - firstdigittimeout - 16 - sccp-custom - number - - - First Digit Timeout: The amount of time after your first digit to start dialing automatically. This can be over-ridden with settings in your dialplan.xml or by using the 'immediate dial' button. - - - - digittimeout - 8 - sccp-custom - number - - - Digit Timeout: The amount of time to wait after the second (or subsequent) dialed digit. Override rules are the same as for firstdigittimeout. - - - - autoanswer_ring_time - 0 - sccp-custom - number - - - Autoanswer Ring Time: The amount of time the phones will ring when being called as Intercom or Paging mode. - - - - autoanswer_tone - 0x32 - sccp-custom - - Autoanswer Tone: The tone the phone plays back when it picks up the phone in autoanswer mode. Default is '0x32'. Silence is '0x00'. There are lots of tones, all expressed as '0XNN' where 'NN' is a hexadecimal number. - - - - remotehangup_tone - 0x32 - sccp-custom - - Remote Hangup Tone: The tone played by the phone when it received a remote hang-up signal. Use '0' to disable the tone. - - - - transfer_tone - 0x32 - sccp-custom - - Transfer Tone: The tone played when a call is transferred. Use '0' to disable the tone. - - - - callwaiting_tone - 0x2D - sccp-custom - - Call Waiting Tone: The tone played when a call is waiting. If you set this one to '0', you will not get a tone in your current call if a new call comes in, so you might want to disable call waiting for this line instead. - - echocancel - no - - - Echo Cancel: Echo Cancellation (On or Off). - - silencesuppression - no - - - Silence Suppression: Slience Suppression on the phone. - - private - yes - - - Private Calling Enabled: Place a call with privacy Options (no Caller ID) turned on. Needs to be supported in Asterisk to work through SIP and DAHDI trunks. - - pickupmodeanswer - no - - - Directed Pickup Mode (Answer): If a call is sent with the "directed pickup" flag, the phone will answer when set to "Yes". - - callanswerorder - oldestfirst - - - Call Answer Order: Which call should be answered first? The most common choice is "oldestfirst", but other orders are supported. - - mwilamp - On - - - - - - Set the MWI lamp style when MWI active to on, off, wink, flash or blink - - mwioncall - no - - - Set the MWI on call. - - - - - - ntp_config_enabled - no - - - Enabling NTP settings in device configuration. - - - - ntp_server - pool.ntp.org - pool.ntp.org - - NTP Server name or IP - - ntp_server_mode - unicast - - - - - Configure NTP Server protocol time syncronization - - - - - - dateformat - - Date Format: The date format for the on-screen display. Can be one of the following: (D-M-YA, M.D.Y, Y/M/D) where 'D' is Day, 'M' is Month, 'Y' is Year, 'A' is 24-hour, 'a' is 12-hour, and the separators can be '.','-','/' - - - ntp_timezone - - Date Format: Time zone - - - - - - - - dev_servicesURL - - - - - - - - - - dev_authenticationURL - - - - - The above is simply a dummy authentication page. It literally contains one word: AUTHORIZED (it receives UserId, Password, and devicename in the url - if you truly wish to implement special auth) - - - - dev_idleURL - - - - - URL of CiscoIPPhoneImage. Requires a non-zero setting in idleTimeout. - - - - dev_informationURL - - - - - - - - dev_messagesURL - - - - - - - - dev_directoryURL - - - - This is the URL for a CiscoIPPhoneMenu which gets appended to the end of the Missed/Received/Placed calls. I don't use it (I find it makes more sense to put my phone book under services) - - - - dev_proxyServerURL - - - - - - - - - - dev_idleTimeout - 60 - sccp-custom - number - - - - - - - - - - sccp_tos - 0x68 - sccp-custom - - - sccp_cos - 0x4 - sccp-custom - - SCCP Type Of Service / Class Of Service: SCCP Type or Class of Service - this is modifiable, but don't. - - - - audio_tos - 0xB8 - sccp-custom - - - audio_cos - 0x6 - sccp-custom - - Audio Type Of Service / Class Of Service: Audio Type or Class of Service - this is modifiable, but don't. - - - - video_tos - 0x88 - sccp-custom - - - video_cos - 0x5 - sccp-custom - - Video Type Of Service / Class Of Service: Video Type or Class of Service - this is modifiable, but don't. - - - - - Help_id2 - 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. - The hotline function can be used in : - - First time configurationThis will make it easier to register new devices and assign numbers - At a doorWhere you want people to be able to only call one number - For unprovisioned phonesTo only be able to call the helpdesk to get their phone set up - - - Be careful with this function. Especially not to the internet. So i would restring the deny/permit to 'internal' by default in that case. - - Alow =Specify a list of your networks, for example: 192.168.1.0 - deny =0.0.0.0/0.0.0.0 - permit =internal - hotline_context =sccp - hotline_label = hotline - - - - - - hotline_enabled - no - - - Hotline Enabled: This allows unregistered extensions to connect to the system and dial the number listed below. - - - - hotline_extension - *111 - sccp-custom - - Hotline Extension: The number that gets called when a hotline is picked up. hint - - - - hotline_label - Hot Line - sccp-custom - - Hotline Label: The label on the device - - - - - hotline_context - default - sccp-custom - - 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. - - - - context - from-internal - sccp-custom - - Context: This is the context in which your phones will operate. It should match the context you are using for the rest of your phones (if you have any). The FreePBX default is 'from-internal' - - - - regcontext - sccpregistration - sccp-custom - - If regcontext is specified in sccp.conf chan-sccp-b will dynamically create and destroy a NoOp priority 1 extension for a given peer/line which registers with the server. If the context is not specified in extension.conf, then it will be dynamically created when an chan-sccp-b agent registers - - - musicclass - none - - form-control - Music Class: Available MOH Classes. These are the MOH classes listed in your current server. - - - dial_templet - none - - sccp-custom - Help. - - - autoselectline_enabled - - no - - - Enables and disables auto line selection. - - meetme - no - - - enable/disable conferencing via meetme (on/off), make sure you have one of the meetme apps mentioned below activated in module.conf - - - - meetmeopts - qxd - sccp-custom - - Other options (app_meetme: A,a,b,c,C,d,D,E,e,F,i,I,l,L,m,M,o,p,P,q,r,s,S,t,T,w,x,X,1) see meetme specific documentation - - - - autocall_select - - no - - - - - backgroundImageAccess - no - - - I'm guessing on this one, but on some devices, the background image on the display can be modified at the device. I think this is the thing that allows that to take. - - - - - - - tftp_path - /tftpboot - sccp-custom - - Path to tftp home directory - - - devicetable - sccpdevice - - - sccp-custom - Device Table: This is the devicetable for your realtime configuration. Don't change this unless you know what you are doing and have made all the appropriate changes in the rest of your Asterisk config files. There are two reasonable settings for this - the sccpdevice table or the sccpdeviceconfig view. If you do not want to use the realtime database anymore, you can set this to blank. NOT RECOMMENDED. - - - - - linetable - sccpline - sccp-custom - - Line Table: This is the linetable for your realtime configuration. Don't change this unless you know what you are doing and have made all the appropriate changes in the rest of your Asterisk config files. If you do not want to use the realtime database anymore, you can set this to blank. NOT RECOMMENDED. - - - - createlangdir - no - - - Say 'yes' if you need to create cisco default language directory in tftp path. - - - - - - - - mac - 000000000 - sccp-custom - - 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 - - - - - type - 7911 - - hw_select sccp-custom - 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. - - - - addon - none - - hw_select sccp-custom - 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. - - - - - - - - mac - 000000000 - sccp-custom - - - The MAC address of the phone - - - - type - 7911 - - - hw_select sccp-custom - 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. - - - - - - type - 79XX - sccp-custom - - - 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. - - - - - addon - none - sccp-custom - - - 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. - - - - - - - - - description - 000000000 - sccp-custom - - The information in the upper right corner of the device screen - - - softkeyset - default - - System default softkey - - - tzoffset - 00 - - Time Zone offset - - - netlang - English_United_States - - The Network locales allows the phone to play tones (ringing, busy etc.) native to the phone's country. - - - devlang - Russian_Russia - - The user locale allows the phone to display text (menu items, soft keys etc.) native to the phone's language. - - - - backgroundImage - - sccp-custom - - For phones that can display background images - display this one. Default is [empty] - - - - ringtone - - sccp-custom - - The ringtone that the phone will default to. Can be overridden in the phone. The files RINGLIST.XML provice the basic phone ring tones, while DISTINCTIVERINGLIST.XML defines the list of possible ring tones for your other line types. They, along with the actual 'raw' ringtones, are stored in the /tftpboot/ directory with the rest of the config files. - - - - - - - mac - 000000000 - sccp-custom - - - - - - - - transfer - no - - - Transfer allowed - - cfwdall - no - - - Activate the callforward softkeys. Default is On - - cfwdbusy - no - - - Activate the callforward busy softkeys. Default is On - - - useRedialMenu - - no - - - You can specifying 'useRedialMenu = yes' in the sccp.conf device section and the redial softkey will cause the "placed calls" list instead of immediately calling the last dialed number. - - - dndFeature - - On - - - Do Not Disturb. Default is Off - - - - dtmfmode - - outofband - - - Dual-Tone Multi-Frequency: outofband is the native cisco dtmf tone play - - - mwilamp - - On - - - - - - Set the MWI lamp style when MWI active to on, off, wink, flash or blink - - pickupexten - yes - - - Enable Pickup function to direct pickup an extension. Default is On - - pickupmodeanswer - yes - - - On (Default)= the call has been answered when picked up. Off = call manager way, the phone who picked up the call rings the call - - - - pickupcontext - - sccp-custom - - Context where direct pickup search for extensions. if not set current contect will be use. - - - - - - - conf_allow - - yes - - - Allow the use of conference - - - conf_play_general_announce - - yes - - - Playback General Announcements (like: 'You are Entering/Leaving the conference') - - - conf_play_part_announce - - yes - - - Playback Personal/Participant Announcements, (like: 'You have been muted / You have been kicked') - - - conf_mute_on_entry - - no - - - Mute new participants from the start - - - conf_show_conflist - - yes - - - Automatically show conference list to the moderator - - - conf_music_on_hold_class - default - - form-control - Play music on hold of this class when no moderator is listening on the conference. If set to an empty string, no music on hold will be played. - - - - - - - - - permit_net - 0.0.0.0 - sccp-custom - - - permit_mask - 0.0.0.0 - sccp-custom - - Local network settings. Blank fields will be ignored used Network 0.0.0.0. - / - - - - deny_net - 0.0.0.0 - sccp-custom - - - deny_mask - 0.0.0.0 - sccp-custom - - IP deny: IP Address deny netmask. Should always be at least '0.0.0.0/0.0.0.0'. - / - - - nat - - Off - - - Device NAT support (default Off) - - - - directrtp - - Off - - - This option allow devices to do direct RTP sessions (default Off) - - - earlyrtp - - progress - - - - - The audio strem will be open in the progress and connected state. Valid options: none, progress, offhook, dial, ringout. Default may be Progress. - - - - - - - - dialtemplete_name - - form-control - - Help. - - - - - - - dialtemplete - */10/* - title - - - text1 - - - - empty - Bellcore-Alerting - Bellcore-Inside - Bellcore-Outside - Bellcore-Busy - Bellcore-BusyVerify - Bellcore-Reorder - Bellcore-CallWaiting - Bellcore-Hold - Bellcore-Reminder - Bellcore-Confirmation - Bellcore-Stutter - Bellcore-Permanent - Bellcore-None - Cisco-Zip - Cisco-ZipZip - Cisco-BeepBonk - Bellcore-dr1 - Bellcore-dr2 - Bellcore-dr3 - Bellcore-dr4 - Bellcore-dr5 - Bellcore-dr6 - CallWaiting-2 - CallWaiting-3 - CallWaiting-4 - - Alow network settings. Blank fields will be ignored used Network 0.0.0.0. - - - - diff --git a/conf/sccpgeneral.xml.v11 b/conf/sccpgeneral.xml.v11 index cca276e..1aa17a7 100644 --- a/conf/sccpgeneral.xml.v11 +++ b/conf/sccpgeneral.xml.v11 @@ -288,6 +288,76 @@ and open the template in the editor. Base Version before all crash :-) Date Format: Time zone + + + + + + Help_srst + You can also configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + This proves especially useful in a remote site configuration where the phones and Asterisk are connected over a WAN network. + SRST provides users with fallback support for the IP phones that cannot access the primary, secondary, or tertiary Asterisk Node in the CallManager List because + of an Asterisk Node failure or loss of connectivity across the WAN. For the remote sites attached to multiple-service routers across the WAN, + SRST ensures that your remote users receive continuous (although minimal) service by providing call handling support directly from the SRST router. + + When IP phones lose contact with primary, secondary, and tertiary Asterisk Nodes (CM's), they must establish a connection to a local + SRST router to sustain the call-processing capability necessary to place and receive calls. + The IP phone retains the IP address of the local SRST router as a default router in the Network Configuration area of the Settings menu. + The Settings menu supports a maximum of five default router entries; however, the cnf.xml accommodates a maximum of three entries. + When a secondary Asterisk Node is not available on the network, the local SRST Router's IP address is retained as the standby + connection for Asterisk Node during normal operation. + + + + srst_Option + no + + + + You enabled configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + + srst_userModifiable + false + + + The user can change the personal SRST configuration on the device + + srst_isSecure + false + + + The user can change the personal SRST configuration on the device + + + + + + srst_Name + Enable + + You enabled configure a Survivable Remote Site Telephony (SRST) reference as the last device in the CallManager(CM) list. + + + + + srst_ip + 3 + / + + + + Help. + + + + srst_sip + 3 + / + + + + Help. + diff --git a/views/form.adddevice.php b/views/form.adddevice.php index 7432429..34c633f 100644 --- a/views/form.adddevice.php +++ b/views/form.adddevice.php @@ -6,6 +6,7 @@ */ $def_val = null; $dev_id = null; +$dev_new = null; if (!empty($_REQUEST['new_id'])) { $dev_id = $_REQUEST['new_id']; $val = str_replace('SEP', '', $dev_id); @@ -13,15 +14,14 @@ if (!empty($_REQUEST['new_id'])) { $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'])) { -// print_r($_REQUEST); -// -// get model Info $dev_id = $_REQUEST['id']; + $dev_new = $dev_id; $db_res = $this->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); foreach ($db_res as $key => $val) { if (!empty($val)) { @@ -54,11 +54,14 @@ if (!empty($_REQUEST['id'])) { '; - echo $this->ShowGroup('sccp_hw_dev', 1, 'sccp_hw', $def_val); } else { echo ''; + } + if (empty($dev_id)){ + echo $this->ShowGroup('sccp_hw_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); diff --git a/views/form.buttons.php b/views/form.buttons.php index bb9af4b..3b3e3a5 100644 --- a/views/form.buttons.php +++ b/views/form.buttons.php @@ -32,12 +32,16 @@ if (!empty($_REQUEST['id'])) { $show_buttons = $max_buttons; } if (!empty($_REQUEST['new_id'])) { - $val = $_REQUEST['type']; - $dev_schema = $this-> getSccp_model_information('byid', false, "all", array('model' =>$val)); - + $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; + $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; } ?> diff --git a/views/formShow.php b/views/formShow.php index 4bb16da..ddde403 100644 --- a/views/formShow.php +++ b/views/formShow.php @@ -147,6 +147,10 @@ foreach ($items as $child) { $lnhtm = ''; $res_id = $napref.$child->name; $i = 0; + $max_row = 255; + if (!empty($child->max_row)) { + $max_row = $child->max_row; + } if (!empty($fvalues[$res_n])) { if (!empty($fvalues[$res_n]['data'])) { @@ -208,7 +212,7 @@ foreach ($items as $child) { // print_r($opt_at); // print_r(json_encode($opt_at)); // print_r(bin2hex(json_encode($opt_at))); - echo ''; + echo ''; ?> diff --git a/views/hardware.phone.php b/views/hardware.phone.php index ce6ca92..1a28205 100644 --- a/views/hardware.phone.php +++ b/views/hardware.phone.php @@ -31,7 +31,7 @@ - + @@ -45,10 +45,22 @@