Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7159861
sip_trace.phtml
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
sip_trace.phtml
View Options
<?php
require
'/etc/cdrtool/global.inc'
;
// if ($_REQUEST['public']) {
// $db = new DB_CDRTool;
// $key="callid-".trim($_REQUEST['callid']).trim($_REQUEST['fromtag']);
// $query=sprintf("select * from memcache where `key` = '%s'",addslashes($key));
// sleep(1);
// dprint($query);
// if ($db->query($query)) {
// if ($db->num_rows()) {
// $authorize=0;
// } else {
// $authorize=1;
// }
// } else {
// $authorize=1;
// }
// } else {
// $authorize=1;
// }
// if ($authorize==1) {
// page_open(array(
// "sess" => "CDRTool_Session",
// "auth" => "CDRTool_Auth",
// "perm" => "CDRTool_Perm")
// );
// } else {
// unset($auth);
// unset($sess);
// unset($perm);
// }
$proxyIP
=
$_REQUEST
[
'proxyIP'
];
$callid
=
htmlspecialchars
(
$_REQUEST
[
'callid'
]);
$fromtag
=
$_REQUEST
[
'fromtag'
];
$totag
=
$_REQUEST
[
'totag'
];
$cdr_source
=
$_REQUEST
[
'cdr_source'
];
$format
=
isset
(
$_REQUEST
[
'format'
])
?
$_REQUEST
[
'format'
]
:
'html'
;
$title
=
sprintf
(
"CDRTool SIP trace for session %s"
,
$callid
);
include
'header.phtml'
;
require
'cdr_generic.php'
;
if
(
!
$authorize
||
in_array
(
$cdr_source
,
$CDRTool
[
'dataSourcesAllowed'
]))
{
$sipTrace
=
new
SIP_trace
(
$cdr_source
);
if
(
$format
==
'html'
)
{
$sipTrace
->
show
(
$proxyIP
,
$callid
,
$fromtag
,
$totag
);
}
elseif
(
$format
==
'text'
)
{
$sipTrace
->
showText
(
$proxyIP
,
$callid
,
$fromtag
,
$totag
);
}
}
else
{
printf
(
"Error: Invalid datasource '%s' for user '%s'"
,
$cdr_source
,
$auth
->
auth
[
"uname"
]);
}
print
"
</body>
</html>
"
;
if
(
$authorize
=
1
)
{
page_close
();
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 23, 2:18 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3409216
Default Alt Text
sip_trace.phtml (1 KB)
Attached To
Mode
rCDRT CDRTool
Attached
Detach File
Event Timeline
Log In to Comment