Config

Config

The config verb allows developers to change the default speech settings for the current session or to gather speech or DTMF input in the background while other verbs are executing. This background gathering technique is mainly useful for specific scenarios when integrating with certain conversational AI systems.

This verb is non-blocking, meaning the specified settings are changed, and execution immediately continues with the next verb in the application.

{
  "verb": "config",
  "synthesizer": {
    "voice": "Jenny"
  },
  "recognizer": {
    "vendor": "google",
    "language": "de-DE"
  },
  "bargeIn": {
    "enable": true,
    "input" : ["speech"],
    "actionHook": "/userInput"
  }
}

You can use the following attributes with the config command:

Option Description Required
amd Enable answering machine detection; see answering machine detection for details. No
actionHookDelayAction Object, see here for details. No
bargeIn This object contains properties used to instantiate a ‘background’ gather verb. No
bargeIn.enable If true, begin listening for speech or DTMF input while the session is executing other verbs. This is known as a “background gather” and allows an application to capture user input outside of a gather verb. If false, stop any background listening task that is in progress. No
bargeIn.sticky If true and bargeIn.enable is true, then when the background gather completes with speech or DTMF detected, it will automatically start another background gather. No
bargeIn.actionHook A webhook to call if user input is collected from the background gather. No
bargeIn.input Array, specifying allowed types of input: ['digits'], ['speech'], or ['digits', 'speech']. Yes
bargeIn.finishOnKey DTMF key that signals the end of DTMF input. No
bargeIn.numDigits Exact number of DTMF digits expected to gather. No
bargeIn.minDigits Minimum number of DTMF digits expected to gather. Defaults to 1. No
bargeIn.maxDigits Maximum number of DTMF digits expected to gather. No
bargeIn.interDigitTimeout Amount of time to wait between digits after minDigits have been entered. No
boostAudioSignal A string or integer value indicating the number of decibels to boost or reduce the strength of the outgoing audio signal to the caller/called party, e.g., "-6 dB". Note this applies to the main track only, not to any dub tracks. No
fillerNoise Play audio to the caller while the remote application is processing gather transcriptions. This is a session-wide setting that may be overridden at the gather verb level. See Using filler noise for more details. No
fillerNoise.enable Boolean, whether to enable or disable filler noise. Yes
fillerNoise.url HTTP(s) audio to play as filler noise. Yes
fillerNoise.startDelaySecs Integer value specifying number of seconds to wait for a response from the remote application before playing filler noise (default: play immediately after sending results). No
listen A nested listen action, which allows recording of the call from this point forward by streaming the audio to a remote server over a WebSocket connection. No
notifyEvents Boolean, whether to enable event notifications (verb:status messages) over WebSocket connections. Verbs that are sent over the WebSocket must also contain an "id" property to activate this feature. No
onHoldMusic String, provides the URL to a remote music source to use when a call is placed on hold. No
recognizer Change the session-level default speech recognition settings. See the transcribe verb for details on the recognizer property. No
reset String or array, resets either 'recognizer' and/or 'synthesizer' to the default application settings. No
record Options to manage call recording using SIPREC. No
record.action "startCallRecording", "stopCallRecording", "pauseCallRecording", or "resumeCallRecording". Yes
record.siprecServerURL SIP URI for SIPREC server. Required if action is "startCallRecording".
record.recordingID User-supplied string to identify the recording. No
transcribe A nested transcribe action, which allows a transcription of the call to be sent in the background. No
transcribe.enable Boolean, if true start the transcribe; if false stop it. Yes
transcribe.transcriptionHook The webhook/WebSocket identifier to send transcriptions to. Yes if enabling transcription.
transcribe.recognizer recognizer options. No
sipRequestWithinDialogHook Object or string, a webhook to call when a SIP request is received within the dialog (e.g., an INFO, NOTIFY, or REFER). No
synthesizer Change the session-level default text-to-speech settings. See the say verb for details on the synthesizer property. No

Ready To Get Started?