-
ntp_timezone
sccp-custom
diff --git a/contrib/rewrite.rules b/contrib/rewrite.rules
index 2e0759b..50d5815 100644
--- a/contrib/rewrite.rules
+++ b/contrib/rewrite.rules
@@ -58,13 +58,13 @@ ri ^(P00405000700.sbn)$ firmware/7910/\1
ri ^(CP7912080004SCCP080108A.sbin)$ firmware/7912/\1
# 7915 firmware (ancient)
-ri ^(B015-1-0-4.SBN)$ firmware/7915/\1
+ri ^(B015-1-0-)(+\.SBN)$ firmware/7915/\1
# 7916 firmware (ancient)
-ri ^(B016-1-0-4.SBN)$ firmware/7916/\1
+ri ^(B016-1-0-)(+\.SBN)$ firmware/7916/\1
# 7920 firmware (ancient)
-ri ^(cmterm_7920.4.0-03-02.bin)$ firmware/7920/\1
+ri ^(cmterm_7920)(+\.bin)$ firmware/7920/\1
# 7921_7925 firmware (ancient)
ri ^(APPS-1.4.3.4.SBN)$ firmware/7921/\1
diff --git a/install.php b/install.php
index 1c5e9ec..2bd71d0 100644
--- a/install.php
+++ b/install.php
@@ -264,6 +264,7 @@ function Get_DB_config($sccp_compatible) {
'directrtp' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
'dndFeature' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
'earlyrtp' => array('create' => "ENUM('immediate','offHook','dialing','ringout','progress','none') NULL default NULL", 'modify' => "ENUM('immediate','offHook','dialing','ringout','progress','none')"),
+ 'monitor' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
'audio_tos' => array('def_modify' => "0xB8"),
'audio_cos' => array('def_modify' => "6"),
'video_tos' => array('def_modify' => "0x88"),
@@ -336,6 +337,7 @@ function Get_DB_config($sccp_compatible) {
'directed_pickup' => array('drop' => "yes"),
'cfwdnoanswer' => 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')"),
+ 'monitor' => array('create' => "enum('on','off') NULL default NULL", 'modify' => "enum('on','off')"),
'_description' => array('rename' => "description"),
'_loginname' => array('drop' => "yes"),
'_profileid' => array('drop' => "yes"),
@@ -658,8 +660,8 @@ function InstallDB_fillsccpdevmodel() {
outn("" . _("Fill sccpdevmodel") . "");
$sql = "REPLACE INTO `sccpdevmodel` (`model`, `vendor`, `dns`, `buttons`, `loadimage`, `loadinformationid`, `enabled`, `nametemplate`) VALUES ('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, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-2-1-0', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, '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', 'loadInformation228', 1, NULL), ('7916', 'CISCO', 0, 24, 'B015-1-0-4', '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, NULL), ('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'), " .
+ "('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, NULL), ('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_796x_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, NULL), ('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, NULL), ('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, NULL), ('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL), ('8941', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation586', 0, NULL), ('8945', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation585', 0, NULL), ('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, ''), ".
diff --git a/views/formShow.php b/views/formShow.php
index 56dacd3..73e9e5d 100644
--- a/views/formShow.php
+++ b/views/formShow.php
@@ -8,7 +8,7 @@
* SLA - Select element (from - data )
* Input element Select SLD - Date format
* SLZ - Time Zone
- * SLZN - Time Zone List
+ * SLTZN - Time Zone List
* SLT - TFTP Lang
* SLM - Music on hold
* SLK - System KeySet
@@ -35,6 +35,7 @@ $time_zone = array('-12' => 'GTM -12', '-11' => 'GTM -11', '-10' => 'GTM -10', '
'04' => 'GTM +4', '05' => 'GTM +5', '06' => 'GTM +6', '07' => 'GTM +7',
'08' => 'GTM +8', '09' => 'GTM +9', '10' => 'GTM +10', '11'=> 'GTM +11', '12' => 'GTM +12');
+
$time_zone_name = array();
$extension_list = array();
$sofkey_list = array();
@@ -42,7 +43,6 @@ $model_list = array();
$device_list = array();
$dialplan_list = array();
-//$time_zone_name = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_timezone');
//$time_zone = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_time');
//$system_time_zone = \FreePBX::Sccp_manager()->getSysnemTimeZone();
//$sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets();
@@ -486,7 +486,7 @@ foreach ($items as $child) {
* Input element Select SLS - System Language
*/
- if ($child['type'] == 'SLS' || $child['type'] == 'SLT' || $child['type'] == 'SLA' || $child['type'] == 'SLZ' || $child['type'] == 'SLZN') {
+ if ($child['type'] == 'SLS' || $child['type'] == 'SLT' || $child['type'] == 'SLA' || $child['type'] == 'SLZ') {
// $value = $child -> select;
$res_n = (string)$child ->name;
$res_id = $npref.$res_n;
@@ -504,12 +504,6 @@ foreach ($items as $child) {
if ($child['type'] == 'SLT') {
$select_opt= $tftp_lang;
}
- if ($child['type'] == 'SLZN') {
- if (empty($time_zone_name)) {
- $time_zone_name = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_timezone');
- }
- $select_opt= $time_zone_name;
- }
if ($child['type'] == 'SLZ') {
$select_opt= $time_zone;
// $child->value = ($system_time_zone[offset]/60);
@@ -929,6 +923,82 @@ foreach ($items as $child) {
label.' -->';
}
+/*
+ * Input element Select SLTZN - System Time Zone
+ */
+
+ if ($child['type'] == 'SLTZN') {
+// $value = $child -> select;
+ $res_n = (string)$child ->name;
+ $res_id = $npref.$res_n;
+ $child->value ='';
+
+ if (!empty($metainfo[$res_n])){
+ if ($child->meta_help == '1' || $child->help == 'Help!') {
+ $child->help = $metainfo[$res_n]['Description'];
+ }
+ }
+
+ $time_regions = array('Africa', 'America', 'Antarctica', 'Arctic', 'Asia', 'Atlantic', 'Australia', 'Europe', 'Russian', 'Indian', 'Pacific');
+ $time_zone_global = DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC );
+ $time_zone_ru = array('Russian/Kaliningrad', 'Russian/Moscow', 'Russian/St.Peterburg', 'Russian/Samara', 'Russian/Novosibirsk', 'Russian/Ekaterinburg', 'Russian/Irkutsk', 'Russian/Yakutsk', 'Russian/Khabarovsk', 'Russian/Vladivostok', 'Russian/Sakhalin', 'Russian/Magadan', 'Russian/Kamchatka');
+ $time_zone_list = array_merge($time_zone_global,$time_zone_ru);
+ $optgroup = '';
+ sort($time_zone_list);
+
+ if (empty($child->class)) {
+ $child->class = 'form-control';
+ }
+
+ if (!empty($fvalues[$res_n])) {
+ if (!empty($fvalues[$res_n]['data'])) {
+ $child->value = $fvalues[$res_n]['data'];
+ }
+ }
+
+ if (empty($child->value)){
+ $child->value = \date_default_timezone_get();
+// if (!empty($child->default)){
+// $child->value = $child->default;
+// }
+ }
+
+ echo '';
+ ?>
+
+
+ label.' -->';
+
+ }
+
}
?>
diff --git a/views/hardware.phone.php b/views/hardware.phone.php
index 2303cc0..0819565 100644
--- a/views/hardware.phone.php
+++ b/views/hardware.phone.php
@@ -38,9 +38,9 @@
|
|
|
- |
- |
- |
+ |
+ |
+ |
|
diff --git a/views/hardware.sphone.php b/views/hardware.sphone.php
index b0f94f6..f13476d 100644
--- a/views/hardware.sphone.php
+++ b/views/hardware.sphone.php
@@ -32,9 +32,9 @@
|
|
|
- |
- |
- |
+ |
+ |
+ |
|
diff --git a/views/server.info.php b/views/server.info.php
index ba726a0..e674fd1 100644
--- a/views/server.info.php
+++ b/views/server.info.php
@@ -5,149 +5,444 @@
* and open the template in the editor.
*/
+$test_ami = 0;
+$test_any = 0;
$driver = $this->FreePBX->Core->getAllDriversInfo();
$core = $this->srvinterface->getSCCPVersion();
$ast_realtime = $this->srvinterface->sccp_realtime_status();
-$ast_realm = (empty($ast_realtime['sccp']) ? '':'sccp');
+$ast_realm = (empty($ast_realtime['sccp']) ? '' : 'sccp');
foreach ($ast_realtime as $key => $value) {
if (empty($ast_realm)) {
- if ($value['status'] == 'OK') {
- $ast_realm = $key;
- }
+ if ($value['status'] == 'OK') {
+ $ast_realm = $key;
+ }
}
}
-$conf_realtime = $this->extconfigs->validate_RealTime($ast_realm);
-$db_Schema = $this->dbinterface->validate();
-$mysql_info = $this->dbinterface->get_db_sysvalues();
-$compatable = $this->srvinterface->get_compatible_sccp();
-$info = array();
-
+$conf_realtime = $this->extconfigs->validate_RealTime($ast_realm);
+$db_Schema = $this->dbinterface->validate();
+$mysql_info = $this->dbinterface->get_db_sysvalues();
+$compatable = $this->srvinterface->get_compatible_sccp();
+$info = array();
+
$info['srvinterface'] = $this->srvinterface->info();
-$info['extconfigs'] = $this->extconfigs->info();
-$info['dbinterface'] = $this->dbinterface->info();
-$info['aminterface'] = $this->aminterface->info();
-$info['XML'] = $this->xmlinterface->info();
-$info['sccp_class'] = $driver['sccp'];
-$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']. ' Hash :'. $core['RevisionHash']);
-$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.');
+$info['extconfigs'] = $this->extconfigs->info();
+$info['dbinterface'] = $this->dbinterface->info();
+$info['aminterface'] = $this->aminterface->info();
+$info['XML'] = $this->xmlinterface->info();
+$info['sccp_class'] = $driver['sccp'];
+$info['Core_sccp'] = array('Version' => $core['Version'], 'about' => 'Sccp ver.' . $core['Version'] . ' r' . $core['vCode'] . ' Revision :' . $core['RevisionNum'] . ' Hash :' . $core['RevisionHash']);
+$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about' => 'Asterisk.');
if (!empty($this->sccpvalues['SccpDBmodel'])) {
- $info['DB Model'] = array('Version' => $this->sccpvalues['SccpDBmodel']['data'], 'about'=> 'SCCP DB Configure');
+ $info['DB Model'] = array('Version' => $this->sccpvalues['SccpDBmodel']['data'], 'about' => 'SCCP DB Configure');
}
if (!empty($this->sccpvalues['tftp_rewrite'])) {
if ($this->sccpvalues['tftp_rewrite']['data'] == 'pro') {
- $info['Provision_SCCP'] = array('Version' => 'base', 'about'=> 'Provision Sccp enabled');
+ $info['Provision_SCCP'] = array('Version' => 'base', 'about' => 'Provision Sccp enabled');
} else {
- $info['TFTP_Rewrite'] = array('Version' => 'base', 'about'=> 'Rewrite Supported');
+ $info['TFTP_Rewrite'] = array('Version' => 'base', 'about' => 'Rewrite Supported');
}
}
-$info['Сompatible'] = array('Version' => $compatable, 'about'=> 'Ok');
+$info['Сompatible'] = array('Version' => $compatable, 'about' => 'Ok');
if (!empty($this->sccpvalues['SccpDBmodel'])) {
- if ($compatable > $this->sccpvalues['SccpDBmodel']['data']){
+ if ($compatable > $this->sccpvalues['SccpDBmodel']['data']) {
$info['Сompatible']['about'] = ' Reinstall SCCP manager required
';
}
}
if ($db_Schema == 0) {
- $info['DB_Schema'] = array('Version' => 'Error', 'about'=> ' ERROR DB Version
');
+ $info['DB_Schema'] = array('Version' => 'Error', 'about' => ' ERROR DB Version
');
} else {
- $info['DB_Schema'] = array('Version' => $db_Schema, 'about'=> (($compatable == $db_Schema ) ? 'Ok' : 'Incompatable Version'));
+ $info['DB_Schema'] = array('Version' => $db_Schema, 'about' => (($compatable == $db_Schema ) ? 'Ok' : 'Incompatable Version'));
}
if (empty($ast_realtime)) {
- $info['RealTime'] = array('Version' => 'Error', 'about'=> ' No found Real Time connections
');
+ $info['RealTime'] = array('Version' => 'Error', 'about' => ' No found Real Time connections
');
} else {
$rt_info = '';
$rt_sccp = 'Failed';
foreach ($ast_realtime as $key => $value) {
if ($key == $ast_realm) {
if ($value['status'] == 'OK') {
- $rt_sccp = 'TEST OK';
+ $rt_sccp = 'TEST OK';
$rt_info .= 'SCCP Connections found';
} else {
$rt_sccp = 'SCCP ERROR';
- $rt_info .= ' Error : '. $value['message']. '
';
+ $rt_info .= ' Error : ' . $value['message'] . '
';
}
} else if ($value['status'] == 'ERROR') {
- $rt_info .= ' Found error in realtime sectoin ['.$key.'] : '. $value['message']. '
';
+ $rt_info .= ' Found error in realtime sectoin [' . $key . '] : ' . $value['message'] . '
';
}
}
- $info['RealTime'] = array('Version' => $rt_sccp, 'about'=> $rt_info);
+ $info['RealTime'] = array('Version' => $rt_sccp, 'about' => $rt_info);
}
if (empty($conf_realtime)) {
- $info['ConfigsRealTime'] = array('Version' => 'Error', 'about'=> ' No found Real Time Configs
');
+ $info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => ' No found Real Time Configs
');
} else {
$rt_info = '';
foreach ($conf_realtime as $key => $value) {
if (($value != 'OK') && ($key != 'extconfigfile')) {
- $rt_info .= ' Found error in section '.$key.' :'. $value. '
';
+ $rt_info .= ' Found error in section ' . $key . ' :' . $value . '
';
}
- }
+ }
if (!empty($rt_info)) {
- $info['ConfigsRealTime'] = array('Version' => 'Error', 'about'=> $rt_info);
+ $info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => $rt_info);
}
}
// $mysql_info
if ($mysql_info['Value'] <= '2000') {
- $this->info_warning['MySql'] = Array('Increase Mysql Group Concat Max. Length','Step 1: Go to mysql path
nano /etc/my.cnf',
- 'Step 2: And add the following line below [mysqld] as shown below
[mysqld]
group_concat_max_len = 4096 or more',
- 'Step 3: Save and restart
systemctl restart mariadb.service
Or
service mysqld restart');
+ $this->info_warning['MySql'] = Array('Increase Mysql Group Concat Max. Length', 'Step 1: Go to mysql path
nano /etc/my.cnf',
+ 'Step 2: And add the following line below [mysqld] as shown below
[mysqld]
group_concat_max_len = 4096 or more',
+ 'Step 3: Save and restart
systemctl restart mariadb.service
Or
service mysqld restart');
}
- global $amp_conf;
+
+
+// Check Time Zone comatable
+$conf_tz = $this->sccpvalues['ntp_timezone']['data'];
+$cisco_tz = $this->extconfigs->getextConfig('sccp_timezone', $conf_tz);
+if ($cisco_tz['offset'] == 0) {
+ if (!empty($conf_tz)) {
+ $tmp_dt = new DateTime(null, new DateTimeZone($conf_tz));
+ $tmp_ofset = $tmp_dt->getOffset();
+ if (($cisco_tz['offset'] != ($tmp_ofset / 60) )) {
+ $this->info_warning['NTP'] = Array('The selected NTP time zone is not supported by cisco devices.', 'We will use the Greenwich Time zone');
+ }
+ }
+}
+
+global $amp_conf;
+
+
+if ($test_any == 1) {
+# Output option list, HTML.
+
+$timezone_identifiers = DateTimeZone::listIdentifiers();
+$timezone_abbreviations = DateTimeZone::listAbbreviations();
+$a = DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC );
+
+
+$Ts_set = $a[200];
+
+
// ************************************************************************************
-/*
-//$tmp_data_list = $this->getSccp_model_information('enabled', $validate = TRUE);
-//$tmp_data_list = $amp_conf;
- //$tmp_data_list=FreePBX::create()->Sipsettings->getConfig('bindport');
-// $tmp_data_list=FreePBX::Sipsettings()->getChanSipSettings();
- $tmp_data_list=$this->sipconfigs->getSipConfig();
- //$tmp_data_list=FreePBX::Sipsettings()->getBinds();
-
-// $tmp_data_list = \FreePBX::Sipsettings()->getSipPortOwner();
-// $tmp_data_list=$this->dbinterface->get_db_SccpTableData('SccpExtension');
-// $tmp_data_list=$this->dbinterface->get_db_SccpTableData('SccpDevice', array('type'=>'cisco-sip'));
-// $tmp_data_list= FreePBX::Sipsettings()->getChanSipDefaults();
-//$tmp_data_list = $this->find_all_files($dir, $file_ext, 'fileonly');
print_r("
Help Info:
");
- print_r("
");
- print_r($tmp_data_list);
- //$tmp_data_list = FreePBX::Sipsettings()->getChanSipDefaults();
-// $tmp_data_list = \FreePBX::Sipsettings()->getSipPortOwner();
- //print_r($buton_list);
- print_r("
");
- print_r($this->sccp_conf_init);
- //$tmp_data_list=$this->sipconfigs->get_db_sip_TableData('Device');
- print_r("
");
+print_r("
");
+//print_r(array_column($timezone_abbreviations, 'timezone_id'));
+print_r($Ts_set);
+$tz_tmp = array();
+
+foreach ($timezone_abbreviations as $subArray) {
+ $dddd = array_search($Ts_set ,array_column($subArray, 'timezone_id'));
+ if (!empty($dddd)) {
+ $tz_tmp[] = $subArray[$dddd];
+ }
+}
+
+if (empty($tz_tmp)) {
+ print_r('erroe');
+}
+if (count($tz_tmp)==1) {
+ $time_set = $tz_tmp[0];
+} else {
+ $tmp_dt = new DateTime(null, new DateTimeZone($Ts_set));
+ $tmp_ofset = $tmp_dt->getOffset();
+ foreach ($tz_tmp as $subArray) {
+ if ($subArray['offset'] == $tmp_ofset) {
+ $time_set = $subArray;
+ }
+ }
+}
+
+print_r("
");
+//print_r($time_set);
+print_r($this->sccpvalues['ntp_timezone']);
+//print_r($tz_tmp);
+print_r("
");
+print_r("
");
+
+print_r("
");
+//print_r($timezone_abbreviations);
+//print_r($timezone_identifiers);
+//print_r($timezone);
+//print_r($transitions);
+
+
+print_r("
");
+print_r("
");
// print_r("DIRECT START");
// print_r($this->sccpvalues['ccm_address']);
- //print_r($this->get_php_classes('\\FreePBX\\modules\\'));
- //print_r($this->dbinterface->get_db_SccpTableData('SccpExtension'));
-// print_r($this->srvinterface->getеtestChanSCCP_GlablsInfo());
+//print_r($this->get_php_classes('\\FreePBX\\modules'));
+// print_r(get_declared_classes());
+// $a = $this->aminterface->_config;
+// print_r($a);
+// print_r($this->aminterface->info());
+//print_r(get_declared_classes());
+// print_r($this->aminterface->open());
+// $time_start = microtime_float();
+// $this->aminterface->open();
+// $time_connect = microtime_float();
+// print_r($this->aminterface->send(new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowSoftkeySetsAction()));
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowSoftkeySetsAction();
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\ExtensionStateListAction();
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\SCCPShowDeviceAction('SEP00070E36555C');
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\SCCPDeviceRestartAction('SEP00070E36555C');
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\ReloadAction('chan_sccp');
+//$a = new \FreePBX\modules\Sccp_manager\aminterface\CommandAction('core show hints');
+/*
+ $time_start = microtime_float();
+ print_r($this->srvinterface->t_get_ami_data());
+ $time_get_dl = microtime_float()-$time_start;
+ print_r('
Delta :'); print_r($time_get_dl);
+ $time_start = microtime_float();
+ $tmp_data = $this->aminterface->sccp_get_active_device(); print_r($tmp_data);
+ $time_get_dl = microtime_float()-$time_start;
+ print_r('
Delta :'); print_r($time_get_dl);
+
+ die();
+
+ /*
+ */
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\CommandAction('realtime mysql status');
+// $a = new \FreePBX\modules\Sccp_manager\aminterface\SCCPConfigMetaDataAction();
+// $response = $this->aminterface->send($a);
+//
+// $response = $this->aminterface->getRealTimeStatus();
+// $time_get_a = microtime_float();
+// print_r($response);
+// $tmp_data = $this->aminterface->core_sccp_reload();
+// print_r($tmp_data);
+// print_r($response -> getResult());
+// $events = $response->getEvents();
+// $events = $response->Events2Array();
+//
+// print_r($events);
+// print_r('--- RESULT A -----------------');
+// $b = $this->oldinterface->sccp_realtime_status();
+// print_r($b);
+// $b = $this->srvinterface->sccp_realtime_status();
+// print_r($response->getMessage());
+// print_r($a);
+// $events = $response ->getTableNames();
+// $events = $response->getEvents();
+// print_r($events);
+// $b = $response->Table2Array($events[0]);
+// $b = $response->getResult();
+// $b = $response->getResult();
+// print_r($b);
+// $time_get_ra = microtime_float();
+
+
+/*
+ */
+// $tmp_data = $this->aminterface->sccp_get_active_device();
+// print_r($tmp_data);
+}
+
+/* Test Ok
+ *
+ *
+ *
+ *
+ */
+if ($test_ami == 1) {
+ $time_ami = 0;
+ $time_old = 0;
+ $test_info = array();
+ $tmp_test_name = 'get_version';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->get_compatible_sccp();
+ print_r($tmp_data);
+ $tmp_data = $this->oldinterface->getSCCPVersion();
+ print_r($tmp_data);
+ $tmp_data = $this->oldinterface->getChanSCCPVersion();
+ print_r($tmp_data);
+ $tmp_data = $this->oldinterface->sccp_realtime_status();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+ $time_get_start = $time_get_dl;
+
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->srvinterface->get_compatible_sccp();
+ print_r($tmp_data);
+ print_r('
Not Use
');
+ $tmp_data = $this->srvinterface->getChanSCCPVersion();
+ print_r($tmp_data);
+ $tmp_data = $this->srvinterface->sccp_realtime_status();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+
+ $tmp_test_name = 'getdevice_info';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->sccp_getdevice_info('SEP00070E36555C');
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->srvinterface->sccp_getdevice_info('SEP00070E36555C');
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ $tmp_test_name = 'get_active_device';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->sccp_get_active_device();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->aminterface->sccp_get_active_device();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ $tmp_test_name = 'sccp_list_keysets';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->sccp_list_keysets();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->aminterface->sccp_list_keysets();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ $tmp_test_name = 'list_all_hints';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->sccp_list_all_hints();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->aminterface->core_list_all_hints();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ $tmp_test_name = 'sccp_list_hints';
+ print_r('
-------------- OLD: ' . $tmp_test_name . '---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->oldinterface->sccp_list_hints();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['old'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+ print_r('
-------------- AMI: ' . $tmp_test_name . ' ---------------------------
');
+ $time_get_start = microtime_float();
+ $tmp_data = $this->aminterface->core_list_hints();
+ print_r($tmp_data);
+ $time_get_dl = microtime_float();
+ $test_info[$tmp_test_name]['ami'] = $time_get_dl - $time_get_start;
+ print_r('
Delta :');
+ print_r($time_get_dl - $time_get_start);
+
+ print_r('
--- Stat -----------------
');
+
+ print_r(' Function | Old Time | Ami Time |
');
+ $time_ami = 0;
+ $time_old = 0;
+ foreach ($test_info as $key => $value) {
+ print_r('' . $key . ' | ' . $value['old'] . ' | ' . $value['ami'] . ' |
');
+ $time_ami += $value['ami'];
+ $time_old += $value['old'];
+ }
+ print_r('
');
+ print_r('
Ami Responce :');
+ print_r($time_ami);
+ print_r('
PBX Responce :');
+ print_r($time_old);
+ print_r('
--- Stat -----------------
');
+}
+/*
+ */
+
+// $events = $response->getEvents();
+// print_r($events);
+//$b = $response->Table2Array($events[0]);
+//$b = $response->getResult();
+// print_r('--- RESULT 2 -----------------
');
+//print_r($events);
+// print_r($b);
+// $ser = serialize($response);
+// print_r($ser);
+// $result2 = unserialize($ser);
+// print_r($result2);
+/* $events = $result2->getEvents();
+ $this->assertEquals($result2->getMessage(), 'Channels will follow');
+ $this->assertEquals($events[0]->getName(), 'CoreShowChannelsComplete');
+ $this->assertEquals($events[0]->getListItems(), 0);
+ */
+// print_r('--- RESULT 3 -----------------');
+// print_r($a);
+// print_r('--- С RESULT -----------------');
+// print_r($this->aminterface::SCCPShowDevicesAction());
+//
+// print_r($this->aminterface->close());
+//
+//
+//print_r($this->dbinterface->get_db_SccpTableData('SccpExtension'));
+// print_r($this->srvinterface->getеtestChanSCC());
// $test_data = $this->srvinterface-> astman_GetRaw('ExtensionStateList');
// print_r($test_data);
// print_r($this->srvinterface-> core_list_all_exten());
// print_r($this->get_hint_info());
+// print_r($this->aminterface->open());
// print_r($this->aminterface-> core_list_all_exten('exten'));
// print_r($this->aminterface->Sok_param['total']);
// print_r($this->srvinterface->t_get_meta_data());
// print_r($this->sccp_metainfo);
- print("");
+print(" ");
/* */
// ************************************************************************************
-
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
// print_r('
');
// print_r(timezone_identifiers_list());
// print_r('
');
-
//print_r($this->dbinterface->info());
- if (!empty($this->info_warning)) {
+if (!empty($this->info_warning)) {
?>
@@ -156,14 +451,15 @@ print_r("
Help Info:
");
There are Warning in the SCCP Module:
info_warning as $key => $value) {
- echo ''.$key.'
';
- if (is_array($value)) {
- echo '
'._(implode('', $value)).'';
- } else {
- echo '
'. _($value).'';
- }
+ foreach ($this->info_warning as $key => $value) {
+ echo '
' . $key . '
';
+ if (is_array($value)) {
+ echo '
' . _(implode('', $value)) . '';
+ } else {
+ echo '
' . _($value) . '';
}
+ echo '
';
+ }
?>
Check these problems before continuing to work.
@@ -171,8 +467,9 @@ print_r("
Help Info:
");
-
-
+class_error)) {
?>
@@ -182,7 +479,7 @@ if (!empty($this->class_error)) {
Diagnostic information about SCCP Manager errors
There is an error in the :
- class_error); ?>
+ class_error); ?>
Correct these problems before continuing to work.
Open 'SCCP Connectivity' -> Server Config' to change global settings
@@ -190,8 +487,8 @@ if (!empty($this->class_error)) {
-
-
+
+
@@ -206,11 +503,11 @@ if (!empty($this->class_error)) {
- $value) {
- echo '' . $key . ' | ' . $value['Version'] . ' | ' . $value['about'] . ' |
';
- }
- ?>
+ $value) {
+ echo '' . $key . ' | ' . $value['Version'] . ' | ' . $value['about'] . ' |
';
+}
+?>
@@ -219,5 +516,5 @@ if (!empty($this->class_error)) {
-ShowGroup('sccp_info',0); ?>
+ShowGroup('sccp_info', 0); ?>
diff --git a/views/server.setting.php b/views/server.setting.php
index 992fabc..3d5510c 100644
--- a/views/server.setting.php
+++ b/views/server.setting.php
@@ -14,6 +14,13 @@
+
ShowGroup('sccp_general',1);
echo $this->ShowGroup('sccp_dev_time_s',1);