Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7312157
network_status.phtml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
network_status.phtml
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 1, 5:14 AM (19 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3488676
Default Alt Text
network_status.phtml (3 KB)
Attached To
Mode
rCDRT CDRTool
Attached
Detach File
Event Timeline
Log In to Comment