added freeswitch version when retrievable

This commit is contained in:
Matthew Vale
2015-12-07 17:38:54 +00:00
parent 8d62c96ef7
commit 2c369260fc
2 changed files with 24 additions and 0 deletions

View File

@@ -105,6 +105,20 @@ $document['title'] = $text['title-sys-status'];
echo "</tr>\n";
}
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_version = event_socket_request($fp, 'api version');
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(\s*(\d+\w+)\s*\)/", $switch_version, $matches);
$switch_version = $matches[1];
$switch_bits = $matches[2];
echo "<tr>\n";
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
echo " ".$text['label-switch_version']."\n";
echo " </td>\n";
echo " <td class=\"row_style1\">$switch_version ($switch_bits)</td>\n";
echo "</tr>\n";
}
echo "<!--\n";
$tmp_result = shell_exec('uname -a');
echo "-->\n";