From a9d39764b185330b4adf06984f7da667668e44b8 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Mon, 2 Oct 2017 18:57:37 +0300 Subject: [PATCH] Prerelease 02.10.2017 Remove old SEPxxx.conf.XML fron tftpd add device from HotLine Registry. add Adv. Button Line configuration. add secondary dialtone tone configuration. --- Sccp_manager.class.php | 3 +++ conf/Sccp.class.php | 33 +++++++++++++++++++++++++++------ conf/Sccp.class.php.v11 | 17 +++++++++++++++++ views/server.setting.php | 4 ++++ 4 files changed, 51 insertions(+), 6 deletions(-) diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index f777d9c..3676476 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -23,7 +23,10 @@ * + Change internal use Field to _Field (new fiture support in chan_sccp ) * + Delete phone XML * + Change Installer ?? (test ) + * - Auto Addons! * + DND Mode + * + secondary_dialtone_digits = "" line config + * + secondary_dialtone_tone = 0x22 line config * - suport kvstore ????? * + Shared Line * - bug Fix ...(K no w bug? no fix) diff --git a/conf/Sccp.class.php b/conf/Sccp.class.php index 8d39424..a04c5fa 100644 --- a/conf/Sccp.class.php +++ b/conf/Sccp.class.php @@ -11,6 +11,7 @@ class Sccp extends \FreePBX\modules\Core\Driver { "cid_num" => 'cid_num', "cid_name" => 'label', "mailbox" => 'description', "musicclass" => 'musicclass', "dnd" => 'dnd', "silencesuppression" => 'silencesuppression', + "secondary_dialtone_digits" => 'secondary_dialtone_digits', "secondary_dialtone_tone" => 'secondary_dialtone_tone', 'namedcallgroup'=>'namedcallgroup', 'namedpickupgroup' => 'namedpickupgroup' ); @@ -144,6 +145,14 @@ class Sccp extends \FreePBX\modules\Core\Driver { "value" => "no", "flag" => $flag++ ), + "secondary_dialtone_digits" => array( + "value" => "9", + "flag" => $flag++ + ), + "secondary_dialtone_tone" => array( + "value" => "0x22", + "flag" => $flag++ + ), "musicclass" => array( "value" => "default", "flag" => $flag++ @@ -161,19 +170,31 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tmparr = array(); $tt = _("The SCCP channel number for this port."); $tmparr['incominglimit'] = array('prompttext' => _('Line incoming limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel); - $tt = _("Asterisk context this device will send calls to. Only change this is you know what you are doing."); + + $tt = _("Asterisk context this device will send calls to. Only change this is you know what you are doing."); $tmparr['context'] = array('prompttext' => _('Line context'), 'value' => 'from-internal', 'tt' => $tt, 'level' => 1); - $tt = _("Phone call group callgroup=1,3-4"); + + $tt = _("Phone call group callgroup=1,3-4"); $tmparr['callgroup'] = array('prompttext' => _('Call group id'),'value' => '', 'tt' => $tt, 'level' => 1); - $tt = _("Phone pickup group pickupgroup=1,3-4"); + + $tt = _("Phone pickup group pickupgroup=1,3-4"); $tmparr['namedcallgroup'] = array('prompttext' => _('Call group name'),'value' => '', 'tt' => $tt, 'level' => 1); - $tt = _("sets the named caller groups this line is a member of (ast111)"); + + $tt = _("sets the named caller groups this line is a member of (ast111)"); $tmparr['pickupgroup'] = array('prompttext' => _('Pickup group id'),'value' => '', 'tt' => $tt, 'level' => 1); - $tt = _("Phone pincode"); + + $tt = _("Phone pincode"); $tmparr['namedpickupgroup'] = array('prompttext' => _('Pickup group name'),'value' => '', 'tt' => $tt, 'level' => 1); - $tt = _("Sets the named pickup groups this line is a member of (this phone can pickup calls from remote phones which are in this caller group (ast111)"); + + $tt = _("Sets the named pickup groups this line is a member of (this phone can pickup calls from remote phones which are in this caller group (ast111)"); $tmparr['pin'] = array('value' => '', 'tt' => $tt, 'level' => 1); + $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); + + $tt = _("Outside dialtone frequency (defaul 0x22)"); + $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1); + unset($select); $select[] = array('value' => 'yes', 'text' => 'Yes'); $select[] = array('value' => 'no', 'text' => 'No'); diff --git a/conf/Sccp.class.php.v11 b/conf/Sccp.class.php.v11 index 17a342f..5679e2f 100644 --- a/conf/Sccp.class.php.v11 +++ b/conf/Sccp.class.php.v11 @@ -11,6 +11,7 @@ class Sccp extends \FreePBX\modules\Core\Driver { "cid_num" => 'cid_num', "cid_name" => 'label', "mailbox" => 'description', "musicclass" => 'musicclass', "dnd" => 'dnd', "silencesuppression" => 'silencesuppression', + "secondary_dialtone_digits" => 'secondary_dialtone_digits', "secondary_dialtone_tone" => 'secondary_dialtone_tone', 'namedcallgroup'=>'namedcallgroup', 'namedpickupgroup' => 'namedpickupgroup' ); @@ -53,6 +54,8 @@ class Sccp extends \FreePBX\modules\Core\Driver { $sqlv = 'values ("'.$id.'", "'.$id.'"'; foreach($this->data_fld as $key => $val) { switch ($key) { + case 'secondary_dialtone_digits': + case 'secondary_dialtone_tone': case 'dnd': $sql .= ', '.$key; if (!empty($settings[$val]['value'])){ @@ -156,6 +159,14 @@ class Sccp extends \FreePBX\modules\Core\Driver { "value" => "no", "flag" => $flag++ ), + "secondary_dialtone_digits" => array( + "value" => "9", + "flag" => $flag++ + ), + "secondary_dialtone_tone" => array( + "value" => "0x22", + "flag" => $flag++ + ), "musicclass" => array( "value" => "default", "flag" => $flag++ @@ -185,6 +196,12 @@ class Sccp extends \FreePBX\modules\Core\Driver { $tmparr['namedpickupgroup'] = array('prompttext' => _('Pickup group name'),'value' => '', 'tt' => $tt, 'level' => 1); $tt = _("Sets the named pickup groups this line is a member of (this phone can pickup calls from remote phones which are in this caller group (ast111)"); $tmparr['pin'] = array('value' => '', 'tt' => $tt, 'level' => 1); + $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); + + $tt = _("Outside dialtone frequency (defaul 0x22)"); + $tmparr['secondary_dialtone_tone'] = array('prompttext' => _('Secondary dialtone tone'), 'value' => '', 'tt' => $tt, 'level' => 1); + unset($select); $select[] = array('value' => 'yes', 'text' => 'Yes'); diff --git a/views/server.setting.php b/views/server.setting.php index c6c369d..0760f34 100644 --- a/views/server.setting.php +++ b/views/server.setting.php @@ -7,6 +7,10 @@ // vim: set ai ts=4 sw=4 ft=phtml: // print_r($this->sccpvalues['sccp_comatable']); // print_r($this->sccpvalues); +// $id_name = 'SEPB8BEBF224790'; +// $dev_data = $this->sccp_getdevice_info($id_name); +// print_r($dev_data); + ?>