Begin resample Sccp_manager
add system info
This commit is contained in:
parent
48ff0dc56c
commit
20ce9d0581
|
@ -49,9 +49,8 @@ Make sure you have the following installed on your system:
|
|||
### Requirements
|
||||
- Chan_SCCP module 4.3.0 (or later) channel driver for Asterisk: [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/Building-and-Installation-Guide)
|
||||
- configure flags ./configure --enable-conference --enable-advanced-functions --enable-distributed-devicestate
|
||||
- Creating mysql DB from sorce (mysql -u root asterisk < mysql-v5_enum.sql)
|
||||
|
||||
- Real Time cofiguration for Chan_SCCP
|
||||
- Creating mysql DB from sorce (mysql -u root asterisk < mysql-v5.sql)
|
||||
|
||||
- TFTP Server running under (recomended) /tftpboot/ [See our WIKI] (https://github.com/chan-sccp/chan-sccp/wiki/setup-tftp-service)
|
||||
- You will need the phone settings templates. You can use the templates taken from the distribution "chan-sccp"
|
||||
|
|
|
@ -70,7 +70,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.3';
|
||||
private $tftpLang = array();
|
||||
private $hint_context = '@ext-local'; /// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Get it from Config !!!
|
||||
private $val_null = 'NONE'; /// REPLACE to null Field
|
||||
|
@ -348,6 +348,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
|||
"name" => _("Advanced SCCP Settings"),
|
||||
"page" => 'views/server.advanced.php'
|
||||
),
|
||||
"sccpinfo" => array(
|
||||
"name" => _("SCCP info"),
|
||||
"page" => 'views/server.info.php'
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($this->pagedata as &$page) {
|
||||
|
@ -1469,10 +1473,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
|||
if (empty($driver['sccp'])) {
|
||||
$driver_replace = 'yes';
|
||||
} else {
|
||||
if (empty($driver['sccp']['sccp_driver_ver'])) {
|
||||
if (empty($driver['sccp']['Version'])) {
|
||||
$driver_replace = 'yes';
|
||||
} else {
|
||||
if ($driver['sccp']['sccp_driver_ver'] != $this->sccp_driver_ver){
|
||||
if ($driver['sccp']['Version'] != $this->sccp_driver_ver){
|
||||
$driver_replace = 'yes';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@ class dbinterface {
|
|||
public function __construct() {
|
||||
}
|
||||
public function info() {
|
||||
return Array('Ver' =>'Data access interface');
|
||||
return Array('Version' => '13.0.2',
|
||||
'about' =>'Data access interface v. 13.0.2');
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -9,7 +9,8 @@ class extconfigs {
|
|||
}
|
||||
|
||||
public function info() {
|
||||
return Array('Ver' =>'Default Setings and Enums');
|
||||
return Array('Version' => '13.0.2',
|
||||
'about' =>'Default Setings and Enums ver: 13.0.2');
|
||||
}
|
||||
|
||||
public function getextConfig($id = '', $index = '') {
|
||||
|
|
|
@ -13,7 +13,8 @@ class srvinterface {
|
|||
public function __construct() {
|
||||
}
|
||||
public function info() {
|
||||
return Array('Ver' =>'server interface data');
|
||||
return Array('Version' => '13.0.2',
|
||||
'about' =>'Server interface data ver 13.0.2');
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,8 +22,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
|||
"prettyName" => _("Sccp Custom Driver"),
|
||||
"shortName" => "SCCP",
|
||||
"description" => _("Sccp Device"),
|
||||
"sccp_driver_ver" => "11.2",
|
||||
"about" => "Sccp mysql class Base ver: 11.2, Sccp ver: default"
|
||||
"Version" => "11.3",
|
||||
"about" => "Sccp mysql class Base ver: 11.3, Sccp ver: default"
|
||||
|
||||
);
|
||||
}
|
||||
|
@ -79,7 +79,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
|||
|
||||
public function getDevice($id) {
|
||||
$sccp_line = array();
|
||||
$sql = "SELECT name as id, name as name";
|
||||
// $sql = "SELECT name as id, name as name";
|
||||
$sql = "SELECT name as id, name as name ";
|
||||
foreach($this->data_fld as $key => $val) {
|
||||
$sql .= ',`'. $key .'` as '.$val;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
|
|||
"prettyName" => _("Sccp Custom Driver"),
|
||||
"shortName" => "SCCP",
|
||||
"description" => _("Sccp Device"),
|
||||
"sccp_driver_ver" => "11.2",
|
||||
"about" => "Sccp mysql class Base ver: 11.2, Sccp ver: 431"
|
||||
"Version" => "11.3",
|
||||
"about" => "Sccp mysql class Base ver: 11.3, Sccp ver: 431"
|
||||
);
|
||||
}
|
||||
public function addDevice1($id, $settings) {
|
||||
|
|
|
@ -5,7 +5,17 @@ To change this template file, choose Tools | Templates
|
|||
and open the template in the editor. Base Version before all crash :-)
|
||||
-->
|
||||
<root>
|
||||
<page_group name="sccp_hidden"><label>SCCP Hidden Server config</label>
|
||||
<page_group name="sccp_info">
|
||||
<item type="IS" id="6" seq="99"><name>XML_info</name> <label>XML_Ver Default</label>
|
||||
<default>NONE</default>
|
||||
<button value="NONE">XML_Ver_Old</button>
|
||||
<help></help>
|
||||
</item>
|
||||
|
||||
</page_group>
|
||||
|
||||
<page_group name="sccp_hidden">
|
||||
<label>SCCP Hidden Server config</label>
|
||||
<item type="IE" id="1" seq="10"><label>Phone SSH login</label>
|
||||
<input>
|
||||
<name>dev_sshUserId</name>
|
||||
|
|
|
@ -5,6 +5,15 @@ To change this template file, choose Tools | Templates
|
|||
and open the template in the editor. Base Version before all crash :-)
|
||||
-->
|
||||
<root>
|
||||
<page_group name="sccp_info">
|
||||
<item type="IS" id="6" seq="99"><name>XML_info</name> <label>XML_Ver 431</label>
|
||||
<default>NONE</default>
|
||||
<button value="NONE">XML_Ver 431</button>
|
||||
<help></help>
|
||||
</item>
|
||||
|
||||
</page_group>
|
||||
|
||||
<page_group name="sccp_hidden"><label>SCCP Hiden Server config</label>
|
||||
<item type="IE" id="1" seq="10"><label>Phone ssh login</label>
|
||||
<input>
|
||||
|
|
|
@ -668,7 +668,7 @@ function Setup_RealTime() {
|
|||
}
|
||||
|
||||
CheckSCCPManagerDBTables($table_req);
|
||||
CheckPermissions();
|
||||
#CheckPermissions();
|
||||
CheckAsteriskVersion();
|
||||
$sccp_compatible = CheckChanSCCPСomatable();
|
||||
$db_config = Get_DB_config($sccp_compatible);
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
/* $Id:$ */
|
||||
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
|
||||
|
||||
global $db;
|
||||
$version = FreePBX::Config()->get('ASTVERSION');
|
||||
global $db;
|
||||
$version = FreePBX::Config()->get('ASTVERSION');
|
||||
|
||||
echo "dropping table sccpdevmodel..";
|
||||
sql("DROP TABLE IF EXISTS `sccpdevmodel`");
|
||||
echo "dropping table sccpsettings..";
|
||||
sql("DROP TABLE IF EXISTS `sccpsettings`");
|
||||
if (!empty($version)) {
|
||||
echo "dropping table sccpdevmodel..";
|
||||
sql("DROP TABLE IF EXISTS `sccpdevmodel`");
|
||||
echo "dropping table sccpsettings..";
|
||||
sql("DROP TABLE IF EXISTS `sccpsettings`");
|
||||
if (!empty($version)) {
|
||||
// Woo, we have a version
|
||||
if (version_compare($version, "14.0.0", "<=")) {
|
||||
echo "Deleting key FROM kvstore..";
|
||||
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
|
||||
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
||||
}
|
||||
|
||||
$check = $db->getRow("SELECT 1 FROM `kvstore` LIMIT 0", DB_FETCHMODE_ASSOC);
|
||||
if (!(DB::IsError($check))) {
|
||||
//print_r("none, creating table :". $value);
|
||||
echo "Deleting key FROM kvstore..";
|
||||
sql("DELETE FROM kvstore WHERE module = 'sccpsettings'");
|
||||
sql("DELETE FROM kvstore WHERE module = 'Sccp_manager'");
|
||||
}
|
||||
|
||||
/* Comment: Maybe save in sccpsettings, if the chan_sccp tables already existed in the database or if they were created by install.php */
|
||||
/* So that you know if it is save to drop/delete them */
|
||||
|
|
62
views/server.info.php
Normal file
62
views/server.info.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
// vim: set ai ts=4 sw=4 ft=phtml:
|
||||
// print_r($this->sccp_conf_init);
|
||||
// print_r($this->sccpvalues);
|
||||
//$core = $this->srvinterface->getCoreSCCPVersion();
|
||||
//print_r($core);
|
||||
//print_r('<br><br>');
|
||||
|
||||
$driver = $this->FreePBX->Core->getAllDriversInfo();
|
||||
$core = $this->srvinterface->getChanSCCPVersion();
|
||||
$info = array();
|
||||
$info['srvinterface'] = $this->srvinterface->info();
|
||||
$info['extconfigs'] = $this->extconfigs->info();
|
||||
$info['dbinterface'] = $this->dbinterface->info();
|
||||
$info['sccp_class'] = $driver['sccp'];
|
||||
$info['Core_sccp'] = array('Version' => $core['Version'], 'about'=> 'Sccp ver.'. $core['Version'].' r'.$core['vCode']. ' Revision :'. $core['RevisionNum']);
|
||||
$info['Asterisk'] = array('Version' => FreePBX::Config()->get('ASTVERSION'), 'about'=> 'Asterisk.');
|
||||
$info['Сompatible'] = array('Version' => $this->srvinterface->get_compatible_sccp(), 'about'=> '');
|
||||
//print_r('<br><br>');
|
||||
|
||||
//print_r($this->srvinterface->info());
|
||||
//print_r($this->extconfigs->info());
|
||||
//print_r($this->dbinterface->info());
|
||||
|
||||
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
||||
// print_r('<br>');
|
||||
// print_r(timezone_identifiers_list());
|
||||
// print_r('<br>');
|
||||
|
||||
?>
|
||||
<div class="fpbx-container container-fluid">
|
||||
<div class="row">
|
||||
<div class="container">
|
||||
<h2>Sccp Manager Info </h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Module</th>
|
||||
<th>Version</th>
|
||||
<th>Info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($info as $key => $value) {
|
||||
echo '<tr><td>' . $key . '</td><td>' . $value['Version'] . '</td><td>' . $value['about'] . '</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->ShowGroup('sccp_info',0); ?>
|
||||
|
|
@ -5,13 +5,7 @@
|
|||
* and open the template in the editor.
|
||||
*/
|
||||
// vim: set ai ts=4 sw=4 ft=phtml:
|
||||
// print_r($this->sccp_conf_init);
|
||||
// print_r($this->sccpvalues);
|
||||
// print_r($this->srvinterface->getCoreSCCPVersion());
|
||||
// $lang_arr = $this->extconfigs->getextConfig('sccp_lang','sk_SK');
|
||||
// print_r('<br>');
|
||||
// print_r(timezone_identifiers_list());
|
||||
// print_r('<br>');
|
||||
|
||||
?>
|
||||
|
||||
<form autocomplete="off" name="frm_general" id="frm_general" class="fpbx-submit" action="" method="post">
|
||||
|
|
Loading…
Reference in a new issue