Voice OUT Service CDR Streaming

Voice OUT CDR Streamer enables its users to receive near real-time CDRs. CDRs are delivered within 3 seconds after call completion to the customer’s designated HTTP endpoint.

HTTP request headers example:

POST /cdr HTTP/1.1
Host: 192.0.2.5
User-Agent: CDR-streamer
Accept: */*
Content-Type: text/plain
Content-Encoding: gzip
Content-Length: 2358
Expect: 100-continue

HTTP request payload example:

{ "type": "outbound-cdr", "id": "3d6af8ac-5ed1-11ea-bc9d-005056845b1e", "attributes" : { "source_ip" : "1.2.3.4", "call_id" : "3eab288b2e0eb547122434ce0e648bb5", "call_type" : "INTERNATIONAL", "time_end" : "2020-03-05T11:05:35.782831+00:00", "pop" : "NYC", "disconnect_reason" : "Request terminated (Cancel)", "price" : 0, "duration" : 0, "rate" : 0.005, "dst_number" : "441158720600", "time_start" : "2020-03-05T11:05:33.879559+00:00", "original_src_number" : "02089643990", "time_connect" : null, "billing_duration" : null, "disconnect_code" : 487, "source_port" : 5060, "success" : false, "initial_billing_interval" : 1, "src_number" : "123439643990", "next_billing_interval" : 1, "user_agent" : "Asterisk PBX 1.8.32.3", "trunk_name": "Trunk 1", "p_charge_info": "<sip:02089643990@customer.example.com;billing-account-id=212>" }}
{ "type": "outbound-cdr", "id": "1c3f702a-5ed0-11ea-bc9c-005056845b1e", "attributes" : { "source_ip" : "4.3.2.1", "call_id" : "60de10410b36681c5dcb8e7804e72540", "call_type" : "INTERNATIONAL", "time_end" : "2020-03-05T10:57:31.086143+00:00", "pop" : "FRA", "disconnect_reason" : "Not Found", "price" : 0, "duration" : 0, "rate" : 0.005, "dst_number" : "448009778097", "time_start" : "2020-03-05T10:57:28.334934+00:00", "original_src_number" : "07795622299", "time_connect" : null, "billing_duration" : null, "disconnect_code" : 404, "source_port" : 5060, "success" : false, "initial_billing_interval" : 1, "src_number" : "1345322299", "next_billing_interval" : 1, "user_agent" : "Asterisk PBX 1.8.32.3", "trunk_name": "Trunk 1", "p_charge_info": "<sip:1345322299@customer.example.com;billing-account-id=11232>" }}

Warning

Request Payload encoded as gzip so customer’s API should support gzip.

CDR attributes description:

type

String
CDR type. Voice Out CDR will be marked as outbound-cdr

id

String
Unique CDR identifier in UUID format.

attributes

Hash
Structure contains all CDR attributes. See description below.

time_start

Timestamp
Start time when the initial INVITE is received.

time_connect

Timestamp
Time after the successful handshake (200OK SIP).

time_end

Timestamp
Time when the call was disconnected.

duration

Integer
Call duration in seconds. For non-connected calls duration is 0.

success

Boolean
Indicates that the call was successful.

disconnect_code

Integer
DIDWW internal disconnect code.

disconnect_reason

String
DIDWW internal disconnect reason.

call_id

String
SIP Call-ID of the call leg between the customer equipment and DIDWW.

source_ip

String
IP address of the call originator.

source_port

Integer
Port of the call originator.

source_protocol

String
SIP transport protocol used between customer and DIDWW platform. Possible values:

  • UDP

  • TCP

  • TLS

trunk_name

String
Outbound trunk friendly name.

call_type

String
Call type. Possible values:

  • INTERNATIONAL

  • ORIGIN

  • LOCAL

trunk_name

String
Outgoing trunk name. Friendly name defined by customer during the trunk creation.

src_name

String
Incoming caller name.

original_src_number

String
Incoming Caller-ID.

src_number

String
Incoming Caller-ID.

dst_number

String
Called destination number.

customer_vat

Numeric
Charged VAT amount for the call.

rate

Numeric
Customer outbound call termination rate.

initial_billing_interval

Integer
Initial billing interval for the outbound call termination.

next_billing_interval

Integer
Next billing interval for the outbound call termination.

billing_duration

Integer
Call duration rounded to the configured billing interval for the outbound call termination.

price

Numeric
Customer accumulated amount for the outbound call termination.

pop

String
Location of DIDWW equipment that processed call, see DIDWW Point of Presence. Possible values:

  • NYC USA New-York

  • LAC USA Los Angeles

  • MIA USA Miami

  • FRA Germany, Frankfurt

  • SG - Singapore

user_agent

String
User-Agent and Server headers values from the customer gateway.

p_charge_info

String
P-Charge-Info header value is received from the call originator. Using this header, customers can add custom information to the DIDWW CDR for technical and billing purposes. See Service description for more details.

Batching

CDRs are delivered in batches, HTTP POST request can contain multiple CDRs. Maximum batch size is 1000. Destination API should be able to process multiple CDRs in same request.

Error handling

If the destination API responds with 2xx HTTP code, the streaming interface will consider all CDRs sent in that request as processed and they will be automatically deleted from the queue. In case of HTTP error (non 2xx response or timeout), CDRs will be stored in the queue and will re-attempt to deliver them after 3 seconds.

Warning

  1. The queue length is limited to 10,000 records per customer. Extended downtime or increased delays in processing requests may result in data loss on the customer’s endpoint. For this reason, the CDR Streaming mechanism should not be relied upon as the sole method for receiving CDRs. Refer to the API documentation for additional CDR retrieval methods.

  2. If the HTTP endpoint does not respond within 10 seconds, the request will time out, triggering an automatic retry.