Event reference
These are the events you can subscribe to. The event name arrives in the X-Event-Type header; the body is the payload below (snake_case).
IDs are UUIDs, no prefix. The
ses_xxxx/prd_xxxxstyle you'll see in examples below is a shortened placeholder for readability — don't validate on it. See Check a call for the real shape.
| Event | Fires when |
|---|---|
call.ended |
A call finished (any direction) and its recording is ready (or 60s passed). |
recording.ready |
The recording URL became available. |
tool_call |
An event tool fired during a call. |
These are the only three supported event types. Subscribing to anything else returns a
400.
`call.ended`
Sent once, when a call ends. This is the main event — it carries the outcome, transcript, recording, and which agent ran it.
Timing: call.ended waits up to 60 seconds for the recording URL so it always ships in the same payload. If the recording isn't ready within 60s, call.ended is sent anyway with recording_url: null (it still lands on the dashboard later, and a separate recording.ready fires if you subscribe to it).
{
"event_id": "e1aedeec-ff3c-4ac9-910a-8f5df55c65d3",
"event_type": "call.ended",
"ts": 1788017684,
"session_id": "ffd09731-5543-4be8-80aa-a93c677f5599",
"product_id": "9663e67e-9181-4670-b028-75e3966fa4a7",
"org_id": "8aebb37c-e4bd-45b3-8850-7a7ab3fcc7b7",
"client_request_id": "order-9182",
"direction": "outbound",
"pipeline_mode": "realtime",
"telephony_provider": "custom_sip",
"from": "+918008001234",
"to": "+919876543210",
"forwarded_from": null,
"status": "completed",
"ended_reason": null,
"provider_reason": null,
"duration_sec": 47,
"transfer_duration_sec": 0,
"agent_id": "9c1f0f5e-2a77-4a1e-9a0c-6f2f1c8b77aa",
"recording_url": "https://.../rec/ffd09731.wav",
"transcript": [
{ "role": "assistant", "text": "Hi, calling about your order.", "timestamp": "2025-05-26T10:32:03.1Z" },
{ "role": "user", "text": "Yes?", "timestamp": "2025-05-26T10:32:05.4Z" }
],
"started_at": "2025-05-26T10:32:01Z",
"ended_at": "2025-05-26T10:32:48Z",
"provider_raw": { "stream_id": "…" }
}| Field | What |
|---|---|
event_id |
Unique id for this delivery. Also sent as the X-Event-Id header — use it to dedupe retries. |
event_type |
call.ended. Also sent as the X-Event-Type header. |
ts |
When the event was built, Unix seconds. |
session_id |
The call's id. |
product_id / org_id |
The product and organization the call belonged to. |
direction |
outbound, inbound, or socket. |
pipeline_mode |
Which engine ran the call: realtime, cascading, or direct_call (no AI). |
telephony_provider |
Which carrier ran the call. |
from / to |
Caller ID and the dialed number. |
forwarded_from |
For forwarded inbound calls, the line it came from. Else null. |
status |
See Call status below. |
ended_reason |
See End reasons below. null on a normal completion. |
provider_reason |
The carrier's own wording, when it differs from ended_reason. For debugging only — do not switch on it. |
duration_sec |
How long it lasted. |
transfer_duration_sec |
Seconds spent talking to a human after a transfer. 0 on a normal call. |
agent_id |
The agent that ran it. null for inline agents and for calls with no agent. |
recording_url |
Link to the recording, or null. |
transcript |
The conversation, in order — speech and tool entries. null if there was no conversation. A turn may carry "source": "pre_recorded_greeting" — see below. |
client_request_id |
Your reference from the trigger, if you sent one. |
started_at / ended_at |
Timestamps, RFC 3339 UTC. |
provider_raw |
Carrier metadata. Contents vary by provider and are not part of the stable contract. |
Transcript turns
Each entry has a role (assistant, user, or tool), its text, and a timestamp.
One optional field to know about: when the agent opened the call with a
pre-recorded greeting, that first turn carries
"source": "pre_recorded_greeting".
{
"role": "assistant",
"text": "Thanks for calling Sharma Dental, how can I help?",
"timestamp": "2025-05-26T10:32:01.2Z",
"source": "pre_recorded_greeting"
}source is absent on every other turn, so existing parsers are unaffected — read it only if you want to tell recorded audio from speech the agent generated.
Call status
status |
Meaning |
|---|---|
completed |
The call connected and finished. |
failed |
It never connected, or ended in an error. |
Those are the only two values call.ended carries. A successful call is
completed — check duration_sec and transcript for what actually happened.
End reasons
ended_reason is null for a normal call — the caller or the far end hung
up and nothing cut it short. A value means something ended the call deliberately:
ended_reason |
Meaning |
|---|---|
no_answer |
Nobody picked up. |
busy |
The line was busy. |
rejected |
The far end declined. |
carrier_error |
The carrier could not complete the call. |
timeout |
The carrier timed out. |
max_conversation_time |
The agent's call-length limit was reached. |
caller_silence |
The caller stopped responding. |
unsupported_mode |
The call requested a pipeline mode the agent doesn't support. |
client_closed |
A Voice Socket client closed the connection. |
handed_off / handoff_completed |
The call was transferred to a human. |
handoff_transport_closed |
The human leg's line dropped during a transfer. |
handoff_max_duration |
A transfer hit its maximum length and was hung up. |
bridge_error |
An internal failure ended the call. |
caller_hangup |
On a Direct Call, the carrier side hung up. |
client_hangup |
On a Direct Call, your client hung up. |
peer_gone |
On a Direct Call, the other side disappeared before the two legs could bridge. |
These values are engine-internal outcomes, not carrier wording: a call that goes
unanswered reports no_answer regardless of which carrier carried it. This
table is exhaustive — anything else is a bug, not a value to add a case for.
insufficient_balance is not an ended_reason: it's an API error
code returned when a call is rejected before it starts.
`recording.ready`
Sent when the recording URL becomes available — usually within 10–30s of a call ending.
{
"event_id": "9b6f1a2e-0e3d-4a11-8c2a-1f6e2b6b7b10",
"event_type": "recording.ready",
"ts": 1788017705,
"session_id": "ffd09731-5543-4be8-80aa-a93c677f5599",
"product_id": "9663e67e-9181-4670-b028-75e3966fa4a7",
"org_id": "8aebb37c-e4bd-45b3-8850-7a7ab3fcc7b7",
"recording_url": "https://.../rec/ffd09731.wav",
"duration_sec": 47
}| Field | What |
|---|---|
event_id |
Unique id for this delivery. Also sent as the X-Event-Id header — use it to dedupe retries. |
event_type |
recording.ready. Also sent as the X-Event-Type header. |
ts |
When the event was built, Unix seconds. |
session_id |
The call's id. |
product_id / org_id |
The product and organization the call belonged to. |
recording_url |
Link to the recording. |
duration_sec |
How long the call lasted. |
If you subscribe to
call.ended, you usually don't needrecording.ready—call.endedalready waits for and includesrecording_url. Use this event only if you want the recording as soon as it lands, separately from the call result.
`tool_call`
Sent when an event tool fires mid-call, so your backend can react in real time. (Function tools don't send this — they call your handler URL directly.)
{
"event_id": "3f1c9e2a-6b4d-4e2a-9c1a-7d5e8b9a0c4f",
"event_type": "tool_call",
"ts": 1788017684,
"session_id": "ffd09731-5543-4be8-80aa-a93c677f5599",
"product_id": "9663e67e-9181-4670-b028-75e3966fa4a7",
"org_id": "8aebb37c-e4bd-45b3-8850-7a7ab3fcc7b7",
"tool": {
"name": "log_complaint",
"args": { "reason": "late delivery" }
}
}| Field | What |
|---|---|
event_id |
Unique id for this delivery. Also sent as the X-Event-Id header — use it to dedupe retries. |
event_type |
tool_call. Also sent as the X-Event-Type header. |
ts |
When the event was built, Unix seconds. |
session_id |
The call it happened on. |
product_id / org_id |
The product and organization the call belonged to. |
tool.name |
Which event tool fired. |
tool.args |
The arguments the agent supplied. |
You can limit
tool_calldeliveries to specific tool names in your dashboard. By default you get all of them.
Tips
- Switch on
X-Event-Type, not on the body shape. call.endedis the one to start with — it's everything you need for outbound and inbound results.- The transcript and tool args are stored and sent here — don't put secrets in tool results you don't want persisted.
Next
- Overview & signing — verify every delivery
- Manage endpoints — subscribe to these events
