Skip to content

Stream events

Stream events fire when a media stream is created and when it ends. They are useful for billing, observability, and triggering downstream processing once audio is fully delivered.

Wire shape depends on your webhook version. Each payload has a toggle: pick your version once and the whole page switches.

Fires when Teler successfully opens the WebSocket to your ws_url and delivers the start message.

{
"id": "evt_...",
"type": "stream.initiated",
"api_version": "2026-06-01",
"occurred_at": "2026-06-01T11:30:50.100Z",
"account_id": "acc_...",
"voice_app_id": "va_...",
"sip_trunk_id": null,
"call_id": "cs_...",
"leg_id": "cl_...",
"data": {
"call_id": "cs_...",
"stream_id": "ms_...",
"started_at": "2026-06-01T11:30:50.100Z",
"ws_url": "wss://your-app.example.com/stream"
},
"previous_attributes": null
}

Fires when the WebSocket closes, whether the call ended cleanly or the connection dropped. The underlying call may continue if the WebSocket closes prematurely.

{
"id": "evt_...",
"type": "stream.completed",
"api_version": "2026-06-01",
"occurred_at": "2026-06-01T11:32:18.501Z",
"account_id": "acc_...",
"voice_app_id": "va_...",
"sip_trunk_id": null,
"call_id": "cs_...",
"leg_id": "cl_...",
"data": {
"call_id": "cs_...",
"stream_id": "ms_...",
"ended_at": "2026-06-01T11:32:18.501Z",
"duration_seconds": 88,
"reason": "normal"
},
"previous_attributes": null
}