Skip to navigation
Callingai

params

View as MarkdownOpen in Claude

Parameters for AI that can be passed in ai.params at the top level of the ai method. These parameters control the fundamental behavior and capabilities of the AI agent, including model selection, conversation management, and advanced features like thinking and vision. Timing parameters take a number or a duration string such as "1.5s" or "20m"; see Duration values.

Properties

ai.params
object

An object that accepts the following properties.

params.ai_model
stringDefaults to gpt-4o-mini

The AI model for the conversation, used when prompt.model isn’t set. Name a model on the supported model list, optionally as model@provider. Any other name runs as gpt-4o-mini, and the call gets a non-fatal calling.error whose error is model_substituted.

params.ai_name
stringDefaults to computer

Sets the name the AI agent responds to for wake/activation purposes. When using enable_pause, start_paused, or speak_when_spoken_to, the user must say this name to get the agent’s attention. The name matching is case-insensitive.

params.app_name
stringDefaults to swml app

A custom identifier for the AI application instance. This name is included in webhook payloads (post_prompt_url, SWAIG function calls), allowing backend systems to identify which AI configuration made the request.

params.conscience
string

Sets the prompt which binds the agent to its purpose. This prompt helps reinforce the AI’s behavior after SWAIG function calls.

It is used to reinforce the AI agent’s behavior and guardrails throughout the conversation.

params.convo
object[]

Injects pre-existing conversation history into the AI session at startup. This allows you to seed the AI agent with context from a previous conversation or provide example interactions.

convo[].role
stringRequired

The role of the message sender. Valid values:

  • user - A message from the human caller/user interacting with the AI agent.
  • assistant - A message from the AI agent itself.
  • system - A system message providing instructions or context to guide the AI’s behavior.
convo[].content
stringRequired

The text content of the message. With redact_prompt set, user entries are exported as ---- in the call logs.

convo[].lang
stringDefaults to en

The language code for the message. Uses standard ISO language codes such as en, en-US, es, fr, de, etc.

params.conversation_id
string

Used by check_for_input and save_conversation to identify an individual conversation.

params.conversation_sliding_window
integer

Sets the size of the sliding window for conversation history. This limits how much conversation history is sent to the AI model. The current step’s instructions and the current gather question are never dropped from the window.

params.direction
stringDefaults to the natural direction of the call

Forces the direction of the call to the assistant. Valid values are inbound and outbound.

params.double_turns
booleanDefaults to false

Before each reply, a smaller planning model reviews the conversation and the available functions, then gives the agent a short directive on how to respond. This can improve function use and coherence. The reply waits for the plan, which adds latency to every turn. The planning model is double_turn_model if set, otherwise utility_model if set, otherwise ai_model. Billed separately from the agent’s per-minute rate. To cover the wait, set double_turn_fillers on each entry in languages.

params.double_turn_model
string

The model that plans each reply when double_turns is enabled. It takes priority over utility_model for planning, so you can plan with one model and run background tasks with another. If the model isn’t recognized, the planning step is skipped and the agent replies without a plan. Has no effect unless double_turns is true.

params.enable_end_call
booleanDefaults to true

Whether the model can end the call itself. Set it to false and the call ends only when the caller hangs up, through a SWAIG action such as hangup, transfer, or stop, or through hard_stop_time, inactivity_timeout, or outbound_attention_timeout. With it off:

  • The model isn’t taught how to hang up.
  • An end-call marker the model writes anyway is removed from the spoken words, and no hangup is queued.
  • A hangup tool call is refused, and the model is told to continue the conversation.

false, 0, and the strings "false", "no", "off", "f", "disabled", "inactive", "disallow", and "0" turn it off. Any other value, 1 included, leaves it on.

params.enable_inner_dialog
booleanDefaults to false

Enables the inner dialog feature, which runs a separate AI process in the background that analyzes the conversation and provides real-time insights to the main AI agent. This gives the agent a form of “internal thought process” that can help it make better decisions.

params.enable_pause
booleanDefaults to false

Enables the pause/resume functionality for the AI agent. When enabled, a pause_conversation function is automatically added that the AI can call when the user says things like “hold on”, “wait”, or “pause”. While paused, the agent stops responding until the user speaks the agent’s name (set via ai_name) to resume. Cannot be used together with speak_when_spoken_to.

params.enable_thinking
booleanDefaults to false

Enables thinking output for the AI Agent. When set to true, the AI Agent will be able to utilize thinking capabilities. This may introduce a little bit of latency as the AI will use an additional turn in the conversation to think about the query.

params.enable_turn_detection
string | booleanDefaults to both

How the agent recognizes that the caller has finished speaking. Two signals feed the decision: sentence-ending punctuation in the partial transcript, and an acoustic read of the caller’s intonation.

  • both — Use both signals. Punctuation ends the turn, while the acoustic signal can hold the turn open for another word when the caller sounds mid-sentence, or end it when the caller trails off without punctuation. true is an alias.
  • punct_only — Punctuation alone ends the turn.
  • acoustic_only — The acoustic signal alone ends the turn.
  • off — Neither signal is used, and the agent waits out end_of_speech_timeout silence instead. false is an alias.

The both and punct_only modes are tuned by turn_detection_min_length and turn_detection_timeout; acoustic_only uses neither. The parameter is also accepted under the name turn_detection.

params.enable_vision
booleanDefaults to false

Enables visual input processing for the AI Agent. When set to true, the AI Agent will be able to utilize visual processing capabilities. The image used for visual processing will be gathered from the user’s camera if video is available on the call, leveraging the get_visual_input function.

