Page MenuHomePhabricator

network_status.phtml
No OneTemporary

network_status.phtml

<?php
require '/etc/cdrtool/global.inc';
page_open(
array(
"sess" => "CDRTool_Session",
"auth" => "CDRTool_Auth",
"perm" => "CDRTool_Perm"
)
);
require 'sip_statistics.php';
require 'media_sessions.php';
$perm->check("admin");
$title = "SIP network status";
include 'header.phtml';
global $CDRTool;
$allowedDomains = array();
if (strlen($CDRTool['filter']['domain'])) {
$allowedDomains = explode(' ', $CDRTool['filter']['domain']);
}
$layout = new pageLayoutLocal();
$layout->showTopMenu($title);
foreach (array_keys($DATASOURCES) as $datasource) {
print "<div class='row-fluid'>";
if (in_array($datasource, $CDRTool['dataSourcesAllowed']) && !$DATASOURCES[$datasource]['invisible']) {
if ($DATASOURCES[$datasource]['networkStatus']) {
print "<div class='span6'>";
printf("<h2>%s</h2>", $DATASOURCES[$datasource]['name']);
$SipThorNetworkImage = new SipThorNetworkImage($DATASOURCES[$datasource]['networkStatus'], $allowedDomains);
//printf ("<img src=images/SipThorNetwork.php?engine=%s align=left>",$DATASOURCES[$datasource]['networkStatus']);
print "<div id='thorMap__$datasource'><script>";
printf("var thorData__$datasource = %s", json_encode($SipThorNetworkImage->returnImageData()));
print "</script></div>";
print "</div>";
print "<div class='span6'>";
} else if ($DATASOURCES[$datasource]['db_registrar']) {
print "<div class='span7'>";
printf("<h2>%s</h2>", $DATASOURCES[$datasource]['name']);
require_once("cdr_generic.php");
$online = new SIPonline($datasource, $DATASOURCES[$datasource]['db_registrar']);
$online->showAll();
print "</div>";
print "<div class='span5'>";
}
if (array_key_exists('mediaSessions', $DATASOURCES[$datasource])) {
$MediaSessions = new MediaSessionsNGNPro($DATASOURCES[$datasource]['mediaSessions'], $allowedDomains);
$MediaSessions->getSessions();
$MediaSessions->getSummary();
print "<div class=row><h2>Media relays</h2></div>";
$MediaSessions->showSummary();
} else if (array_key_exists('mediaDispatcher', $DATASOURCES[$datasource])) {
$MediaSessions = new MediaSessions($DATASOURCES[$datasource]['mediaDispatcher'], $allowedDomains);
$MediaSessions->getSessions();
$MediaSessions->getSummary();
print "<div class=row><h2>Media relays</h2></div>";
$MediaSessions->showSummary();
}
if (array_key_exists('networkStatus', $DATASOURCES[$datasource])) {
$NetworkStatistics = new NetworkStatistics($DATASOURCES[$datasource]['networkStatus'], $allowedDomains);
print "<div class=row><h2>SIP accounts</h2></div>";
$NetworkStatistics->showStatistics();
print "<div class=row><h2>Network topology</h2></div>";
$NetworkStatistics->showStatus();
}
print "</div>";
}
print "</div>";
}
$layout->showFooter();
print "
</body>
</html>";
page_close();
?>

File Metadata

Mime Type
text/x-php
Expires
Sat, Feb 1, 5:14 AM (19 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3488676
Default Alt Text
network_status.phtml (3 KB)

Event Timeline