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:
| State | Meaning |
|---|---|
starting | The call is being set up. Nothing is connected yet. |
ringing | The other end is being rung. Outbound calls sit here until answered. |
active | Connected. The agent is in conversation. |
ended | Finished normally. |
failed | Never 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:
- The agent is resolved. Widget id, phone number, or campaign assignment identifies which agent takes the call. A
Pausedagent doesn't take it. - 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.
- 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:
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
| Ending | Cause |
|---|---|
| The agent hangs up | It decided the conversation was complete and called the hangup tool |
| The caller hangs up | They ended it |
| Transferred | The agent handed the call to a person or another number |
| Duration limit | The agent's maximum call duration was reached |
| Balance exhausted | The account ran out mid-call |
| Failure | Network 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
- Quickstart — build an agent and hear this happen
- Testing your agent — how to check behaviour before real callers do