params.languages_enabled
boolean

Has no effect and can be omitted.

A languages array takes effect because it is set, not because of this flag, so setting this to false does not disable one. The separate multilingual object is likewise switched on by being set.

params.local_tz
stringDefaults to US/Central

The local timezone setting for the AI. Value should use IANA TZ ID

params.redact_prompt
string

A plain-language description of sensitive content to redact from everything the platform records or transmits about the call — logs, events, webhook payloads, the call timeline, and the post-conversation call_log and raw_call_log. For example: "credit card numbers, social security numbers, and full names". Redacted content is replaced with ----. Set this parameter to enable redaction; omit it to leave redaction off.

The caller still hears the content in full, and the AI still receives the real text — redaction protects what is recorded and transmitted, not what the AI processes. Redaction can occasionally miss content, so treat it as a safeguard for your logs and integrations rather than an absolute guarantee.

With redaction on, these are also masked:

  • A caller turn with no redacted form is exported as ----, never as said. That covers a turn whose redaction failed, a turn that doesn’t wake the agent (under speak_when_spoken_to, or while paused), and user entries given in convo.
  • Recognizer details on caller entries, such as an entity’s value and the raw and formatted text of each formatting span, show ----.
  • Words from other speakers under asr_speaker_affinity are exported as Speaker N said: ----.
  • calling.ai.partial_result is sent without its text, and calling.ai.speech_detect isn’t sent. With debug on, both are sent with their text.
params.rescue_model
stringDefaults to gpt-6-luna

The model that answers a turn the agent’s model couldn’t. A model name, or model@provider. When the agent’s model gives unusable replies, the turn goes once to the rescue model instead of the platform retrying the same model until the call fails. The rescue model gets the same conversation, tools, and step, and its reply is spoken and kept like any other. The next turn goes back to the agent’s model.

A turn goes to the rescue model when any of these happens:

  • Two replies in one request are discarded as degenerate output, such as padding or a word repeated without end.
  • A reply writes a tool call as text instead of making it, twice in one request.
  • The provider refuses the model’s calls to a tool the request didn’t offer more than twice in one caller turn.
  • The provider refuses the request even when it is sent again without tools.

There is no rescue when the agent’s model is the rescue model, when the name isn’t a model the platform has configured, when the call isn’t allowed to use the named model, or for HTTP errors and timeouts. To turn rescue off, set this to the agent’s own model.

params.save_conversation
booleanDefaults to false

Send a summary of the conversation after the call ends. This requires post_prompt_url to be set and the conversation_id defined. This eliminates the need for a post_prompt in the ai parameters.

The platform stores nothing: the summary goes to post_prompt_url as conversation_summary, and keeping it is up to you. The next call that starts with the same conversation_id asks post_prompt_url for the summary you stored, in a request with "action": "fetch_conversation", and resumes the conversation with the conversation_summary in your reply. See responding to post prompt requests for the reply format.

params.summary_mode
string

Summary generation mode. Only "string" and "original" are accepted.

params.thinking_model
stringDefaults to Value of ai_model parameter

The AI model that the AI Agent will use when utilizing thinking capabilities.

params.utility_model
stringDefaults to Value of ai_model parameter

The AI model used for lightweight background tasks such as redaction (redact_prompt) and transcription cleanup (auto_correct). Choose a small, fast model, such as gpt-4o-mini or gpt-4.1-mini — these tasks run while the caller is waiting for a response. A value that is not a recognized model is ignored, and the agent’s main model is used instead.

params.transfer_summary
booleanDefaults to false

Pass a summary of a conversation from one AI agent to another. For example, transfer a call summary between support agents in two departments.

params.vision_model
stringDefaults to Value of ai_model parameter

The AI model that the AI Agent will use when utilizing vision capabilities.

params.visual_input
boolean | integerDefaults to 1

How many of the caller’s newest video frames get_visual_input sends, oldest first, taken at most one per second: true is 1, or a whole number from 1 to 5. Any other value keeps the default. This doesn’t affect the visual_input of a semantic gate or a SWAIG function, which each set their own count.

params.wait_for_user
booleanDefaults to false

When false, AI agent will initialize dialogue after call is setup. When true, agent will wait for the user to speak first.

Speech Recognition

Configure how the AI agent processes and understands spoken input, including speaker identification, voice activity detection, and transcription settings.

params.asr_diarize
booleanDefaults to false

If true, enables speaker diarization in ASR (Automatic Speech Recognition). This will break up the transcript into chunks, with each chunk containing a unique identity (e.g speaker1, speaker2, etc.) and the text they spoke.

params.background_sounds
booleanDefaults to false

Tells the model about sounds in the background of the caller’s turn. The groups are dog barking, phone ringing, alarm going off, and siren. On a turn with words, the groups heard are added after the caller’s words, each once and in the order heard, so the model reads Yes. (background: dog barking, phone ringing). The note becomes part of the caller’s turn text.

Sounds heard with no words after them don’t start a turn or move any of the caller’s timers. Each adds a system-log entry with action: "background_sound" and the group to the call log.

params.asr_smart_format
booleanDefaults to false

Enables smart formatting in ASR (Automatic Speech Recognition). This improves the formatting of numbers, dates, times, and other entities in the transcript.

params.auto_correct
booleanDefaults to false

