call_connected

View as Markdown

Direction: Dial → your server. Sent once per connection, immediately after the socket opens, before any transcript or response request — so you receive it again if the connection drops and reconnects. Use it to set up (or restore) per‑call state, keyed by call_id.

Schema

FieldTypeDescription
typestringAlways "call_connected".
call_idstringDial’s call identifier — the same value as in the connection path. Stable across reconnects. The only call id you receive.
directionstring"inbound" if someone called your Dial number; "outbound" if the call originated from your account.
fromstringCalling phone number, E.164.
tostringCalled phone number, E.164.
instructionstring | nullThe instruction Dial ran the call with — your outbound/inbound instruction plus Dial’s general context (current time, the voice’s gender). Use it as your model’s system prompt. null if none was set.
languagestring | nullThe call’s primary language, BCP‑47 (e.g. en-US, he-IL). null if unset.

Example

1{
2 "type": "call_connected",
3 "call_id": "call_01HW3X7P5QF6K2YQ9YJ7Q8R5N3",
4 "direction": "inbound",
5 "from": "+14155550123",
6 "to": "+14155559876",
7 "instruction": "General context:\n- Current time: Tuesday, June 9, 2026 at 14:43 (Asia/Jerusalem)\n- Speak as a female\n\nAnswer billing questions for Acme Corp.",
8 "language": "en-US"
9}