Logo
Search
API Docs

Call Ending: Phrases, Silence & Max Duration

Inbound Call Handling

Call Ending: Phrases, Silence & Max Duration

Overview

A call can end automatically in several distinct ways, each producing its own ended reason on the call record. This page is the single consolidated reference for how automatic call ending works, pulling together the three built-in end conditions plus the more flexible hook-based approach. For the full mechanics of each underlying piece, see Call Timeouts & Duration, Idle Messages, and Hooks & Call Control.


The Three Built-In Ways a Call Ends Automatically

Every call that ends on its own (rather than a caller or assistant explicitly hanging up) falls into one of these categories:

MechanismEnded ReasonWhat triggers it
End-call phraseassistant-said-end-call-phraseThe assistant says a phrase configured to trigger termination
Silence timeoutsilence-timed-outNo speech is detected for the configured silence timeout duration
Max durationexceeded-max-durationThe call reaches the maxDurationSeconds hard cap

These are all normal, expected call endings, not errors. You can find the ended reason in your call logs or on the call object via the API.


End-Call Phrases

When the assistant says a phrase you've configured to signal the conversation is over, the call ends with assistant-said-end-call-phrase. This is the simplest mechanism — it relies on the assistant's own language, not a timer, so it fires as soon as the model naturally reaches a closing line matching your configuration.


Silence Timeout & Max Duration (Hard Limits)

Two settings act as hard ceilings, independent of anything the assistant says:

  • Silence timeout — ends the call outright, with no warning to the caller, once no speech is detected for the configured duration. This is distinct from idle messages (below), which prompt the user before anything ends.
  • maxDurationSeconds — a hard cap on total call length, configured on the assistant. Once reached, the call ends with exceeded-max-duration regardless of what's happening in the conversation.

Because both of these end the call abruptly, most teams pair them with the escalating hook pattern below so the caller gets a warning first, or use call.timeElapsed hooks to speak a wrap-up message shortly before maxDurationSeconds is reached.


Escalating Idle Messages via the customer.speech.timeout Hook

For more control than the raw silence timeout gives you, use the customer.speech.timeout hook (documented in full on the Idle Messages page). It supports:

OptionTypeRangeDefaultDescription
timeoutSecondsnumber1–1000s7.5How long to wait for customer speech before triggering
triggerMaxCountnumber1–103Maximum times the hook fires per call
triggerResetModestringnever | onUserSpeechneverWhether the trigger count resets when the user speaks

Stacking several of these hooks at increasing intervals lets you escalate from a gentle check-in to actually ending the call, using the say + endCall tool pattern:

{
  "hooks": [
    {
      "on": "customer.speech.timeout",
      "options": { "timeoutSeconds": 10, "triggerMaxCount": 3, "triggerResetMode": "onUserSpeech" },
      "do": [{ "type": "say", "exact": "Are you still there? Please let me know how I can help you." }]
    },
    {
      "on": "customer.speech.timeout",
      "options": { "timeoutSeconds": 20, "triggerMaxCount": 3, "triggerResetMode": "onUserSpeech" },
      "do": [{ "type": "say", "prompt": "The user has not responded in 20s. Based on {{transcript}}, ask if they need help or if not you will be ending the call." }]
    },
    {
      "on": "customer.speech.timeout",
      "options": { "timeoutSeconds": 30, "triggerMaxCount": 3, "triggerResetMode": "onUserSpeech" },
      "do": [
        { "type": "say", "exact": "I'll be ending the call now, please feel free to call back at any time." },
        { "type": "tool", "tool": { "type": "endCall" } }
      ]
    }
  ]
}

Note that idle messages (and this hook) are automatically disabled during tool calls and warm transfers, so they don't interrupt system processes. For the full hook mechanics, action types, and filters, see Hooks & Call Control.


Silence Timeout for AI-Managed Warm Transfers

AI-managed warm transfers have their own, separate silence handling: silenceTimeoutSeconds (default 30 seconds), configured on the Transfer Assistant. This automatically ends the call after a specified period of silence during the transfer itself, preventing an idle transferred call from lingering and running up cost.


Quick Reference

SettingScopeWhat it controls
End-call phraseAssistant speechAssistant's own words trigger call end
silence-timed-outCallNo warning, ends outright after silence
maxDurationSecondsCallHard cap on total call duration
customer.speech.timeout hookIdle messagesEscalating prompts, optionally ending the call
silenceTimeoutSecondsWarm transferEnds transfer after silence

In summary: end-call phrases, silence timeout, and max duration are the three automatic, built-in ways a call ends. The customer.speech.timeout hook gives you a more graduated, controllable version of silence handling, and warm transfers have their own dedicated silence setting. See Call Timeouts & Duration for the full settings reference (including web-call join timeouts), Idle Messages for the complete idle-message configuration guide, and Hooks & Call Control for the general hooks framework these all build on.