Cleans up the transcription of the caller’s speech before the AI reads it — converting spoken numbers to digits, formatting addresses and phone numbers, and fixing obvious mishearings — without changing the meaning. Cannot be used together with enable_text_normalization, which is on by default: set enable_text_normalization to "off" to use auto_correct; otherwise auto_correct has no effect. When used alongside redact_prompt, cleanup and redaction happen together in a single step, which keeps responses fast.

params.enable_text_normalization
stringDefaults to both

Converts numbers, currency, dates, and similar values between their written and spoken forms so the AI understands callers more accurately and speaks its responses more naturally. For example, a caller who says “twenty three dollars” is understood as $23, and the AI’s $23 is spoken back as “twenty three dollars”. Applies in both directions by default. See accepted values below.

params.asr_speaker_affinity
booleanDefaults to false

If true, will force the AI Agent to only respond to the speaker who responds to the AI Agent first. Any other speaker will be ignored. With redact_prompt set, other speakers’ words are exported as Speaker N said: ----.

params.end_of_speech_timeout
integer | stringDefaults to 700

Amount of silence, in ms, at the end of an utterance to detect end of speech. Allowed values from 0-10,000. Also accepts a duration.

params.energy_level
numberDefaults to 52

Amount of energy necessary for bot to hear you (in dB). Allowed values from 0.0-100.0.

params.first_word_timeout
integer | stringDefaults to 1000

Amount of time, in ms, to wait for the first word after speech is detected. Allowed values from 0-10,000. Also accepts a duration.

params.llm_diarize_aware
booleanDefaults to false

If true, the AI Agent will be involved with the diarization process. Users can state who they are at the start of the conversation and the AI Agent will be able to correctly identify them when they are speaking later in the conversation.

params.noisy_line_ms
integer | stringDefaults to 4000

How much loud audio with no recognized words, in ms, the caller’s line can carry before the agent says it seems very noisy on the caller’s side, that it might have trouble hearing them, and asks whether they can make it a little quieter. The agent says this in the language of the conversation. Allowed values from 0 to 600,000, where 0 turns the notice off. Also accepts a duration.

Two things trigger it:

  • Sustained noise. Loud audio with no words is counted from a baseline taken 1 second after the agent stops speaking. Once the count passes this value, while the agent isn’t speaking and no request is out, the model’s next turn gives the notice, unless the caller has said something since. It’s given again only after the caller has said words and the count has passed the threshold again.
  • A noisy turn. A turn that ended with no words over noise filling most of it, or with noise after its last words, also gets the notice. With no words, the notice is its own turn; with words, the reply that answers them includes it. It’s given again only after a turn that wasn’t noisy.

Loud audio is never taken for speech: no turn is ended, held, or re-asked because of it. Each notice adds a system-log entry with action: "noisy_line" to the call log. The notice needs a speech recognizer that reports line loudness.

params.openai_asr_engine
stringDefaults to deepgram:nova-3

The ASR (Automatic Speech Recognition) engine to use. Common values include deepgram:nova-2, deepgram:nova-3, and other supported ASR engines.

params.text_normalization_show_heard
booleanDefaults to false

When the Deepgram recognizer formats the transcript, the model also reads the words as spoken after each span the formatting changed. For example, the model reads The order number is w7123456 (heard: w seven one two three four five six). The annotation becomes part of the caller’s turn text.

Nothing is added for a span the formatter restored to its spoken words, or for one that can’t be placed in the text. Recognizers that don’t format the transcript themselves get no annotation.

Values for enable_text_normalization

ValueApplies toWhat it does
heardCaller inputConverts what the caller says into written form before the AI reads it — for example, “twenty three dollars” becomes $23.
spokenAI responsesConverts the AI’s written response into spoken form before it is read aloud — for example, $23 becomes “twenty three dollars”.
bothCaller input and AI responsesApplies both conversions. This is the default.
false / off / none—Turns text normalization off.
true / onCaller input and AI responsesSame as both.

Text normalization is applied per language and adapts automatically if the conversation switches languages.

If text normalization isn’t available for the language being spoken, that direction is simply skipped and the conversation continues uninterrupted. Some languages support only one direction; in that case, both applies whichever is available.

Speech Synthesis

Customize the AI agent’s voice output, including volume control, voice characteristics, emotional range, and video avatars for visual interactions.

params.ai_volume
integerDefaults to 0

Adjust the volume of the AI. Allowed values from -50-50.

params.cartesia_max_buffer_delay_ms
integer | stringDefaults to 500

The maximum buffer delay, in ms, for Cartesia voices. Allowed values from 0 to 5,000. Also accepts a duration with units, such as "0.5s", read as a strict millisecond value. A value out of range, or one that’s neither a number nor a duration, keeps the default.

params.heygen_key
string

Your HeyGen API key, used by HeyGen Voice (heygen.<voice> voices). Without it, the platform’s key is used. The key can contain only letters, digits, -, _, and .; a key with other characters doesn’t open. It needs HeyGen’s voices:write scope, and HeyGen refuses a key without it.

params.heygen_model
stringDefaults to heygen-voice-1-turbo

The HeyGen Voice model, used when the voice string doesn’t name one (heygen.<voice>:<model>). Valid values:

  • heygen-voice-1-turbo: lower latency.
  • heygen-voice-1: higher latency, especially on short phrases.

Any other value uses the default.

params.heygen_stream_first
booleanDefaults to true

Whether a HeyGen voice streams each reply’s first sentence, so playback starts at its first audio while the rest is generated in the background. Set it to false to turn that streaming off.

params.max_emotion
integer

Has no effect and can be omitted. Setting it does not change the voice.

params.speech_gen_quick_stops
integerDefaults to 3

