Fix issue #63.
Some device settings were being reset by Doctrine. Ensure that these settings are restored after Doctrine has finished. Clarify some settings Remove legacy code which could potentially reset settings
This commit is contained in:
parent
98ed27cf8f
commit
cc6421d3a0
|
@ -434,7 +434,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<label>Global Enable/Disable Softkeys</label>
|
||||
<item type="IS" id="2" seq="0">
|
||||
<name>cfwdall</name>
|
||||
<label>Call Forward</label>
|
||||
<label>Enable "Call Forward"</label>
|
||||
<default>off</default>
|
||||
<button value="yes">Yes</button>
|
||||
<button value="no">No</button>
|
||||
|
@ -442,7 +442,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</item>
|
||||
<item type="IS" id="3" seq="0">
|
||||
<name>cfwdbusy</name>
|
||||
<label>Call Forward busy</label>
|
||||
<label>Enable "Call Forward when busy"</label>
|
||||
<default>off</default>
|
||||
<button value="yes">Yes</button>Call Forward
|
||||
<button value="no">No</button>
|
||||
|
@ -450,7 +450,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</item>
|
||||
<item type="IS" id="3" seq="0">
|
||||
<name>cfwdnoanswer</name>
|
||||
<label>Forward call when not answered</label>
|
||||
<label>Enable "Forward call when not answered"</label>
|
||||
<default>off</default>
|
||||
<button value="yes">Yes</button>
|
||||
<button value="no">No</button>
|
||||
|
@ -458,15 +458,16 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</item>
|
||||
<item type="IS" id="5" seq="0">
|
||||
<name>dndFeature</name>
|
||||
<label>DND Button on Device</label>
|
||||
<label>Enable "Do Not Disturb"</label>
|
||||
<default>on</default>
|
||||
<button value="on">On</button>
|
||||
<button value="off">Off</button>
|
||||
<help>Do Not Disturb. Default is Off</help>
|
||||
</item>
|
||||
<item type="IS" id="1" seq="0">
|
||||
<!--Need to change to enable "Transfer"-->
|
||||
<name>transfer</name>
|
||||
<label>Transfer</label>
|
||||
<label>Enable "Transfer"</label>
|
||||
<default></default>
|
||||
<button value="yes">Yes</button>
|
||||
<button value="no">No</button>
|
||||
|
@ -589,7 +590,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<item type="IS" id="6" seq="98">
|
||||
<name>videocapability</name>
|
||||
<label>Video Capability</label>
|
||||
<default>off</default>
|
||||
<default>on</default>
|
||||
<button value="off">Disabled</button>
|
||||
<button value="on">Enabled</button>
|
||||
<help></help>
|
||||
|
@ -758,16 +759,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="1" seq="10">
|
||||
<label>Phone Secure Service URL</label>
|
||||
<input>
|
||||
<name>dev_secureservicesURL</name>
|
||||
<default></default>
|
||||
<value></value>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/service.php"></options>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="2" seq="10">
|
||||
<label>Phone authentication URL</label>
|
||||
<input>
|
||||
|
@ -778,16 +769,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help>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)</help>
|
||||
</item>
|
||||
<item type="IE" id="2" seq="10">
|
||||
<label>Phone Secure authentication URL</label>
|
||||
<input>
|
||||
<name>dev_secureauthenticationURL</name>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/authentication.php"></options>
|
||||
<default></default>
|
||||
<value></value>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="4" seq="10">
|
||||
<label>Phone information URL</label>
|
||||
<input>
|
||||
|
@ -797,15 +778,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="4" seq="10">
|
||||
<label>Phone Secure information URL</label>
|
||||
<input>
|
||||
<name>dev_secureinformationURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/information.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="5" seq="10">
|
||||
<label>Phone messages URL</label>
|
||||
<input>
|
||||
|
@ -815,15 +787,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="5" seq="10">
|
||||
<label>Phone Secure messages URL</label>
|
||||
<input>
|
||||
<name>dev_securemessagesURL</name>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/messages.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="6" seq="10">
|
||||
<label>Phone directory service URL</label>
|
||||
<input>
|
||||
|
@ -833,15 +796,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help>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)</help>
|
||||
</item>
|
||||
<item type="IE" id="6" seq="10">
|
||||
<label>Phone Secure directory service URL</label>
|
||||
<input>
|
||||
<name>dev_securedirectoryURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/directories.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="3" seq="10">
|
||||
<label>Phone Idle information URL</label>
|
||||
<input>
|
||||
|
@ -852,17 +806,6 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help>URL of CiscoIPPhoneImage. Requires a non-zero setting in idleTimeout.</help>
|
||||
</item>
|
||||
<item type="IE" id="3" seq="10">
|
||||
<label>Phone Secure Idle information URL</label>
|
||||
<input>
|
||||
<name>dev_secureidleURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/idle.php"></options>
|
||||
<default></default>
|
||||
<value></value>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
|
||||
<item type="IE" id="7" seq="10">
|
||||
<label>Phone proxyServer URL</label>
|
||||
<input>
|
||||
|
@ -885,6 +828,63 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="1" seq="10">
|
||||
<label>Phone Secure Service URL</label>
|
||||
<input>
|
||||
<name>dev_secureservicesURL</name>
|
||||
<default></default>
|
||||
<value></value>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/service.php"></options>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="2" seq="10">
|
||||
<label>Phone Secure authentication URL</label>
|
||||
<input>
|
||||
<name>dev_secureauthenticationURL</name>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/authentication.php"></options>
|
||||
<default></default>
|
||||
<value></value>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="4" seq="10">
|
||||
<label>Phone Secure information URL</label>
|
||||
<input>
|
||||
<name>dev_secureinformationURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/information.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="5" seq="10">
|
||||
<label>Phone Secure messages URL</label>
|
||||
<input>
|
||||
<name>dev_securemessagesURL</name>
|
||||
<options placeholder="https://x.x.x.x:port/cisco_menu/messages.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="6" seq="10">
|
||||
<label>Phone Secure directory service URL</label>
|
||||
<input>
|
||||
<name>dev_securedirectoryURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/directories.php"></options>
|
||||
<default></default>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
<item type="IE" id="3" seq="10">
|
||||
<label>Phone Secure Idle information URL</label>
|
||||
<input>
|
||||
<name>dev_secureidleURL</name>
|
||||
<options placeholder="https://x.x.x.x/cisco_menu/idle.php"></options>
|
||||
<default></default>
|
||||
<value></value>
|
||||
</input>
|
||||
<help></help>
|
||||
</item>
|
||||
</page_group>
|
||||
|
||||
<page_group name="sccp_qos_config">
|
||||
|
@ -1207,6 +1207,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<button value="pro">Provision</button>
|
||||
<help>Support the use of regular-expression-based filename remapping</help>
|
||||
</item>
|
||||
<!--
|
||||
<item type="IE" id="2">
|
||||
<label>SCCP SERVER MySQL Device Table</label>
|
||||
<input>
|
||||
|
@ -1225,6 +1226,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
</input>
|
||||
<help>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.</help>
|
||||
</item>
|
||||
-->
|
||||
<item type="IS" id="4" seq="99">
|
||||
<name>createlangdir</name>
|
||||
<label>Create tftp empty language dir</label>
|
||||
|
@ -1493,8 +1495,8 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<name>park</name>
|
||||
<label>Park</label>
|
||||
<default>on</default>
|
||||
<button value="on">On</button>
|
||||
<button value="off">Off</button>
|
||||
<button value="yes">Yes</button>
|
||||
<button value="no">No</button>
|
||||
<help>Take a look to the compile how-to. Park stuff is not compiled by default.</help>
|
||||
</item>
|
||||
<item type="IS" id="2" seq="99">
|
||||
|
@ -1563,8 +1565,8 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<name>mwioncall</name>
|
||||
<label>Message Lamp On Call</label>
|
||||
<default>on</default>
|
||||
<button value="on">Yes</button>
|
||||
<button value="off">No</button>
|
||||
<button value="yes">Yes</button>
|
||||
<button value="no">No</button>
|
||||
<help>Set the MWI on call.</help>
|
||||
</item>
|
||||
|
||||
|
@ -1728,7 +1730,7 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<help>This option allow devices to do direct RTP sessions (default Off)</help>
|
||||
</item>
|
||||
-->
|
||||
<item type="IS" id="5" seq="99">
|
||||
<item type="IS" id="5" seq="98">
|
||||
<name>earlyrtp</name>
|
||||
<label>Early RTP</label>
|
||||
<default></default>
|
||||
|
|
210
install.php
210
install.php
|
@ -94,54 +94,49 @@ function Get_DB_config($sccp_compatible)
|
|||
'pickupmodeanswer' => array('drop' => "yes"),
|
||||
'disallow' => array('drop' => "yes"),
|
||||
'callhistory_answered_elsewhere' => array('create' => "enum('Ignore','Missed Calls','Received Calls', 'Placed Calls') NOT NULL default 'Ignore'",
|
||||
'modify' => "enum('Ignore','Missed Calls','Received Calls','Placed Calls')"),
|
||||
'hwlang' => array('rename' => "_hwlang"),
|
||||
'_hwlang' => array('create' => 'VARCHAR(12) NULL DEFAULT NULL'),
|
||||
'_loginname' => array('create' => 'VARCHAR(20) NULL DEFAULT NULL AFTER `_hwlang`'),
|
||||
'_profileid' => array('create' => "INT(11) NOT NULL DEFAULT '0' AFTER `_loginname`"),
|
||||
'_dialrules' => array('create' => "VARCHAR(255) NULL DEFAULT NULL AFTER `_profileid`"),
|
||||
'useRedialMenu' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no')"),
|
||||
'modify' => "enum('Ignore','Missed Calls','Received Calls','Placed Calls') NOT NULL"),
|
||||
'useRedialMenu' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'dtmfmode' => array('drop' => "yes"),
|
||||
'force_dtmfmode' => array('create' => "ENUM('auto','rfc2833','skinny') NOT NULL default 'auto'",
|
||||
'modify' => "ENUM('auto','rfc2833','skinny')"),
|
||||
'modify' => "ENUM('auto','rfc2833','skinny') NOT NULL"),
|
||||
'deny' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"),
|
||||
'permit' => array('create' => 'VARCHAR(100) NULL DEFAULT NULL', 'modify' => "VARCHAR(100)"),
|
||||
'backgroundImage' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"),
|
||||
'ringtone' => array('create' => 'VARCHAR(255) NULL DEFAULT NULL', 'modify' => "VARCHAR(255)"),
|
||||
'transfer' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes')"),
|
||||
'cfwdall' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'cfwdbusy' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'cfwdnoanswer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'park' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'directrtp' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes')"),
|
||||
'dndFeature' => array('create' => "enum('off','on') NOT NULL default 'off'", 'modify' => "enum('off','on')"),
|
||||
'earlyrtp' => array('create' => "ENUM('yes','no') NOT NULL default 'yes'", 'modify' => "ENUM('yes','no')"),
|
||||
'monitor' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'audio_tos' => array('create' => "VARCHAR(11) NOT NULL default '0xB8'",'modify' => "0xB8"),
|
||||
'audio_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x6'",'modify' => "0x6"),
|
||||
'video_tos' => array('create' => "VARCHAR(11) NOT NULL default '0x88'",'modify' => "0x88"),
|
||||
'video_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x5'",'modify' => "0x5"),
|
||||
'transfer' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes') NOT NULL"),
|
||||
'cfwdall' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'cfwdbusy' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'cfwdnoanswer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'park' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'directrtp' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes') NOT NULL"),
|
||||
'dndFeature' => array('create' => "enum('off','on') NOT NULL default 'off'", 'modify' => "enum('off','on') NOT NULL"),
|
||||
'earlyrtp' => array('create' => "ENUM('yes','no') NOT NULL default 'yes'", 'modify' => "ENUM('yes','no') NOT NULL"),
|
||||
'monitor' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'audio_tos' => array('create' => "VARCHAR(11) NOT NULL default '0xB8'", 'modify' => "VARCHAR(11)"),
|
||||
'audio_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x6'", 'modify' => "VARCHAR(11)"),
|
||||
'video_tos' => array('create' => "VARCHAR(11) NOT NULL default '0x88'", 'modify' => "VARCHAR(11)"),
|
||||
'video_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x5'", 'modify' => "VARCHAR(11)"),
|
||||
'trustphoneip' => array('drop' => "yes"),
|
||||
'transfer_on_hangup' => array('create' => "enum('yes','no') NOT NULL DEFAULT 'no'", 'modify' => "enum('yes','no')"),
|
||||
'transfer_on_hangup' => array('create' => "enum('yes','no') NOT NULL DEFAULT 'no'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'phonecodepage' => array('create' => 'VARCHAR(50) NULL DEFAULT NULL', 'modify' => "VARCHAR(50)"),
|
||||
'mwilamp' => array('create' => "enum('on','off','wink','flash','blink') NOT NULL default 'on'",
|
||||
'modify' => "enum('on','off','wink','flash','blink')"),
|
||||
'mwioncall' => array('create' => "enum('no','yes') NOT NULL default 'yes'",'modify' => "enum('no','yes')"),
|
||||
'private' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no')"),
|
||||
'privacy' => array('create' => "enum('full','on','off') NOT NULL default 'full'", 'modify' => "enum('full','on','off')"),
|
||||
'nat' => array('create' => "enum('on','off','auto') NOT NULL default 'off'", 'modify' => "enum('on','off','auto')"),
|
||||
'conf_allow' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'conf_play_part_announce' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'conf_mute_on_entry' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'conf_show_conflist' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'modify' => "enum('on','off','wink','flash','blink') NOT NULL"),
|
||||
'mwioncall' => array('create' => "enum('no','yes') NOT NULL default 'yes'",'modify' => "enum('no','yes') NOT NULL"),
|
||||
'private' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'privacy' => array('create' => "enum('full','on','off') NOT NULL default 'full'", 'modify' => "enum('full','on','off') NOT NULL"),
|
||||
'nat' => array('create' => "enum('on','off','auto') NOT NULL default 'off'", 'modify' => "enum('on','off','auto') NOT NULL"),
|
||||
'conf_allow' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'conf_play_part_announce' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'conf_mute_on_entry' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'conf_show_conflist' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'type' => array('create' => 'VARCHAR(15) NULL DEFAULT NULL', 'modify' => "VARCHAR(15)"),
|
||||
'imageversion' => array('create' => 'VARCHAR(31) NULL DEFAULT NULL', 'modify' => "VARCHAR(31)"),
|
||||
'softkeyset' => array('def_modify' => "softkeyset")
|
||||
),
|
||||
'sccpline' => array(
|
||||
'directed_pickup' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no')"),
|
||||
'directed_pickup' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'directed_pickup_context' => array('create' => "VARCHAR(100) NULL DEFAULT NULL"),
|
||||
'pickup_modeanswer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'pickup_modeanswer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'namedcallgroup' => array('create' => "VARCHAR(255) NULL DEFAULT NULL AFTER `setvar`", 'modify' => "VARCHAR(100)"),
|
||||
'namedpickupgroup' => array('create' => "VARCHAR(255) NULL DEFAULT NULL AFTER `namedcallgroup`", 'modify' => "VARCHAR(100)"),
|
||||
'adhocNumber' => array('create' => "VARCHAR(45) NULL DEFAULT NULL AFTER `namedpickupgroup`"),
|
||||
|
@ -155,31 +150,31 @@ function Get_DB_config($sccp_compatible)
|
|||
'audio_cos' => array('drop' => "yes"),
|
||||
'video_tos' => array('drop' => "yes"),
|
||||
'video_cos' => array('drop' => "yes"),
|
||||
'videomode' => array('create' => "enum('auto','user','off') NOT NULL default 'auto'", 'modify' => "enum('auto','user','off')"),
|
||||
'videomode' => array('create' => "enum('auto','user','off') NOT NULL default 'auto'", 'modify' => "enum('auto','user','off') NOT NULL"),
|
||||
'incominglimit' => array('create' => "INT(11) DEFAULT '6'", 'modify' => 'INT(11)', 'def_modify' => "6"),
|
||||
'transfer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'transfer' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'vmnum' => array('def_modify' => "*97"),
|
||||
'musicclass' => array('def_modify' => "default"),
|
||||
'disallow' => array('create' => "VARCHAR(255) NULL DEFAULT 'all'", 'modify' => 'VARCHAR(255)'),
|
||||
'allow' => array('create' => "VARCHAR(255) NULL DEFAULT NULL"),
|
||||
'id' => array('create' => 'MEDIUMINT(9) NOT NULL AUTO_INCREMENT, ADD UNIQUE(id);', 'modify' => "MEDIUMINT(9)", 'index' => 'id'),
|
||||
'echocancel' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'silencesuppression' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes')"),
|
||||
'dnd' => array('create' => "enum('reject','off','silent','user') NOT NULL default 'reject'", 'modify' => "enum('reject','off','silent','user')", 'def_modify' => "reject")
|
||||
'echocancel' => array('create' => "enum('yes','no') NOT NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'silencesuppression' => array('create' => "enum('no','yes') NOT NULL default 'no'", 'modify' => "enum('no','yes') NOT NULL"),
|
||||
'dnd' => array('create' => "enum('reject','off','silent','user') NOT NULL default 'reject'", 'modify' => "enum('reject','off','silent','user') NOT NULL", 'def_modify' => "reject")
|
||||
),
|
||||
'sccpuser' => array(
|
||||
'name' => array('create' => "VARCHAR(20) NOT NULL", 'modify' => "VARCHAR(20)" ),
|
||||
'pin' => array('create' => "VARCHAR(7) NOT NULL", 'modify' => "VARCHAR(7)" ),
|
||||
'password' => array('create' => "VARCHAR(7) NOT NULL", 'modify' => "VARCHAR(7)" ),
|
||||
'description' => array('create' => "VARCHAR(45) NOT NULL", 'modify' => "VARCHAR(45)" ),
|
||||
'roaminglogin' => array('create' => "ENUM('off','on','multi') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off','multi')" ),
|
||||
'auto_logout' => array('create' => "ENUM('on','off') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off')" ),
|
||||
'roaminglogin' => array('create' => "ENUM('off','on','multi') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off','multi') NOT NULL" ),
|
||||
'auto_logout' => array('create' => "ENUM('on','off') NOT NULL DEFAULT 'off'", 'modify' => "ENUM('on','off') NOT NULL" ),
|
||||
'homedevice' => array('create' => "VARCHAR(20) NOT NULL", 'modify' => "VARCHAR(20)" ),
|
||||
'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')" ),
|
||||
'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser') NOT NULL" ),
|
||||
)
|
||||
);
|
||||
// Hardware Mobile. Can switch Software to Hardware
|
||||
|
@ -191,7 +186,7 @@ function Get_DB_config($sccp_compatible)
|
|||
'pickupexten' => array('drop' => "yes"),
|
||||
'directed_pickup' => array('drop' => "yes"),
|
||||
'cfwdnoanswer' => array('create' => "enum('yes','no') NULL default 'yes'", 'modify' => "enum('yes','no')"),
|
||||
'park' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'park' => array('create' => "enum('on','off') NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'monitor' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
|
||||
'_description' => array('rename' => "description"),
|
||||
'_loginname' => array('drop' => "yes"),
|
||||
|
@ -218,17 +213,17 @@ function Get_DB_config($sccp_compatible)
|
|||
'displayontime' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'displayonduration' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'displayidletimeout' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'settingsaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'videocapability' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'webaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'webadmin' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'pcport' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'spantopcport' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off')"),
|
||||
'voicevlanaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'enablecdpswport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'enablecdppcport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'enablelldpswport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'enablelldppcport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'settingsaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'videocapability' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'webaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'webadmin' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'pcport' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'spantopcport' => array('create' => "enum('on','off') NOT NULL default 'on'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'voicevlanaccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'enablecdpswport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'enablecdppcport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'enablelldpswport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'enablelldppcport' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'firstdigittimeout' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'digittimeout' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'cfwdnoanswer_timeout' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
|
@ -238,7 +233,7 @@ function Get_DB_config($sccp_compatible)
|
|||
'transfer_tone' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'callwaiting_tone' => array('create' => "VARCHAR(20) NULL default null", 'modify' => "VARCHAR(20)"),
|
||||
'callanswerorder' => array('create' => "enum('oldestfirst','latestfirst') NOT NULL default 'latestfirst'",
|
||||
'modify' => "enum('oldestfirst','latestfirst')"),
|
||||
'modify' => "enum('oldestfirst','latestfirst') NOT NULL"),
|
||||
'sccp_tos' => array('create' => "VARCHAR(11) NOT NULL default '0x68'", 'modify' => "VARCHAR(11)"),
|
||||
'sccp_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x4'", 'modify' => "VARCHAR(11)"),
|
||||
'dev_sshPassword' => array('create' => "VARCHAR(25) NOT NULL default 'cisco'"),
|
||||
|
@ -248,67 +243,25 @@ function Get_DB_config($sccp_compatible)
|
|||
'profileid' => array('create' => "INT(11) NOT NULL DEFAULT '0'"),
|
||||
'dialrules' => array('create' => "VARCHAR(255) NULL DEFAULT NULL"),
|
||||
'description' => array('create' => "VARCHAR(45) NULL DEFAULT NULL"),
|
||||
'_hwlang' => array ('drop' => 'yes'),
|
||||
'devlang' => array('create' => "VARCHAR(50) NULL default NULL", 'modify' => "VARCHAR(50)"),
|
||||
'netlang' => array('create' => "VARCHAR(50) NULL default NULL", 'modify' => "VARCHAR(50)"),
|
||||
'_devlang' => array('rename' => "devlang"),
|
||||
'_netlang' => array('rename' => "netlang"),
|
||||
'_logserver' => array('rename' => 'logserver'),
|
||||
'_daysdisplaynotactive' => array('rename' => 'daysdisplaynotactive'),
|
||||
'_displayontime' => array('rename' => 'displayontime'),
|
||||
'_displayonduration' => array('rename' => 'displayonduration'),
|
||||
'_displayidletimeout' => array('rename' => 'displayidletimeout'),
|
||||
'_settingsaccess' => array('rename' => 'settingsaccess'),
|
||||
'_videocapability' => array('rename' => 'videocapability'),
|
||||
'_webaccess' => array('rename' => 'webaccess'),
|
||||
'_webadmin' => array('rename' => 'webadmin'),
|
||||
'_pcport' => array('rename' => 'pcport'),
|
||||
'_spantopcport' => array('rename' => 'spantopcport'),
|
||||
'_voicevlanaccess' => array('rename' => 'voicevlanaccess'),
|
||||
'_enablecdpswport' => array('rename' => 'enablecdpswport'),
|
||||
'_enablecdppcport' => array('rename' => 'enablecdppcport'),
|
||||
'_enablelldpswport' => array('rename' => 'enablelldpswport'),
|
||||
'_enablelldppcport' => array('rename' => 'enablelldppcport'),
|
||||
'_firstdigittimeout' => array('rename' => 'firstdigittimeout'),
|
||||
'_digittimeout' => array('rename' => 'digittimeout'),
|
||||
'_cfwdnoanswer_timeout' => array('rename' => 'cfwdnoanswer_timeout'),
|
||||
'_autoanswer_ring_time' => array('rename' => 'autoanswer_ring_time'),
|
||||
'_autoanswer_tone' => array('rename' => 'autoanswer_tone'),
|
||||
'_remotehangup_tone' => array('rename' => 'remotehangup_tone'),
|
||||
'_transfer_tone' => array('rename' => 'transfer_tone'),
|
||||
'_callwaiting_tone' => array('rename' => 'callwaiting_tone'),
|
||||
'_callanswerorder' => array('rename' => 'callanswerorder'),
|
||||
'_sccp_tos' => array('rename' => 'sccp_tos'),
|
||||
'_sccp_cos' => array('rename' => 'sccp_cos'),
|
||||
'_dev_sshPassword' => array('rename' => 'dev_sshPassword'),
|
||||
'_dev_sshUserId' => array('rename' => 'dev_sshUserId'),
|
||||
'_phonepersonalization' => array('rename' => '_phonepersonalization'),
|
||||
'_loginname' => array('rename' => 'loginname'),
|
||||
'_profileid' => array('rename' => 'profileid'),
|
||||
'_dialrules' => array('rename' => 'dialrules'),
|
||||
'_description' => array('rename' => 'description'),
|
||||
'keepalive' => array('create' => "INT(11) DEFAULT '60'", 'modify' => 'INT(11)', 'def_modify' => "60")
|
||||
'keepalive' => array('create' => "INT(11) DEFAULT '60'", 'modify' => 'INT(11)', 'def_modify' => "60"),
|
||||
'park' => array('create' => "enum('yes','no') NULL default 'yes'", 'modify' => "enum('yes','no') NOT NULL")
|
||||
),
|
||||
'sccpline' => array(
|
||||
'regcontext' => array('create' => "VARCHAR(20) NULL default 'sccpregistration'", 'modify' => "VARCHAR(20)"),
|
||||
'transfer_on_hangup' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'autoselectline_enabled' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'autocall_select' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'backgroundImageAccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')"),
|
||||
'callLogBlfEnabled' => array('create' => "enum('3','2') NOT NULL default '2'", 'modify' => "enum('3','2')"),
|
||||
'_regcontext' => array('rename' => 'regcontext'),
|
||||
'_transfer_on_hangup' => array('rename' => 'transfer_on_hangup'),
|
||||
'_autoselectline_enabled' => array('rename' => 'autoselectline_enabled'),
|
||||
'_autocall_select' => array('rename' => 'autocall_select'),
|
||||
'_backgroundImageAccess' => array('rename' => 'backgroundImageAccess'),
|
||||
'_callLogBlfEnabled' => array('rename' => 'callLogBlfEnabled')
|
||||
'transfer_on_hangup' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'autoselectline_enabled' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'autocall_select' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'backgroundImageAccess' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off') NOT NULL"),
|
||||
'callLogBlfEnabled' => array('create' => "enum('3','2') NOT NULL default '2'", 'modify' => "enum('3','2') NOT NULL"),
|
||||
),
|
||||
'sccpsettings' => array(
|
||||
'systemdefault' => array('create' => "VARCHAR(255) NULL default ''")
|
||||
),
|
||||
'sccpdevmodel' => array(
|
||||
'fwfound' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no')"),
|
||||
'templatefound' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no')")
|
||||
'fwfound' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no') NOT NULL"),
|
||||
'templatefound' => array('create' => "enum('yes','no') NOT NULL default 'no'", 'modify' => "enum('yes','no') NOT NULL")
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -475,11 +428,14 @@ function InstallDB_updateSchema($db_config)
|
|||
$sql_modify .= "MODIFY COLUMN {$fld_id} {$tab_modif[$fld_id]['modify']} DEFAULT '{$tab_modif[$fld_id]['def_modify']}', ";
|
||||
// def_modify has been used so unset
|
||||
unset($tab_modif[$fld_id]['def_modify']);
|
||||
/*
|
||||
} else if (!empty($tab_modif[$fld_id]['create'])) {
|
||||
// use create attributes
|
||||
// use create attributes. This is dangerous as will overwrite defaults - drop this
|
||||
// and require specific def_modify if really want to change defaults
|
||||
$sql_modify .= "MODIFY COLUMN {$fld_id} {$tab_modif[$fld_id]['create']}, ";
|
||||
*/
|
||||
} else {
|
||||
// No default to modify so leave unchanged
|
||||
// No default to modify so leave default unchanged
|
||||
$sql_modify .= "MODIFY COLUMN {$fld_id} {$tab_modif[$fld_id]['modify']}, ";
|
||||
}
|
||||
$count_modify ++;
|
||||
|
@ -532,6 +488,7 @@ function InstallDB_updateSchema($db_config)
|
|||
}
|
||||
}
|
||||
// only case left to handle is create as all others handled above
|
||||
// This should never be used - creates should be handled by doctrine or will have dataloss on subsequent installs.
|
||||
foreach ($tab_modif as $row_fld => $row_data) {
|
||||
if (!empty($row_data['create'])) {
|
||||
$sql_create .= "ADD COLUMN {$row_fld} {$row_data['create']}, ";
|
||||
|
@ -679,7 +636,6 @@ function InstallDB_updateSchema($db_config)
|
|||
"('8961', 'CISCO', 1, 1, '', 'loadInformation540', 0, '')",
|
||||
"('Iphone', 'APPLE', 0, 1, '', 'loadInformation562', 0, '')",
|
||||
"('Android', 'ANDROID', 0, 1, '', 'loadInformation575', 0, '')",
|
||||
|
||||
"('VXC 6215', 'CISCO', 1, 1, '', 'loadInformation634', 0, '')",
|
||||
"('Analog', 'CISCO', 1, 1, '', 'loadInformation30027', 0, '')",
|
||||
"('ISDN', 'CISCO', 1, 1, '', 'loadInformation30028', 0, '')",
|
||||
|
@ -696,9 +652,9 @@ function InstallDB_updateSchema($db_config)
|
|||
"('VGC Phone', 'CISCO', 1, 1, '', 'loadInformation10', 0, NULL)",
|
||||
"('7911-sip', 'CISCO-SIP', 1, 1, 'SIP11.9-2-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_sip_template')",
|
||||
"('9951-sip', 'CISCO-SIP', 1, 5, 'sip9951.9-2-2SR1-9', 'loadinformation537', 1, 'SEP0000000000.cnf.xml_99xx_sip_template')",
|
||||
"('VGC Virtual', 'CISCO', 1, 1, '', 'loadInformation11', 0, NULL)");
|
||||
"('VGC Virtual', 'CISCO', 1, 1, '', 'loadInformation11', 0, NULL)"
|
||||
);
|
||||
|
||||
dbug(count($devModelArr));
|
||||
$test = $db->prepare("SELECT count(*) AS modelCount from sccpdevmodel");
|
||||
$test->execute();
|
||||
if ($test->fetchAll()[0]['modelCount'] == count($devModelArr)) {
|
||||
|
@ -1133,7 +1089,6 @@ function cleanUpSccpSettings() {
|
|||
$stmt = $db->prepare("SELECT keyword, sccpsettings.* FROM sccpsettings");
|
||||
$stmt->execute();
|
||||
$settingsFromDb = $stmt->fetchAll(\PDO::FETCH_ASSOC|\PDO::FETCH_UNIQUE);
|
||||
|
||||
// See if a previous version was installed
|
||||
outn("<li>" . _("Checking for previous version of Sccp_manager.") . "</li>");
|
||||
if (!isset($settingsFromDb['sccp_compatible']['data'])) {
|
||||
|
@ -1141,20 +1096,6 @@ function cleanUpSccpSettings() {
|
|||
} else {
|
||||
outn(_("Found DB Schema : {$settingsFromDb['sccp_compatible']['data']}"));
|
||||
}
|
||||
// Check that required settings are initialised and update db and $settingsFromDb if not
|
||||
/*
|
||||
foreach ($extconfigs->getExtConfig('sccpDefaults') as $key => $value) {
|
||||
if (empty($settingsFromDb[$key])) {
|
||||
$settingsFromDb[$key] = array('keyword' => $key, 'data' => $value, 'type' => 0, 'seq' => 0);
|
||||
|
||||
$sql = "REPLACE INTO sccpsettings (keyword, data, seq, type) VALUES ('{$key}', '{$value}', 0, 0)";
|
||||
$results = $db->query($sql);
|
||||
if (DB::IsError($results)) {
|
||||
die_freepbx(_("Error updating sccpsettings: $key"));
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
// Clean up sccpsettings to remove legacy values.
|
||||
$xml_vars = $amp_conf['AMPWEBROOT'] . "/admin/modules/sccp_manager/conf/sccpgeneral.xml.v{$sccp_compatible}";
|
||||
$thisInstaller->xml_data = simplexml_load_file($xml_vars);
|
||||
|
@ -1169,7 +1110,6 @@ function cleanUpSccpSettings() {
|
|||
}
|
||||
$settingsFromDb = array_merge($settingsFromDb, array_diff_key($thisInstaller->sccpvalues, $settingsFromDb));
|
||||
unset($thisInstaller->sccpvalues);
|
||||
|
||||
// get chan-sccp defaults
|
||||
|
||||
foreach (array('general','device','line') as $section) {
|
||||
|
@ -1269,7 +1209,6 @@ function cleanUpSccpSettings() {
|
|||
$settingsFromDb[$key]['data'] = '';
|
||||
$count++;
|
||||
}
|
||||
|
||||
// Write settings back to db
|
||||
$sql = "TRUNCATE sccpsettings";
|
||||
$results = $db->query($sql);
|
||||
|
@ -1285,6 +1224,23 @@ function cleanUpSccpSettings() {
|
|||
)";
|
||||
$results = $db->query($sql);
|
||||
}
|
||||
//Have saved settings, now need to reset db defaults which have possible been mangled by Doctrine
|
||||
// TODO: This needs to be integrated better with InstallDB_updateSchema
|
||||
foreach (['sccpdevice', 'sccpline'] as $table) {
|
||||
$sql_modify = '';
|
||||
$stmt = $db->prepare("DESCRIBE {$table}");
|
||||
$stmt->execute();
|
||||
$db_result = $stmt->fetchAll(\PDO::FETCH_ASSOC|\PDO::FETCH_UNIQUE);
|
||||
foreach ($db_result as $key => $value) {
|
||||
if (!empty($settingsFromDb[$key]['data'])) {
|
||||
$sql_modify .= "ALTER COLUMN ${key} SET DEFAULT '{$settingsFromDb[$key]['data']}', ";
|
||||
}
|
||||
}
|
||||
$sql_modify = rtrim($sql_modify, ', ');
|
||||
$stmt = $db->prepare("ALTER TABLE {$table} ${sql_modify}");
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
// Need to load any existing sccp.conf so that retain softkeys section if exists.
|
||||
$sccp_conf_init = $thisInstaller->initialiseConfInit();
|
||||
// Now correct sccp.conf to replace any illegal settings passing $sccp_conf_init
|
||||
|
|
36
module.xml
36
module.xml
|
@ -83,9 +83,9 @@
|
|||
<field name="directrtp" type="string" notnull="false"/>
|
||||
<field name="softkeyset" type="string" length="100" default="softkeyset" notnull="false"/>
|
||||
<field name="audio_tos" type="string" length="11" default="0xB8" notnull="false"/>
|
||||
<field name="audio_cos" type="string" length="1" default="6" notnull="false"/>
|
||||
<field name="audio_cos" type="string" length="11" default="6" notnull="false"/>
|
||||
<field name="video_tos" type="string" length="11" default="0x88" notnull="false"/>
|
||||
<field name="video_cos" type="string" length="1" default="5" notnull="false"/>
|
||||
<field name="video_cos" type="string" length="11" default="5" notnull="false"/>
|
||||
<field name="conf_allow" type="string" default="on"/>
|
||||
<field name="conf_play_general_announce" type="string" length="3" default="on" notnull="false"/>
|
||||
<field name="conf_play_part_announce" type="string" default="on"/>
|
||||
|
@ -112,37 +112,37 @@
|
|||
<field name="phonecodepage" type="string" length="50" notnull="false"/>
|
||||
<field name="logserver" type="string" length="100" default="NULL" notnull="false"/>
|
||||
<field name="_logserver" type="string" length="100" notnull="false"/>
|
||||
<field name="daysdisplaynotactive" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="daysdisplaynotactive" type="string" length="20" notnull="false"/>
|
||||
<field name="_daysdisplaynotactive" type="string" length="20" notnull="false"/>
|
||||
<field name="displayontime" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="displayontime" type="string" length="20" notnull="false"/>
|
||||
<field name="_displayontime" type="string" length="20" notnull="false"/>
|
||||
<field name="displayonduration" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="displayonduration" type="string" length="20" notnull="false"/>
|
||||
<field name="_displayonduration" type="string" length="20" notnull="false"/>
|
||||
<field name="displayidletimeout" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="displayidletimeout" type="string" length="20" notnull="false"/>
|
||||
<field name="_displayidletimeout" type="string" length="20" notnull="false"/>
|
||||
<field name="settingsaccess" type="string" default="off"/>
|
||||
<field name="settingsaccess" type="string"/>
|
||||
<field name="_settingsaccess" type="string" notnull="false"/>
|
||||
<field name="videocapability" type="string" default="off"/>
|
||||
<field name="videocapability" type="string"/>
|
||||
<field name="_videocapability" type="string" notnull="false"/>
|
||||
<field name="webaccess" type="string" default="off"/>
|
||||
<field name="webaccess" type="string"/>
|
||||
<field name="_webaccess" type="string" notnull="false"/>
|
||||
<field name="webadmin" type="string" default="off"/>
|
||||
<field name="webadmin" type="string"/>
|
||||
<field name="_webadmin" type="string" notnull="false"/>
|
||||
<field name="pcport" type="string" default="on"/>
|
||||
<field name="pcport" type="string"/>
|
||||
<field name="_pcport" type="string" notnull="false"/>
|
||||
<field name="spantopcport" type="string" default="on"/>
|
||||
<field name="spantopcport" type="string"/>
|
||||
<field name="_spantopcport" type="string" notnull="false"/>
|
||||
<field name="voicevlanaccess" type="string" default="off"/>
|
||||
<field name="voicevlanaccess" type="string"/>
|
||||
<field name="_voicevlanaccess" type="string" notnull="false"/>
|
||||
<field name="enablecdpswport" type="string" default="off"/>
|
||||
<field name="enablecdpswport" type="string"/>
|
||||
<field name="_enablecdpswport" type="string" notnull="false"/>
|
||||
<field name="enablecdppcport" type="string" default="off"/>
|
||||
<field name="enablecdppcport" type="string"/>
|
||||
<field name="_enablecdppcport" type="string" notnull="false"/>
|
||||
<field name="enablelldpswport" type="string" default="off"/>
|
||||
<field name="enablelldpswport" type="string"/>
|
||||
<field name="_enablelldpswport" type="string" notnull="false"/>
|
||||
<field name="enablelldppcport" type="string" default="off"/>
|
||||
<field name="enablelldppcport" type="string"/>
|
||||
<field name="_enablelldppcport" type="string" notnull="false"/>
|
||||
<field name="firstdigittimeout" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="firstdigittimeout" type="string" length="20" notnull="false"/>
|
||||
<field name="_firstdigittimeout" type="string" length="20" notnull="false"/>
|
||||
<field name="digittimeout" type="string" length="20" default="NULL" notnull="false"/>
|
||||
<field name="_digittimeout" type="string" length="20" notnull="false"/>
|
||||
|
|
|
@ -440,6 +440,7 @@ class dbinterface
|
|||
$sth->execute();
|
||||
return $sth->fetchAll()[$element];
|
||||
}
|
||||
|
||||
public function getNamedGroup($callGroup) {
|
||||
//$sql = "SELECT {$callGroup} FROM sccpline GROUP BY {$callGroup}";
|
||||
$sth = $this->db->prepare("SELECT {$callGroup} FROM sccpline GROUP BY {$callGroup}");
|
||||
|
|
|
@ -386,7 +386,7 @@ class formcreate
|
|||
}
|
||||
if (!empty($sccp_defaults[$res_n]['systemdefault'])) {
|
||||
// There is a system default, so add button to customise or reset
|
||||
// the closing } is after the code to include the button at line ~438
|
||||
// the closing } is after the code to include the button at line ~427
|
||||
|
||||
//-- Start include of defaults button --
|
||||
echo "<div class='col-md-3'>";
|
||||
|
|
|
@ -279,6 +279,7 @@ trait ajaxHelper {
|
|||
}
|
||||
|
||||
function saveServerSettings($request, $validateonly = false) {
|
||||
dbug($request);
|
||||
$hdr_prefix = 'sccp_';
|
||||
$hdr_arprefix = 'sccp-ar_';
|
||||
$save_settings = array();
|
||||
|
@ -371,6 +372,8 @@ trait ajaxHelper {
|
|||
// Value unchanged so ignore
|
||||
} else {
|
||||
$dbSaveArray[$key] = array('table' => $tableName, 'field' => $key, 'Default' => $value);
|
||||
// Save these settings to sccpsettings as backup - Doctrine overwrites defaults in installer.
|
||||
$save_settings[$key]= ['keyword' => $key, 'seq' => 98, 'type' => 2, 'data' => $value, 'systemdefault' => ''];
|
||||
}
|
||||
// If have matched on device, cannot match on line
|
||||
continue 2;
|
||||
|
@ -546,19 +549,12 @@ trait ajaxHelper {
|
|||
}
|
||||
break;
|
||||
case 'phonecodepage':
|
||||
// phonecodepage depends on 2 variables - language and phone type (uses java or not).
|
||||
// Non java phones use ISO8859-1 or CP1251 (Cyrillic); java phones use UTF-8. See @dkgroot.
|
||||
// Below list is not definitive or necessarily accurate - needs to be maintained.
|
||||
$nonJavaPhones = array(
|
||||
'6901', '6911', '6921', '6945', '7902', '7905', '7910', '7911', '7912', '7914', '7915', '7916', '7920', '7925', '7926', '7931', '7935', '7936', '7937', '7940', '7960'
|
||||
);
|
||||
// TODO: May be other exceptions so use switch. Historically this is the only one handled
|
||||
// phonecodepage depends on 2 variables - language and phone type (uses java or not).
|
||||
// Non java phones use ISO8859-1 or CP1251 (Cyrillic); java phones use UTF-8. See @dkgroot.
|
||||
// Below list is not definitive or necessarily accurate - needs to be maintained.
|
||||
$nonJavaPhones = array(
|
||||
'6901', '6911', '6921', '6945', '7902', '7905', '7910', '7911', '7912', '7914', '7915', '7916', '7920', '7925', '7926', '7931', '7935', '7936', '7937', '7940', '7960'
|
||||
);
|
||||
$nonJavaPhones = array( '7902', '7905', '7912', '7935', '7940', '7960');
|
||||
|
||||
if (!empty($get_settings["{$hdr_prefix}devlang"])) {
|
||||
switch ($get_settings["{$hdr_prefix}devlang"]) {
|
||||
case 'Russian_Russian_Federation':
|
||||
|
@ -586,28 +582,6 @@ trait ajaxHelper {
|
|||
case 'permit':
|
||||
case 'deny';
|
||||
$this->convertArrayToCsv($netValue);
|
||||
|
||||
/*
|
||||
// Now have an array of settings each with keys net and Mask
|
||||
// TODO: This needs to be optimised
|
||||
//foreach ($valueArr as $netValue) {
|
||||
if (isset($netValue['inherit'])) {
|
||||
$save_settings['deny'] = 'NONE';
|
||||
continue 2;
|
||||
}
|
||||
if (isset($netValue['internal'])) {
|
||||
$output[] = 'internal';
|
||||
continue 2;
|
||||
}
|
||||
if (empty($netValue['net'])) {
|
||||
// empty net so ignored
|
||||
continue 2;
|
||||
}
|
||||
$netValue['mask'] = (empty($netValue['mask'])) ? "255.255.255.0" : $netValue['mask'];
|
||||
$output[]= implode('/', $netValue);
|
||||
//}
|
||||
*/
|
||||
|
||||
break;
|
||||
case 'setvar':
|
||||
$output[] = implode(';', $netValue);
|
||||
|
@ -621,12 +595,14 @@ trait ajaxHelper {
|
|||
// Now only have normal prefix
|
||||
if (!empty($get_settings["{$hdr_prefix}{$key}"])) {
|
||||
$value = $get_settings["{$hdr_prefix}{$key}"];
|
||||
//dbug($key . " " . $value);
|
||||
}
|
||||
}
|
||||
if (!empty($value)) {
|
||||
$save_settings[$key] = $value;
|
||||
}
|
||||
}
|
||||
dbug($save_settings);
|
||||
// Save this device.
|
||||
$this->dbinterface->write('sccpdevice', $save_settings, 'replace');
|
||||
// Retrieve the phone buttons from $_REQUEST ($get_settings) and write back to
|
||||
|
|
|
@ -62,6 +62,7 @@ trait bmoFunctions {
|
|||
// Have a device that is connected but is not currently in the database
|
||||
// This device must have connected via hotline or config in sccp.conf.
|
||||
// Pass parameters to addDevice so that can be added to db.
|
||||
// TODO: Should use LoadInformationId as a key as this is unique $dev_data['SCCP_Vendor']['model_id'] (numeric)
|
||||
foreach ($activeDevices as $dev_ids) {
|
||||
$id_name = $dev_ids['name'];
|
||||
$dev_data = $this->aminterface->sccp_getdevice_info($id_name);
|
||||
|
|
|
@ -455,6 +455,7 @@ trait helperfunctions {
|
|||
} else {
|
||||
$datav = (string) $child->value;
|
||||
}
|
||||
dbug($child->name);
|
||||
if (empty($this->sccpvalues[(string) $child->name])) {
|
||||
$this->sccpvalues[(string) $child->name] = array('keyword' => (string) $child->name, 'data' => $datav, 'type' => '2', 'seq' => $seq, 'systemdefault' => '');
|
||||
}
|
||||
|
@ -473,6 +474,7 @@ trait helperfunctions {
|
|||
}
|
||||
}
|
||||
}
|
||||
dbug($this->sccpvalues['earlyrtp']);
|
||||
}
|
||||
|
||||
public function getSipConfig() {
|
||||
|
|
Loading…
Reference in a new issue