Skip to main content
The [END_CALL] tag tells the engine to end the call after the agent has finished speaking. The agent says its goodbye line first, then the call is terminated cleanly.

Syntax

[END_CALL]
No parameters. Place it anywhere in the agent’s reply.

Example

Caller: “Great, thanks for the help.” Agent: “You’re welcome. Have a lovely day. [END_CALL]”
The caller hears the goodbye. Then the engine ends the call cleanly.

When to use it

Tell the agent in the system prompt when it should end calls:
ACTIONS
- End the call when the booking is complete and confirmed: [END_CALL]
- End the call when the caller says goodbye or signals they're done: [END_CALL]
- End the call if the caller is being abusive after one warning: [END_CALL]

How call ending works

Nixflex uses three layers to make sure every call ends cleanly on the caller’s phone. Closing our own audio stream is not enough — we must explicitly tell the telephony provider to terminate the call.
  1. Trigger — something decides the call should end ([END_CALL] tag, silence timeout, max duration reached, etc.).
  2. Direct telephony hangup — we call the telephony API to terminate the call leg. The phone disconnects within ~1 second.
  3. Post-stream safety net — when our stream closes, the telephony provider asks our engine what to do next. We return a hangup instruction so even if step 2 fails, the call still ends.
All three layers run in parallel. The caller’s phone disconnects, the recording saves, post-call analysis runs, and the webhook fires.

Other ways calls end

[END_CALL] is the graceful option. Calls also end automatically when one of these conditions is met. The exact value is stored on the call record as ended_reason.
ended_reasonWhat happened
completedThe agent emitted [END_CALL]. Goodbye spoken, call ended.
caller_hangupThe caller pressed end on their phone.
silence_timeoutThe caller stayed silent past silence_hangup_seconds (default 10s, range 5–45s).
max_duration_reachedThe call exceeded max_call_duration_seconds (default 300s, range 60s–1800s).
transferredThe caller was transferred to a human via [TRANSFER:].
voicemail_detectedAn outbound call hit voicemail. The engine hangs up immediately.
balance_insufficientThe developer ran out of credit. Caller hears an apology, call ends.
Use ended_reason to filter analytics and identify problem calls.

Configuration

The two silence/duration thresholds are agent-level fields:
FieldDefaultRangeNotes
silence_hangup_seconds105–45How long the agent waits in silence before ending the call.
max_call_duration_seconds30060–1800Hard cap on call length, whether or not anyone is talking.
Set them when creating an agent or update them later. See Create agent.
If you want the agent to confirm the booking back to the caller before ending, write that into the prompt. The agent will speak the confirmation, then emit [END_CALL].