Number of quick stops for speech generation. Allowed values from 0-10.

params.tts_number_format
stringDefaults to e164

How the agent formats phone numbers when it speaks them. Valid values: e164 (e.g. +12345678901), international (e.g. +1 234-567-8901), national (e.g. (234) 567-8901), or generic (e.g. 234 567 8901). e.164 is accepted as another spelling of e164. An unrecognized value is ignored and e164 is used.

params.tts_pause_cap_ms
integer | stringDefaults to 300

The longest pause, in ms, that plays inside the agent’s speech. Some voices pause for most of a second after a short sentence such as “Yes.”, and a caller can take that pause as the end of the agent’s turn. A quiet stretch between two sounds of a reply plays up to the cap, and the rest is dropped. Quiet before a reply’s first sound and after its last isn’t played. Quiet means a 20 ms frame below about −45 dBFS, or digital silence.

Allowed values from 0 to 2,000, where 0 plays speech as the engine made it. A value outside the range is clamped to it. Also accepts a duration, read as a strict millisecond value; a value that’s neither a number nor a duration keeps the default.

The cap applies to the platform’s built-in TTS engines, such as ElevenLabs, Cartesia, Rime, OpenAI, Deepgram, and Azure, when they don’t stream. Speech plays as made on a voice with streaming: true and on the polly, gcloud, and amazon engines.

params.video_blank_image
string

What the caller sees on a video call without avatar clips (no video_talking_file): an http:// or https:// URL to a PNG, shown as a still image. The image can be up to 4 MB and 3840 x 2160 pixels, and is scaled to fit within 1280 x 720. Any other value is ignored. Without it, the still is black.

The still shows when the call captures the caller’s video frames, through enable_vision or the visual_input of a semantic gate or SWAIG function, or when this param is set. Set it whenever you capture frames on a video call without avatar clips, so the caller doesn’t see a black screen.

params.video_idle_file
string

URL of a video file to play when AI is idle. Only works for calls that support video.

params.video_listening_file
string

URL of a video file to play when AI is listening to the user speak. Only works for calls that support video.

params.video_talking_file
string

URL of a video file to play when AI is talking. Only works for calls that support video.

params.eleven_labs_similarity
numberDefaults to 0.75Deprecated

The similarity slider dictates how closely the AI should adhere to the original voice when attempting to replicate it. The higher the similarity, the closer the AI will sound to the original voice. Valid values range from 0.0 to 1.0. Deprecated: Use languages[].params.similarity instead.

params.eleven_labs_stability
numberDefaults to 0.50Deprecated

The stability slider determines how stable the voice is and the randomness between each generation. Lowering this slider introduces a broader emotional range for the voice. Valid values range from 0.0 to 1.0. Deprecated: Use languages[].params.stability instead.

Interruption & Barge Control

Manage how the AI agent handles interruptions when users speak over it, including when to stop speaking, acknowledge interruptions, or continue regardless.

params.acknowledge_interruptions
boolean | integerDefaults to false

Instructs the agent to acknowledge crosstalk and confirm user input when the user speaks over the agent. true acknowledges up to one interruption; a positive integer sets the maximum number of interruptions to acknowledge.

params.barge_functions
booleanDefaults to false

Allow functions to be called during barging. When false, functions are not executed if the user is speaking.

With false, a function’s filler holds back the caller’s words while it is playing or queued, and neither keypad input nor interrupt_on_noise cuts it. Once the calls have returned and no filler or say is left, the reply after them can be barged. Under transparent_barge, a turn whose function ran is kept rather than discarded. A function has run once its call was sent; a call that a semantic gate blocked, or that names no available function, didn’t run.

With true, a turn that transparent barge discards also loses its tool calls and results: actions it queued with post_process don’t run, and a call that hadn’t run yet is dropped.

params.barge_match_string
string

Takes a string, including a regular expression, defining barge behavior. For example, this param can direct the AI to stop when the word “hippopotamus” is input.

Setting this param turns off transparent_barge, even when transparent_barge is set to true. When barge_min_words is also set, either condition is enough: the caller interrupts the agent by saying at least that many words or by saying something that matches this string.

params.barge_min_words
integerDefaults to 0

Defines the number of words that must be input before triggering barge behavior. Allowed values: 0 to turn the word count off, or 1-99. Any other value is ignored. When barge_match_string is also set, either condition is enough to interrupt the agent.

params.enable_barge
string

Controls when user can interrupt the AI. Valid values: "complete", "partial", "all", or boolean. Set to false to disable barging.

With partial transcripts enabled (the default includes partial), a partial transcript that passes the barge checks while the model request is still out, before any of its reply has played, cancels that request, and none of the reply plays. barge_min_words, barge_match_string, and barge_functions apply as they do while the agent speaks. Under transparent_barge, only a statement begun inside the window cancels the request; one begun later is the caller’s next turn, and the reply plays first. calling.ai.partial_result carries barged: true when a partial cut the reply or cancelled the request.

params.ignore_backchannels
booleanDefaults to true

Ignores a bare acknowledgement that the caller says over the agent’s speech, such as “mm-hmm”, “uh-huh”, “yeah”, “okay”, “right”, or “got it”: it doesn’t interrupt the agent and isn’t treated as a turn. “Yes”, “no”, “stop”, and “wait” are never treated as acknowledgements, and “Yeah, but the…” barges as usual. Set it to false to treat acknowledgements like any other speech.

  • Over the agent’s speech means the caller began while the agent’s audio was playing, or during the stretch of audio just before it, such as a filler. Speech begun in a silence between them, or before the agent’s first audio, doesn’t count.
  • Said into silence, an acknowledgement is a turn as usual.
  • During a reply that a no_barge_next_response action protects, an acknowledgement is held until the reply has played, and then it’s the caller’s answer.
  • Each ignored acknowledgement adds a system-log entry with action: "backchannel" to the call log.

