Inbound CDR streaming#

Inbound CDR Streaming delivers completed records for calls to your DID numbers, including routing-attempt outcomes and applicable charges. Configure Voice IN → CDR Streaming. For shared transport, batching, acknowledgement and retry rules, see the Configuration and delivery reference.

Note

All inbound CDR timestamps are UTC. time_start, time_connect and time_end currently have no time zone suffix or offset. Interpret them as UTC, retaining their fractional seconds. Outbound CDR timestamps include +00:00. The examples preserve each service’s actual format.

Records and routing attempts#

Each object has type: "inbound-cdr", its own UUID id and an attributes object. One inbound call can produce several CDRs if routing tries different destinations. routing_attempt identifies the attempt number. is_last_cdr marks the final attempt, whether successful or not.

Use the CDR UUID to deduplicate delivery. Use local_tag, destination-leg term_call_id, timestamps and numbers to investigate related calls and attempts. Do not assume that the CDR UUID is the Call Events id or SIP Call-ID. See Routing attempts in call logs.

success describes whether a connection was established. Inspect the disconnect initiator, internal disconnect fields and destination (leg B) response fields together when diagnosing how an attempt ended.

Inbound CDR streaming attributes#

The tables give the JSON type and applicable condition. A nullable attribute can be present with JSON null. That is different from an omitted key. Zero and false remain meaningful values. An empty string is a separate string value, not a substitute for null or omission. The examples do not establish that every field must be non-null on every call.

Identifiers, timing and outcomes#

Field

JSON type

Meaning, unit and availability

type

String

Record discriminator: inbound-cdr.

id

String

Unique CDR UUID. Different records, including routing attempts, have different IDs.

attributes

Object

Container for the attributes below.

local_tag

String

Internal identifier of the call record. Distinct from the CDR UUID.

term_call_id

String

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

routing_attempt

Integer

Attempt number: 1 for the first attempt, 2 for the next, and so on.

is_last_cdr

Boolean

True for the final routing attempt. Does not itself mean that the call connected.

time_start

String

UTC timestamp of the initial SIP INVITE received by DIDWW, without an offset.

time_connect

String (timestamp)

UTC timestamp of the successful connection, without a time zone offset.

time_end

String

UTC termination timestamp, without an offset.

duration

Integer

Call duration in integer seconds as returned by the service. Zero for an unconnected attempt. Billing durations are separate fields.

success

Boolean

Whether the attempt connected. False is an outcome value, not missing data or failed HTTP delivery.

disconnect_initiator

Integer

0: routing engine. 1: SBC. 2: called destination network. 3: call originator.

internal_disconnect_code

Integer

DIDWW internal disconnect code. Interpret with the internal reason.

internal_disconnect_reason

String

DIDWW internal reason for termination.

legb_disconnect_code

Integer

SIP response or disconnect code received from the destination network. It can differ from the internal code.

legb_disconnect_reason

String

SIP disconnect reason received from the destination network. Inspect alongside its code.

Numbers and delivery destination#

Field

JSON type

Meaning and conditions

did_number

String

DID receiving the call, in full number format.

src_number

String

Incoming caller number. Preserve as a string.

src_name

String

Incoming caller display name.

dst_number

String

Routed called identifier. Depending on the destination it can be a number or a nonnumeric SIP user, such as an extension.

trunk_destination

String

Destination URI used for the trunk or routed leg, such as sip:12025550123@pbx.example.com.

out_pop_id

Integer

Destination-leg PoP: 1 New York, 2 Frankfurt, 4 Los Angeles, 5 Miami, 6 Singapore, 7 Hong Kong, 8 Amsterdam.

transport_protocol_id

Integer

SIP transport to the customer gateway: 1 UDP, 2 TCP, 3 TLS.

user_agent

String or null

User-Agent or Server value from the customer gateway. Can be explicitly null.

is_redirected

Boolean

Whether the call was redirected by a SIP 3xx response.

early_media_present

Boolean

Whether early media was present on the destination leg.

Billing fields#

