Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7312188
media_sessions.phtml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
media_sessions.phtml
View Options
<?php
require
'/etc/cdrtool/global.inc'
;
page_open
(
array
(
"sess"
=>
"CDRTool_Session"
,
"auth"
=>
"CDRTool_Auth"
,
"perm"
=>
"CDRTool_Perm"
)
);
$perm
->
check
(
"statistics"
);
require
'media_sessions.php'
;
$title
=
"Media sessions"
;
include
'header.phtml'
;
global
$CDRTool
;
$allowedDomains
=
array
();
if
(
strlen
(
$CDRTool
[
'filter'
][
'domain'
]))
{
$allowedDomains
=
explode
(
' '
,
$CDRTool
[
'filter'
][
'domain'
]);
}
$layout
=
new
pageLayoutLocal
();
$layout
->
showTopMenu
(
$title
);
if
(
isset
(
$_REQUEST
[
'datasource'
]))
{
$datasources
=
array
(
$_REQUEST
[
'datasource'
]);
}
else
{
$datasources
=
array_keys
(
$DATASOURCES
);
}
$user
=
isset
(
$_REQUEST
[
'user'
])
?
$_REQUEST
[
'user'
]
:
''
;
foreach
(
$datasources
as
$datasource
)
{
if
(
in_array
(
$datasource
,
$CDRTool
[
'dataSourcesAllowed'
]))
{
if
(
array_key_exists
(
'mediaSessions'
,
$DATASOURCES
[
$datasource
]))
{
// MediaProxy 2 over NGNPro
printf
(
"<h2>%s (MediaProxy 2)</h2><br />"
,
$DATASOURCES
[
$datasource
][
'name'
]);
$filters
=
array
(
'user'
=>
$user
);
$MediaSessions
=
new
MediaSessionsNGNPro
(
$DATASOURCES
[
$datasource
][
'mediaSessions'
],
$allowedDomains
,
$filters
);
$MediaSessions
->
getSessions
();
$MediaSessions
->
showAll
();
}
else
if
(
array_key_exists
(
'mediaDispatcher'
,
$DATASOURCES
[
$datasource
]))
{
// MediaProxy 2 via dispatcher tcp socket
printf
(
"<h2>%s (MediaProxy 2.x)</h2><br />"
,
$DATASOURCES
[
$datasource
][
'name'
]);
$filters
=
array
(
'user'
=>
$user
);
$MediaSessions
=
new
MediaSessions
(
$DATASOURCES
[
$datasource
][
'mediaDispatcher'
],
$allowedDomains
,
$filters
);
$MediaSessions
->
getSessions
();
$MediaSessions
->
showAll
();
}
else
if
(
array_key_exists
(
'mediaServers'
,
$DATASOURCES
[
$datasource
]))
{
// MediaProxy 1 via relay tcp socket
printf
(
"<h2>%s (MediaProxy 1.x)</h2><br />"
,
$DATASOURCES
[
$datasource
][
'name'
]);
$MediaSessions
=
new
MediaSessions1
(
$DATASOURCES
[
$datasource
][
'mediaServers'
],
$allowedDomains
);
$MediaSessions
->
getSessions
();
$MediaSessions
->
show
();
}
}
}
$layout
->
showFooter
();
print
"
</body>
</html>
"
;
page_close
();
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 1, 5:20 AM (19 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3488737
Default Alt Text
media_sessions.phtml (2 KB)
Attached To
Mode
rCDRT CDRTool
Attached
Detach File
Event Timeline
Log In to Comment