Skip to main content
Back to how-to guides Use this pattern when callers interrupt the agent, pause mid-answer, go silent, or speak unclearly on a voice call.

Concept

A phone call has no screen and no send button. The platform must decide when the caller has finished, whether to stop talking when the caller starts, and what to do with silence or noise. Each decision has its own setting. These settings apply to KoreVG pipeline voice: speech-to-text, then the agent, then text-to-speech. On realtime speech-to-speech calls, the model provider owns most turn decisions. See Realtime voice.

Minimal working example

Table_Booking lets callers interrupt, waits a short time after each pause, and ends the call after two unanswered reprompts.
Variable sources:
  • party_size is a GATHER field. The caller supplies it.
  • COMPLETE reads party_size in its condition and its reply.

How it works

Listening mode

The listening mode is fixed for the whole call. Barge-in and streaming are decided for each spoken output inside that mode. The mode resolves in this order:
  1. The channel’s listeningMode.
  2. The entry agent’s CONVERSATION.listening.mode.
  3. A derived mode: background when barge-in is allowed, otherwise turn_taking.
A handoff, step, reply, or tool cannot change the mode. A LISTENING key in a VOICE block is a compile error. Back-channel phrases and barge-in continuation work only in background mode.

Barge-in

Barge-in decides whether the agent stops when the caller speaks. The narrowest setting wins:
  1. The reply’s own VOICE block, or its template.
  2. A GATHER field VOICE block (FLOW steps only).
  3. The tool reply policy.
  4. The FLOW step.
  5. The agent’s listening.barge_in, or listening.on_overlap when barge_in is not set.
  6. The channel setting.
An explicit allow beats a wider disallow. Use disallow for a disclosure or a one-time code the caller must hear in full. Older spellings such as enabled, off, and deny still work in barge_in. They compile with a warning. A value the platform does not know is ignored, and the call takes the channel default.

Pauses

The platform ends the caller’s turn after a silence. Three settings control how long.
  • on_pause sets the silence for the agent’s turns. wait_briefly, brief, short, and respond_quickly give 800 ms. wait_longer, long, and patient give 2500 ms. Any other text gives 1500 ms.
  • END_OF_SPEECH_TURN_TYPE sets the silence for one question. It names the expected answer, and the platform picks a timeout.
  • TURN_DETECTION lets the voice gateway decide when the caller has finished. It replaces the silence timer.
END_OF_SPEECH_TIMEOUT_MS sets an exact value from 100 to 5000 ms. A value outside that range is ignored. TURN_DETECTION takes enabled and an optional eou_threshold from 0.3 to 0.9 in steps of 0.1. The default is 0.5. A higher value waits longer. Use 0.8 for long digit strings and 0.9 for spelling. While turn detection is on, the gateway ignores end-of-speech timeouts, so the compiler warns when one block sets both.

Silence

on_no_input handles a caller who says nothing.
  • Recognized speech or accepted keypad input resets the retry count.
  • Input the platform accepted but has not run is not silence. The window waits.
  • After the window ends, the platform waits one more second for late speech before it reprompts.
  • A FLOW step can override the policy with VOICE: ON_NO_INPUT:. Step message N plays after agent message N as one utterance.
  • on_exhausted: hook runs the on_no_input_exhausted hook. The hook can hold CALL, SET, HANDOFF, and CRITICAL. It cannot hold RESPOND. Put the last words in exhausted_message.
A project default sets what happens when retries run out for every agent that sets no on_exhausted. An agent, profile, or step value replaces it.

Back-channel, hold, and continuation

  • on_caller_backchannel ignores short acknowledgements while the agent speaks. The platform matches the whole utterance against your phrases. “Okay” is ignored. “Okay but stop” is a normal turn.
  • on_hold recognizes “hold on”. After a hold phrase, the silence window becomes grace_ms (30000 ms by default), up to max_holds times (2 by default). With suppress_response: true, the agent stays silent instead of replying.
  • barge_in_continuation merges phrases the recognizer split from one interruption. It is on by default. window_ms takes 300 to 2000, max_hold_ms 500 to 8000, max_merges 1 to 20, and max_chars 1 to 20000.
