FreePBX->Core->getAllDriversInfo();
$core = $this->aminterface->getSCCPVersion();
$ast_realtime = $this->aminterface->getRealTimeStatus();
//$ast_realm = (empty($ast_realtime['sccp']) ? '' : 'sccp');
// if there are multiple connections, this will only return the first.
foreach ($ast_realtime as $key => $value) {
if (empty($ast_realm)) {
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();
$compatible = $this->aminterface->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']);
/*
if (!$this->srvinterface->useAmiInterface) {
$info['aminterface']['about'] .= ' -- Disabled';
$info['Core_sccp'] = array('Version' => $core['Version'], 'about' => 'Sccp ver.' . $core['Version'] . ' r' . $core['vCode'] . ' Revision :' . $core['RevisionNum'] . ' Hash :' . $core['RevisionHash'] . ' ----Warning: Upgrade chan_sccp to use full ami functionality');
}
*/
$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');
}
if (!empty($this->sccpvalues['tftp_rewrite'])) {
if ($this->sccpvalues['tftp_rewrite']['data'] == 'pro') {
$info['Provision_SCCP'] = array('Version' => 'base', 'about' => 'Provision Sccp enabled');
} else {
$info['TFTP_Rewrite'] = array('Version' => 'base', 'about' => 'Rewrite Supported');
}
}
$info['Сompatible'] = array('Version' => $compatible, 'about' => 'Ok');
if (!empty($this->sccpvalues['SccpDBmodel'])) {
if ($compatible > $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
');
} else {
$info['DB_Schema'] = array('Version' => $db_Schema, 'about' => (($compatible == $db_Schema ) ? 'Ok' : 'Incompatible Version'));
}
if (empty($ast_realtime)) {
$info['RealTime'] = array('Version' => 'Error', 'about' => ' No RealTime connections found
');
} 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_info .= ' Using SCCP connection found to database: '.$value['realm'] . ' with connector: ['. $key .']
';
} else {
$rt_sccp = 'SCCP ERROR';
$rt_info .= ' Error : ' . $value['message'] . '
';
}
} elseif ($value['status'] == 'ERROR') {
$rt_info .= ' No connector found for [' . $key . '] : ' . $value['message'] . '
';
} elseif ($value['status'] == 'OK') {
$rt_info .= ' Alternative connector found to database '.$value['realm'] . ' with connector: ['. $key . ']
';
}
}
$info['RealTime'] = array('Version' => $rt_sccp, 'about' => $rt_info);
}
// There are potential issues with string Type Declarations in PHP 5.
$info['PHP'] = array('Version' => phpversion(), 'about' => version_compare(phpversion(), '7.0.0', '>' ) ? 'OK' : 'PHP 7 Preferred - Please upgrade if possible');
if (empty($conf_realtime)) {
$info['ConfigsRealTime'] = array('Version' => 'Error', 'about' => ' Realtime configuration was not found
');
} else {
$rt_info = '';
foreach ($conf_realtime as $key => $value) {
if (($value != 'OK') && ($key != 'extconfigfile')) {
$rt_info .= ' Found error in section ' . $key . ' :' . $value . '
';
}
}
if (!empty($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');
}
// Check Time Zone compatibility
$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');
}
}
}
if (!empty($this->info_warning)) {
?>
Sccp Manager Warning
There are Warning in the SCCP Module:
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.
class_error)) {
?>
Diagnostic information about SCCP Manager errors
There is an error in the :
class_error); ?>
Correct these problems before continuing to work.
Open 'SCCP Connectivity' -> Server Config' to change global settings
Sccp Manager V.sccp_manager_ver); ?> Info
Module |
Version |
Info |
$value) {
echo '' . $key . ' | ' . $value['Version'] . ' | ' . $value['about'] . ' |
';
}
?>
showGroup('sccp_info', 0); ?>