How call events and CDR streaming work#
Call Events describe a call while it progresses. CDR Streaming describes the result after a call or routing attempt ends. Both send data to your application over HTTP.
Inbound and outbound directions#
Inbound means a call to one of your DIDWW DID numbers, which DIDWW delivers to the configured inbound trunk. Outbound means a call that your equipment or application sends through a DIDWW outbound trunk to a telephone destination.
A single conversation can involve both directions. For example, an inbound call answered by an application can be transferred through an outbound trunk to a telephone number. That outgoing leg can produce outbound events and an outbound CDR separately from the inbound leg. Enable each feed that you need to observe. Enabling inbound streaming does not enable outbound streaming.
PSTN forwarding configured on an inbound trunk is described by the inbound
CDR’s forwarding fields. Do not classify a record from the word “transfer”
alone: use its type, trunk and payload reference.
Follow the call lifecycle#
Stage |
What it means |
Notification |
|---|---|---|
Start |
DIDWW has completed routing and sends a SIP INVITE to attempt the destination connection. |
A start event. It does not establish that the call was answered. |
Connect |
The destination has answered with a successful SIP response (200 OK). |
A connect event. Calls that do not connect skip this stage. |
End |
The call has ended, with or without a connection. |
A call end event. CDR Streaming separately reports completed calls or routing attempts. |
An answered call follows start → connect → end. An attempt that is rejected, cancelled or unanswered can follow start → end, with no connect event. The trigger definitions above determine when each notification is generated. A failed attempt can still produce a CDR.
For unconnected call end events and outbound CDRs, time_connect is
null and duration is zero. This establishes that no connection was
recorded. It does not by itself establish whether the destination rang
or was reached. Use the disconnect code and reason to understand the
outcome. For inbound CDR field availability, use its payload reference.
Use time_connect and connected duration to check whether an answer was
recorded. Inspect the CDR’s success and disconnect fields together to
understand the reported outcome. Their direction-specific definitions are
in the applicable payload reference.
Calls, routing attempts and records#
An inbound call can try more than one destination, for example when a trunk
group fails over. Its inbound CDRs distinguish the attempts with
routing_attempt and identify the final attempt with is_last_cdr.
Count these as routing-attempt records when analyzing delivery, rather than
assuming that every record represents a different incoming call.
The lifecycle events describe call progress. They are not a replacement for the CDR’s attempt outcome or billing attributes. For record-level detail, see Inbound CDR streaming and Outbound CDR streaming.
Use the right identifier#
Identifier |
Purpose |
|---|---|
Call Events |
Correlates the start, connect and end events of a call. It is shared, so the identifier alone is not a unique lifecycle-event key. |
Call Events |
SIP Call-ID for the customer-facing call leg. For inbound events it is absent at start, before the connected leg is known. |
CDR |
Identifies one completed CDR. Use it to suppress repeated delivery of that record. Different routing attempts have different CDR identifiers. |
Inbound CDR |
Identify the internal inbound call record and its destination SIP leg. Use the SIP Call-ID, timestamps, numbers and trunk when investigating routing attempts. |
Outbound CDR |
Identifies the SIP leg between your equipment and DIDWW and helps correlate it with call logs. It is distinct from the CDR UUID. |
Do not assume that identifiers for different legs or feeds are interchangeable. When matching a callback to a call log, also compare direction, timestamps, numbers and trunk. Keep the original payload so that the identifiers and outcome can be checked together.
Event time and arrival time#
time_start, time_connect and time_end describe the call. Your
receiver’s arrival time describes HTTP delivery. They can differ because of
record generation, batching, network delay or retries. Store both if your
application measures delivery delay.
All call timestamps are UTC, even when the value has no offset. Parse the format returned by each feed and normalize it for comparisons. Do not treat an inbound CDR timestamp without a suffix as the receiver’s local time.
Delivery and processing outcomes#
Call Events arrive as individual JSON objects. CDR Streaming can put several newline-separated JSON objects in one request. A batch groups records for delivery. It does not imply that they belong to the same conversation.
The receiver’s HTTP response acknowledges data delivery. A 2xx response does
not mean that the call connected. Conversely, a CDR with success: false
can be a valid record that your receiver accepts successfully.
For CDR Streaming, a successful HTTP response acknowledges the entire batch. Accept or persist every record before acknowledging it, then perform slower business processing separately. Design processing to tolerate repeated delivery. Exact acknowledgement, timeout, batching and queue rules are in the Configuration and delivery reference.
Historical lookup and recovery#
Use Call logs for individual call investigations and Exports for historical reporting. The Exports API can automate creation and retrieval of call-log export files. It is separate from callback delivery and uses the authentication for your selected API version.
Streaming is a delivery feed, not a historical archive. After an interruption, reconcile your stored CDRs with call logs or exports within their retention period. Historical exports provide reporting records. They do not replay the original start, connect and end callbacks.