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();
$moduleXml = simplexml_load_file("{$amp_conf['AMPWEBROOT']}/admin/modules/sccp_manager/module.xml");
$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']}");
$capabilityArray = array( "park", "pickup", "realtime", "video", "conference", "dirtrfr", "feature_monitor", "functions", "manager_events",
"devicestate", "devstate_feature", "dynamic_speeddial", "dynamic_speeddial_cid", "experimental", "debug");
$info['chan-sccp build info'] = array('Version' => $core['Version'], 'about' => 'Following options NOT built: ' . implode('; ',array_diff($capabilityArray, $core['buildInfo'])));
$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');
}
exec('in.tftpd -V', $tftpInfo);
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');
if (isset($tftpInfo[0])) {
$tftpInfo = explode(',',$tftpInfo[0]);
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => 'Mapping not available');
$tftpInfo[1] = trim($tftpInfo[1]);
if ($tftpInfo[1] == 'with remap') {
$info['TFTP Server'] = array('Version' => $tftpInfo[0], 'about' => $tftpInfo[1]);
}
}
if (!empty($this->sccpvalues['tftp_rewrite']['data'])) {
switch ($this->sccpvalues['tftp_rewrite']['data']) {
case 'custom':
case 'pro':
$info['Provision_SCCP'] = array('Version' => 'base', 'about' => 'Provision Sccp enabled');
break;
default:
if ($tftpInfo[1] == 'with remap') {
$info['TFTP_Mapping'] = array('Version' => 'off', 'about' => "TFTP mapping is available but the mapping file is not included in tftpd-hpa default settings.
To enable Provision mode, add option
-m /etc/asterisk/sccpManagerRewrite.rules
to the tftpd defaults, (location dependant on the system), and restart the tftpd server");
} else {
$info['TFTP_Mapping'] = array('Version' => 'off', 'about' => "Mapping capability is not built into the TFTP server. To enable Provision, upgrade the TFTP server.");
}
break;
}
}
// Finished testing tftp server options
$info['Сompatible'] = array('Version' => $compatible, 'about' => 'Ok');
if (!empty($this->sccpvalues['SccpDBmodel'])) {
if ($compatible > $this->sccpvalues['SccpDBmodel']['data']) {
$info['Сompatible']['about'] = '
info_warning as $key => $value) { echo '' . $key . '
'; if (is_array($value)) { echo '
class_error); ?>