Child pages
  • Call Detail Records (CDR)
Skip to end of metadata
Go to start of metadata

SipX Call Detail Records (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. Regarding security and ports, the same rules apply as for callcontroller described above,

It is bundled as a JAR package file and is loaded by the sipXrest container on initialization. It is invoked by the GET HTTP method to a specific URL.

The general form of the URL when call is issued from internal cluster is:
http://<sipxrest_node_host>:6667/cdr/user?fromdate=yyyymmdd&limit=<max # of records to return>

The general form of the URL when call is issued from outside the cluster is:
https://<web_admin_host>/sipxconfig/rest/my/redirect/cdr/user?fromdate=yyyymmdd&limit=<max # of records to return>

URL Parameters:

Property

Description

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
curl -k --digest -X GET -u 200:123 https://192.168.1.104/sipxconfig/rest/my/redirect/cdr/200?limit=5
It returns first five calling records for the user 200. The call is secured and DIGEST authentication is applied. As wanted, you can perform basic authentication or authenticate against LDAP.
Sample response as follows:
<?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>

Retrieve user call logs

Resource URI: cdr/{user}
Default Resource Properties
The resource is represented by the following properties when the GET request is performed:

Property

Description

fromdate

Start date from which call records will be retrieved.

limit

Maximum number of call log records to return.

Specific Response Codes: N/A
HTTP Method: GET
Get the current call state for any ongoing call between callingUser and calledUser.
Examples: XML format
<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>
Return Values: list with information on the user ID
Unsupported HTTP Method: POST, PUT, DELETE

View CDR settings

Available in 14 starting with 14.10

Resource URI: /cdrs/settings

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description

path


type


entry


key


Specific Response Codes: N/A

HTTP Method: GET

Retrieves a list with all the CDR settings in the system.

Example: XML format

<Settings>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_LOG_LEVEL</path>

<type>enum</type>

<options>

<entry>

<key>NOTICE</key>

</entry>

<entry>

<key>CRIT</key>

</entry>

<entry>

<key>EMERG</key>

</entry>

<entry>

<key>WARNING</key>

</entry>

<entry>

<key>ERR</key>

</entry>

<entry>

<key>INFO</key>

</entry>

<entry>

<key>ALERT</key>

</entry>

<entry>

<key>DEBUG</key>

</entry>

</options>

<value>NOTICE</value>

<defaultValue>NOTICE</defaultValue>

<label>Logging Level</label>

<description>Creating Call Detail Records (CDRs) and monitoring active calls.</description>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_PURGE</path>

<type>boolean</type>

<value>ENABLE</value>

<defaultValue>ENABLE</defaultValue>

<label>Purge aged records daily</label>

<description>Schedule a daily purge of the CDR database and delete records older than specified below.</description>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_PURGE_AGE_CDR</path>

<type>integer</type>

<value>185</value>

<defaultValue>185</defaultValue>

<label>Purge age for CDRs</label>

<description>If daily purging is enabled, then remove CDRs older than this (in days).</description>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_PURGE_AGE_CSE</path>

<type>integer</type>

<value>7</value>

<defaultValue>7</defaultValue>

<label>Purge age for CSEs</label>

<description>Call State Events (CSEs) are collected in different places in the system and are used to compute system-wide CDRs. Once the CDRs are created, CSEs are no longer needed. They are deleted from the database (if CDR purging is enabled) after the number of days specified here.</description>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_CSE_POLLING_INTERVAL</path>

<type>integer</type>

<value>10</value>

<defaultValue>10</defaultValue>

<label>CSE polling interval</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_CALL_DIRECTION</path>

<type>boolean</type>

<value>DISABLE</value>

<defaultValue>DISABLE</defaultValue>

<label>Call direction</label>

<description>Compute call direction. Call direction labels calls as incoming, outgoing, or intra-network based on whether the call came from a PSTN gateway, went to a PSTN gateway, or neither, respectively.</description>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_AGENT_PORT</path>

<type>integer</type>

<value>8130</value>

<defaultValue>8130</defaultValue>

<label>Agent Port</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_CSE_QUEUE_SIZE</path>

<type>integer</type>

<value>2500</value>

<defaultValue>2500</defaultValue>

<label>CSE Queue size</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_CDR_QUEUE_SIZE</path>

<type>integer</type>

<value>1000</value>

<defaultValue>1000</defaultValue>

<label>CDR Queue size</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_MAX_CALL_LEN</path>

<type>integer</type>

<value>28800</value>

<defaultValue>28800</defaultValue>

<label>Maximum call length</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_MAX_RINGING_CALL_LEN</path>

<type>integer</type>

<value>120</value>

<defaultValue>120</defaultValue>

<label>Maximum Ringing call length</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_MIN_CLEANUP_INTERVAL</path>

<type>integer</type>

<value>300</value>

<defaultValue>300</defaultValue>

<label>Minimum cleanup interval</label>

</Setting>

<Setting>

<path>callresolver/SIP_CALLRESOLVER_REMOTE_ACCESS</path>

<type>string</type>

<label>Remote Access Address</label>

<description>IP Address of remote device(s) that will be granted access to the CDR database. Wildcards (ie. *) can be used in any of the last 3 octects to indicate the full range of addresses. Return the value to default(blank) will turn off remote database access.</description>

</Setting>

</Settings>

JSON format

!!!

Unsupported HTTP Method: PUT, POST, DELETE


View or modify CDR settings

Available in 14 starting with 14.10

Resource URI: /cdrs/settings/{path}

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description

path


type


value


defaultValue


label


description


Specific Response Codes: N/A

HTTP Method: GET

Retrieves CDR options for the setting form the specified path.

Example: XML format

<Setting>

<path>callresolver/SIP_CALLRESOLVER_PURGE_AGE_CSE</path>

<type>integer</type>

<value>7</value>

<defaultValue>7</defaultValue>

<label>Purge age for CSEs</label>

<description>Call State Events (CSEs) are collected in different places in the system and are used to compute system-wide CDRs. Once the CDRs are created, CSEs are no longer needed. They are deleted from the database (if CDR purging is enabled) after the number of days specified here.</description>

</Setting>

Unsupported HTTP Method: POST, PUT, DELETE


View active all CDRs

Available in 14 starting with 14.10

Resource URI: /cdrs/active

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description

callee


calleeAor


caller


duration


recipient


startAt


termination


Specific Response Codes: N/A

HTTP Method: GET

Retrieves a list with all the active CDRs in the system.

Example: XML format

<Cdrs>

<Cdr>

<callee>400</callee>

<calleeAor><sip:400@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<duration>00:00:29</duration>

<recipient>400</recipient>

<startAt>9/12/14 3:32 PM</startAt>

<termination>IN_PROGRESS</termination>

</Cdr>

</Cdrs>

JSON format

{

cdrs:

{

startTime: 1410525150000

caller: "200"

callee: "400"

startAt: "9/12/14 3:32 PM"

connectAt: null

duration: "00:00:13"

callerAor: ""200" <sip:200@dluca.ezuce.ro>"

calleeAor: "<sip:400@dluca.ezuce.ro;user=phone>"

recipient: "400"

termination: "IN_PROGRESS"

callId: null

}-

-

}

Unsupported HTTP Method: PUT, POST, DELETE


View CDRs history

Available in 14 starting with 14.10

Resource URI: /cdrs/history

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description





Filtering Parameters:

Parameter

Description

fromDate

Optional. The beginning point in the date range 

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to yesterday.

toDate

Optional. The ending point in the date range 

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to now.

from


to


limit

Maximum number of rows with results.

offset


orderBy

Determines how the results are ordered. Options are:

  • caller
  • callee
  • startTime
  • duration
  • termination


Specific Response Codes: N/A

HTTP Method: GET

Retrieves the history for all the CDRs in the system that match the filtering parameters.

Example: XML format

<Cdrs>

<Cdr>

<callId>df01bebf-a9246135-3b09f217@10.5.0.3</callId>

<callee>300</callee>

<calleeAor><sip:300@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 3:30 PM</startAt>

<termination>ABANDONED</termination>

</Cdr>

<Cdr>

<callId>8a9fbbaf-cc747405-b95b7e87@10.5.0.3</callId>

<callee>400</callee>

<calleeAor><sip:400@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<connectAt>9/12/14 12:32 PM</connectAt>

<duration>00:21:05</duration>

<recipient>400</recipient>

<startAt>9/12/14 3:32 PM</startAt>

<termination>COMPLETED</termination>

</Cdr>

<Cdr>

<callId>ebf13b4f-ff161ae5-9261eb27@10.5.0.3</callId>

<callee>333</callee>

<calleeAor><sip:333@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 3:54 PM</startAt>

<termination>FAILED</termination>

</Cdr>

<Cdr>

<callId>fe09178d-9a6adb1f-71d18e55@10.5.0.3</callId>

<callee>300</callee>

<calleeAor><sip:300@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<connectAt>9/12/14 12:55 PM</connectAt>

<duration>00:00:16</duration>

<recipient>300</recipient>

<startAt>9/12/14 3:54 PM</startAt>

<termination>TRANSFER</termination>

</Cdr>

<Cdr>

<callId>b7e025d7-88a40c7d-ca5fd5ef@10.5.0.3</callId>

<callee>300</callee>

<calleeAor><sip:300@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 3:56 PM</startAt>

<termination>FAILED</termination>

</Cdr>

<Cdr>

<callId>d8458d6f-6a11d945-137e47@10.5.0.3</callId>

<callee>333</callee>

<calleeAor><sip:333@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<connectAt>9/12/14 12:57 PM</connectAt>

<duration>00:00:15</duration>

<recipient>333</recipient>

<startAt>9/12/14 3:57 PM</startAt>

<termination>COMPLETED</termination>

</Cdr>

<Cdr>

<callId>8f14f1e3-404ddc94-f041937@10.5.0.2</callId>

<callee>*4333</callee>

<calleeAor><sip:*4333@dluca.ezuce.ro;user=phone></calleeAor>

<caller>400</caller>

<callerAor>"400" <sip:400@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 3:58 PM</startAt>

<termination>FAILED</termination>

</Cdr>

<Cdr>

<callId>8510150f-b8f09825-53c732e7@10.5.0.3</callId>

<callee>300</callee>

<calleeAor><sip:300@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 4:07 PM</startAt>

<termination>FAILED</termination>

</Cdr>

<Cdr>

<callId>89ad82ff-f22d3df5-38b93857@10.5.0.3</callId>

<callee>300</callee>

<calleeAor><sip:300@dluca.ezuce.ro;user=phone></calleeAor>

<caller>200</caller>

<callerAor>"200" <sip:200@dluca.ezuce.ro></callerAor>

<connectAt>9/12/14 1:09 PM</connectAt>

<duration>00:01:05</duration>

<recipient>300</recipient>

<startAt>9/12/14 4:09 PM</startAt>

<termination>TRANSFER</termination>

</Cdr>

<Cdr>

<callId>11bffdd3-f7bb6a95-ae713073@10.5.0.4</callId>

<callee>333</callee>

<calleeAor><sip:333@dluca.ezuce.ro;user=phone></calleeAor>

<caller>300</caller>

<callerAor>"300" <sip:300@dluca.ezuce.ro></callerAor>

<duration>00:00:00</duration>

<startAt>9/12/14 4:10 PM</startAt>

<termination>FAILED</termination>

</Cdr>

<Cdr>

<callId>60c91777-98d2a490-4e1dcaeb@10.5.0.2</callId>

<callee>*4333</callee>

<calleeAor><sip:*4333@dluca.ezuce.ro;user=phone></calleeAor>

<caller>400</caller>

<callerAor>"400" <sip:400@dluca.ezuce.ro></callerAor>

<connectAt>9/12/14 1:12 PM</connectAt>

<duration>00:00:09</duration>

<recipient>*4333</recipient>

<startAt>9/12/14 4:12 PM</startAt>

<termination>COMPLETED</termination>

</Cdr>

</Cdrs>

JSON format
{
cdrs:
0: {
startTime: 1410525010684
caller: "200"
callee: "300"
startAt: "9/12/14 3:30 PM"
connectAt: null
duration: "00:00:00"
callerAor: ""200" <sip:200@dluca.ezuce.ro>"
calleeAor: "<sip:300@dluca.ezuce.ro;user=phone>"
recipient: null
termination: "ABANDONED"
callId: "df01bebf-a9246135-3b09f217@10.5.0.3"
}-
{
startTime: 1410525150483
caller: "200"
callee: "400"
startAt: "9/12/14 3:32 PM"
connectAt: "9/12/14 12:32 PM"
duration: "00:21:05"
callerAor: ""200" <sip:200@dluca.ezuce.ro>"
calleeAor: "<sip:400@dluca.ezuce.ro;user=phone>"
recipient: "400"
termination: "COMPLETED"
callId: "8a9fbbaf-cc747405-b95b7e87@10.5.0.3"
}-
{
startTime: 1410526446565
caller: "200"
callee: "333"
startAt: "9/12/14 3:54 PM"
connectAt: null
duration: "00:00:00"
callerAor: ""200" <sip:200@dluca.ezuce.ro>"
calleeAor: "<sip:333@dluca.ezuce.ro;user=phone>"
recipient: null
termination: "FAILED"
callId: "ebf13b4f-ff161ae5-9261eb27@10.5.0.3"
}-
{
startTime: 1410526499280
caller: "200"
callee: "300"
startAt: "9/12/14 3:54 PM"
connectAt: "9/12/14 12:55 PM"
duration: "00:00:16"
callerAor: ""200" <sip:200@dluca.ezuce.ro>"
calleeAor: "<sip:300@dluca.ezuce.ro;user=phone>"
recipient: "300"
termination: "TRANSFER"
callId: "fe09178d-9a6adb1f-71d18e55@10.5.0.3"
}
}

Unsupported HTTP Method: PUT, POST, DELETE


View active CDRs for a user ID

Available in 14 starting with 14.10

Resource URI: /cdrs/user/{userId}/active

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description





Specific Response Codes: N/A

HTTP Method: GET

Retrieves a list with the active CDRs for the specified user ID, user name or alias.

Unsupported HTTP Method: PUT, POST, DELETE


View CDRs history for a user ID

Available in 14 starting with 14.10

Resource URI: /cdrs/user/{userId}/history

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description





Filtering Parameters:

Parameter

Description

fromDate

Optional. The beginning point in the date range

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to yesterday.

toDate

Optional. The ending point in the date range

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to now.

from


to


limit

Maximum number of results.

offset


orderBy

Determines how the results are ordered. Options are:

  • caller
  • callee
  • startTime
  • duration
  • termination


Specific Response Codes: N/A

HTTP Method: GET

Retrieves the history for the CDRs corresponding to the specified user ID, user name or alias.

Example:


Unsupported HTTP Method: PUT, POST, DELETE


Download report for all CDRs

Available in 14 starting with 14.10

Resource URI: /cdrs/reports/cdr-table

Default Resource Properties:

The resource is represented by the following properties when the GET request is performed:

Property

Description





Filtering Parameters:

Parameter

Description

fromDate

Optional. The beginning point in the date range

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to yesterday.|

toDate

Optional. The ending point in the date range

used to retrieve the history. The format is

yyyyMMddHHmm. If not specified, the date

defaults to now.|

from


to


limit

Maximum number of results.

offset


orderBy

Determines how the results are ordered. Options are:

  • caller
  • callee
  • startTime
  • duration
  • termination


Specific Response Codes: N/A

HTTP Method: GET

Downloads a report in the PDF format.

Example: N/A

Unsupported HTTP Method: PUT, POST, DELETE

Download report for CDRs for a user ID

Available in 14 starting with 14.10

Resource URI: /cdrs/user/{userId}/reports/cdr-table

Default Resource Properties: N/A

Filtering Parameters:

Parameter

Description

fromDate

Optional. The beginning point in the date range. The format is yyyyMMddHHmm. If not specified, the date defaults to yesterday.

toDate

Optional. The ending point in the date range. The format is yyyyMMddHHmm. If not specified, the date defaults to now.

from


to


limit

Maximum number of results?

offset


orderBy

Determines how the results are ordered. Options are:

  • caller
  • callee
  • startTime
  • duration
  • termination


Specific Response Codes: N/A

HTTP Method: GET

Downloads a report in the PDF format for the specified user ID, user name or alias.

Example: N/A

Unsupported HTTP Method: PUT, POST, DELETE



  • No labels