Billing families describe different services: tf_* for toll-free usage, trm_* for PSTN forwarding, and metered_channels_* for metered capacity. Their presence or a zero rate does not by itself establish that the service was used. Inapplicable billed durations and amounts can be null.

*_amount_no_vat explicitly excludes VAT. Keep the corresponding *_amount values as returned rather than applying a new tax calculation to them. Null billing data is not a zero charge.

customer_vat contains the customer VAT value returned with the call record. Use the completed amount fields and the account VAT settings for reporting. The payload has no separate currency field.

Actual duration and the applicable billed duration can differ because of billing increments. See Inbound call billing and VAT for the account billing context.

Field

JSON type

Meaning, unit and conditions

customer_vat

Number

Customer VAT value returned with the call record.

tf_rate

Number

Toll-free rate.

tf_connection_fee

Number

Toll-free connection fee.

tf_initial_interval

Integer or null

Initial toll-free billing interval, seconds. Can be null when not applicable or no billed value is available.

tf_next_interval

Integer or null

Subsequent toll-free billing interval, seconds. Can be null when not applicable or no billed value is available.

tf_duration

Integer or null

Billed toll-free duration, seconds, after interval rounding. Can be null when not applicable or no billed value is available.

tf_amount

Number or null

Customer accumulated toll-free amount as returned by the service. Can be null when inapplicable or unavailable.

tf_amount_no_vat

Number or null

Customer accumulated toll-free amount excluding VAT. Can be null when inapplicable or unavailable.

trm_rate

Number

PSTN forwarding rate.

trm_connection_fee

Number

PSTN forwarding connection fee.

trm_initial_interval

Integer or null

Initial PSTN forwarding billing interval, seconds. Can be null when not applicable or no billed value is available.

trm_next_interval

Integer or null

Subsequent PSTN forwarding billing interval, seconds. Can be null when not applicable or no billed value is available.

trm_duration

Integer or null

Billed PSTN forwarding duration, seconds, after interval rounding. Can be null when not applicable or no billed value is available.

trm_amount

Number or null

Customer accumulated pstn forwarding amount as returned by the service. Can be null when inapplicable or unavailable.

trm_amount_no_vat

Number or null

Customer accumulated pstn forwarding amount excluding VAT. Can be null when inapplicable or unavailable.

metered_channels_rate

Number or null

Metered capacity rate. Can be null.

metered_channels_connection_fee

Number or null

Metered capacity connection fee. Can be null.

metered_channels_initial_interval

Integer or null

Initial metered capacity billing interval, seconds. Can be null when not applicable or no billed value is available.

metered_channels_next_interval

Integer or null

Subsequent metered capacity billing interval, seconds. Can be null when not applicable or no billed value is available.

metered_channels_duration

Integer or null

Billed metered capacity duration, seconds, after interval rounding. Can be null when not applicable or no billed value is available.

metered_channels_amount

Number or null

Customer accumulated metered capacity amount as returned by the service. Can be null when inapplicable or unavailable.

metered_channels_amount_no_vat

Number or null

Customer accumulated metered capacity amount excluding VAT. Can be null when inapplicable or unavailable.

Subcustomer attributes#

These fields describe the subcustomer associated with the call and its billing details. tf refers to toll-free service. trm refers to PSTN forwarding. Subcustomer amounts are separate from the account-level tf_* and trm_* amounts.

Field

Value type

Description

sub_customer_id

Identifier or null

Subcustomer associated with the call.

sub_customer_tf_rate

Number

Subcustomer toll-free rate per minute.

sub_customer_tf_connection_fee

Number

Subcustomer toll-free connection fee.

sub_customer_tf_initial_interval

Integer or null

Subcustomer toll-free initial billing interval, in seconds.

sub_customer_tf_next_interval

Integer or null

Subcustomer toll-free subsequent billing interval, in seconds.

sub_customer_tf_duration

Number or null

Subcustomer toll-free billed duration, in seconds.

sub_customer_tf_amount

Number or null

Subcustomer toll-free accumulated amount.

sub_customer_trm_rate

Number

Subcustomer PSTN forwarding rate per minute.

sub_customer_trm_connection_fee

Number

Subcustomer PSTN forwarding connection fee.

