Skip to content

What happens during a call ​

The same agent behaves the same way whether the call came from a browser widget, an inbound phone call, or an outbound campaign. Only the first and last few seconds differ.

The five states ​

Every call moves through a subset of these:

A call moves from starting to ringing to active to ended, or fails from starting or ringingstartingringingactiveendedfailed
StateMeaning
startingThe call is being set up. Nothing is connected yet.
ringingThe other end is being rung. Outbound calls sit here until answered.
activeConnected. The agent is in conversation.
endedFinished normally.
failedNever reached conversation — no answer, busy, rejected, setup error.

Alongside the state, every call records its direction (inbound or outbound) and its source (phone or browser).

Before the caller says anything ​

Three things happen in the first moment, and each can stop the call:

  1. The agent is resolved. Widget id, phone number, or campaign assignment identifies which agent takes the call. A Paused agent doesn't take it.
  2. Permission is checked. For the browser widget, the request origin must match the agent's allowed domain. For outbound calls, the contact is checked against the blacklist, do-not-call list and consent status — a blocked contact is never dialed.
  3. Balance is checked. An account with no remaining balance is refused before any audio flows, rather than being cut off mid-sentence.

Only then does the agent connect and speak its greeting.

A turn, step by step ​

Once connected, the call is a loop. Here's one turn:

A turn: caller speaks, silence is detected, audio is transcribed, the model decides, optionally calls a tool, then the reply is spoken sentence by sentence12345Caller speaksvoice activity detection marks the startThey stopa long enough pause ends the turnAudio is transcribedspeech becomes text — the agent never hears audioThe model decidesreply, or call a tool first and then replyThe reply is spokensentence by sentence, while the rest is still being written

Then it repeats. Most calls are between five and forty of these.

When the caller interrupts ​

If the caller starts speaking while the agent is mid-sentence, barge-in fires: the agent stops immediately, discards the rest of what it was going to say, and listens.

Two consequences worth knowing:

  • The unspoken remainder is gone. The agent does not resume where it left off; it responds to what you just said. The transcript records the interrupted turn as truncated, so what you read matches what was actually heard.
  • Short listening noises — "mm-hmm", "okay", "right" — are not meant to interrupt. The agent tries to distinguish these from real interruptions and keep talking. Getting this right in a noisy room is genuinely hard, and it is the main reason a real phone call tells you things the browser Test tab cannot.

How calls end ​

EndingCause
The agent hangs upIt decided the conversation was complete and called the hangup tool
The caller hangs upThey ended it
TransferredThe agent handed the call to a person or another number
Duration limitThe agent's maximum call duration was reached
Balance exhaustedThe account ran out mid-call
FailureNetwork or provider error

Every ended call records a hangup cause so you can tell these apart afterwards.

Agents end calls on their own

A well-prompted agent wraps up when the caller's goal is met — it says a closing line, then hangs up. It should not wait to be dismissed. If yours lingers awkwardly, that's a prompt problem; see Writing the system prompt.

What's recorded ​

Every call produces a conversation record, visible under Conversations:

  • The transcript, turn by turn, showing what the agent actually heard
  • Tool calls made during the call, with their outcome
  • Per-turn timing, so you can see which turn was slow and which stage caused it
  • The audio recording, if recording is enabled
  • How the call ended

This is the first place to look when an agent misbehaves. Nearly every "why did it do that?" question is answered by reading the transcript — usually because the agent heard something different from what was said.

After the call ​

If you've subscribed a webhook, a call.completed event fires once the call reaches a final state. Campaign calls that are about to be retried do not fire it — only the final outcome does. See Webhooks.

Next ​