Skip to main content

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:

ProtocolURL SchemaDescription
HTTPhttp: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.
Websocketws:CDR records will be delivered using Websocket. Each CDR will be delivered using a single text message containing JSON encoded record.
Secure Websocketwss: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 S3s3: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:

FieldTypeDescription
timestampNumberThe Unix timestamp in seconds for when the call started.
domainStringThe Cloudonix domain name in which the CDR was generated.
subscriberStringThe subscriber MSISDN of the subscriber originating this call, or null if this is a CDR for a call originating from the PSTN.
fromStringThe caller ID for the call origin.
toStringThe original destination number of the call.
cx_trunk_idNumberThe Cloudonix trunk ID of the trunk that was used for termination if the call terminated to the PSTN.
applicationStringThe name of the application deployment that handled the call.
routeObjectThe LCR routing data that was used in the call, based on the API.Core session update response, see below.
durationNumberThe 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.
billsecNumberThe billable second of the call, calculated as the time from when the call media was connected until the session's "call end" field.
dispositionStringThe call termination cause, one of: ANSWER, BUSY, CANCEL, FAILED, CONGESTION , NOANSWER.
rated_costNumberThe "buy cost" of the call, as calculated by the API.Core for the session (see issue #323), as a decimal number.
approx_costNumberThe 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_costNumberThe "sell cost" of the call, as calculated by the API.Core for the session (see issue #323), as a decimal number.
vapp_serverStringThe hostname of the Cloudonix VApp server that handled the call.
call_idStringThe SIP call-id, for future reference.
sessionObjectThe 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.

FieldTypeDescription
provider_idTheLCR record identifier for the provider that was used to terminate the call.
cx_trunk_idNumberThe LCR cx_trunk_id field from the LCR trunks record.
offer_idNumberThe LCR record identifier for the LCR offer that generated the route.
rate_idNumberThe LCR record identifier for the LCR rate that was used for termination.
buyrateNumberThe cost for each time unit billable for the call, as a decimal amount of the rate's currency.
buyrate_minimumNumberThe length of time for the first billable unit for the call, as a number of seconds.
buyrate_incrementNumberThe length of time for any additional billable units for the call, as a number of seconds.
sellrateNumberThe cost for the subscriber for each time unit billable for the call, as a decimal amount of the rate's currency.
sellrate_minimumNumberThe length of time for the first subscriber billable unit for the call, as a number of seconds.
sellrate_incrementNumberThe 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"
}
}