“Okay”, “alright”, and “right” also answer questions, so one said over the end of a question the agent is still finishing is ignored.

params.interrupt_on_noise
booleanDefaults to false

When enabled, barges agent upon any sound interruption longer than 1 second. The 1-second threshold can’t be changed. With barge_functions off, it doesn’t cut a function’s filler.

The sound doesn’t need to be recognized as words, so sustained sound, such as background conversation or music, can interrupt the agent. This interruption ignores enable_barge, barge_min_words, and barge_match_string, and it interrupts a static greeting even when static_greeting_no_barge is true.

params.interrupt_prompt
string

A prompt that is used to help the AI agent respond to interruptions.

Default: “The user didn’t wait for you to finish responding and started talking over you. As part of your next response, make a comment about how you were both talking at the same time and verify you properly understand what the user said.”

params.transparent_barge
booleanDefaults to true

Lets the caller correct or extend what they just said. When the caller’s next statement begins within transparent_barge_max_time of their previous one, the agent’s turn in between is discarded and the two statements go to the model as one, each part as said. Off when barge_match_string is set.

  • Inside the window, the turn in between is discarded whether its reply was whole, partial, or not started, and whether or not any of it played. A request still in flight is cancelled.
  • At or past the window, the agent’s turn stands and the new words are a turn of their own. A request in flight runs on and its reply plays.
  • Speech the barge settings hold back never discards a turn on its own: speech with enable_barge off, below barge_min_words, or said over a function’s filler with barge_functions off.
  • With barge_functions off, a turn whose function ran is kept.
  • The greeting comes before the caller’s first statement and is never discarded.
params.transparent_barge_max_time
integer | stringDefaults to 3000

The transparent barge window, in ms. It runs from when the caller’s previous final transcript arrived to when their next statement began: its first partial transcript with words, its final transcript if no partial came first, or the first key for keypad input. Allowed values from 0 to 60,000, where 0 means no limit, so every next statement is inside the window. Also accepts a duration.

Timeouts & Delays

Set various timing parameters that control wait times, response delays, and session limits to optimize the conversation flow and prevent dead air.

params.attention_timeout
integer | stringDefaults to 5000

Amount of time, in ms, to wait before prompting the user to respond. Allowed values: 0 (to disable) or 1,000-600,000. Also accepts a duration. A nonzero value lower than end_of_speech_timeout is raised to end_of_speech_timeout plus 1,000 ms.

params.attention_timeout_prompt
stringDefaults to The user has not responded, try to get their attention. Stay in the same language.

A custom prompt that is fed into the AI when the attention_timeout is reached.

params.digit_timeout
integer | stringDefaults to 3000

Time, in ms, at the end of digit input to detect end of input. Allowed values from 1-29,999; any other value keeps the default. Also accepts a duration.

params.hard_stop_prompt
string

A final prompt that is fed into the AI when the hard_stop_time is reached.

params.hard_stop_time
string

The maximum time the AI Agent stays active. Once it has passed, the next time the agent is waiting for the caller it receives hard_stop_prompt as a final instruction for its last reply. The conversation then ends and the next SWML instruction runs. The stop is not exact and does not cut off speech in progress.

The value is a duration in which a bare number is seconds, rounded to the second. For example, "30m", "30:00", and "1800" are all 30 minutes, and "1h30m" is 90 minutes. A string the duration rules refuse is read by its digits and colons with the letters h, m, and s dropped, so "30ss" is 30 seconds. A value that reads neither way sets no stop.

params.inactivity_timeout
integer | stringDefaults to 600000

Amount of time, in ms, to wait before exiting the app due to inactivity. Allowed values: 0 (to disable) or 10,000-3,600,000. The default is 10 minutes. Also accepts a duration, such as "15m".

params.initial_sleep_ms
integer | stringDefaults to 0

Amount of time, in ms, to wait before the AI Agent starts processing. Allowed values from 0-300,000. Also accepts a duration. Speech recognition is already running during the wait, and anything the caller says during it is taken once the wait ends.

params.outbound_attention_timeout
integer | stringDefaults to 120000

How long, in ms, the agent waits for the caller’s first words when it’s set to wait for them: with direction set to outbound, or with wait_for_user. When it runs out and the caller has never spoken, the call ends. With speak_when_spoken_to, the agent waits for the caller’s first words without a time limit. Allowed values from 10,000-600,000. Also accepts a duration.

params.speech_event_timeout
integer | stringDefaults to 0

Timeout for speech events processing. Allowed values from 0-10,000 ms. 0, or leaving it unset, lets speech recognition set this timing itself. Also accepts a duration.

params.speech_timeout
integer

Has no effect and can be omitted. Setting it does not change speech timing on your calls.

params.target_first_segment_ms
integer | stringDefaults to 200

How long, in ms, the model’s first words can take before the agent plays a filler to cover the wait. Allowed values from 0 to 5,000. Also accepts a duration. Under transparent_barge, this filler doesn’t hold back the caller’s words.

