AccountEndedCalls
Fires when a call finishes, for the whole account. This is the event to write to a call log or a CRM: it is the record of what actually happened, including every leg the call passed through.
Compare UserEndedCalls, which is the same event scoped
to one user's perspective and without the leg breakdown.
Payload
The call's summary fields, plus a cdrs array — one entry per leg.
{
"callId": "1754489201.884213",
"direction": "inbound",
"status": "answered",
"callerType": "external",
"callerName": "ACME ROOFING",
"callerNumber": "13475550123",
"calledType": "user",
"calledName": "Dana Spencer",
"calledNumber": "204",
"dialledNumber": "12125550188",
"startTime": "2026-08-11T13:20:01Z",
"callDuration": 238,
"talkDuration": 220,
"agentOnCall": false,
"webhookType": "AccountEndedCalls",
"externalCallerId": "12125550188",
"externalCallerName": "Acme Inc",
"recordingUrl": "https://api.account.telebroad.com/recordings/play/9f2c…",
"cdrs": [
{
"uniqueId": "1754489201.884213",
"callId": "1754489201.884213",
"status": "answered",
"startTime": "2026-08-11T13:20:01Z",
"endTime": "2026-08-11T13:21:37Z",
"callDuration": 96,
"talkDuration": 81,
"callerType": "external",
"callerNumber": "13475550123",
"callerName": "ACME ROOFING",
"calledType": "user",
"calledNumber": "204",
"recordingUrl": "https://api.account.telebroad.com/recordings/play/9f2c…"
}
]
}
Call fields
| Field | Type | Description |
|---|---|---|
callId | string | The call id — matches call history, reports and the recordings endpoint. |
direction | string | inbound or outbound. |
status | string | How the call ended — answered, missed, and so on. |
callerType / callerName / callerNumber | string | The calling party. |
calledType / calledName / calledNumber | string | The called party. |
dialledNumber | string | What was actually dialled — for an inbound call, your DID. |
startTime | string | RFC 3339 UTC. |
callDuration | integer | Seconds, including ringing. |
talkDuration | integer | Seconds connected. Closer to the length of any recording. |
agentOnCall | boolean | Whether an agent was on the call. |
externalCallerId / externalCallerName | string | The external caller ID presented. |
recordingUrl | string | Signed playback link. Absent when nothing was recorded. |
webhookType | string | Always AccountEndedCalls. |
cdrs | array | One entry per leg — see below. Absent when there is nothing to break down. |
cdrs[] — one entry per leg
| Field | Type | Description |
|---|---|---|
uniqueId | string | The leg identifier. Matches uniqueId from the recordings endpoint. |
callId | string | The switch's call id for this leg — can differ from the top-level one. |
status | string | How this leg ended. |
startTime / endTime | string | RFC 3339 UTC. endTime is absent on a leg that did not complete normally. |
callDuration / talkDuration | integer | Seconds, per leg. |
callerType / callerNumber / callerName | string | This leg's calling party. |
calledType / calledNumber | string | This leg's called party. |
callerIdInternal / externalCallerId | string | Present when set. |
callerNameInternal / externalCallerName | string | Present when set. |
bridgedFromCallId | string | The call this leg was bridged from — this is how you follow a transfer. |
recordingUrl | string | Signed playback link for this leg. Absent if the leg was not recorded. |
Why cdrs matters
A call that rang a queue, was answered and was transferred is one callId and
several legs. The top-level fields describe the call; cdrs describes what
happened inside it.
- Who really handled it — the last leg with talk time, not the first.
- How long the caller waited — the gap between the call's
startTimeand the answered leg's. - Following a transfer — chain on
bridgedFromCallId. - Which audio to play — each leg carries its own
recordingUrl; there is usually no single "the recording".
Gotchas
recordingUrlis absent, not empty, when nothing was recorded.- A recording URL needs no credential and never expires. Treat it as a secret — see Recordings.
- This fires for internal extension-to-extension calls too. Filter on
directionandcallerTypeif you only want external traffic. recordingUrlcan be present before the audio is fetchable. It is written after hangup — retry with backoff rather than treating an immediate miss as "no recording".