Fix phonepersonalisation
Set expected numeric value for phonepersonalization WIP fix - adv.ini
This commit is contained in:
parent
2898f5e3c9
commit
477eb69146
|
@ -554,12 +554,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if (!empty($get_settings[$hdr_prefix . $key])) {
|
||||
$value = $get_settings[$hdr_prefix . $key];
|
||||
}
|
||||
// handle vendor prefix
|
||||
if (!empty($get_settings[$hdr_vendPrefix . $key])) {
|
||||
$value = $get_settings[$hdr_vendPrefix . $key];
|
||||
}
|
||||
// handle array prefix
|
||||
if (!empty($get_settings[$hdr_arprefix . $key])) {
|
||||
$arr_data = '';
|
||||
$arr_clear = false;
|
||||
|
@ -602,6 +601,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
|||
$value = $arr_data;
|
||||
}
|
||||
}
|
||||
// Now only have normal prefix
|
||||
if (!empty($get_settings["{$hdr_prefix}{$key}"])) {
|
||||
$value = $get_settings["{$hdr_prefix}{$key}"];
|
||||
} else if (!empty($get_settings["sccp_hw{$key}"])) {
|
||||
//have an underscore db field
|
||||
$value = $get_settings["sccp_hw{$key}"];
|
||||
}
|
||||
}
|
||||
if (!empty($value)) {
|
||||
$save_settings[$key] = $value;
|
||||
|
|
|
@ -471,6 +471,12 @@
|
|||
|
||||
<deviceSecurityMode>1</deviceSecurityMode>
|
||||
<phonePersonalization>1</phonePersonalization>
|
||||
<!--
|
||||
ToDo Three options. Must be numeric. actual numerics need to be confirmed
|
||||
0 Disabled-The user cannot customize the Cisco Unified IP Phone by using Phone Designer.
|
||||
1 Enabled-The user can use Phone Designer to customize the phone.
|
||||
2 Default-The phone uses the configuration from the Phone Personalization enterprise parameter if you choose Default in both the Phone Configuration and Common Phone Profile Configuration windows. If you choose Default in the Common Phone Profile Configuration window but not in the Phone Configuration window, the phone uses the configuration that you specify in the Phone Configuration window.
|
||||
-->
|
||||
<singleButtonBarge>1</singleButtonBarge>
|
||||
<joinAcrossLines>1</joinAcrossLines>
|
||||
<autoCallPickupEnable>false</autoCallPickupEnable>
|
||||
|
|
|
@ -417,9 +417,9 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<item type="IS" id="11" seq="98">
|
||||
<name>phonepersonalization</name>
|
||||
<label>Allow push background from server </label>
|
||||
<default>0</default>
|
||||
<button value="on">Enabled</button>
|
||||
<button value="off">Disabled</button>
|
||||
<default></default>
|
||||
<button value="1">Enabled</button>
|
||||
<button value="0">Disabled</button>
|
||||
<help>This needs to be enabled to allow the server to push background or ringtones to the phone in the SEPXXXXXXXXXX.cnf.xml of each phone:</help>
|
||||
</item>
|
||||
</page_group>
|
||||
|
@ -1349,6 +1349,14 @@ and open the template in the editor. Base Version before all crash :-)
|
|||
<select> </select>
|
||||
<help>The user locale allows the phone to display text (menu items, soft keys etc.) native to the phone's language. If No language packs found is shown, you need to add locales in the tftp server</help>
|
||||
</item>
|
||||
<item type="IS" id="11" seq="98">
|
||||
<name>phonepersonalization</name>
|
||||
<label>Allow push background from server </label>
|
||||
<default></default>
|
||||
<button value="1">Enabled</button>
|
||||
<button value="0">Disabled</button>
|
||||
<help>This needs to be enabled to allow the server to push background or ringtones to the phone in the SEPXXXXXXXXXX.cnf.xml of each phone:</help>
|
||||
</item>
|
||||
<item type="IE" id="6" seq="99">
|
||||
<label>Background Image</label>
|
||||
<input>
|
||||
|
|
|
@ -249,7 +249,7 @@ function Get_DB_config($sccp_compatible)
|
|||
'_sccp_cos' => array('create' => "VARCHAR(11) NOT NULL default '0x4'", 'modify' => "VARCHAR(11)"),
|
||||
'_dev_sshPassword' => array('create' => "VARCHAR(25) NOT NULL default 'cisco'"),
|
||||
'_dev_sshUserId' => array('create' => "VARCHAR(25) NOT NULL default 'cisco'"),
|
||||
'_phonepersonalization' => array('create' => "enum('on','off') NOT NULL default 'off'", 'modify' => "enum('on','off')")
|
||||
'_phonepersonalization' => array('create' => "VARCHAR(25) NOT NULL default '0'", 'modify' => "VARCHAR(25)")
|
||||
),
|
||||
'sccpline' => array (
|
||||
'_regcontext' => array('create' => "VARCHAR(20) NULL default 'sccpregistration'", 'modify' => "VARCHAR(20)"),
|
||||
|
|
|
@ -100,6 +100,7 @@ class SCCPShowDevice_Event extends Event
|
|||
// This is a list of tables
|
||||
public function getCapabilities()
|
||||
{
|
||||
// TODO unused method - to be deleted?
|
||||
$ret = array();
|
||||
$codecs = explode(';', substr($this->getKey('Capabilities'), 1, -1));
|
||||
foreach ($codecs as $codec) {
|
||||
|
@ -111,6 +112,7 @@ class SCCPShowDevice_Event extends Event
|
|||
|
||||
public function getCodecsPreference()
|
||||
{
|
||||
// TODO unused method - to be deleted?
|
||||
$ret = array();
|
||||
$codecs = explode(';', substr($this->getKey('CodecsPreference'), 1, -1));
|
||||
foreach ($codecs as $codec) {
|
||||
|
|
|
@ -297,10 +297,12 @@ class extconfigs
|
|||
switch ($settingsFromDb['tftp_rewrite']['data']) {
|
||||
case 'pro':
|
||||
$adv_tree_mode = 'pro';
|
||||
if (!empty($adv_ini)) {
|
||||
if (!empty($adv_ini) && file_exists($adv_ini)) {
|
||||
$adv_ini_array = parse_ini_file($adv_ini);
|
||||
$adv_config = array_merge($adv_config, $adv_ini_array);
|
||||
}
|
||||
}
|
||||
// rewrite adv_ini to reflect the new $adv_config
|
||||
if (file_exists($adv_ini)){
|
||||
rename($adv_ini, "{$adv_ini}.old");
|
||||
|
|
|
@ -584,7 +584,6 @@ trait ajaxHelper {
|
|||
}
|
||||
|
||||
public function getFilesFromProvisioner($request) {
|
||||
dbug($request);
|
||||
$filesToGet = array();
|
||||
$provisionerUrl = "https://github.com/dkgroot/provision_sccp/raw/master/";
|
||||
if (!file_exists("{$this->sccppath['tftp_path']}/masterFilesStructure.xml")) {
|
||||
|
|
|
@ -80,6 +80,9 @@ if (!empty($_REQUEST['id'])) {
|
|||
// $key = $key . '_mask';
|
||||
// $val = after('/', $val);
|
||||
// break;
|
||||
case '_phonepersonalization':
|
||||
$def_val['phonepersonalization'] = array("keyword" => 'phonepersonalization', "data" => $val, "seq" => "99");
|
||||
|
||||
default:
|
||||
// Overwrite existing defaults after checking that data is still valid after schema updates
|
||||
// Do not strip underscores as these fields are new in the schema and so should be valid.
|
||||
|
|
Loading…
Reference in a new issue