Separately, when the model has sent nothing for 3 seconds after a request, the agent plays one of the current language’s thinking fillers (speech_fillers, or multilingual.fillers). Once that filler has played, the filler from this param stays silent, so the caller never hears both. The 3-second filler plays once per request, retries included, and also right after a function call. It doesn’t play while the agent is paused, after the caller’s words have cut the request, or when the language has no thinking fillers, and its timing can’t be changed.

Audio & Media

Control background audio, hold music, and greeting messages to enhance the caller experience during different phases of the conversation.

params.background_file
string

URL of audio file to play in the background while AI plays in foreground.

params.background_file_loops
integerDefaults to undefined

Maximum number of times to loop playing the background file.

params.background_file_volume
integerDefaults to 0

Defines background_file volume. Allowed values from -50 to 50.

params.hold_music
string

A URL for the hold music to play, accepting WAV, mp3, and FreeSWITCH tone_stream.

params.hold_on_process
booleanDefaults to false

Enables hold music during SWAIG processing.

params.static_greeting
string

The static greeting to play when the call is answered. This will always play at the beginning of the call.

params.static_greeting_no_barge
booleanDefaults to false

If true, the static greeting will not be interrupted by the user if they speak over the greeting. If false, the static greeting can be interrupted by the user if they speak over the greeting.

With true, what the caller says during the greeting is kept and answered after the greeting finishes. A DTMF key press still interrupts the greeting, and so does interrupt_on_noise.

With false, the greeting stops once the caller finishes speaking over it. This interruption ignores barge_min_words, barge_match_string, and enable_barge, which apply only after the greeting.

SWAIG Functions

Configure SignalWire AI Gateway (SWAIG) function capabilities, including permissions, execution timing, and data persistence across function calls.

params.function_wait_for_talking
booleanDefaults to false

If true, the AI will wait for any filler to finish playing before executing a function. If false, the AI will asynchronously execute a function while playing a filler.

params.functions_on_no_response
booleanDefaults to false

Execute functions when the user doesn’t respond (on attention timeout).

params.swaig_allow_settings
booleanDefaults to true

Allows SWAIG functions to change the AI model’s settings with the settings action in their response. Only settings the selected model supports are applied.

params.swaig_allow_swml
booleanDefaults to true

Allows your SWAIG to return SWML to be executed.

params.swaig_post_conversation
booleanDefaults to false

Post entire conversation to any SWAIG call.

params.swaig_set_global_data
booleanDefaults to true

Allows SWAIG functions to change global_data with the set_global_data and unset_global_data actions. Changes last for the rest of the AI session and don’t carry over to other calls. To keep global_data for a later AI session on the same call, see persist_global_data.

params.unavailable_function_response
string

What the model is told when it calls a function that can’t run right now: one that’s switched off, used up, or not in the current step’s functions, or a name the agent doesn’t have. Nothing runs either way. These variables are filled in:

  • ${function}: the name the model called.
  • ${tools}: the tools the request offered, comma-separated.
  • ${steps}: the other steps in the current context that offer the function, comma-separated. Empty for a name the agent doesn’t have.

For example: "${function} cannot run right now. Available: ${tools}." Without it, the model is told that nothing ran, which steps offer the function, and which tools are available now.

params.semantic_gates_enabled
booleanDefaults to true

Whether the call checks the semantic gates on its SWAIG functions. Set it to false to turn gate checks off for the call: gated functions then run without being checked.

params.semantic_gate_timeout_ms
integer | stringDefaults to 2500

How long one semantic gate check may take in total, in milliseconds, retries included. A check that runs out of time blocks the function. Allowed values from 500 to 10000. Also accepts a duration, such as "2.5s", read as a strict millisecond value.

params.semantic_gate_history
integerDefaults to 20

How many recent conversation entries a semantic gate check reads. Allowed values from 0 to 100. A gate’s own history replaces it for that gate.

params.semantic_gate_dialogue
stringDefaults to window

Which part of the conversation a semantic gate check judges, unless a gate sets its own dialogue. Valid values:

  • window: the newest semantic_gate_history entries.
  • proposal: only what was said since semantic_state last changed, from the agent’s first turn after the change: the read-back and the caller’s reply. If the agent has said nothing since, the conversation is empty, so a yes is never judged against a read-back that never came. With no semantic_state set, window is used.

Only the word proposal, in any case, selects it; any other value is window. See semantic gates.

A semantic_gate_timeout_ms or semantic_gate_history value outside its range is clamped to it, and a number’s fraction is dropped. semantic_gate_history reads a string only when it’s a whole number ("30"). semantic_gate_timeout_ms reads a whole number ("3000") or a duration ("3000ms", "2.5s"), but not a bare decimal string ("2.5"). Any other string, a boolean, or null keeps the default.

Input & DTMF

Handle dual-tone multi-frequency (DTMF) input and configure input polling for integrating external data sources during conversations.

params.digit_terminators
string

