Skip to content
Call controlhangupstable

End call

Politely ends the call and cleans up any in-progress audio, recordings, or ringing legs. Use this whenever a flow has reached its natural end.

What it does

Ends the call cleanly when a flow has reached its natural conclusion. The worker tears down the parent leg AND every bridge leg currently associated with the call, so a hangup mid-dial cancels still-ringing extensions, a hangup mid-bridge drops the agent at the same time as the caller, and a hangup mid-recording closes the recording out before the leg goes away.

Hangup is a terminal node — once it runs, the flow run is marked completed, a final flow.end telemetry row is written, and any configured onCallEnd triggers fire. Outgoing edges on hangup are ignored: there's nothing left to advance to. If the caller hangs up first, the same teardown happens automatically via the call.hangup event — you only need this node when the flow is the one deciding to end the call.

When to use it

  • After voicemail save/discard to release the line ("Thanks, goodbye.")
  • At the end of an after-hours branch that reads a closed-message and drops the call
  • As the target of a call.hangup edge to make the flow's terminal state explicit in the editor (the flow ends either way; this just makes it visible)
  • As the success path of a self-service flow that's done its job (e.g. paid a bill, confirmed an appointment) and doesn't need a human

Configuration

The node has no configuration fields — it just ends the call.

Politely ends the call and cleans up any in-progress audio, recordings, or ringing legs. Use this whenever a flow has reached its natural end.

This node has no configurable fields.

Examples

End-of-flow goodbye

Read a closing prompt and hang up when it finishes.

{
  "id": "goodbye",
  "type": "say",
  "config": {
    "prompt": { "kind": "text", "text": "Thanks for calling. Goodbye." }
  },
  "on": { "call.speak.ended": "end-call", "call.hangup": "end" }
}
{
  "id": "end-call",
  "type": "hangup",
  "config": {},
  "on": {}
}

Gotchas

  • Bridge legs go down with the parent. If the caller is bridged to an agent extension and the flow runs hangup, both sides drop together. This is the right behavior for ending the call but surprising if you meant to drop only the caller — there's no "hang up just one leg" node.
  • It's terminal — no outgoing edges fire. Wiring an edge out of hangup does nothing; the flow run completes the moment the node runs. If you need post-hangup work (CRM updates, SMS confirmations) put it before the hangup or use an onCallEnd trigger chain.
  • Pending playback / recording is interrupted. A speak or record command in flight when hangup runs is cut short — Telnyx fires call.playback.ended / call.recording.saved on the way out, but the flow has already moved to completed so those events don't route anywhere. Voicemails-in-progress are committed via the hangup-fallback path (see confirmVoicemail for details).
  • Caller-initiated hangup runs the same teardown. You don't need hangup on the call.hangup edge unless you want to make the terminal state visible — the flow ends either way. Some teams prefer the explicit node for clarity in the editor.