Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
|
5752d9f393 | ||
|
b28ec36e20 | ||
|
9519f0243a | ||
|
f5e51a52b7 | ||
|
4cf414e995 | ||
|
fb66f0e239 | ||
|
60e973b4a6 | ||
|
2ea478c117 | ||
|
fbbbefb25e | ||
|
e7bc2492ef | ||
|
f7e13505e9 | ||
|
b752640f81 | ||
|
da62493384 |
|
@ -692,15 +692,8 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
'tftp_countries_path' => $this->sccpvalues['tftp_countries_path']['data']
|
'tftp_countries_path' => $this->sccpvalues['tftp_countries_path']['data']
|
||||||
);
|
);
|
||||||
|
|
||||||
$read_config = $this->cnf_read->getConfig('sccp.conf');
|
// initialise $sccp_conf_init
|
||||||
$this->sccp_conf_init['general'] = $read_config['general'];
|
$this->sccp_conf_init = $this->initialiseConfInit();
|
||||||
foreach ($read_config as $key => $value) {
|
|
||||||
if (isset($read_config[$key]['type'])) { // copy soft key
|
|
||||||
if ($read_config[$key]['type'] == 'softkeyset') {
|
|
||||||
$this->sccp_conf_init[$key] = $read_config[$key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$hint = $this->aminterface->core_list_hints();
|
$hint = $this->aminterface->core_list_hints();
|
||||||
foreach ($hint as $key => $value) {
|
foreach ($hint as $key => $value) {
|
||||||
|
|
324
install.php
324
install.php
|
@ -10,7 +10,6 @@ global $version;
|
||||||
global $aminterface;
|
global $aminterface;
|
||||||
global $extconfigs;
|
global $extconfigs;
|
||||||
global $mobile_hw;
|
global $mobile_hw;
|
||||||
global $useAmiForSoftKeys;
|
|
||||||
global $settingsFromDb;
|
global $settingsFromDb;
|
||||||
global $thisInstaller;
|
global $thisInstaller;
|
||||||
global $cnf_int;
|
global $cnf_int;
|
||||||
|
@ -21,7 +20,6 @@ $mobile_hw = '0';
|
||||||
$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT" : "AUTO_INCREMENT";
|
$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT" : "AUTO_INCREMENT";
|
||||||
$table_req = array('sccpdevice', 'sccpline', 'sccpsettings');
|
$table_req = array('sccpdevice', 'sccpline', 'sccpsettings');
|
||||||
$sccp_compatible = 0;
|
$sccp_compatible = 0;
|
||||||
$chanSCCPWarning = true;
|
|
||||||
$db_config = '';
|
$db_config = '';
|
||||||
$sccp_version = array();
|
$sccp_version = array();
|
||||||
$cnf_int = \FreePBX::Config();
|
$cnf_int = \FreePBX::Config();
|
||||||
|
@ -45,16 +43,14 @@ foreach ($requiredClasses as $className) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckAsteriskVersion();
|
CheckAsteriskVersion();
|
||||||
$sccp_version = CheckChanSCCPCompatible();
|
$sccp_compatible = $aminterface->getSCCPVersion()['vCode'];
|
||||||
$sccp_compatible = $sccp_version[0];
|
|
||||||
$chanSCCPWarning = $sccp_version[1] ^= 1;
|
|
||||||
outn("<li>" . _("Sccp model Compatible code : ") . $sccp_compatible . "</li>");
|
outn("<li>" . _("Sccp model Compatible code : ") . $sccp_compatible . "</li>");
|
||||||
if ($sccp_compatible == 0) {
|
if ($sccp_compatible == 0) {
|
||||||
outn("<br>");
|
outn("<br>");
|
||||||
outn("<font color='red'>Chan Sccp not Found. Install it before continuing !</font>");
|
outn("<font color='red'>chan-sccp not found. Install it before continuing !</font>");
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
// BackUp Old config
|
// BackUp Old config
|
||||||
createBackUpConfig();
|
createBackUpConfig();
|
||||||
RenameConfig();
|
RenameConfig();
|
||||||
|
@ -68,10 +64,7 @@ InstallDB_createButtonConfigTrigger();
|
||||||
InstallDbCreateViews($sccp_compatible);
|
InstallDbCreateViews($sccp_compatible);
|
||||||
installDbPopulateSccpline();
|
installDbPopulateSccpline();
|
||||||
InstallDB_updateDBVer($sccp_compatible);
|
InstallDB_updateDBVer($sccp_compatible);
|
||||||
if ($chanSCCPWarning) {
|
|
||||||
outn("<br>");
|
|
||||||
outn("<font color='red'>Error: installed version of chan-sccp is not compatible. Please upgrade chan-sccp</font>");
|
|
||||||
}
|
|
||||||
Setup_RealTime();
|
Setup_RealTime();
|
||||||
addDriver($sccp_compatible);
|
addDriver($sccp_compatible);
|
||||||
checkTftpServer();
|
checkTftpServer();
|
||||||
|
@ -189,7 +182,7 @@ function Get_DB_config($sccp_compatible)
|
||||||
'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser')" ),
|
'modify' => "enum('sccpdevice', 'sipdevice', 'sccpuser')" ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Hardware Mobile. Can switch Softwate to Hardware
|
// Hardware Mobile. Can switch Software to Hardware
|
||||||
$db_config_v4M = array(
|
$db_config_v4M = array(
|
||||||
'sccpdevmodel' => array(
|
'sccpdevmodel' => array(
|
||||||
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL")
|
'loadinformationid' => array('create' => "VARCHAR(30) NULL DEFAULT NULL")
|
||||||
|
@ -312,6 +305,10 @@ function Get_DB_config($sccp_compatible)
|
||||||
),
|
),
|
||||||
'sccpsettings' => array(
|
'sccpsettings' => array(
|
||||||
'systemdefault' => array('create' => "VARCHAR(255) NULL default ''")
|
'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')")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -325,6 +322,7 @@ function Get_DB_config($sccp_compatible)
|
||||||
$db_config_v4['sccpdevice'] = array_merge($db_config_v4['sccpdevice'],$db_config_v5['sccpdevice']);
|
$db_config_v4['sccpdevice'] = array_merge($db_config_v4['sccpdevice'],$db_config_v5['sccpdevice']);
|
||||||
$db_config_v4['sccpline'] = array_merge($db_config_v4['sccpline'],$db_config_v5['sccpline']);
|
$db_config_v4['sccpline'] = array_merge($db_config_v4['sccpline'],$db_config_v5['sccpline']);
|
||||||
$db_config_v4['sccpsettings'] = $db_config_v5['sccpsettings'];
|
$db_config_v4['sccpsettings'] = $db_config_v5['sccpsettings'];
|
||||||
|
$db_config_v4['sccpdevmodel'] = $db_config_v5['sccpdevmodel'];
|
||||||
}
|
}
|
||||||
return $db_config_v4;
|
return $db_config_v4;
|
||||||
}
|
}
|
||||||
|
@ -369,10 +367,8 @@ function CheckAsteriskVersion()
|
||||||
|
|
||||||
function CheckChanSCCPCompatible()
|
function CheckChanSCCPCompatible()
|
||||||
{
|
{
|
||||||
global $chanSCCPWarning;
|
|
||||||
global $aminterface;
|
global $aminterface;
|
||||||
// calling with true returns array with compatibility and RevisionNumber
|
return $aminterface->getSCCPVersion['vCode'];
|
||||||
return $aminterface->get_compatible_sccp(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function InstallDB_updateSchema($db_config)
|
function InstallDB_updateSchema($db_config)
|
||||||
|
@ -573,137 +569,148 @@ function InstallDB_updateSchema($db_config)
|
||||||
}
|
}
|
||||||
outn("<li>" . _("Total modify count :") . $count_modify . "</li>");
|
outn("<li>" . _("Total modify count :") . $count_modify . "</li>");
|
||||||
|
|
||||||
// Force update of sccp devmodel to ensure changes are taken into account
|
// Now see if sccpdevmodel is populated.
|
||||||
|
$devModelArr = array( "('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL)",
|
||||||
|
"('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL)",
|
||||||
|
"('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL)",
|
||||||
|
"('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL)",
|
||||||
|
"('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL)",
|
||||||
|
"('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, '')",
|
||||||
|
"('6901', 'CISCO', 1, 1, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL)",
|
||||||
|
"('6911', 'CISCO', 1, 1, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL)",
|
||||||
|
"('6921', 'CISCO', 1, 1, 'SCCP69xx.9-4-1-3SR3', 'loadInformation496', 0, NULL)",
|
||||||
|
"('6941', 'CISCO', 1, 1, 'SCCP69xx.9-3-1-3', 'loadInformation495', 0, NULL)",
|
||||||
|
"('6945', 'CISCO', 1, 1, 'SCCP6945.9-3-1-3', 'loadInformation564', 0, NULL)",
|
||||||
|
"('6961', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL)",
|
||||||
|
"('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL)",
|
||||||
|
"('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL)",
|
||||||
|
"('7906', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template')",
|
||||||
|
"('7910', 'CISCO', 1, 1, 'P00405000700', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template')",
|
||||||
|
"('7911', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template')",
|
||||||
|
"('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL)",
|
||||||
|
"('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL)",
|
||||||
|
"('7914;7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL)",
|
||||||
|
"('7915', 'CISCO', 0, 24, 'B015-1-0-4-2', 'loadInformation227', 1, NULL)",
|
||||||
|
"('7915;7915', 'CISCO', 0, 48, 'B015-1-0-4-2', 'loadInformation228', 1, NULL)",
|
||||||
|
"('7916', 'CISCO', 0, 24, 'B016-1-0-4-2', 'loadInformation229', 1, NULL)",
|
||||||
|
"('7916;7916', 'CISCO', 0, 48, 'B016-1-0-4-2', 'loadInformation230', 1, NULL)",
|
||||||
|
"('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL)",
|
||||||
|
"('7921', 'CISCO', 1, 1, 'CP7921G-1.4.6.3', 'loadInformation365', 0, NULL)",
|
||||||
|
"('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, 'SEP0000000000.cnf.xml_7925_template')",
|
||||||
|
"('7926', 'CISCO', 1, 1, 'CP7926G-1.4.5.3', 'loadInformation577', 0, '')",
|
||||||
|
"('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL)",
|
||||||
|
"('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL)",
|
||||||
|
"('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL)",
|
||||||
|
"('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-5-7', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template')",
|
||||||
|
"('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_7940_template')",
|
||||||
|
"('7941', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation115', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7941G-GE', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation309', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7942', 'CISCO', 1, 2, 'SCCP42.9-4-2SR3-1S', 'loadInformation434', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7945', 'CISCO', 1, 2, 'SCCP45.9-3-1SR1-1S', 'loadInformation435', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7960', 'CISCO', 3, 6, 'P0030801SR02', 'loadInformation7', 1, 'SEP0000000000.cnf.xml_7940_template')",
|
||||||
|
"('7961', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation30018', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7961G-GE', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation308', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7962', 'CISCO', 3, 6, 'SCCP42.9-4-2SR3-1S', 'loadInformation404', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7965', 'CISCO', 3, 6, 'SCCP45.9-3-1SR1-1S', 'loadInformation436', 0, 'SEP0000000000.cnf.xml_796x_template')",
|
||||||
|
"('7821', 'CISCO', 1, 1, '', 'loadInformation621', 0, '')",
|
||||||
|
"('7841', 'CISCO', 1, 1, '', 'loadInformation622', 0, '')",
|
||||||
|
"('7861', 'CISCO', 1, 1, '', 'loadInformation623', 0, '')",
|
||||||
|
"('7970', 'CISCO', 3, 8, 'SCCP70.9-4-2SR3-1S', 'loadInformation30006', 0, 'SEP0000000000.cnf.xml_797x_template')",
|
||||||
|
"('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, 'SEP0000000000.cnf.xml_797x_template')",
|
||||||
|
"('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, 'SEP0000000000.cnf.xml_7975_template')",
|
||||||
|
"('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL)",
|
||||||
|
"('8831', 'CISCO', 1, 1, '', 'loadInformation659', 0, '')",
|
||||||
|
"('8841', 'CISCO', 1, 1, '', 'loadInformation683', 0, '')",
|
||||||
|
"('8851', 'CISCO', 1, 1, '', 'loadInformation684', 0, '')",
|
||||||
|
"('8861', 'CISCO', 1, 1, '', 'loadInformation685', 0, '')",
|
||||||
|
"('8941', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation586', 0, 'SEP0000000000.cnf.xml_797x_template')",
|
||||||
|
"('8945', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation585', 0, 'SEP0000000000.cnf.xml_7975_template')",
|
||||||
|
"('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, 'SEP0000000000.cnf.xml_ATA_template')",
|
||||||
|
"('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, 'SEP0000000000.cnf.xml_ATA_template')",
|
||||||
|
"('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL)",
|
||||||
|
"('Digital Access', 'CISCO', 1, 1, 'D001M022', 'loadInformation40', 0, NULL)",
|
||||||
|
"('Digital Access+', 'CISCO', 1, 1, 'D00303010033', 'loadInformation42', 0, NULL)",
|
||||||
|
"('E-Series', 'NOKIA', 1, 1, '', '', 0, NULL)",
|
||||||
|
"('ICC', 'NOKIA', 1, 1, '', '', 0, NULL)",
|
||||||
|
"('Analog Access', 'CISCO', 1, 1, 'A001C030', 'loadInformation30', 0, '')",
|
||||||
|
"('WS-X6624', 'CISCO', 1, 1, 'A00204000013', 'loadInformation43', 0, '')",
|
||||||
|
"('WS-X6608', 'CISCO', 1, 1, 'C00104000003', 'loadInformation51', 0, '')",
|
||||||
|
"('H.323 Phone', 'CISCO', 1, 1, '', 'loadInformation61', 0, '')",
|
||||||
|
"('Simulator', 'CISCO', 1, 1, '', 'loadInformation100', 0, '')",
|
||||||
|
"('MTP', 'CISCO', 1, 1, '', 'loadInformation111', 0, '')",
|
||||||
|
"('MGCP Station', 'CISCO', 1, 1, '', 'loadInformation120', 0, '')",
|
||||||
|
"('MGCP Trunk', 'CISCO', 1, 1, '', 'loadInformation121', 0, '')",
|
||||||
|
"('UPC', 'CISCO', 1, 1, '', 'loadInformation358', 0, '')",
|
||||||
|
"('TelePresence', 'TELEPRESENCE', 1, 1, '', 'loadInformation375', 0, '')",
|
||||||
|
"('1000', 'TELEPRESENCE', 1, 1, '', 'loadInformation478', 0, '')",
|
||||||
|
"('3000', 'TELEPRESENCE', 1, 1, '', 'loadInformation479', 0, '')",
|
||||||
|
"('3200', 'TELEPRESENCE', 1, 1, '', 'loadInformation480', 0, '')",
|
||||||
|
"('500-37', 'TELEPRESENCE', 1, 1, '', 'loadInformation481', 0, '')",
|
||||||
|
"('1300-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation505', 0, '')",
|
||||||
|
"('1100', 'TELEPRESENCE', 1, 1, '', 'loadInformation520', 0, '')",
|
||||||
|
"('200', 'TELEPRESENCE', 1, 1, '', 'loadInformation557', 0, '')",
|
||||||
|
"('400', 'TELEPRESENCE', 1, 1, '', 'loadInformation558', 0, '')",
|
||||||
|
"('EX90', 'TELEPRESENCE', 1, 1, '', 'loadInformation584', 0, '')",
|
||||||
|
"('500-32', 'TELEPRESENCE', 1, 1, '', 'loadInformation590', 0, '')",
|
||||||
|
"('1300-47', 'TELEPRESENCE', 1, 1, '', 'loadInformation591', 0, '')",
|
||||||
|
"('TX1310-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation596', 0, '')",
|
||||||
|
"('EX60', 'TELEPRESENCE', 1, 1, '', 'loadInformation604', 0, '')",
|
||||||
|
"('C90', 'TELEPRESENCE', 1, 1, '', 'loadInformation606', 0, '')",
|
||||||
|
"('C60', 'TELEPRESENCE', 1, 1, '', 'loadInformation607', 0, '')",
|
||||||
|
"('C40', 'TELEPRESENCE', 1, 1, '', 'loadInformation608', 0, '')",
|
||||||
|
"('C20', 'TELEPRESENCE', 1, 1, '', 'loadInformation609', 0, '')",
|
||||||
|
"('C20-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation610', 0, '')",
|
||||||
|
"('C60-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation611', 0, '')",
|
||||||
|
"('C40-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation612', 0, '')",
|
||||||
|
"('C60-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation613', 0, '')",
|
||||||
|
"('C60-52D', 'TELEPRESENCE', 1, 1, '', 'loadInformation614', 0, '')",
|
||||||
|
"('C60-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation615', 0, '')",
|
||||||
|
"('C90-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation616', 0, '')",
|
||||||
|
"('MX200', 'TELEPRESENCE', 1, 1, '', 'loadInformation617', 0, '')",
|
||||||
|
"('TX9000', 'TELEPRESENCE', 1, 1, '', 'loadInformation619', 0, '')",
|
||||||
|
"('TX9200', 'TELEPRESENCE', 1, 1, '', 'loadInformation620', 0, '')",
|
||||||
|
"('SX20', 'TELEPRESENCE', 1, 1, '', 'loadInformation626', 0, '')",
|
||||||
|
"('MX300', 'TELEPRESENCE', 1, 1, '', 'loadInformation627', 0, '')",
|
||||||
|
"('C40-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation633', 0, '')",
|
||||||
|
"('Jabber', 'CISCO', 1, 1, '', 'loadInformation652', 0, '')",
|
||||||
|
"('S60', 'NOKIA', 0, 1, '', 'loadInformation376', 0, '')",
|
||||||
|
"('9971', 'CISCO', 1, 1, '', 'loadInformation493', 0, '')",
|
||||||
|
"('9951', 'CISCO', 1, 1, '', 'loadInformation537', 0, '')",
|
||||||
|
"('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, '')",
|
||||||
|
"('SCCP GW', 'CISCO', 1, 1, '', 'loadInformation30032', 0, '')",
|
||||||
|
"('IP-STE', 'CISCO', 1, 1, '', 'loadInformation30035', 0, '')",
|
||||||
|
"('SPA 521S', 'CISCO', 1, 1, '', 'loadInformation80000', 0, '')",
|
||||||
|
"('SPA 502G', 'CISCO', 1, 1, '', 'loadInformation80003', 0, '')",
|
||||||
|
"('SPA 504G', 'CISCO', 1, 1, '', 'loadInformation80004', 0, '')",
|
||||||
|
"('SPA 525G', 'CISCO', 1, 1, '', 'loadInformation80005', 0, '')",
|
||||||
|
"('SPA 525G2', 'CISCO', 1, 1, '', 'loadInformation80009', 0, '')",
|
||||||
|
"('SPA 303G', 'CISCO', 1, 1, '', 'loadInformation80011', 0, '')",
|
||||||
|
"('IP Communicator', 'CISCO', 1, 1, '', 'loadInformation30016', 0, NULL)",
|
||||||
|
"('Nokia E', 'Nokia', 1, 28, '', 'loadInformation275', 0, NULL)",
|
||||||
|
"('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)"
|
||||||
|
);
|
||||||
|
|
||||||
|
$test = $db->prepare("SELECT count(*) AS modelCount from sccpdevmodel");
|
||||||
|
$test->execute();
|
||||||
|
if ($test->fetchAll()[0]['modelCount'] == count($devModelArr)) {
|
||||||
|
// Appear to have a correctly populated sccpdevmodel table. Do not overwrite
|
||||||
|
// as may contain user modifications;
|
||||||
|
outn("<li>" . _("sccpdevmodel appears to be populated; not overwriting") . "</li>");
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// Update sccpdevmodel as counts do not match
|
||||||
outn("Updating sccpdevmodel...");
|
outn("Updating sccpdevmodel...");
|
||||||
outn("<li>" . _("Fill sccpdevmodel") . "</li>");
|
outn("<li>" . _("Fill sccpdevmodel") . "</li>");
|
||||||
$sql = "REPLACE INTO sccpdevmodel (model, vendor, dns, buttons, loadimage, loadinformationid, enabled, nametemplate) VALUES
|
$sql = "REPLACE INTO sccpdevmodel (model, vendor, dns, buttons, loadimage, loadinformationid, enabled, nametemplate) VALUES" . implode(',',$devModelArr);
|
||||||
('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL),
|
|
||||||
('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL),
|
|
||||||
('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL),
|
|
||||||
('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL),
|
|
||||||
('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL),
|
|
||||||
('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''),
|
|
||||||
('6901', 'CISCO', 1, 1, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL),
|
|
||||||
('6911', 'CISCO', 1, 1, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL),
|
|
||||||
('6921', 'CISCO', 1, 1, 'SCCP69xx.9-4-1-3SR3', 'loadInformation496', 0, NULL),
|
|
||||||
('6941', 'CISCO', 1, 1, 'SCCP69xx.9-3-1-3', 'loadInformation495', 0, NULL),
|
|
||||||
('6945', 'CISCO', 1, 1, 'SCCP6945.9-3-1-3', 'loadInformation564', 0, NULL),
|
|
||||||
('6961', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL),
|
|
||||||
('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL),
|
|
||||||
('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL),
|
|
||||||
('7906', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template'),
|
|
||||||
('7910', 'CISCO', 1, 1, 'P00405000700', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template'),
|
|
||||||
('7911', 'CISCO', 1, 1, 'SCCP11.9-4-2SR3-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template'),
|
|
||||||
('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL),
|
|
||||||
('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL),
|
|
||||||
('7914;7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL),
|
|
||||||
('7915', 'CISCO', 0, 24, 'B015-1-0-4-2', 'loadInformation227', 1, NULL),
|
|
||||||
('7915;7915', 'CISCO', 0, 48, 'B015-1-0-4-2', 'loadInformation228', 1, NULL),
|
|
||||||
('7916', 'CISCO', 0, 24, 'B016-1-0-4-2', 'loadInformation229', 1, NULL),
|
|
||||||
('7916;7916', 'CISCO', 0, 48, 'B016-1-0-4-2', 'loadInformation230', 1, NULL),
|
|
||||||
('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL),
|
|
||||||
('7921', 'CISCO', 1, 1, 'CP7921G-1.4.6.3', 'loadInformation365', 0, NULL),
|
|
||||||
('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, 'SEP0000000000.cnf.xml_7925_template'),
|
|
||||||
('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL),
|
|
||||||
('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL),
|
|
||||||
('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL),
|
|
||||||
('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL),
|
|
||||||
('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-5-7', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'),
|
|
||||||
('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_7940_template'),
|
|
||||||
('7941', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation115', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7941G-GE', 'CISCO', 1, 2, 'SCCP41.9-4-2SR3-1S', 'loadInformation309', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7942', 'CISCO', 1, 2, 'SCCP42.9-4-2SR3-1S', 'loadInformation434', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7945', 'CISCO', 1, 2, 'SCCP45.9-3-1SR1-1S', 'loadInformation435', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7960', 'CISCO', 3, 6, 'P0030801SR02', 'loadInformation7', 1, 'SEP0000000000.cnf.xml_7940_template'),
|
|
||||||
('7961', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation30018', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7961G-GE', 'CISCO', 3, 6, 'SCCP41.9-4-2SR3-1S', 'loadInformation308', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7962', 'CISCO', 3, 6, 'SCCP42.9-4-2SR3-1S', 'loadInformation404', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7965', 'CISCO', 3, 6, 'SCCP45.9-3-1SR1-1S', 'loadInformation436', 0, 'SEP0000000000.cnf.xml_796x_template'),
|
|
||||||
('7970', 'CISCO', 3, 8, 'SCCP70.9-4-2SR3-1S', 'loadInformation30006', 0, 'SEP0000000000.cnf.xml_797x_template'),
|
|
||||||
('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, 'SEP0000000000.cnf.xml_797x_template'),
|
|
||||||
('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, 'SEP0000000000.cnf.xml_7975_template'),
|
|
||||||
('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL),
|
|
||||||
('8941', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation586', 0, 'SEP0000000000.cnf.xml_797x_template'),
|
|
||||||
('8945', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation585', 0, 'SEP0000000000.cnf.xml_7975_template'),
|
|
||||||
('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, 'SEP0000000000.cnf.xml_ATA_template'),
|
|
||||||
('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, 'SEP0000000000.cnf.xml_ATA_template'),
|
|
||||||
('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL),
|
|
||||||
('Digital Access', 'CISCO', 1, 1, 'D001M022', 'loadInformation40', 0, NULL),
|
|
||||||
('Digital Access+', 'CISCO', 1, 1, 'D00303010033', 'loadInformation42', 0, NULL),
|
|
||||||
('E-Series', 'NOKIA', 1, 1, '', '', 0, NULL),
|
|
||||||
('ICC', 'NOKIA', 1, 1, '', '', 0, NULL),
|
|
||||||
('Analog Access', 'CISCO', 1, 1, 'A001C030', 'loadInformation30', 0, ''),('WS-X6608', 'CISCO', 1, 1, 'D00404000032', 'loadInformation43', 0, ''),
|
|
||||||
('WS-X6624', 'CISCO', 1, 1, 'A00204000013', 'loadInformation43', 0, ''),
|
|
||||||
('WS-X6608', 'CISCO', 1, 1, 'C00104000003', 'loadInformation51', 0, ''),
|
|
||||||
('H.323 Phone', 'CISCO', 1, 1, '', 'loadInformation61', 0, ''),
|
|
||||||
('Simulator', 'CISCO', 1, 1, '', 'loadInformation100', 0, ''),
|
|
||||||
('MTP', 'CISCO', 1, 1, '', 'loadInformation111', 0, ''),
|
|
||||||
('MGCP Station', 'CISCO', 1, 1, '', 'loadInformation120', 0, ''),
|
|
||||||
('MGCP Trunk', 'CISCO', 1, 1, '', 'loadInformation121', 0, ''),
|
|
||||||
('UPC', 'CISCO', 1, 1, '', 'loadInformation358', 0, ''),
|
|
||||||
('TelePresence', 'TELEPRESENCE', 1, 1, '', 'loadInformation375', 0, ''),
|
|
||||||
('1000', 'TELEPRESENCE', 1, 1, '', 'loadInformation478', 0, ''),
|
|
||||||
('3000', 'TELEPRESENCE', 1, 1, '', 'loadInformation479', 0, ''),
|
|
||||||
('3200', 'TELEPRESENCE', 1, 1, '', 'loadInformation480', 0, ''),
|
|
||||||
('500-37', 'TELEPRESENCE', 1, 1, '', 'loadInformation481', 0, ''),
|
|
||||||
('1300-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation505', 0, ''),
|
|
||||||
('1100', 'TELEPRESENCE', 1, 1, '', 'loadInformation520', 0, ''),
|
|
||||||
('200', 'TELEPRESENCE', 1, 1, '', 'loadInformation557', 0, ''),
|
|
||||||
('400', 'TELEPRESENCE', 1, 1, '', 'loadInformation558', 0, ''),
|
|
||||||
('EX90', 'TELEPRESENCE', 1, 1, '', 'loadInformation584', 0, ''),
|
|
||||||
('500-32', 'TELEPRESENCE', 1, 1, '', 'loadInformation590', 0, ''),
|
|
||||||
('1300-47', 'TELEPRESENCE', 1, 1, '', 'loadInformation591', 0, ''),
|
|
||||||
('TX1310-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation596', 0, ''),
|
|
||||||
('EX60', 'TELEPRESENCE', 1, 1, '', 'loadInformation604', 0, ''),
|
|
||||||
('C90', 'TELEPRESENCE', 1, 1, '', 'loadInformation606', 0, ''),
|
|
||||||
('C60', 'TELEPRESENCE', 1, 1, '', 'loadInformation607', 0, ''),
|
|
||||||
('C40', 'TELEPRESENCE', 1, 1, '', 'loadInformation608', 0, ''),
|
|
||||||
('C20', 'TELEPRESENCE', 1, 1, '', 'loadInformation609', 0, ''),
|
|
||||||
('C20-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation610', 0, ''),
|
|
||||||
('C60-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation611', 0, ''),
|
|
||||||
('C40-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation612', 0, ''),
|
|
||||||
('C60-52', 'TELEPRESENCE', 1, 1, '', 'loadInformation613', 0, ''),
|
|
||||||
('C60-52D', 'TELEPRESENCE', 1, 1, '', 'loadInformation614', 0, ''),
|
|
||||||
('C60-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation615', 0, ''),
|
|
||||||
('C90-65', 'TELEPRESENCE', 1, 1, '', 'loadInformation616', 0, ''),
|
|
||||||
('MX200', 'TELEPRESENCE', 1, 1, '', 'loadInformation617', 0, ''),
|
|
||||||
('TX9000', 'TELEPRESENCE', 1, 1, '', 'loadInformation619', 0, ''),
|
|
||||||
('TX9200', 'TELEPRESENCE', 1, 1, '', 'loadInformation620', 0, ''),
|
|
||||||
('SX20', 'TELEPRESENCE', 1, 1, '', 'loadInformation626', 0, ''),
|
|
||||||
('MX300', 'TELEPRESENCE', 1, 1, '', 'loadInformation627', 0, ''),
|
|
||||||
('C40-42', 'TELEPRESENCE', 1, 1, '', 'loadInformation633', 0, ''),
|
|
||||||
('Jabber', 'CISCO', 1, 1, '', 'loadInformation652', 0, ''),
|
|
||||||
('S60', 'NOKIA', 0, 1, '', 'loadInformation376', 0, ''),
|
|
||||||
('9971', 'CISCO', 1, 1, '', 'loadInformation493', 0, ''),
|
|
||||||
('9951', 'CISCO', 1, 1, '', 'loadInformation537', 0, ''),
|
|
||||||
('8961', 'CISCO', 1, 1, '', 'loadInformation540', 0, ''),
|
|
||||||
('Iphone', 'APPLE', 0, 1, '', 'loadInformation562', 0, ''),
|
|
||||||
('Android', 'ANDROID', 0, 1, '', 'loadInformation575', 0, ''),
|
|
||||||
('7926', 'CISCO', 1, 1, 'CP7926G-1.4.5.3', 'loadInformation577', 0, ''),
|
|
||||||
('7821', 'CISCO', 1, 1, '', 'loadInformation621', 0, ''),
|
|
||||||
('7841', 'CISCO', 1, 1, '', 'loadInformation622', 0, ''),
|
|
||||||
('7861', 'CISCO', 1, 1, '', 'loadInformation623', 0, ''),
|
|
||||||
('VXC 6215', 'CISCO', 1, 1, '', 'loadInformation634', 0, ''),
|
|
||||||
('8831', 'CISCO', 1, 1, '', 'loadInformation659', 0, ''),
|
|
||||||
('8841', 'CISCO', 1, 1, '', 'loadInformation683', 0, ''),
|
|
||||||
('8851', 'CISCO', 1, 1, '', 'loadInformation684', 0, ''),
|
|
||||||
('8861', 'CISCO', 1, 1, '', 'loadInformation685', 0, ''),
|
|
||||||
('Analog', 'CISCO', 1, 1, '', 'loadInformation30027', 0, ''),
|
|
||||||
('ISDN', 'CISCO', 1, 1, '', 'loadInformation30028', 0, ''),
|
|
||||||
('SCCP GW', 'CISCO', 1, 1, '', 'loadInformation30032', 0, ''),
|
|
||||||
('IP-STE', 'CISCO', 1, 1, '', 'loadInformation30035', 0, ''),
|
|
||||||
('SPA 521S', 'CISCO', 1, 1, '', 'loadInformation80000', 0, ''),
|
|
||||||
('SPA 502G', 'CISCO', 1, 1, '', 'loadInformation80003', 0, ''),
|
|
||||||
('SPA 504G', 'CISCO', 1, 1, '', 'loadInformation80004', 0, ''),
|
|
||||||
('SPA 525G', 'CISCO', 1, 1, '', 'loadInformation80005', 0, ''),
|
|
||||||
('SPA 525G2', 'CISCO', 1, 1, '', 'loadInformation80009', 0, ''),
|
|
||||||
('SPA 303G', 'CISCO', 1, 1, '', 'loadInformation80011', 0, ''),
|
|
||||||
('IP Communicator', 'CISCO', 1, 1, '', 'loadInformation30016', 0, NULL),
|
|
||||||
('Nokia E', 'Nokia', 1, 28, '', 'loadInformation275', 0, NULL),
|
|
||||||
('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);";
|
|
||||||
$check = $db->query($sql);
|
$check = $db->query($sql);
|
||||||
if (DB::IsError($check)) {
|
if (DB::IsError($check)) {
|
||||||
die_freepbx("Can not create sccpdevmodel table, error:$check\n");
|
die_freepbx("Can not create sccpdevmodel table, error:$check\n");
|
||||||
|
@ -1017,13 +1024,6 @@ function addDriver($sccp_compatible) {
|
||||||
$file = $amp_conf['AMPWEBROOT'] . '/admin/modules/core/functions.inc/drivers/Sccp.class.php';
|
$file = $amp_conf['AMPWEBROOT'] . '/admin/modules/core/functions.inc/drivers/Sccp.class.php';
|
||||||
$contents = "<?php include '/var/www/html/admin/modules/sccp_manager/sccpManClasses/Sccp.class.php.v{$sccp_compatible}'; ?>";
|
$contents = "<?php include '/var/www/html/admin/modules/sccp_manager/sccpManClasses/Sccp.class.php.v{$sccp_compatible}'; ?>";
|
||||||
file_put_contents($file, $contents);
|
file_put_contents($file, $contents);
|
||||||
|
|
||||||
$dir = $cnf_int->get('ASTETCDIR');
|
|
||||||
if (!file_exists("{$dir}/sccp.conf")) { // System re Config
|
|
||||||
outn("<li>" . _("Adding default configuration file ...") . "</li>");
|
|
||||||
$sccpfile = file_get_contents($amp_conf['AMPWEBROOT'] . '/admin/modules/sccp_manager/conf/sccp.conf');
|
|
||||||
file_put_contents("{$dir}/sccp.conf", $sccpfile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function checkTftpServer() {
|
function checkTftpServer() {
|
||||||
outn("<li>" . _("Checking TFTP server path and availability ...") . "</li>");
|
outn("<li>" . _("Checking TFTP server path and availability ...") . "</li>");
|
||||||
|
@ -1142,19 +1142,6 @@ function cleanUpSccpSettings() {
|
||||||
outn(_("Found DB Schema : {$settingsFromDb['sccp_compatible']['data']}"));
|
outn(_("Found DB Schema : {$settingsFromDb['sccp_compatible']['data']}"));
|
||||||
}
|
}
|
||||||
// Check that required settings are initialised and update db and $settingsFromDb if not
|
// 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.
|
// Clean up sccpsettings to remove legacy values.
|
||||||
$xml_vars = $amp_conf['AMPWEBROOT'] . "/admin/modules/sccp_manager/conf/sccpgeneral.xml.v{$sccp_compatible}";
|
$xml_vars = $amp_conf['AMPWEBROOT'] . "/admin/modules/sccp_manager/conf/sccpgeneral.xml.v{$sccp_compatible}";
|
||||||
$thisInstaller->xml_data = simplexml_load_file($xml_vars);
|
$thisInstaller->xml_data = simplexml_load_file($xml_vars);
|
||||||
|
@ -1222,6 +1209,8 @@ function cleanUpSccpSettings() {
|
||||||
// Override certain chan-sccp defaults as they are based on a non-FreePbx system
|
// Override certain chan-sccp defaults as they are based on a non-FreePbx system
|
||||||
$settingsFromDb['context']['systemdefault'] = 'from-internal';
|
$settingsFromDb['context']['systemdefault'] = 'from-internal';
|
||||||
$settingsFromDb['directed_pickup']['systemdefault'] = 'no';
|
$settingsFromDb['directed_pickup']['systemdefault'] = 'no';
|
||||||
|
// Override this chan-sccp default as it is a potential security risk. See Issue 29
|
||||||
|
$settingsFromDb['hotline_enabled']['systemdefault'] = 'no';
|
||||||
|
|
||||||
unset($sysConfiguration[$key]);
|
unset($sysConfiguration[$key]);
|
||||||
}
|
}
|
||||||
|
@ -1283,9 +1272,10 @@ function cleanUpSccpSettings() {
|
||||||
)";
|
)";
|
||||||
$results = $db->query($sql);
|
$results = $db->query($sql);
|
||||||
}
|
}
|
||||||
|
// Need to load any existing sccp.conf so that retain softkeys section if exists.
|
||||||
// Now correct sccp.conf to replace any illegal settings
|
$sccp_conf_init = $thisInstaller->initialiseConfInit();
|
||||||
$thisInstaller->createDefaultSccpConfig($settingsFromDb, $cnf_int->get('ASTETCDIR'));
|
// Now correct sccp.conf to replace any illegal settings passing $sccp_conf_init
|
||||||
|
$thisInstaller->createDefaultSccpConfig($settingsFromDb, $cnf_int->get('ASTETCDIR'), $sccp_conf_init);
|
||||||
|
|
||||||
// have to correct prior verion sccpline lists for allow/disallow and deny permit. Prior
|
// have to correct prior verion sccpline lists for allow/disallow and deny permit. Prior
|
||||||
// versions used csl, but chan-sccp expects ; separated lists when returned by db.
|
// versions used csl, but chan-sccp expects ; separated lists when returned by db.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<module>
|
<module>
|
||||||
<rawname>sccp_manager</rawname>
|
<rawname>sccp_manager</rawname>
|
||||||
<name>SCCP Manager</name>
|
<name>SCCP Manager</name>
|
||||||
<version>14.5.0.1</version>
|
<version>14.5.0.4</version>
|
||||||
<type>setup</type>
|
<type>setup</type>
|
||||||
<category>SCCP Connectivity</category>
|
<category>SCCP Connectivity</category>
|
||||||
<publisher>Steve Lad, Alex GP</publisher>
|
<publisher>Steve Lad, Alex GP</publisher>
|
||||||
|
@ -41,6 +41,8 @@
|
||||||
* Version 14.4.0.2 * - Revert error in Installer db calls - IF EXISTS is not valid in MariaDb v5 (package DB)
|
* Version 14.4.0.2 * - Revert error in Installer db calls - IF EXISTS is not valid in MariaDb v5 (package DB)
|
||||||
* Version 14.4.0.3 * - Change method of selecting phonecodepage depending on if is java phone.
|
* Version 14.4.0.3 * - Change method of selecting phonecodepage depending on if is java phone.
|
||||||
* Version 14.4.0.5 * - Fix issue #59.
|
* Version 14.4.0.5 * - Fix issue #59.
|
||||||
|
* Version 14.5.0.2 * - Fix issue #32.
|
||||||
|
* Version 14.5.0.4 * - Fix issue where values with spaces are truncated. Preserve softkeys accross installs
|
||||||
</changelog>
|
</changelog>
|
||||||
<location>https://github.com/chan-sccp/sccp_manager</location>
|
<location>https://github.com/chan-sccp/sccp_manager</location>
|
||||||
<depends>
|
<depends>
|
||||||
|
|
|
@ -175,7 +175,6 @@ class extconfigs
|
||||||
'pt_BR' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Brazil', 'codepage' => 'ISO8859-1'),
|
'pt_BR' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Brazil', 'codepage' => 'ISO8859-1'),
|
||||||
'pt_PT' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Portugal', 'codepage' => 'ISO8859-1'),
|
'pt_PT' => array('code' => 'pt', 'language' => 'Portuguese', 'locale' => 'Portuguese_Portugal', 'codepage' => 'ISO8859-1'),
|
||||||
'ro_RO' => array('code' => 'ro', 'language' => 'Romanian', 'locale' => 'Romanian_Romania', 'codepage' => 'ISO8859-1'),
|
'ro_RO' => array('code' => 'ro', 'language' => 'Romanian', 'locale' => 'Romanian_Romania', 'codepage' => 'ISO8859-1'),
|
||||||
'ru_RU' => array('code' => 'ru', 'language' => 'Russian', 'locale' => 'Russian_Russian_Federation', 'codepage' => 'CP1251'),
|
|
||||||
'sk_SK' => array('code' => 'sk', 'language' => 'Slovakian', 'locale' => 'Slovak_Slovakia', 'codepage' => 'ISO8859-1'),
|
'sk_SK' => array('code' => 'sk', 'language' => 'Slovakian', 'locale' => 'Slovak_Slovakia', 'codepage' => 'ISO8859-1'),
|
||||||
'sl_SL' => array('code' => 'sl', 'language' => 'Slovenian', 'locale' => 'Slovenian_Slovenia', 'codepage' => 'ISO8859-1'),
|
'sl_SL' => array('code' => 'sl', 'language' => 'Slovenian', 'locale' => 'Slovenian_Slovenia', 'codepage' => 'ISO8859-1'),
|
||||||
'sr_ME' => array('code' => 'sr', 'language' => 'Serbian', 'locale' => 'Serbian_Republic_of_Montenegro', 'codepage' => 'ISO8859-1'),
|
'sr_ME' => array('code' => 'sr', 'language' => 'Serbian', 'locale' => 'Serbian_Republic_of_Montenegro', 'codepage' => 'ISO8859-1'),
|
||||||
|
|
|
@ -463,7 +463,7 @@ class formcreate
|
||||||
} else {$val_check = "";}
|
} else {$val_check = "";}
|
||||||
} else {$val_check = "";}
|
} else {$val_check = "";}
|
||||||
}
|
}
|
||||||
echo "<input type=radio name= {$res_id} id=${res_id}_{$i} value={$value[@value]} {$val_check} {$opt_hide} {$opt_disabled}>";
|
echo "<input type=radio name= {$res_id} id=${res_id}_{$i} value='{$value[@value]}' {$val_check} {$opt_hide} {$opt_disabled}>";
|
||||||
echo "<label for= {$res_id}_{$i}>{$value}</label>";
|
echo "<label for= {$res_id}_{$i}>{$value}</label>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ trait ajaxHelper {
|
||||||
if (!empty($request['softkey'])) {
|
if (!empty($request['softkey'])) {
|
||||||
$id_name = $request['softkey'];
|
$id_name = $request['softkey'];
|
||||||
unset($this->sccp_conf_init[$id_name]);
|
unset($this->sccp_conf_init[$id_name]);
|
||||||
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"]);
|
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
|
||||||
$msg = print_r($this->aminterface->core_sccp_reload(), 1);
|
$msg = print_r($this->aminterface->core_sccp_reload(), 1);
|
||||||
return array('status' => true, 'table_reload' => true);
|
return array('status' => true, 'table_reload' => true);
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ trait ajaxHelper {
|
||||||
$this->sccp_conf_init[$id_name][$keyl] = $request[$keyl];
|
$this->sccp_conf_init[$id_name][$keyl] = $request[$keyl];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"]);
|
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
|
||||||
|
|
||||||
// !TODO!: -TODO-: Check SIP Support Enabled
|
// !TODO!: -TODO-: Check SIP Support Enabled
|
||||||
$this->createSccpXmlSoftkey();
|
$this->createSccpXmlSoftkey();
|
||||||
|
@ -521,7 +521,7 @@ trait ajaxHelper {
|
||||||
$this->dbinterface->updateTableDefaults($rowToSave['table'], $rowToSave['field'], $rowToSave['Default']);
|
$this->dbinterface->updateTableDefaults($rowToSave['table'], $rowToSave['field'], $rowToSave['Default']);
|
||||||
}
|
}
|
||||||
// rewrite sccp.conf
|
// rewrite sccp.conf
|
||||||
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"]);
|
$this->createDefaultSccpConfig($this->sccpvalues, $this->sccppath["asterisk"], $this->sccp_conf_init);
|
||||||
$this->createDefaultSccpXml();
|
$this->createDefaultSccpXml();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -728,11 +728,11 @@ trait ajaxHelper {
|
||||||
}
|
}
|
||||||
if (isset($netValue['internal'])) {
|
if (isset($netValue['internal'])) {
|
||||||
$output[] = 'internal';
|
$output[] = 'internal';
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
if (empty($netValue['net'])) {
|
if (empty($netValue['net'])) {
|
||||||
// empty net so ignored
|
// empty net so ignored
|
||||||
continue;
|
continue 2;
|
||||||
}
|
}
|
||||||
$netValue['mask'] = (empty($netValue['mask'])) ? "255.255.255.0" : $netValue['mask'];
|
$netValue['mask'] = (empty($netValue['mask'])) ? "255.255.255.0" : $netValue['mask'];
|
||||||
$output[]= implode('/', $netValue);
|
$output[]= implode('/', $netValue);
|
||||||
|
|
|
@ -275,6 +275,20 @@ trait helperfunctions {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function initialiseConfInit(){
|
||||||
|
$read_config = \FreePBX::LoadConfig()->getConfig('sccp.conf');
|
||||||
|
$sccp_conf_init['general'] = $read_config['general'];
|
||||||
|
foreach ($read_config as $key => $value) {
|
||||||
|
if (isset($read_config[$key]['type'])) { // copy soft key
|
||||||
|
if ($read_config[$key]['type'] == 'softkeyset') {
|
||||||
|
$sccp_conf_init[$key] = $read_config[$key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $sccp_conf_init;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function checkTftpMapping(){
|
public function checkTftpMapping(){
|
||||||
exec('in.tftpd -V', $tftpInfo);
|
exec('in.tftpd -V', $tftpInfo);
|
||||||
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');
|
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');
|
||||||
|
@ -342,18 +356,18 @@ trait helperfunctions {
|
||||||
unset($sysConfig);
|
unset($sysConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createDefaultSccpConfig(array $sccpvalues, string $asteriskPath) {
|
public function createDefaultSccpConfig(array $sccpvalues, string $asteriskPath, $conf_init) {
|
||||||
global $cnf_wr;
|
global $cnf_wr;
|
||||||
// Make sccp.conf data
|
// Make sccp.conf data
|
||||||
// [general] section
|
// [general] section
|
||||||
// TODO: Need to review sccpsettings seq numbering, as will speed this up, and remove the need for $permittedSettings.
|
// TODO: Need to review sccpsettings seq numbering, as will speed this up, and remove the need for $permittedSettings.
|
||||||
$cnf_wr = \FreePBX::WriteConfig();
|
$cnf_wr = \FreePBX::WriteConfig();
|
||||||
//clear old general settings, and initiate with allow/disallow and permit/deny keys in correct order
|
//clear old general settings, and initiate with allow/disallow and permit/deny keys in correct order
|
||||||
$this->sccp_conf_init['general'] = array();
|
$conf_init['general'] = array();
|
||||||
$this->sccp_conf_init['general']['disallow'] = 'all';
|
$conf_init['general']['disallow'] = 'all';
|
||||||
$this->sccp_conf_init['general']['allow'] = '';
|
$conf_init['general']['allow'] = '';
|
||||||
$this->sccp_conf_init['general']['deny'] = '0.0.0.0/0.0.0.0';
|
$conf_init['general']['deny'] = '0.0.0.0/0.0.0.0';
|
||||||
$this->sccp_conf_init['general']['permit'] = '0.0.0.0/0.0.0.0';
|
$conf_init['general']['permit'] = '0.0.0.0/0.0.0.0';
|
||||||
// permitted chan-sccp settings array
|
// permitted chan-sccp settings array
|
||||||
$permittedSettings = array(
|
$permittedSettings = array(
|
||||||
'debug', 'servername', 'keepalive', 'context', 'dateformat', 'bindaddr', 'port', 'secbindaddr', 'secport', 'disallow', 'allow', 'deny', 'permit',
|
'debug', 'servername', 'keepalive', 'context', 'dateformat', 'bindaddr', 'port', 'secbindaddr', 'secport', 'disallow', 'allow', 'deny', 'permit',
|
||||||
|
@ -377,7 +391,7 @@ trait helperfunctions {
|
||||||
case "deny":
|
case "deny":
|
||||||
case "localnet":
|
case "localnet":
|
||||||
case "permit":
|
case "permit":
|
||||||
$this->sccp_conf_init['general'][$key] = explode(';', $value['data']);
|
$conf_init['general'][$key] = explode(';', $value['data']);
|
||||||
break;
|
break;
|
||||||
case "devlang":
|
case "devlang":
|
||||||
/*
|
/*
|
||||||
|
@ -394,7 +408,7 @@ trait helperfunctions {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!empty($value['data'])) {
|
if (!empty($value['data'])) {
|
||||||
$this->sccp_conf_init['general'][$key] = $value['data'];
|
$conf_init['general'][$key] = $value['data'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,7 +418,7 @@ trait helperfunctions {
|
||||||
// This will complicate solving problems caused by unexpected solutions from users.
|
// This will complicate solving problems caused by unexpected solutions from users.
|
||||||
//
|
//
|
||||||
if (file_exists($asteriskPath . "/sccp_custom.conf")) {
|
if (file_exists($asteriskPath . "/sccp_custom.conf")) {
|
||||||
$this->sccp_conf_init['HEADER'] = array(
|
$conf_init['HEADER'] = array(
|
||||||
"; ;",
|
"; ;",
|
||||||
"; It is a very bad idea to add an external configuration file !!!! ;",
|
"; It is a very bad idea to add an external configuration file !!!! ;",
|
||||||
"; This will complicate solving problems caused by unexpected solutions ;",
|
"; This will complicate solving problems caused by unexpected solutions ;",
|
||||||
|
@ -413,7 +427,7 @@ trait helperfunctions {
|
||||||
"#include sccp_custom.conf"
|
"#include sccp_custom.conf"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$cnf_wr->WriteConfig('sccp.conf', $this->sccp_conf_init);
|
$cnf_wr->WriteConfig('sccp.conf', $conf_init);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initVarfromXml() {
|
public function initVarfromXml() {
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
"rawname": "sccp_manager",
|
"rawname": "sccp_manager",
|
||||||
"repo": "stable",
|
"repo": "stable",
|
||||||
"name": "Sccp Manager",
|
"name": "Sccp Manager",
|
||||||
"version": "14.5.0.1",
|
"version": "14.5.0.4",
|
||||||
"publisher": "Steve Lad",
|
"publisher": "Steve Lad",
|
||||||
"license": "GPL",
|
"license": "GPL",
|
||||||
"licenselink": "http://www.gnu.org/licenses/gpl.txt",
|
"licenselink": "http://www.gnu.org/licenses/gpl.txt",
|
||||||
"changelog": "*14.5.0.1* Fix issue 32\n*14.4.0.5* Fix issue 59\n*14.4.0.1* Fix regression in SQL not compatible with MariaDb 5\n*14.4.0.1* Upgrade installer to prevent data loss when run\n*14.3.0.30* Fix issue returning after save\n*14.3.0.28* Fix issue with RNav\n*14.3.0.27* Improve handling of SIP devices\n*14.3.0.15* Install master files list via installer\n*14.2.0.3* Fix module database definition\n*14.2.0.3* Fix module database definition\n*14.2.0.2* First release of new version without old interface\n*13.0.0.1* Packaging of ver 1.0.0.1\n*12.0.0.1* Packaging of ver 1.0.0.1",
|
"changelog": "*14.5.0.4* Preserve softkeys across installs. Fix truncated values\n*14.5.0.3* Fix issue 32\n*14.4.0.5* Fix issue 59\n*14.4.0.1* Fix regression in SQL not compatible with MariaDb 5\n*14.4.0.1* Upgrade installer to prevent data loss when run\n*14.3.0.30* Fix issue returning after save\n*14.3.0.28* Fix issue with RNav\n*14.3.0.27* Improve handling of SIP devices\n*14.3.0.15* Install master files list via installer\n*14.2.0.3* Fix module database definition\n*14.2.0.3* Fix module database definition\n*14.2.0.2* First release of new version without old interface\n*13.0.0.1* Packaging of ver 1.0.0.1\n*12.0.0.1* Packaging of ver 1.0.0.1",
|
||||||
"category": "Sccp Connectivity",
|
"category": "Sccp Connectivity",
|
||||||
"description": "The Sccp Manager module lets you manage the chan-sccp driver.",
|
"description": "The Sccp Manager module lets you manage the chan-sccp driver.",
|
||||||
"depends": {
|
"depends": {
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"supported": {
|
"supported": {
|
||||||
"version": "15.0"
|
"version": "15.0"
|
||||||
},
|
},
|
||||||
"location": "https://github.com/chan-sccp/sccp_manager/archive/refs/tags/v14.5.0.1.tar.gz",
|
"location": "https://github.com/chan-sccp/sccp_manager/archive/refs/tags/v14.5.0.4.tar.gz",
|
||||||
"md5sum": "80a3c110d32b4cbd1658b8d4becad105",
|
"md5sum": "80b454d5cfdd602bffeec350e6e76bac",
|
||||||
"packaged": "1642587698"
|
"packaged": "1643364518"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue