end_call ends the conversation from inside a tool: it hangs up a voice or video call, or ends a text chat. It has no settings, and config may be omitted.

How it behaves

  • It is terminal. Nothing may follow it in its chain, and a tree that puts an operation after one is refused at save. Logging, filing a lead or writing userdata goes above it, while the call is still open.
  • It waits for speech. Before hanging up it waits for the agent’s own speech from before the tool ran and anything the tree queued, such as the goodbye say. That say does not need wait_for_playback. If speech has not finished after 60 seconds, the call ends anyway.
  • The model says nothing afterwards. A run that reaches end_call hands the model no result, whatever the tool collected.

Wording the goodbye

The line before end_call should say what actually happens: the call ends. Never “let me transfer you”, “please hold” or “someone will call you back” unless the tree really does that — the caller hears a promise and then silence. To put the caller through to a person, use transfer. Promise a callback only when an operation above the end_call files it. Do not use end_call to handle a failed operation; let on_error and the agent’s prompt deal with it. See when a tool fails.

How it is recorded

user_initiated means the agent hung up; a caller hanging up is participant_disconnected. See close reasons.

Next

Speech operations

say and generate_reply before the goodbye.

Transfer

Handing the caller to a person instead.