Skip to content
TriedDocs
Conversation flow

End node

Say a final line and hang up when the flow reaches this node, with optional SIP headers on the BYE.

The End node (type: "end", node list label Ending) finishes the call. When the flow reaches it, the agent speaks the node's instruction and hangs up. End nodes have no outgoing transitions.

Configure#

  1. Add an Ending node.
  2. Write the Instruction. New nodes start with the prompt "Thank the user and say goodbye." Switch to Static Sentence for exact wording, for example a legal closing line.
  3. Connect transitions from other nodes into it.

How it runs#

  1. If custom_sip_headers is set, the headers are prepared for the SIP BYE.
  2. The instruction is spoken: a static sentence verbatim, or a line the LLM writes from the prompt. If the instruction is empty, nothing is said.
  3. The worker waits for the speech to finish.
  4. The call ends with disconnection_reason: "agent_hangup".

Fields#

Field Type Description
type "end"
instruction {type, text} Optional final line
custom_sip_headers object of string to string API only. Headers on the SIP BYE; values render {{variables}}
{
  "id": "node_end",
  "type": "end",
  "name": "Goodbye",
  "instruction": { "type": "static_text", "text": "Thanks for calling Bondi Dental, {{first_name}}. See you on {{booking_day}}." },
  "custom_sip_headers": { "X-Call-Outcome": "booked" }
}

BYE headers reach the trunk only for names in the API's BYE_HEADER_NAMES list (default X-Disposition, X-Call-Outcome, X-Transfer-Reason, X-Tried-Call-Id). See End call.

In tests#

In Test LLM, reaching an end node shows "The flow reached an end node" with the node id.

Gotchas#

  • An end node does not add an automatic goodbye. If the instruction is empty, the call ends without a closing line.
  • Several end nodes are fine. Use different ones for different outcomes and set X-Call-Outcome or post-call analysis accordingly.
  • In flex mode, end nodes become an end_call function and the LLM decides when to use it.