From 24e0f2404c0a9b1431c5f21c9c5bad8a9bbded24 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Wed, 25 Oct 2017 19:06:16 +0300 Subject: [PATCH] Begin resample Sccp_manager changed the suffix of the configuration file name --- Sccp_manager.class.php | 2 +- Sccp_manager.inc/srvinterface.class.php | 4 ++-- conf/{Sccp.class.php.v11 => Sccp.class.php.v4.3.1} | 10 +++++++++- conf/{sccpgeneral.xml.v11 => sccpgeneral.xml.v4.3.1} | 0 install.php | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) rename conf/{Sccp.class.php.v11 => Sccp.class.php.v4.3.1} (97%) rename conf/{sccpgeneral.xml.v11 => sccpgeneral.xml.v4.3.1} (100%) diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 8aa9c1a..92aee4e 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -68,7 +68,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { // private $SCCP_LANG_DICTIONARY = 'SCCP-dictionary.xml'; // CISCO LANG file search in /tftp-path private $SCCP_LANG_DICTIONARY = 'be-sccp.jar'; // CISCO LANG file search in /tftp-path private $pagedata = null; - private $sccp_driver_ver = '11.2'; + private $sccp_driver_ver = '11.21'; private $tftpLang = array(); private $hint_context = '@ext-local'; /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Get it from Config !!! private $val_null = 'NONE'; /// REPLACE to null Field diff --git a/Sccp_manager.inc/srvinterface.class.php b/Sccp_manager.inc/srvinterface.class.php index 7bb8b8a..1b5752d 100644 --- a/Sccp_manager.inc/srvinterface.class.php +++ b/Sccp_manager.inc/srvinterface.class.php @@ -135,9 +135,9 @@ class srvinterface { return 0; } if ($res["vCode"] >= 431) { - return 11; + return '4.3.1'; } else { - return 10; + return '4.3.0'; } // return $res["vCode"]; } diff --git a/conf/Sccp.class.php.v11 b/conf/Sccp.class.php.v4.3.1 similarity index 97% rename from conf/Sccp.class.php.v11 rename to conf/Sccp.class.php.v4.3.1 index 581142a..59be00e 100644 --- a/conf/Sccp.class.php.v11 +++ b/conf/Sccp.class.php.v4.3.1 @@ -72,15 +72,23 @@ class Sccp extends \FreePBX\modules\Core\Driver { $sqlv = 'values ("'.$id.'"'; foreach($this->data_fld as $key => $val) { switch ($key) { + case 'incominglimit': + $sql .= ', '.$key; + if (!empty($settings[$val]['value'])){ + $sqlv .= ", '".$settings[$val]['value']."' "; + } else { + $sqlv .= ", DEFAULT(`".$key."`)"; + } + break; case 'secondary_dialtone_digits': case 'secondary_dialtone_tone': -// case 'incominglimit': case 'dnd': $sql .= ', '.$key; if (!empty($settings[$val]['value'])){ $sqlv .= ", '".$settings[$val]['value']."' "; } else { $sqlv .= ", NULL "; +// $sqlv .= ", DEFAULT(`".$key."`)"; } break; default: diff --git a/conf/sccpgeneral.xml.v11 b/conf/sccpgeneral.xml.v4.3.1 similarity index 100% rename from conf/sccpgeneral.xml.v11 rename to conf/sccpgeneral.xml.v4.3.1 diff --git a/install.php b/install.php index 5b1cd07..fb665f2 100644 --- a/install.php +++ b/install.php @@ -226,7 +226,7 @@ $db_config_v3 = array( 'audio_cos' => array('drop' => "yes"), 'video_tos' => array('drop' => "yes"), 'video_cos' => array('drop' => "yes"), - 'incominglimit' =>array('create' => "INT(11) NOT NULL DEFAULT '6'", 'modify' =>'INT(11)', 'def_modify' => "6"), + 'incominglimit' =>array('create' => "INT(11) DEFAULT '6'", 'modify' =>'INT(11)', 'def_modify' => "6"), 'transfer' =>array('create' => "enum('on','off') NOT NULL default 'on'",'modify' => "enum('on','off')"), 'vmnum' =>array('def_modify' => "*97"), 'musicclass' =>array('def_modify' => "default"),