Skip to main content

ai.params

Parameters for AI that can be passed in ai.params at the top level of the ai Method.

Parameters

NameTypeRequired?DefaultDescription
acknowledge_interruptionsboolean or stringOptionalInstructs the agent to acknowledge crosstalk and confirm user input when the user speaks over the agent.
ai_volumeintegerOptional0 (the natural volume of the AI)Adjust the volume of the AI. Allowed values from -50-50.
attention_timeoutintegerOptional10000 ms (10 seconds)Amount of time, in ms, to wait before prompting the user to respond. Allowed values from 10,000-600,000. Set to 0 to disable.
background_filestringOptional600000 ms (10 minutes)URL of audio file to play in the background while AI plays in foreground.
background_file_loopsintegerOptionalundefined (loops indefinitely)Maximum number of times to loop playing the background file.
background_file_volumestringOptionalDefines background_file volume within a range of -50 to +50.
barge_match_stringstringOptionalTakes a string, including a regular expression, defining barge behavior. For example, this param can direct the AI to stop when the word "hippopotomus" is input.
barge_min_wordsstringOptionalDefines the number of words that must be input before triggering barge behavior, in a range of 1-99.
consciencestringOptionalSets the prompt which binds the agent to its purpose.
conversation_idstringOptionalUsed by check_for_input and save_conversation to identify an individual conversation.
debug_webhook_levelbooleanOptionalEnables debugging to the set URL. If a URL is set, this param defaults to 1.
debug_webhook_urlstringOptionalEach interaction between the AI and end user is posted in real time to the established URL.
directionstringOptionalthe natural direction of the callForces the direction of the call to the assistant. Valid values are inbound and outbound.
digit_terminatorsstringOptionalDTMF digit, as a string, to signal the end of input (ex: "#")
digit_timeoutintegerOptional3000 msTime, in ms, at the end of digit input to detect end of input. Allowed values from 250-10,000.
end_of_speech_timeoutintegerOptional2000 ms (2 seconds)Amount of silence, in ms, at the end of an utterance to detect end of speech. Allowed values from 250-10,000.
energy_levelnumberOptional52Amount of energy necessary for bot to hear you (in dB). Allowed values from 0.0-100.0.
hold_musicstringOptionalA URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream.
hold_on_processbooleanOptionalEnables hold music during SWAIG processing.
inactivity_timeoutintegerOptional600000 ms (10 minutes)Amount of time, in ms, to wait before exiting the app due to inactivity. Allowed values from 10,000-3,600,000.
input_poll_freqstringOptionalCheck for input function with check_for_input. Example use case: Feeding an inbound SMS to AI on a voice call, eg., for collecting an email address or other complex information.
interrupt_on_noisebooleanOptionalWhen enabled, barges agent upon any sound interruption longer than 1 second.
interrupt_promptstringOptionalProvide a prompt for the agent to handle crosstalk.
languages_enabledbooleanOptionalAllows multilingualism when true.
local_tzstringOptionalGMTThe local timezone setting for the AI. Value should use IANA TZ ID
outbound_attention_timeoutstringOptionalSets a time duration for the outbound call recipient to respond to the AI agent before timeout, in a range from 10000 to 600000.
save_conversationbooleanOptionalfalseSend a summary of the conversation after the call ends. This requires a post_url to be set in the ai parameters and the conversation_id defined below. This eliminates the need for a post_prompt in the ai parameters.
swaig_allow_settingsbooleanOptionalAllows tweaking any of the indicated settings, such as barge_match_string, using the returned SWML from the SWAIG function.
swaig_allow_swmlbooleanOptionalAllows your SWAIG to return SWML to be executed.
swaig_post_conversationbooleanOptionalPost entire conversation to any SWAIG call.
transfer_summarybooleanOptionalPass a summary of a conversation from one AI agent to another. For example, transfer a call summary between support agents in two departments.
verbose_logsbooleanOptionalEnable verbose logging.
wait_for_userbooleanOptionalfalseWhen false, AI agent will initialize dialogue after call is setup. When true, agent will wait for the user to speak first.