Call Detail Report (CDR)
Configuration
Cloudonix CDR delivery is configured on a per domain basis. To set up your domain to deliver CDR records to
an endpoint of your choosing, set the "domain profile" property cdr-endpoint
to a URL that you control.
The Cloudonix CDR processor will delivery CDR records in the JSON encoded format specified below, to the CDR endpoint configured for the domain, when the endpoint URL specifies one of the following supported protocols as its "schema" part:
Protocol | URL Schema | Description |
---|---|---|
HTTP | http: | CDR records will be delivered using individual POST requests with the content type application/json containing a JSON encoded record, using HTTP version 1.1. |
Websocket | ws: | CDR records will be delivered using Websocket. Each CDR will be delivered using a single text message containing JSON encoded record. |
Secure Websocket | wss: | CDR records will be delivered using Websocket. Each CDR will be delivered using a single text message containing JSON encoded record. The Websocket connection will be initiated over TLS. |
Amazon S3 | s3: | CDR records will be delivered to an Amazon S3 bucket. See specific notes about S3 support below. |
Support for S3 protocol
When configuring CDR delivery to an S3 bucket, the URL should be specified as an s3:
URL as supported
by the AWS CLI - i.e. the URL "authority" part is the bucket name and the optional URL "path" part denotes
the key prefix for the stored files.
In order to allow Cloudonix to delivery CDR records to a customer owned bucket, the S3 bucket specified
must have a custom security policy authorizing write access for the Amazon AWS account 756645658314
.
CDRs will be stored into the S3 bucket and prefix using text files where each text file contains up to 100 new-line character delimited JSON encoded records, for up to 5 minutes of activity (i.e. files are stored for each 100 CDR records or 5 minutes of activity - which ever comes first).
Custom S3 endpoints for non-Amazon S3 compatible services can be supported, contact us for details.
CDR Record
A Cloudonix CDR record has the following fields:
Field | Type | Description |
---|---|---|
timestamp | Number | The Unix timestamp in seconds for when the call started. |
domain | String | The Cloudonix domain name in which the CDR was generated. |
subscriber | String | The subscriber MSISDN of the subscriber originating this call, or null if this is a CDR for a call originating from the PSTN. |
from | String | The caller ID for the call origin. |
to | String | The original destination number of the call. |
cx_trunk_id | Number | The Cloudonix trunk ID of the trunk that was used for termination if the call terminated to the PSTN. |
application | String | The name of the application deployment that handled the call. |
route | Object | The LCR routing data that was used in the call, based on the API.Core session update response, see below. |
duration | Number | The duration of the call in seconds, from session start until hanging up, as calculated from the API.Core session update response's "call start" and "call end" fields. |
billsec | Number | The billable second of the call, calculated as the time from when the call media was connected until the session's "call end" field. |
disposition | String | The call termination cause, one of: ANSWER, BUSY, CANCEL, FAILED, CONGESTION , NOANSWER. |
rated_cost | Number | The "buy cost" of the call, as calculated by the API.Core for the session (see issue #323), as a decimal number. |
approx_cost | Number | The approximated effective cost of the call, taking provider commitments into account. Should be set to the same value as rated_cost pending missing implementation in LCR. |
sell_cost | Number | The "sell cost" of the call, as calculated by the API.Core for the session (see issue #323), as a decimal number. |
vapp_server | String | The hostname of the Cloudonix VApp server that handled the call. |
call_id | String | The SIP call-id, for future reference. |
session | Object | The Cloudonix session object for the call. |
The route
Object
The route object includes the route data from the LCR routes object of the session, of the route that was used for termination. The correct object should be selected from the session's routes list according to the cx_trunk_id matching the one in the CDR / session.
Field | Type | Description |
---|---|---|
provider_id | The | LCR record identifier for the provider that was used to terminate the call. |
cx_trunk_id | Number | The LCR cx_trunk_id field from the LCR trunks record. |
offer_id | Number | The LCR record identifier for the LCR offer that generated the route. |
rate_id | Number | The LCR record identifier for the LCR rate that was used for termination. |
buyrate | Number | The cost for each time unit billable for the call, as a decimal amount of the rate's currency. |
buyrate_minimum | Number | The length of time for the first billable unit for the call, as a number of seconds. |
buyrate_increment | Number | The length of time for any additional billable units for the call, as a number of seconds. |
sellrate | Number | The cost for the subscriber for each time unit billable for the call, as a decimal amount of the rate's currency. |
sellrate_minimum | Number | The length of time for the first subscriber billable unit for the call, as a number of seconds. |
sellrate_increment | Number | The length of time for any additional subscriber billable units for the call, as a number of seconds. |
CDR Example
CDR Request Parameters
{
"timestamp": 1716239100,
"domain": "nullDomain",
"subscriber": null,
"from": "cdrFromIdentString",
"to": "cdrDestinationIdentString",
"cx_trunk_id": null,
"application": null,
"route": null,
"duration": 33,
"billsec": 31,
"disposition": "CONNECTED",
"rated_cost": null,
"approx_cost": null,
"sell_cost": null,
"vapp_server": "172.24.xxx.xxx",
"call_id": "0b515a4c3c683a5c51048b2c3758719f@xxx.xxx.xxx.xxx:5060",
"session": {
"id": 9812750,
"domainId": 755,
"domain": null,
"destination": "cdrDestinationIdentString",
"callerId": "cdrFromIdentString",
"token": "3caa3541d5f8497e9c79ea30ef689677",
"timeLimit": 0,
"profile": {
"callId": ["0b515a4c3c683a5c51048b2c3758719f@xxx.xxx.xxx.xxx:5060"],
"inbound-trunk-name": "fromTrunk-Name",
"qos": {
"CHANNELQOS": "ssrc=1909495585;themssrc=0;lp=0;rxjitter=0.000000;rxcount=0;txjitter=0.000000;txcount=106;rlp=0;rtt=0.000000;rxmes=0.000000;txmes=0.000000",
"ssrc": "1909495585",
"themssrc": "0",
"lp": 0,
"rxjitter": 0,
"rxcount": 0,
"txjitter": 0,
"txcount": 106,
"rlp": 0,
"rtt": 0,
"rxmes": 0,
"txmes": 0,
"rx_mos": "NaN",
"tx_mos": 4.4
},
"application": [
{
"time": "2024-05-20T21:05:02Z",
"url": "https://example.com/remoteCxmlDocument",
"source": "[Your Voice Application CXML Document will appear here]",
"context": "applicationRequest",
"error": null
}
],
"inbound-trunk-id": 610
},
"callStartTime": 1716239100387,
"callEndTime": 1716239134343,
"callAnswerTime": 1716239102610,
"status": "connected",
"vappServer": "172.24.xxx.xxx"
}
}