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.
party_sizeis aGATHERfield. The caller supplies it.COMPLETEreadsparty_sizein 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:
- The channel’s
listeningMode. - The entry agent’s
CONVERSATION.listening.mode. - A derived mode:
backgroundwhen barge-in is allowed, otherwiseturn_taking.
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:- The reply’s own
VOICEblock, or its template. - A
GATHERfieldVOICEblock (FLOW steps only). - The tool reply policy.
- The FLOW step.
- The agent’s
listening.barge_in, orlistening.on_overlapwhenbarge_inis not set. - The channel setting.
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_pausesets the silence for the agent’s turns.wait_briefly,brief,short, andrespond_quicklygive 800 ms.wait_longer,long, andpatientgive 2500 ms. Any other text gives 1500 ms.END_OF_SPEECH_TURN_TYPEsets the silence for one question. It names the expected answer, and the platform picks a timeout.TURN_DETECTIONlets 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: hookruns theon_no_input_exhaustedhook. The hook can holdCALL,SET,HANDOFF, andCRITICAL. It cannot holdRESPOND. Put the last words inexhausted_message.
on_exhausted. An agent, profile, or step value replaces it.
Back-channel, hold, and continuation
on_caller_backchannelignores short acknowledgements while the agent speaks. The platform matches the whole utterance against yourphrases. “Okay” is ignored. “Okay but stop” is a normal turn.on_holdrecognizes “hold on”. After a hold phrase, the silence window becomesgrace_ms(30000 ms by default), up tomax_holdstimes (2 by default). Withsuppress_response: true, the agent stays silent instead of replying.barge_in_continuationmerges phrases the recognizer split from one interruption. It is on by default.window_mstakes 300 to 2000,max_hold_ms500 to 8000,max_merges1 to 20, andmax_chars1 to 20000.
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: falsestep 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.
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.
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.
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”.
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.
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
Setmode: turn_taking when every turn must play in full. Do not set back-channel or continuation in this mode.
accepted is a GATHER field.
Verification
- Run each example through project validation. Fix every error. Read every warning.
- 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.
- Pause for 2 seconds mid-answer. The agent waits when the pause is shorter than your setting. It answers when the pause is longer.
- Stay silent. Count the reprompts. They match
max_retries. After the last one, the call followson_exhausted. - Say “okay” over the agent, then say “hold on”. Check that the agent behaves as you configured.
- Mumble an answer on a channel with
sttMinConfidenceset. Expect a reprompt, not a wrong answer. - Open the session trace. Look for
voice_listening_mode_resolved,voice_no_input_armed,voice_no_input_exhausted,voice_hold_detected, andvoice_stt_below_confidence. Each shows which setting acted and why.
Production readiness checklist
- Every
on_exhausted: hookagent has anon_no_input_exhaustedhook. The hook has noRESPOND. - 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.