';
+
return $tech;
}
@@ -147,6 +166,10 @@ class Sccp extends \FreePBX\modules\Core\Driver {
public function getDefaultDeviceSettings($id, $displayname, &$flag) {
$dial = 'SCCP';
$settings = array(
+ "mailbox" => array(
+ "value" => "",
+ "flag" => $flag++
+ ),
"incominglimit" => array(
"value" => "2",
"flag" => $flag++
@@ -220,6 +243,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
// Assigned DID/CID
$named_group = $this->getNamedGroup();
$tmparr = array();
+ $tt = _("Name or id of lincked maibox");
+ $tmparr['mailbox'] = array('prompttext' => _('Mailbox'), 'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section);
$tt = _("The SCCP channel number for this port. If you plaining to use this line as 'Shared' or use on several devices - leave this field blank or set limit to 10 calls.");
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '2', 'tt' => $tt, 'level' => 0, 'jsvalidation' => 'isEmpty()', 'failvalidationmsg' => $msgInvalidChannel);
// $tmparr['incominglimit'] = array('prompttext' => _('Incoming Call Limit'), 'value' => '', 'tt' => $tt, 'level' => 1, 'section' => $section, 'category' => 'general');
diff --git a/conf/sccpgeneral.xml.v11 b/conf/sccpgeneral.xml.v11
index db5fd75..54b124b 100644
--- a/conf/sccpgeneral.xml.v11
+++ b/conf/sccpgeneral.xml.v11
@@ -800,6 +800,7 @@ and open the template in the editor. Base Version before all crash :-)
directed_pickupyes
+ noEnable Pickup function to direct pickup an extension. Default is On
@@ -808,6 +809,7 @@ and open the template in the editor. Base Version before all crash :-)
conf_allowyes
+ noAllow the use of conference
@@ -815,6 +817,7 @@ and open the template in the editor. Base Version before all crash :-)
+ pickup_hidedirected_pickup_context
@@ -863,6 +866,7 @@ and open the template in the editor. Base Version before all crash :-)
+ conf_hideconf_play_general_announce
diff --git a/install.php b/install.php
index c4c011a..733d163 100644
--- a/install.php
+++ b/install.php
@@ -8,6 +8,17 @@ global $db;
global $amp_conf;
global $astman;
global $version;
+global $srvinterface;
+
+
+
+$class = "\\FreePBX\\Modules\\Sccp_manager\\srvinterface";
+if(!class_exists($class,false)) {
+ include(__DIR__."/Sccp_manager.inc/srvinterface.class.php");
+}
+if(class_exists($class,false)) {
+ $srvinterface = new $class();
+}
//
// Helper function to retrieve SCCPConfigMetaData via ASTMan
@@ -78,6 +89,7 @@ $db_config_v0 = array(
'musicclass' =>array('def_modify' => "default"),
'echocancel' =>array('def_modify' => "on"),
'silencesuppression' =>array('def_modify' => "off"),
+ 'id' =>array('create' => 'VARCHAR( 20 ) NULL DEFAULT NULL', 'modify' => "VARCHAR(20)", 'def_modify' =>"NULL"),
'dnd' =>array('create' => 'VARCHAR( 12 ) DEFAULT "reject" AFTER `amaflags`', 'modify' => "VARCHAR(12)", 'def_modify' =>"reject")
)
);
@@ -198,8 +210,24 @@ function CheckAsteriskVersion() {
return $ver_compatible;
}
-function CheckChanSCCPVersion($astman) {
- global $db_config, $db_config_v0, $db_config_v3;
+function CheckChanSCCPVersion() {
+ global $db_config, $db_config_v0, $db_config_v3, $srvinterface,$astman;
+ if (!$astman) {
+ ie_freepbx('No asterisk manager connection provided!. Installation Failed');
+ }
+ $sccp_ver = $srvinterface->get_comatable_sccp();
+ outn("
" . _("Sccp model Version : ") . $sccp_ver . "
");
+ if ($sccp_ver >= 11) {
+ $db_config = $db_config_v3;
+ } else {
+ $db_config = $db_config_v0;
+ }
+ return $sccp_ver;
+}
+
+/*
+function CheckChanSCCPVersion() {
+ global $db_config, $db_config_v0, $db_config_v3, $astman;
if (!$astman) {
ie_freepbx('No asterisk manager connection provided!. Installation Failed');
}
@@ -226,28 +254,17 @@ function CheckChanSCCPVersion($astman) {
$sccp_ver = 430;
}
}
-
- /*
- if (array_key_exists("Branch",$metadata)) {
- if ($metadata["Branch"] == "master") {
-
- } else
- if ($metadata["Branch"] == "develop") {
-
+ if (array_key_exists("Revision",$metadata)) { // old method
+ if (base_convert($metadata["Revision"],16,10) == base_convert('702487a',16,10)) { // hash values are random, not incrementa
+ $sccp_ver = 431;
+ $db_config = $db_config_v3;
}
}
- */
-
- /* Revision got replaced by RevisionHash in 10404 (using the hash does not work)*/
- if (array_key_exists("Revision",$metadata) && // old method
- (base_convert($metadata["Revision"],16,10) == base_convert('702487a',16,10)) // hash values are random, not incremental
- ) {
- $sccp_ver = 431;
- $db_config = $db_config_v3;
- } else
- if (array_key_exists("RevisionNum",$metadata) && $metadata["RevisionNum"] >= "10403") { // new method, RevisionNum is incremental
- $sccp_ver = 432;
- $db_config = $db_config_v3;
+ if (array_key_exists("RevisionNum",$metadata)) {
+ if ($metadata["RevisionNum"] >= "10403") { // new method, RevisionNum is incremental
+ $sccp_ver = 432;
+ $db_config = $db_config_v3;
+ }
}
} else {
die_freepbx("Version information could not be retrieved from chan-sccp, via astman::SCCPConfigMetaData");
@@ -255,7 +272,8 @@ function CheckChanSCCPVersion($astman) {
outn("
" . _("Sccp Version : ") . $sccp_ver . "
");
return $sccp_ver;
}
-
+*/
+
function InstallDB_sccpsettings() {
global $db;
outn("