DTMF digit, as a string, to signal the end of input (ex: ”#”)

params.input_poll_freq
integer | stringDefaults to 2000

Check for input function with check_for_input. Allowed values from 1,000-10,000 ms. Also accepts a duration. Example use case: Feeding an inbound SMS to AI on a voice call, eg., for collecting an email address or other complex information.

Debug & Development

Enable debugging tools, logging, and performance monitoring features to help developers troubleshoot and optimize their AI agent implementations.

params.audible_debug
booleanDefaults to false

If true, the AI will announce the function that is being executed on the call.

params.audible_latency
booleanDefaults to false

Announce latency information during the call for debugging purposes.

params.cache_mode
booleanDefaults to false

Enable response caching to improve performance for repeated queries.

params.debug
boolean | integerDefaults to false

Enables debug mode for the AI session. When set to true or a positive integer, additional debug information is logged and may be included in webhook payloads. Higher integer values increase verbosity.

params.debug_webhook_level
integerDefaults to 1

How much the debug stream carries. Allowed values from 0-2. Level 2 adds conversation_add, llm_request, and llm_response, which together are far higher volume than everything else combined. Setting debug_webhook_url is what turns the stream on, so lowering the level thins the stream rather than stopping it. See the debug_webhook_url callback below.

params.debug_webhook_url
string

Each interaction between the AI and end user is posted in real time to the established URL. Authentication can also be set in the url in the format of username:password@url. See the debug_webhook_url callback below.

params.enable_accounting
booleanDefaults to false

Enable usage accounting and tracking for billing and analytics purposes.

params.verbose_logs
boolean

Has no effect and can be omitted.

Inner Dialog

Configure the inner dialog feature, which enables a secondary AI process to analyze conversations in real-time and provide insights to the main AI agent.

params.inner_dialog_model
string

Specifies the AI model to use for the inner dialog feature. If not set, the main ai_model is used. This allows you to use a different (potentially faster or cheaper) model for background analysis.

params.inner_dialog_prompt
stringDefaults to The assistant is intelligent and straightforward, does its job well and is not excessively polite.

The system prompt that guides the inner dialog AI’s behavior. This prompt shapes how the background AI analyzes the conversation and what kind of insights it provides to the main agent.

params.inner_dialog_synced
boolean

Has no effect and can be omitted. Setting it does not change how the inner dialog runs.

Pause & Wake

Control the agent’s listening behavior, including pause/resume functionality and activation triggers for hands-free scenarios.

params.speak_when_spoken_to
booleanDefaults to false

When enabled, the AI agent remains silent until directly addressed by name (set via ai_name). This creates a “push-to-talk” style interaction where the agent only responds when explicitly called upon, useful for scenarios where the agent should listen but not interrupt. With redact_prompt set, turns that don’t wake the agent are exported as ----.

params.start_paused
booleanDefaults to false

When enabled, the AI agent starts in a paused state. The agent will not respond to any input until the user speaks the agent’s name (set via ai_name) to activate it. This is useful for scenarios where you want the agent to wait for explicit activation.

params.wake_prefix
string

Specifies an additional prefix that must be spoken along with the agent’s name to wake the agent. For example, if ai_name is “assistant” and wake_prefix is “hey”, the user would need to say “hey assistant” to activate the agent.

Advanced Configuration

Fine-tune advanced AI behavior settings including response limits, data persistence, prompt formatting, and voice activity detection.

params.max_response_tokens
integer

How many tokens to keep free for the reply when the platform summarizes a long conversation to fit the model’s context window. Summarizing starts early enough to leave this much room.

When the prompt sets neither max_tokens nor max_completion_tokens, this value also caps the length of the AI’s replies, held to the range the model accepts. It doesn’t apply to the post_prompt. Accepts 1 to 16384; other values are ignored.

params.persist_global_data
booleanDefaults to true

When enabled, global_data persists across multiple AI agent invocations within the same call. This allows data set by SWAIG functions to be retained if the AI agent is invoked multiple times during a single call session.

params.pom_format
stringDefaults to markdown

Specifies the output format for structured prompts sent to the AI model. Valid values are markdown or xml. This affects how system prompts and context are formatted when sent to the underlying language model.

params.swaig_post_swml_vars
boolean | arrayDefaults to false

Controls whether SWML variables are included in SWAIG function webhook payloads. When set to true, all SWML variables are posted. When set to an array of strings, only the specified variable names are included in the payload.

params.turn_detection_min_length
integerDefaults to 0

Minimum number of characters the transcript must contain before punctuation on its own can end the caller’s turn. Raise it so a back-channel the recognizer renders with a full stop — “Uh-huh.” while the agent is still being answered — doesn’t end a turn the caller hasn’t finished. Allowed values from 0 to 1000, where 0 lets a transcript of any length end a turn.

In both mode the acoustic signal overrides this: when it reads the caller as finished, the turn ends whatever the length, so short complete replies like “Yes.” still work. That leaves this a filter on the punctuation path alone, and it has no effect when enable_turn_detection is off or acoustic_only.

params.turn_detection_timeout
integer | stringDefaults to Value of end_of_speech_timeout

Time in milliseconds the agent waits after deciding the caller’s turn has ended before it finalizes the transcript. A partial transcript arriving inside the window cancels the decision, so this is a ceiling on how long a turn can hang rather than latency added to every turn. A caller who has finished usually commits well inside it.

Lowering it therefore doesn’t make the agent answer faster, and values below 500 degrade transcription accuracy on words the recognizer needs the extra audio to disambiguate. Allowed values from 0 to 10000, where 0 uses the default. Also accepts a duration. Has no effect when enable_turn_detection is off or acoustic_only.

params.turn_filler_every_n
integerDefaults to 1

Play a backchannel on every Nth opportunity rather than all of them. The count advances only on opportunities that would otherwise have produced one, and resets when the caller starts a new turn, so the first opportunity of each turn always plays. A turn that chains several waits shares one count, so raising this widens the spacing across the whole stretch rather than restarting at each wait.

params.turn_filler_min_ms
integer | stringDefaults to 0

How long a wait must already have run, in milliseconds, before a backchannel plays. Also accepts a duration. Off by default: waits open the moment the agent decides to hold, and spell and number are meant to be answered right then. A positive <token>:<ms> suffix in turn_filler_sources replaces this for that token, but :0 does not clear it. To answer one source immediately while delaying others, leave this at 0 and put suffixes on the others.

params.turn_filler_sources
stringDefaults to spell,number

Which deliberate waits earn a backchannel from languages[].turn_fillers, or from multilingual.turn_fillers when the agent is in multilingual mode, as a comma-separated list of tokens. A wait happens when the agent holds off answering because the caller is not finished, and the token names why.

List a specific hold source, or a whole class of wait:

  • spell — the caller is spelling something out
  • number — the caller is reading out digits
  • text — the wording suggests the caller is mid-sentence
  • acoustic — the audio suggests the caller is mid-sentence
  • veto — any of the above

The default answers spell and number only, because those pauses are expected and cannot be shortened. A backchannel during text or acoustic usually talks over a caller who is still going, so give either its own delay with a <token>:<ms> suffix rather than listing it bare, as in spell,number,text:1200. The delay can also be a duration, as in veto:2s.

Tokens are matched whole and case-insensitively, and a space after a comma is fine. A token that is not one of the five above matches no wait, so nothing here is validated and a misspelling silently leaves the agent with no backchannels at all.

params.turn_filler_volume
numberDefaults to 0.5

How loud languages[].turn_fillers and multilingual.turn_fillers play, relative to the agent’s voice as the caller hears it. 1 is the agent’s own level, 0.5 is half the amplitude (−6 dB), and 0.25 is −12 dB. Allowed values above 0 and up to 1; a numeric string is also read, and any other value keeps the default. Levels are applied in whole dB, and a level at or below −50 dB is silence.

It applies to both text phrases and audio-file entries, and it includes ai_volume on voices that apply it: the platform’s built-in engines, gcloud, and amazon.

params.vad_config
string

Configures Silero Voice Activity Detection (VAD) settings. Format: threshold or threshold:frame_ms. The threshold (0-100) sets sensitivity for voice detection, and optional frame_ms (16-40) sets the analysis frame duration in milliseconds.

Duration values

A timing parameter takes a number or a duration string. A string with a unit letter or a colon is read as a duration, so "20m" is 20 minutes and "1.5s" is one and a half seconds.

  • Units are h (hours), m (minutes), s (seconds), and ms (milliseconds). They are case-insensitive, and spaces are allowed anywhere, as in "1h 30m".
  • Several units combine with the larger unit first, each at most once: "1h30m", "2m30s", "1s500ms". "30m1h" and "1m1m" aren’t durations.
  • Decimals are allowed: "1.5s", ".5m", "1.25h".
  • A bare number after a unit is in the next smaller unit: "1h30" is 1 hour 30 minutes, "2m30" is 2 minutes 30 seconds, and "1s500" is 1.5 seconds.
  • Clock form is [[h:]m:]s: "1:30" is 90 seconds, and "1:02:30" is 1 hour, 2 minutes, and 30 seconds. Minutes and seconds go up to 59. Colons can’t be mixed with unit letters or decimals. A colon at the start or end is ignored (":30" is 30 seconds), and two colons side by side aren’t a duration.
  • The result is rounded to the nearest millisecond, or to the nearest second for a value counted in seconds.
  • A parameter’s range applies to the result: "15m" for inactivity_timeout is 900000 ms, which is inside its range.

How a parameter reads a value depends on which of three kinds it is:

KindParametersHow a value is read
MillisecondEvery parameter on this page whose value is in ms, except the strict onesA number is milliseconds, and a duration is converted to milliseconds, so "1:30" is 90000, not 1.3 seconds. Any other string is read by its leading whole number: "700" is 700, "1500.25" is 1500, and a word is 0.
Strict millisecondsemantic_gate_timeout_ms, tts_pause_cap_ms, cartesia_max_buffer_delay_msA number is milliseconds. A string must be a whole number in digits or a duration with units; anything else, including a bare decimal such as "0.5", keeps the default.
Secondhard_stop_time, and the hold function result actionA bare number is seconds, and the result is rounded to the second.

These timing parameters also accept duration strings.

ParameterDefault (ms)Range (ms)
min_utterance_ms15000 to 10000
escalate_after_ms600000 or greater
function_filler_sequence_gap_ms1200Greater than 0
double_turn_wait_ms-1Unspecified
double_turn_filler_min_ms0Greater than 0, or 0 to disable
version: 1.0.0
sections:
main:
- ai:
prompt:
text: You are a helpful assistant.
params:
attention_timeout: 10s
end_of_speech_timeout: 0.8s
inactivity_timeout: 15m
transparent_barge_max_time: 2.5s
tts_pause_cap_ms: 250ms
hard_stop_time: 1h30m

debug_webhook_url callback

A diagnostic feed for a call that is still in progress. Set debug_webhook_url and every step the agent takes is posted to that URL as it happens: speech recognized, model called, tool invoked, context switched, error hit. Use it to work out why a call went the way it did — which tool the agent reached for, what came back, where a turn went wrong — or to react while the call is still live, such as paging a supervisor.

Each request carries call_info plus one or more event properties, where the property name is the event. One moment can produce several: evaluating a data_map webhook sends webhook, input, output, error_keys, and match together. Handle the properties you recognize and ignore the rest, since the set grows over time.

Payload
{
"call_info": {
"call_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
"content_type": "text/json",
"content_disposition": "post_data",
"conversation_type": "voice"
}
}

See the AI debug webhook webhook page for the full field reference. Conversation analytics explains when to use the debug stream and when to use the post-prompt report.