> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Reference ## Docs - [Introduction to SWML](https://signalwire.com/docs/swml.md): Get started with SWML (SignalWire Markup Language), a markup and scripting language for quickly writing powerful communication applications in YAML or JSON documents. - [Expressions](https://signalwire.com/docs/swml/reference/expressions.md): Complete technical reference for JavaScript expressions in SMWL - [Template functions](https://signalwire.com/docs/swml/reference/template-functions.md): Reference for built-in template transformation functions in SWML - [Variables](https://signalwire.com/docs/swml/reference/variables.md): Syntax, scopes, deployment modes, and how to access nested data with SWML variables. - [Errors](https://signalwire.com/docs/swml/reference/errors.md): Error codes emitted by SWML during script execution, for both calling and messaging documents. - [Calling SWML overview](https://signalwire.com/docs/swml/reference/calling.md): Reference for Calling SWML — document structure, webhook payload, variable expansion, and methods for handling inbound and outbound calls. - [ai](https://signalwire.com/docs/swml/reference/calling/ai.md): Create an AI agent to interact with users. - [languages](https://signalwire.com/docs/swml/reference/calling/ai/languages.md): Configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers. - [multilingual](https://signalwire.com/docs/swml/reference/calling/ai/multilingual.md): Configure one AI Agent to detect the caller's language and answer in it, switching as the caller switches. - [params](https://signalwire.com/docs/swml/reference/calling/ai/params.md): Parameters for AI that can customize the AI agent's behavior. - [prompt](https://signalwire.com/docs/swml/reference/calling/ai/prompt.md): Establish the set of rules and instructions for the AI agent through a prompt. - [SWAIG](https://signalwire.com/docs/swml/reference/calling/ai/swaig.md): The SignalWire AI Gateway Interface. Allows you to create user-defined functions that can be executed during the dialogue. - [functions](https://signalwire.com/docs/swml/reference/calling/ai/swaig/functions.md): Functions that can be executed during the interaction with the AI. - [data_map](https://signalwire.com/docs/swml/reference/calling/ai/swaig/functions/data-map.md): Defines how a SWAIG function should process and respond to the user's input data. - [parameters](https://signalwire.com/docs/swml/reference/calling/ai/swaig/functions/parameters.md): The parameters object for the SWAIG function. - [includes](https://signalwire.com/docs/swml/reference/calling/ai/swaig/includes.md): Remote function signatures to include in SWAIG functions. - [ai_sidecar](https://signalwire.com/docs/swml/reference/calling/ai-sidecar.md): Attach a real-time AI observer that streams agent-facing advice events during a live call. - [params](https://signalwire.com/docs/swml/reference/calling/ai-sidecar/params.md): Tuning knobs for the ai_sidecar method that control how it reacts, summarization, transcription, and debugging. - [prompt](https://signalwire.com/docs/swml/reference/calling/ai-sidecar/prompt.md): The operator prompt that instructs the ai_sidecar observer how to coach the agent. - [SWAIG](https://signalwire.com/docs/swml/reference/calling/ai-sidecar/swaig.md): Functions and MCP servers the ai_sidecar observer can call while watching a call. - [amazon_bedrock](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock.md): Create an Amazon Bedrock agent interaction. - [params](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/params.md): Parameters for the Amazon Bedrock that can customize the agent's behavior. - [prompt](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/prompt.md): Establish the set of rules and instructions for the Amazon Bedrock agent through a prompt. - [SWAIG](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/swaig.md): The SignalWire AI Gateway Interface. Allows you to create user-defined functions that can be executed during the dialogue. - [functions](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/swaig/functions.md): Functions that can be executed during the interaction with the Amazon Bedrock agent. - [data_map](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/swaig/functions/data-map.md): Defines how a SWAIG function should process and respond to the user's input data. - [parameters](https://signalwire.com/docs/swml/reference/calling/amazon-bedrock/swaig/functions/parameters.md): The parameters object for the SWAIG function. - [answer](https://signalwire.com/docs/swml/reference/calling/answer.md): Answer incoming call and set an optional maximum duration. - [cond](https://signalwire.com/docs/swml/reference/calling/cond.md): Execute a sequence of instructions depending on the value of a JavaScript condition. - [connect](https://signalwire.com/docs/swml/reference/calling/connect.md): Connect to a phone number, SIP URI, Resource Address, queue, or WebSocket stream. - [denoise](https://signalwire.com/docs/swml/reference/calling/denoise.md): Start noise reduction. - [detect_machine](https://signalwire.com/docs/swml/reference/calling/detect-machine.md): Detect whether the other end of the call is a machine (fax, voicemail, etc.) or a human, using AMD and fax detection. - [enter_queue](https://signalwire.com/docs/swml/reference/calling/enter-queue.md): Place the call in a queue. - [execute](https://signalwire.com/docs/swml/reference/calling/execute.md): Execute a specified section or URL as a subroutine, and upon completion, return to the current document. - [goto](https://signalwire.com/docs/swml/reference/calling/goto.md): Jumps to a defined label in the current SWML section. - [hangup](https://signalwire.com/docs/swml/reference/calling/hangup.md): Ends the call. - [join_conference](https://signalwire.com/docs/swml/reference/calling/join-conference.md): Join an ad-hoc audio conference with Relay and CXML calls. - [join_room](https://signalwire.com/docs/swml/reference/calling/join-room.md): Join a Relay Room Session. - [label](https://signalwire.com/docs/swml/reference/calling/label.md): Mark any point of the SWML section with a label. - [live_transcribe](https://signalwire.com/docs/swml/reference/calling/live-transcribe.md): Transcribe a voice interaction in real-time. - [live_translate](https://signalwire.com/docs/swml/reference/calling/live-translate.md): Translate a voice interaction in real-time. - [pay](https://signalwire.com/docs/swml/reference/calling/pay.md): Enable secure payment processing during voice calls. - [play](https://signalwire.com/docs/swml/reference/calling/play.md): Play file(s), ringtones, speech or silence. - [prompt](https://signalwire.com/docs/swml/reference/calling/prompt.md): Play a prompt and wait for input. - [receive_fax](https://signalwire.com/docs/swml/reference/calling/receive-fax.md): Receive a fax being delivered to this call. - [record](https://signalwire.com/docs/swml/reference/calling/record.md): Record the call audio in the foreground pausing further SWML execution until recording ends. - [record_call](https://signalwire.com/docs/swml/reference/calling/record-call.md): Record call in the background. - [request](https://signalwire.com/docs/swml/reference/calling/request.md): Send a HTTP request to a remote URL. - [return](https://signalwire.com/docs/swml/reference/calling/return.md): Return from a `execute` method or exit script. - [send_digits](https://signalwire.com/docs/swml/reference/calling/send-digits.md): Send digit presses as DTMF tones. - [send_fax](https://signalwire.com/docs/swml/reference/calling/send-fax.md): Send a fax. - [send_sms](https://signalwire.com/docs/swml/reference/calling/send-sms.md): Send an outbound message to a PSTN phone number. - [set](https://signalwire.com/docs/swml/reference/calling/set.md): Set script variables to the specified values. - [sip_refer](https://signalwire.com/docs/swml/reference/calling/sip-refer.md): Send a SIP REFER to a SIP call. - [sleep](https://signalwire.com/docs/swml/reference/calling/sleep.md): Set the amount of time for the current application to sleep for in milliseconds before continuing to the next action. - [stop_denoise](https://signalwire.com/docs/swml/reference/calling/stop-denoise.md): Stop noise reduction. - [stop_record_call](https://signalwire.com/docs/swml/reference/calling/stop-record-call.md): Stop an active background recording. - [stop_stream](https://signalwire.com/docs/swml/reference/calling/stop-stream.md): Stop an active audio stream. - [stop_tap](https://signalwire.com/docs/swml/reference/calling/stop-tap.md): Stop an active tap stream. - [stream](https://signalwire.com/docs/swml/reference/calling/stream.md): Start a background audio stream from the call to a WebSocket endpoint. - [switch](https://signalwire.com/docs/swml/reference/calling/switch.md): Execute different instructions based on a variable's value. - [tap](https://signalwire.com/docs/swml/reference/calling/tap.md): Start background call tap. Media is streamed over Websocket or RTP to customer controlled URI. - [transcribe](https://signalwire.com/docs/swml/reference/calling/transcribe.md): Transcribe the entire call in the background. Use live_transcribe for real-time transcription. - [transcribe_stop](https://signalwire.com/docs/swml/reference/calling/transcribe-stop.md): Stop an active background transcription. - [transfer](https://signalwire.com/docs/swml/reference/calling/transfer.md): Transfer the execution of the script to a different `SWML section`, `URL`, or `Relay application`. - [unset](https://signalwire.com/docs/swml/reference/calling/unset.md): Unset specified variables. - [user_event](https://signalwire.com/docs/swml/reference/calling/user-event.md): Send custom events to the connected client on the call. - [Messaging SWML overview](https://signalwire.com/docs/swml/reference/messaging.md): Reference for Messaging SWML — document modes, webhook payload, variable expansion, and methods for handling inbound SMS and MMS. - [execute](https://signalwire.com/docs/swml/reference/messaging/execute.md): Call a named section as a subroutine and return when it completes. - [goto](https://signalwire.com/docs/swml/reference/messaging/goto.md): Jump to a labeled position in the current section. - [label](https://signalwire.com/docs/swml/reference/messaging/label.md): Mark a position in the current section so that goto can jump to it. - [receive](https://signalwire.com/docs/swml/reference/messaging/receive.md): Accept an inbound message without sending a reply. - [reply](https://signalwire.com/docs/swml/reference/messaging/reply.md): Create and send an outbound message in response to an inbound message. - [request](https://signalwire.com/docs/swml/reference/messaging/request.md): Make an HTTP request to an external URL during inbound message handling. - [return](https://signalwire.com/docs/swml/reference/messaging/return.md): Return from the current section, optionally with a value. - [switch](https://signalwire.com/docs/swml/reference/messaging/switch.md): Branch on a variable's value, with optional text transforms. - [transfer](https://signalwire.com/docs/swml/reference/messaging/transfer.md): Tail-call to a new SWML document fetched from a URL.