sub_customer_trm_initial_interval

Integer or null

Subcustomer PSTN forwarding initial billing interval, in seconds.

sub_customer_trm_next_interval

Integer or null

Subcustomer PSTN forwarding subsequent billing interval, in seconds.

sub_customer_trm_duration

Number or null

Subcustomer PSTN forwarding billed duration, in seconds.

sub_customer_trm_amount

Number or null

Subcustomer PSTN forwarding accumulated amount.

HTTP request payload examples#

The examples below show an answered call and a batch of five CDRs.

Answered call#

 1{
 2      "type": "inbound-cdr",
 3      "attributes": {
 4        "sub_customer_tf_connection_fee": 0,
 5        "trm_initial_interval": null,
 6        "sub_customer_trm_duration": null,
 7        "metered_channels_duration": null,
 8        "sub_customer_trm_next_interval": null,
 9        "time_connect": "2025-02-14T14:36:58.843904",
10        "metered_channels_amount_no_vat": null,
11        "local_tag": "14-1519849E-67AF550A000B932D-348F56C0",
12        "metered_channels_next_interval": null,
13        "internal_disconnect_reason": "Bye",
14        "tf_rate": 0,
15        "duration": 9,
16        "metered_channels_connection_fee": null,
17        "tf_connection_fee": 0,
18        "is_last_cdr": true,
19        "sub_customer_tf_duration": null,
20        "customer_vat": 0,
21        "success": true,
22        "metered_channels_rate": null,
23        "sub_customer_trm_connection_fee": 0,
24        "dst_number": "77615145141",
25        "disconnect_initiator": 3,
26        "trm_duration": null,
27        "tf_duration": null,
28        "src_name": "353122345478",
29        "time_start": "2025-02-14T14:36:58.75863",
30        "sub_customer_trm_amount": null,
31        "term_call_id": "14-14-32FA4FA2-67AF550A000B9E59-5E1F96C0",
32        "early_media_present": false,
33        "did_number": "321555",
34        "tf_initial_interval": null,
35        "trm_rate": 0,
36        "tf_next_interval": null,
37        "time_end": "2025-02-14T14:37:06.977841",
38        "legb_disconnect_reason": "Bye",
39        "sub_customer_tf_next_interval": null,
40        "sub_customer_id": null,
41        "internal_disconnect_code": 200,
42        "trm_amount_no_vat": null,
43        "sub_customer_tf_initial_interval": null,
44        "trunk_destination": "sip:123456@192.0.2.67",
45        "sub_customer_trm_rate": 0,
46        "legb_disconnect_code": 200,
47        "sub_customer_tf_rate": 0,
48        "sub_customer_tf_amount": null,
49        "sub_customer_trm_initial_interval": null,
50        "tf_amount": null,
51        "routing_attempt": 1,
52        "transport_protocol_id": 1,
53        "is_redirected": false,
54        "out_pop_id": 1,
55        "user_agent": "sems callgen",
56        "trm_connection_fee": 0,
57        "tf_amount_no_vat": null,
58        "trm_next_interval": null,
59        "metered_channels_initial_interval": null,
60        "src_number": "123456789",
61        "metered_channels_amount": null,
62        "trm_amount": null
63      },
64  "id": "e20d1722-9b47-4644-92fe-fce28f26871c"
65}

This connected call has duration: 9 and success: true. The caller initiated disconnection and both disconnect codes are 200.

Unconnected calls have a duration of zero. Use the call record and call logs to investigate the outcome.

Example: CDRs in a batch#

Below is an example of a payload containing five CDRs. Each line is a separate JSON object. There is no enclosing array or comma between records.

