Overview
Sipx CDR Log is a RESTLET plugin which provides a resource whereby one can obtain the
Call Logs for a particular user. Records are sorted by start date in descending
order.
It is bundled as a jar file and is loaded by the sipXrest container on initialization. It is invoked by HTTP GET to a specific URL.
The CDR Log consults etc/sipxpbx/validusers.xml to authenticate users and map user aliases to user names.
The general form of the URL is
https://host:6666/cdr/user?fromdate=yyyymmdd&limit=<max # of records to return>
Optional URL parameters:
fromdate - start date from which call records will be retrieved.
limit - maximum number of call log records to return.
Examples
Using curl, you would initiate a query for the specified user calling records
Code Block |
---|
curl -k --digest -X GET -u 200:123 https://192.168.1.104:6666/cdr/200?limit=5 |
It returns first five calling records for user 200. The call is secured and DIGEST authentication is applied
Sample response as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Results> <Row> <caller_aor>"200" <sip:200@domain.com></caller_aor> <callee_aor><sip:1201@domain.com></callee_aor> <callee_contact><sip:202@11.126.12.21:1319></callee_contact> <start_time>2011-01-16 09:08:57.713</start_time> <duration>0 years 0 mons -2 days -23 hours -59 mins -35.811 secs</duration> <termination>C</termination> <callee_route>INT</callee_route> </Row> <Row> <caller_aor>"Alejandro 201" <sip:501@domain.com></caller_aor> <callee_aor>"Buddy 200" <sip:200@external200201.com></callee_aor> <callee_contact><sip:200@192.168.3.2:15060></callee_contact> <start_time>2011-01-15 14:14:11.853</start_time> <duration>0 years 0 mons 0 days 0 hours 0 mins 4.231 secs</duration> <termination>C</termination> <callee_route>null</callee_route> </Row> <Row> <caller_aor>"200" <sip:200@domain.com></caller_aor> <callee_aor><sip:201@domain.com></callee_aor> <callee_contact><sip:202@11.126.12.21:1319></callee_contact> <start_time>2011-01-13 09:08:57.713</start_time> <duration>0 years 0 mons 0 days 0 hours 0 mins 24.189 secs</duration> <termination>C</termination> <callee_route>INT</callee_route> </Row> <Row> <caller_aor>"asd"<sip:201@domain.com></caller_aor> <callee_aor>"200"<sip:200@domain.com></callee_aor> <callee_contact><sip:201@11.126.12.21:1320></callee_contact> <start_time>2011-01-13 09:08:08.724</start_time> <duration>0 years 0 mons 0 days 0 hours 1 mins 28.431 secs</duration> <termination>C</termination> <callee_route>INT</callee_route> </Row> <Row> <caller_aor>"200" <sip:200@domain.com></caller_aor> <callee_aor><sip:201@domain.com></callee_aor> <callee_contact><sip:201@11.126.12.21:1320></callee_contact> <start_time>2011-01-13 09:06:15.806</start_time> <duration>0 years 0 mons 0 days 0 hours 0 mins 31.454 secs</duration> <termination>C</termination> <callee_route>null</callee_route> </Row> </Results> |