Skip to main content

95 docs tagged with "SWML"

SWML related content.

View all tags

ai

Create an AI agent to interact with users.

ai.languages

Configure the spoken language of your AI Agent, as well as the TTS engine, voice, and fillers.

ai.params

Parameters for AI that can customize the AI agent's behavior.

ai.post_prompt

The final set of instructions and configuration settings to send to the agent.

ai.post_prompt_url

The URL that the user defines to which to send status callbacks and reports.

ai.prompt

Establish the set of rules and instructions for the AI agent through a prompt.

ai.pronounce

Use this object to clarify AI's pronunciation of certain words or expressions.

ai.SWAIG

The SignalWire AI Gateway Interface. Allows you to create user-defined functions that can be executed during the dialogue.

answer

Answer incoming call and set an optional maximum duration.

Call whisper

A guide that shows you how to perform a Call Whisper using SWML.

cond

Execute a sequence of instructions depending on the value of a JavaScript condition.

connect

Dial a SIP URI or phone number.

connect.headers

Custom SIP headers to add to INVITE. Has no effect on calls to phone numbers.

contexts.steps

An array of objects that define the steps in the context.

data_map.expressions

An array of objects that define plain string or regex patterns to match against the user's input.

defaults.web_hook_url

The default URL that the user defines to which to send status callbacks and reports.

execute

Execute a specified section or URL as a subroutine, and upon completion, return to the current document.

functions.data_map

Defines how a SWAIG function should process and respond to the user's input data.

get_visual_input

Fillers that will be played while the AI Agent is running the `get_visual_input` function.

goto

Jumps to a defined label in the current SWML section.

internal_fillers

Fillers that help break silence between responses and are played asynchronously during the function call.

Introduction to SWML

Get started with SWML (SignalWire Markup Language), a markup and scripting language for quickly writing powerful Relay applications in YAML or JSON documents.

label

Mark any point of the SWML section with a label.

Methods

Guides for using methods with SWML.

params.conscience

A prompt for AI that reinforces the AI agent's behavior and guardrails throughout the conversation.

params.hold_music

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

pay

Enable secure payment processing during voice calls.

pay.payment_connector_url

The payment_connector_url is the URL to make payment requests to upon completion of all required payment details.

play

Play file(s), ringtones, speech or silence.

prompt

Play a prompt and wait for input.

prompt.contexts

An object that defines the context steps for the AI. The contexts are used to define the flow of the conversation.

prompt.pom

The prompt object model (POM) is a structured data format for organizing, and rendering prompt instructions for AI agents.

Prompts Object

Customize the audio prompts played during different stages of the payment process.

prompts.actions

Customize the audio prompts played during different stages of the payment process.

record

Record the call audio in the foreground pausing further SWML execution until recording ends.

request

Send a HTTP request to a remote URL.

Request

Learn how to use the request method in SWML to send HTTP requests to a web server.

return

Return from a `execute` method or exit script.

send_sms

Send an outbound message to a PSTN phone number.

set

Set script variables to the specified values.

sleep

Set the amount of time for the current application to sleep for in milliseconds before continuing to the next action.

SWAIG Includes

Remote function signatures to include in SWAIG functions.

SWAIG.functions

Functions that can be executed during the interaction with the AI.

switch

Execute different instructions based on a variable's value.

tap

Start background call tap. Media is streamed over Websocket or RTP to customer controlled URI.

transfer

Transfer the execution of the script to a different `SWML section`, `URL`, or `Relay application`.

unset

Unset specified variables.

webhooks.foreach

Iterates over an array of objects and processes an output based on each element in the array.