The platform ships no default phrases. A block with enabled: true and no phrases does nothing, and the compiler warns. A phrase in both lists is a compile error. A phone network hold is a different event. When the network signals a hold, the agent stays silent and stops listening. The project callerHold setting limits it. See Define fallback behavior for voice failures.

Unclear audio

Four layers handle audio the platform cannot use.
  • A result at the threshold passes. Keypad input is never gated. A provider that reports no confidence is never gated.
  • The guidance values are free text. The platform turns underscores into spaces and adds them to the prompt, for example “If audio is unclear, ask to repeat or confirm.” The compiler does not check them.
  • Guidance lines shape what a reasoning agent says. A REASONING: false step speaks its authored prompt.

Realtime voice

Test every realtime setting on your provider. Support differs by provider.

Common variations

Protect a disclosure and a one-time code

Account_Verifier blocks interruption on the recording notice and on the code prompt. Everything else stays interruptible. verify_account is a project-local tool. Replace it with your own verification tool.
Variable sources: account_number and otp_code come from GATHER fields. verify_result is the tool output.

Give slow speakers more time

Claim_Intake waits longer on every pause. The first question also expects a long explanation. open_claim is a project-local tool.
Variable sources: description and policy_number come from GATHER fields. claim is the tool output.

Reprompt, then hand off a silent caller

Card_Support reprompts twice. A step gives a longer wait while the caller finds the card. When retries run out, the hook records the silence and hands off. record_silence is a project-local tool. Transfer_Desk is a separate agent that you define.
Variable sources: last4 comes from a GATHER field. transfer_reason is a session value set by the hook. The target agent can be as small as this:

Ignore acknowledgements and honor “hold on”

Loan_Terms_Agent ignores “uh-huh” and stays silent after “hold on”.
Add phrases_by_locale under on_hold to match hold phrases by the caller’s language. The phrases join the base list.

Recover from unclear audio

Dig_Site_Locator limits recognition to three county names for one question. It also tells the model how to handle mishearing. create_ticket is a project-local tool.
Variable sources: county and street come from GATHER fields. ticket_result is the tool output. ASR: works in FLOW steps only. The field must be the only field in its step. A setting the platform cannot apply falls back to the call’s normal settings.

Never let the caller interrupt a turn

Set mode: turn_taking when every turn must play in full. Do not set back-channel or continuation in this mode.
Variable source: accepted is a GATHER field.

Verification

  1. Run each example through project validation. Fix every error. Read every warning.
  2. Place a test call. Speak over the first prompt. The agent stops when barge-in is allowed. It finishes the prompt when barge-in is blocked.
  3. Pause for 2 seconds mid-answer. The agent waits when the pause is shorter than your setting. It answers when the pause is longer.
  4. Stay silent. Count the reprompts. They match max_retries. After the last one, the call follows on_exhausted.
  5. Say “okay” over the agent, then say “hold on”. Check that the agent behaves as you configured.
  6. Mumble an answer on a channel with sttMinConfidence set. Expect a reprompt, not a wrong answer.
  7. Open the session trace. Look for voice_listening_mode_resolved, voice_no_input_armed, voice_no_input_exhausted, voice_hold_detected, and voice_stt_below_confidence. Each shows which setting acted and why.

Production readiness checklist

  • Every on_exhausted: hook agent has an on_no_input_exhausted hook. The hook has no RESPOND.
  • Every handoff target named in a hook or in a project silence default exists. The current agent declares a route to it.
  • Back-channel and hold phrases are authored. The two lists do not overlap.
  • Disclosures and one-time codes use BARGE_IN: disallow.
  • Each runtime that serves the agent supports the voice listening features it uses. An older runtime refuses to publish the agent.
  • You tested a silent call, a mumbled answer, a slow speaker, and an interruption on the channel you ship.
  • The trace shows the expected silence and hold events for each test.

Common mistakes

Troubleshooting