1{ "type" : "inbound-cdr", "attributes" : { "sub_customer_tf_connection_fee" : 0, "trm_initial_interval" : null, "sub_customer_trm_duration" : null, "metered_channels_duration" : 60, "sub_customer_trm_next_interval" : null, "time_connect" : "2025-04-18T07:47:44.412933", "metered_channels_amount_no_vat" : 0.01, "local_tag" : "21-25F86C33-680203A00004FB2D-7B9F96C0", "metered_channels_next_interval" : 60, "internal_disconnect_reason" : "Bye", "tf_rate" : 0, "duration" : 11, "metered_channels_connection_fee" : 0, "tf_connection_fee" : 0, "is_last_cdr" : true, "sub_customer_tf_duration" : null, "customer_vat" : 21, "success" : true, "metered_channels_rate" : 0.01, "sub_customer_trm_connection_fee" : 0, "dst_number" : "echotest", "disconnect_initiator" : 3, "trm_duration" : null, "tf_duration" : null, "src_name" : "16473635777", "time_start" : "2025-04-18T07:47:44.326742", "sub_customer_trm_amount" : null, "term_call_id" : "21-21-4F754B3D-680203A0000515F7-FE5EC6C0", "early_media_present" : false, "did_number" : "18312630056", "tf_initial_interval" : null, "trm_rate" : 0, "tf_next_interval" : null, "time_end" : "2025-04-18T07:47:54.815287", "legb_disconnect_reason" : "Bye", "sub_customer_tf_next_interval" : null, "sub_customer_id" : null, "internal_disconnect_code" : 200, "trm_amount_no_vat" : null, "sub_customer_tf_initial_interval" : null, "trunk_destination" : "sip:echotest@46.19.209.12", "sub_customer_trm_rate" : 0, "legb_disconnect_code" : 200, "sub_customer_tf_rate" : 0, "sub_customer_tf_amount" : null, "sub_customer_trm_initial_interval" : null, "tf_amount" : null, "routing_attempt" : 1, "transport_protocol_id" : 1, "is_redirected" : false, "out_pop_id" : 1, "user_agent" : "sems callgen", "trm_connection_fee" : 0, "tf_amount_no_vat" : null, "trm_next_interval" : null, "metered_channels_initial_interval" : 60, "src_number" : "16473635777", "metered_channels_amount" : 0.0121, "trm_amount" : null }, "id" : "847d3532-3592-441c-9305-035d31bb38d0" }
2{ "type" : "inbound-cdr", "attributes" : { "sub_customer_tf_connection_fee" : 0, "trm_initial_interval" : null, "sub_customer_trm_duration" : null, "metered_channels_duration" : 60, "sub_customer_trm_next_interval" : null, "time_connect" : "2025-04-18T07:47:45.339513", "metered_channels_amount_no_vat" : 0.01, "local_tag" : "21-4B73AFD3-680203A10003DF75-7B9F96C0", "metered_channels_next_interval" : 60, "internal_disconnect_reason" : "Bye", "tf_rate" : 0, "duration" : 11, "metered_channels_connection_fee" : 0, "tf_connection_fee" : 0, "is_last_cdr" : true, "sub_customer_tf_duration" : null, "customer_vat" : 21, "success" : true, "metered_channels_rate" : 0.01, "sub_customer_trm_connection_fee" : 0, "dst_number" : "echotest", "disconnect_initiator" : 3, "trm_duration" : null, "tf_duration" : null, "src_name" : "16473635777", "time_start" : "2025-04-18T07:47:45.253978", "sub_customer_trm_amount" : null, "term_call_id" : "21-21-26FD31F5-680203A10003F6FB-FE3EA6C0", "early_media_present" : false, "did_number" : "18312630056", "tf_initial_interval" : null, "trm_rate" : 0, "tf_next_interval" : null, "time_end" : "2025-04-18T07:47:55.576196", "legb_disconnect_reason" : "Bye", "sub_customer_tf_next_interval" : null, "sub_customer_id" : null, "internal_disconnect_code" : 200, "trm_amount_no_vat" : null, "sub_customer_tf_initial_interval" : null, "trunk_destination" : "sip:echotest@46.19.209.12", "sub_customer_trm_rate" : 0, "legb_disconnect_code" : 200, "sub_customer_tf_rate" : 0, "sub_customer_tf_amount" : null, "sub_customer_trm_initial_interval" : null, "tf_amount" : null, "routing_attempt" : 1, "transport_protocol_id" : 1, "is_redirected" : false, "out_pop_id" : 1, "user_agent" : "sems callgen", "trm_connection_fee" : 0, "tf_amount_no_vat" : null, "trm_next_interval" : null, "metered_channels_initial_interval" : 60, "src_number" : "16473635777", "metered_channels_amount" : 0.0121, "trm_amount" : null }, "id" : "79479a72-1d19-41cf-83e5-515273915489" }
3{ "type" : "inbound-cdr", "attributes" : { "sub_customer_tf_connection_fee" : 0, "trm_initial_interval" : null, "sub_customer_trm_duration" : null, "metered_channels_duration" : 60, "sub_customer_trm_next_interval" : null, "time_connect" : "2025-04-18T07:47:45.146977", "metered_channels_amount_no_vat" : 0.01, "local_tag" : "21-21E66A31-680203A10000E80F-7B9F96C0", "metered_channels_next_interval" : 60, "internal_disconnect_reason" : "Bye", "tf_rate" : 0, "duration" : 11, "metered_channels_connection_fee" : 0, "tf_connection_fee" : 0, "is_last_cdr" : true, "sub_customer_tf_duration" : null, "customer_vat" : 21, "success" : true, "metered_channels_rate" : 0.01, "sub_customer_trm_connection_fee" : 0, "dst_number" : "echotest", "disconnect_initiator" : 3, "trm_duration" : null, "tf_duration" : null, "src_name" : "16473635777", "time_start" : "2025-04-18T07:47:45.059612", "sub_customer_trm_amount" : null, "term_call_id" : "21-21-46EABA05-680203A100010655-FE4EB6C0", "early_media_present" : false, "did_number" : "18312630056", "tf_initial_interval" : null, "trm_rate" : 0, "tf_next_interval" : null, "time_end" : "2025-04-18T07:47:55.691302", "legb_disconnect_reason" : "Bye", "sub_customer_tf_next_interval" : null, "sub_customer_id" : null, "internal_disconnect_code" : 200, "trm_amount_no_vat" : null, "sub_customer_tf_initial_interval" : null, "trunk_destination" : "sip:echotest@46.19.209.12", "sub_customer_trm_rate" : 0, "legb_disconnect_code" : 200, "sub_customer_tf_rate" : 0, "sub_customer_tf_amount" : null, "sub_customer_trm_initial_interval" : null, "tf_amount" : null, "routing_attempt" : 1, "transport_protocol_id" : 1, "is_redirected" : false, "out_pop_id" : 1, "user_agent" : "sems callgen", "trm_connection_fee" : 0, "tf_amount_no_vat" : null, "trm_next_interval" : null, "metered_channels_initial_interval" : 60, "src_number" : "16473635777", "metered_channels_amount" : 0.0121, "trm_amount" : null }, "id" : "f0270ad1-2b52-4001-a5fc-f44bd456f60c" }
4{ "type" : "inbound-cdr", "attributes" : { "sub_customer_tf_connection_fee" : 0, "trm_initial_interval" : null, "sub_customer_trm_duration" : null, "metered_channels_duration" : null, "sub_customer_trm_next_interval" : null, "time_connect" : "2025-04-18T07:47:45.793212", "metered_channels_amount_no_vat" : null, "local_tag" : "21-5A25EFB7-680203A1000A80FF-7B9F96C0", "metered_channels_next_interval" : null, "internal_disconnect_reason" : "Bye", "tf_rate" : 0, "duration" : 11, "metered_channels_connection_fee" : null, "tf_connection_fee" : 0, "is_last_cdr" : true, "sub_customer_tf_duration" : null, "customer_vat" : 21, "success" : true, "metered_channels_rate" : null, "sub_customer_trm_connection_fee" : 0, "dst_number" : "echotest", "disconnect_initiator" : 3, "trm_duration" : null, "tf_duration" : null, "src_name" : "16473635777", "time_start" : "2025-04-18T07:47:45.688656", "sub_customer_trm_amount" : null, "term_call_id" : "21-21-5C69BF48-680203A1000AE3C0-FE2E96C0", "early_media_present" : false, "did_number" : "18312630056", "tf_initial_interval" : null, "trm_rate" : 0, "tf_next_interval" : null, "time_end" : "2025-04-18T07:47:56.234491", "legb_disconnect_reason" : "Bye", "sub_customer_tf_next_interval" : null, "sub_customer_id" : null, "internal_disconnect_code" : 200, "trm_amount_no_vat" : null, "sub_customer_tf_initial_interval" : null, "trunk_destination" : "sip:echotest@46.19.209.12", "sub_customer_trm_rate" : 0, "legb_disconnect_code" : 200, "sub_customer_tf_rate" : 0, "sub_customer_tf_amount" : null, "sub_customer_trm_initial_interval" : null, "tf_amount" : null, "routing_attempt" : 1, "transport_protocol_id" : 1, "is_redirected" : false, "out_pop_id" : 1, "user_agent" : "sems callgen", "trm_connection_fee" : 0, "tf_amount_no_vat" : null, "trm_next_interval" : null, "metered_channels_initial_interval" : null, "src_number" : "16473635777", "metered_channels_amount" : null, "trm_amount" : null }, "id" : "9b19db91-ba19-43b8-b6e2-dba40fb7ed1b" }
5{ "type" : "inbound-cdr", "attributes" : { "sub_customer_tf_connection_fee" : 0, "trm_initial_interval" : null, "sub_customer_trm_duration" : null, "metered_channels_duration" : null, "sub_customer_trm_next_interval" : null, "time_connect" : "2025-04-18T07:47:46.117589", "metered_channels_amount_no_vat" : null, "local_tag" : "22-3B7592C2-680203A200004394-2CBF86C0", "metered_channels_next_interval" : null, "internal_disconnect_reason" : "Bye", "tf_rate" : 0, "duration" : 11, "metered_channels_connection_fee" : null, "tf_connection_fee" : 0, "is_last_cdr" : true, "sub_customer_tf_duration" : null, "customer_vat" : 21, "success" : true, "metered_channels_rate" : null, "sub_customer_trm_connection_fee" : 0, "dst_number" : "echotest", "disconnect_initiator" : 3, "trm_duration" : null, "tf_duration" : null, "src_name" : "16473635777", "time_start" : "2025-04-18T07:47:46.017443", "sub_customer_trm_amount" : null, "term_call_id" : "22-22-1A8BCA30-680203A200009664-AB1EB6C0", "early_media_present" : false, "did_number" : "18312630056", "tf_initial_interval" : null, "trm_rate" : 0, "tf_next_interval" : null, "time_end" : "2025-04-18T07:47:56.429066", "legb_disconnect_reason" : "Bye", "sub_customer_tf_next_interval" : null, "sub_customer_id" : null, "internal_disconnect_code" : 200, "trm_amount_no_vat" : null, "sub_customer_tf_initial_interval" : null, "trunk_destination" : "sip:echotest@46.19.209.12", "sub_customer_trm_rate" : 0, "legb_disconnect_code" : 200, "sub_customer_tf_rate" : 0, "sub_customer_tf_amount" : null, "sub_customer_trm_initial_interval" : null, "tf_amount" : null, "routing_attempt" : 1, "transport_protocol_id" : 1, "is_redirected" : false, "out_pop_id" : 1, "user_agent" : "sems callgen", "trm_connection_fee" : 0, "tf_amount_no_vat" : null, "trm_next_interval" : null, "metered_channels_initial_interval" : null, "src_number" : "16473635777", "metered_channels_amount" : null, "trm_amount" : null }, "id" : "25166fb8-3e2b-4905-bdd0-48152c27a4b5" }

For batch limits and acknowledgements, see Acknowledgement and CDR queue limits. Routing-attempt fields are described above. Do not infer a shared call or failover sequence merely because several records were delivered in the same request.

Error handling#

A 2xx HTTP response acknowledges every CDR in the request. A non-2xx response or timeout leaves the batch queued for retry. Use each CDR’s unique id to avoid processing a repeated delivery twice.

The shared acknowledgement and CDR queue rules define the 3-second retry delay, 10-second HTTP timeout, 10,000-record customer queue limit, and recovery options for both inbound and outbound CDR Streaming. See also Idempotency and duplicate handling.

For related lifecycle notifications, use Inbound call events.