collect
Collect DTMF digit or speech input without playing a prompt. Use this when you
want to listen for input silently or after a prompt has already been played
separately. For collecting input with a prompt, use
playAndCollect().
This method emits calling.call.collect events. See Call Events for payload details.
Parameters
digits
DTMF digit collection settings.
digits.max
Maximum number of digits to collect.
digits.digit_timeout
Seconds to wait between digits before completing.
digits.terminators
Characters that terminate digit collection (e.g., "#").
speech
Speech recognition settings.
speech.end_silence_timeout
Seconds of silence to wait before finalizing speech input.
speech.speech_timeout
Maximum seconds to listen for speech.
speech.language
Speech recognition language code (e.g., "en-US").
speech.hints
Words or phrases to boost recognition accuracy.
initialTimeout
Seconds to wait for the first input before ending with no_input.
partialResults
Enable partial speech recognition results.
continuous
Keep collecting after each result instead of stopping.
sendStartOfInput
Send an event when input is first detected.
startInputTimers
Start input timers immediately. If false, call
action.startInputTimers() to start them manually.
controlId
Custom control ID. Auto-generated if not provided.
onCompleted
Callback invoked when collection completes.
Returns
Promise<StandaloneCollectAction> — An action
handle with stop(), startInputTimers(), and wait() methods.