Developer resourcesRecipes
Working code for every part of a call
Clone a folder, add your credentials, and it runs. Most are under two hundred lines. The builds show what they look like assembled.
Featured
AI Agents
44
Tools & integrations 13
Let a voice AI agent call an API without your serverserverless API integration for voice AISignalWire makes the API call, so no service of yours is in the tool path.py yamlCommit a transaction from a callvoice transaction confirmationUse an allow-list to validate the caller's confirmation before one transaction tool commits the request.pyCover AI agent tool latency with fillersAI agent tool latency fillersPlay localized filler phrases or a hosted wait file while a slow AI agent tool finishes.pyCreate a hosted voice AI agent with one REST callhosted voice AI agent (no server)Turn the agent definition you would serve yourself into a resource SignalWire hosts, with one POST, then put a phone number on it with one more.py tsExtract structured data after a callpost-call structured data extractionGet typed fields out of a finished conversation instead of parsing a transcript.pyGive a voice AI agent a tooltool calling for voice AILet the model call your function, and decide what it gets back.py tsLet a browser dial your agent with no dashboard setupprogrammatic WebRTC voice agent accessCreate a dialable voice AI endpoint and a restricted guest token over REST, without configuring either in the dashboard.pyLet a voice AI agent see the caller's cameramultimodal voice AI with visionEnable visual input, choose a vision model, and play a filler while the voice AI agent analyzes the caller's camera.pyNormalize spoken dates and phone numbers in a voice AI tool handlerspoken input normalization for voice AITake a date and a phone number in the caller's words, turn them into an ISO date and an E.164 number in the tool handler, and read both back for the caller to check.py tsPush events from a voice AI agent to the browservoice-controlled website navigationReturn a JSON event from a voice AI agent tool and deliver it to the browser connected to the call.py yamlPut an AI agent in a web chat widgetAI web chat widgetA small gateway on your server holds the API token, mints a signed handle per visitor and forwards the page's messages to the AI Chat API. The page learns a publishable key and nothing else.py tsRun the same voice AI agent over text chatomnichannel AI agent (voice and text)Point the AI Chat API at the URL your voice agent already serves. Create a conversation, send turns, read the log, summarise and end it, with one agent definition for both channels.py tsWrite a reusable AI agent skillreusable AI agent skillsPackage a capability once and load it into any agent with one line.py
Governance 11
Collect required details in any order with a voice AI agentslot filling for voice AI agentsLet a caller give the required details of a report in any order, keep the checklist in the tool handlers, and refuse to file until every required detail is in.py tsEnforce an AI agent's next step in codecode-enforced AI conversation flowReturn the next allowed conversation state from code instead of letting the AI agent choose it.pyGet recording consent before recordingcall recording consentSpeak the disclosure and capture the answer before any audio is written to disk.pyShow the AI model only the fields it needsdata minimization for LLM promptsLoad the whole record, expose a curated slice, and keep the rest out of the prompt entirely.pyKeep per-call state server-side, keyed by call idserver-side session state for voice AIStore full per-call state on your server, keyed by call ID, and expose only the fields the voice AI agent needs.pyProtect AI agent tool webhooks with per-call tokensAI agent tool webhook authenticationMint a token for each call and AI agent tool, then reject missing, expired, edited, or mismatched tokens.pyRequire verification before unlocking AI agent toolsverification-gated AI agent toolsThe account tools do not exist in the model's world until a handler says the caller passed.pyControl which tools an AI agent can call at each stepper-step tool scoping for AI agentsAt each point in the conversation the model can only see the tools you allowed there.pyRun isolated personas behind one numbermulti-persona AI on one numberRoute one phone number among isolated sales, support, and billing AI personas, each with access only to its own tools.pyWalk a caller through steps they cannot skipguided AI conversation flowExpose only the next allowed AI agent tool at each step so callers cannot move backward or skip ahead.pyWrite call dispositions from data your handlers recordedcall disposition from handler dataBuild call dispositions only from qualification fields recorded by tool handlers, not from transcripts or model summaries.py
Other 8
Configure a voice AI agent per request for many tenantsmulti-tenant voice AIConfigure a temporary voice AI agent for each request from tenant data in a query string or header, without changing the deployed agent.pyGive a voice AI agent a video avatarAI video avatarAssign idle, listening, and talking video files so a voice AI agent shows the matching avatar state during video calls.py yamlRun a Bedrock voice agentAmazon Bedrock voice agentRun the same voice AI agent and tool handler through Amazon Bedrock by changing the agent class and Bedrock settings.pyRun a voice AI agent as an AWS Lambda functionserverless voice AI on AWS LambdaDeploy one voice AI agent file as an AWS Lambda handler for both call-flow and tool requests behind basic authentication.pyRun a voice AI agent from one YAML filedeclarative voice agent in YAMLDefine and run a voice AI agent from one YAML file without installing an SDK or hosting a server.yamlRun LiveKit Agents code on SignalWireLiveKit Agents compatibilityRun LiveKit Agents-style instructions, sessions, and Python tools through SignalWire while keeping the same agent structure and tool functions.pyStart from a prefab AI agentprebuilt AI receptionist and survey agentsA complete receptionist or survey agent runs from a prefab class and a short configuration block.py tsSwitch language mid-callmultilingual voice AIChange the conversation language and matching voice during a live voice AI call.py yaml
Call control 3
Control when a caller can interrupt a voice AI agentbarge-in and turn-taking for voice AISet which speech events may cut a voice AI agent off, how many words it takes, and how much silence ends the caller's turn, as bounded ai.params.py tsPause a voice AI agent mid-call and bring it backAI agent hold and resumePut the caller on hold with a spoken line, take them off it, or end the AI on a call that keeps running, each with one REST command.py tsPlace an outbound AI calloutbound AI callingPlace a REST call with the voice AI agent definition and wait for the callee to speak before the agent responds.py yaml
Monitoring 3
Inject a message into a live AI calllive AI agent prompt updatesSend a REST command to update a live AI call with a system message, shared data, or a replacement prompt.pyStream voice AI agent debug eventsvoice AI observabilitySelect a voice AI debug level, stream matching events to your webhook, and handle them as they arrive.py yamlTest a voice AI agent offline with swaig-testoffline testing for voice agentsThe SDK's swaig-test command loads an agent file with no number, tunnel or account. It prints the SWML the platform would fetch, lists the tools, and runs any tool with the arguments you give it.py
Handoff 2
Change a voice AI agent's instructions mid-callvoice AI prompt switching mid-callA tool result replaces the system prompt on the call in progress, summarising or dropping the earlier turns, with no transfer.pyTransfer a call without losing contextcontext-preserving call transferPass caller identity and state with the transfer so the next call leg receives the context.py
Knowledge 2
Ground a voice AI agent in your documentsRAG for voice AIConnect a voice AI agent to your documents so it retrieves relevant content before answering.pyRemember a returning caller across callsconversation memory for voice AI (returning callers)Have the platform save a summary when a call ends and hand it back when the same number calls again, so the agent picks up where it left off.py ts
Routing & queueing 2
Builds 7
Voice
57
Call control 22
Answer an inbound callinbound call handlingAccept an incoming call, greet the caller, and hang up cleanly.py yamlBuild a conference callconference callingPut several legs in one room and control each member independently.py yamlCall from a browserWebRTC browser callingPlace a call from a web page into the same flow a phone reaches.ts pyConnect a PBX with a Domain ApplicationSIP trunking for a PBXAn IP-authenticated Domain Application takes inbound SIP from your PBX and a SIP Gateway carries calls back to it.py yamlStart, steer and stop live translation on a call in progressreal-time call translation over RESTSwitch translation on partway through a call, speak a translated line into it, ask for a summary, and switch it off, each with one REST command.py tsDetect a machine, fax tone or digits on a call in progressanswering machine detection (AMD) over RESTStart answering machine, fax tone or keypad detection on a call that is already up, and read the result at your webhook.py tsDetect an answering machineanswering machine detection (AMD)Use answering machine detection to classify a pickup as human or voicemail before playing the main message.pyEmbed a call widget with no backendclick-to-call widgetA sw-click-to-call element with a Click to Call token from the Dashboard and a destination address puts a call button on a page. No server of yours is in the call path.pyEnd or transfer a live call over RESTREST call control (hangup and transfer)Hang up a live call with a reason, send it to a new destination, or unbridge it from its peer, each with one REST command addressed to the call id.py tsPause and resume a call recording over RESTcall recording pause and resumeStart recording a live call from your own backend, pause it while a card number is read out, resume it, and stop it, all by control id over REST.py tsPlace an outbound callprogrammatic outbound callingDial a number from your own code and follow the call through to completion.pyPlay a prompt and collect digits or speech over RESTprompt playback and input collection on a live callSpeak a prompt into a live call from your own backend, stop it early, and collect keypad digits or speech, with the result delivered to your webhook.py tsReceive calls in the browserWebRTC softphone in the browserRegister a browser as a WebRTC endpoint with a subscriber token, then route calls to its address.py tsRecord a callcall recordingStart a recording and pick it up from the completion webhook.py yamlReduce background noise on a callAI noise suppressionTurn call noise reduction on or off in the call flow or during a live call through REST.yaml pyRegister a SIP endpoint and receive callsSIP endpoint registrationCreate SIP credentials for a softphone, register it as an endpoint, and route calls to its address.pySend DTMF to someone else's IVRautomated DTMF navigationSend programmed keypad tones during an outbound call to navigate an external IVR.pyStream call audio to a WebSocket that checks a bearer tokenauthenticated media streaming over WebSocketSend one side of a call, or both, to your own WebSocket over TLS, with a bearer token on the connection and your own metadata attached.py tsStream call audio to your own servermedia streaming and audio forkingCopy live call audio to your WebSocket or RTP server, then stop the stream by its control ID.yaml pyTake a voicemailvoicemailIf a bridge fails, play a voicemail prompt, record the caller's message, and send its download URL to a status webhook.yaml pyTranscribe a voicemail and text it to the ownervoicemail transcription (voicemail to text)Turn transcription on in a cXML Record, then text the owner the words and the recording link when the transcription callback arrives.py tsTransfer a SIP call with REFERSIP REFER transferHand a SIP call to another endpoint with a REFER, sending the destination URI and, when the far end asks for them, credentials.py ts
Routing & queueing 13
Build an IVR menuIVR menu (DTMF)Play a menu, collect keypad input, and route the caller to the right place.py yamlBuild an IVR without a serverserverless IVRCreate and assign a serverless IVR call flow through REST, without hosting a webhook server.pyCollect speech input and branch on itspeech recognition IVRAsk an open question, recognise the answer, and take a different path for each.py yamlForward calls to a phone and keep the caller's numbercall forwarding with caller ID pass-throughForward every call on a number to a phone, and show that phone the original caller's number instead of your own.py tsHost a TwiML bin without a serverhosted cXML script (TwiML bin)Store a cXML document on SignalWire with one REST call, get back the URL it is served from, and route a number to it, with no server of yours in the call.py tsLook up the caller and branch inside the call flowdata-driven call routing (CRM lookup)Have the call itself fetch the caller's record from your API, branch on a field of the reply, and still reach a human when the lookup fails.py tsOffer a callback instead of a holdvirtual hold with callbackCollect the caller's number and context, end the held call, then call them back with that context.pyQueue a call until an agent is freecall queuingCallers wait in a named queue with hold audio and are bridged in order as agents connect to it.yaml pyReject callers on a blocklist before answeringcall blocking and screening (blocklist)Read the caller's number when SignalWire fetches your call document, and decline a listed number before the call is answered while everyone else is connected.py tsRelay calls and texts through a proxy numberphone number masking (call and text by proxy)Pair two people on one number of yours so calls and texts between them are relayed with your number showing, and neither ever sees the other's.py tsRoute calls by dialed number or timetime-of-day call routingRead the dialed number and local time from each inbound webhook, then return the matching call flow.pyRoute SIP calls to AI agents by usernameSIP routing to AI agentsMap SIP usernames on one domain to different AI agents and return the selected agent's call flow.pyDial destinations in order or all at once, with a failure pathsequential and simultaneous ringDial destinations sequentially or simultaneously, then run a failure branch if no connection succeeds.yaml py
Governance 8
Check consent before an outbound calloutbound call consent and hours checksCheck stored consent and the callee's local calling window before your code sends an outbound dial request.pyExport recordings and enforce retentioncall recording retention and exportCopy recordings older than your retention window to your storage, then delete each SignalWire original after a successful copy.pyIssue a browser calling token restricted to chosen destinationsscoped WebRTC access tokensMint a short-lived browser token and restrict what it is allowed to call.pyIsolate tenants with subprojects and scoped tokensmulti-tenant isolation with scoped API tokensCreate a subproject for each tenant and issue API tokens limited to that subproject and an explicit permission list.pyLet your users buy a phone number through your appself-service number provisioning for tenantsGive each customer their own project and API token, then search, buy, route and release phone numbers with their credentials rather than yours.py tsRegister an E911 address for a numberE911 address registrationCreate an emergency address through REST, look up the phone number, and attach that address to it.pyVerify a caller id for outbound callscaller ID verificationThree REST requests register a number you own elsewhere as a verified caller ID. You submit the code you heard, and redial the verification call if you missed it.pyVerify a webhook signaturewebhook signature verificationThe gate refuses, with 403 and before any route runs, a request whose signature header does not match hex(HMAC(signing_key, url + raw_body)). X-Signalwire-SHA256-Signature decides when present; otherwise X-Signalwire-Signature, the SHA-1 one, does.py
Monitoring 7
Barge into a live callcall barge-inJoin an in-progress call with full audio, and leave without tearing it down.pyHandle call status callbackscall status webhooksReceive ordered webhooks for initiated, ringing, answered, and completed call states, keyed by call ID.pyListen to a live callsilent call monitoringAttach to a call in progress and hear both sides without joining it.pyReconcile webhooks against the Logs APIwebhook reconciliation against call logsPage through voice and message logs, find entries missing from your webhook store, and retrieve each missing call's event history.pyStart live transcription and consume the webhookreal-time call transcriptionTurn on transcription for a call and receive the text as it is spoken.py yamlTranscribe a call in the backgroundasynchronous call transcriptionStart or stop background transcription on a live call through REST and receive available transcript text at your status webhook.pyWhisper to an agent mid-callagent whisper and call coachingOne-way audio that only the agent's leg can hear.py
Other 4
Buy a number and point it at your appphone number provisioningSearch by area code or pattern, purchase, and assign the number's call and message handlers, all over REST.pyLook up a caller's carrier and namephone number lookup (carrier and CNAM)One GET returns a number's validity, formatting, country and type. include=carrier,cnam adds the carrier record and the caller-ID name.pyMove a TwiML app by changing the endpointTwilio migration (TwiML compatibility)Point your TwiML app at SignalWire's compatible REST endpoint and credentials while keeping the same call request and XML response.pyTranslate a call in real timereal-time call translationTranslate both sides of one bridged call so each participant speaks and hears their chosen language.py yaml
Handoff 3
Whisper a summary to the agent before connecting the callerwarm transfer with agent whisperCompose a bounded summary, play it to the agent, then join the caller.pyHand off from AI to a human agentAI-to-human handoff with contextStore the AI agent's notes by call ID, transfer the caller to a queue, and load those notes for the human agent.pyTransfer a callcall transferMove a live caller to another number or address.py yaml
Builds 6
Messaging
12
Governance 4
Handle SMS STOP and START in your own codeSMS opt-out (STOP) handlingVerify inbound webhook signatures, record STOP or START, send a confirmation, and check the consent record before every outbound SMS.pyRedact a message body after sendingSMS content redactionOne PATCH with body "" clears a sent message's stored body in SignalWire's records. The empty string is the only value the spec accepts, and only a message in a terminal state is eligible.pyRegister a 10DLC brand and campaign10DLC registrationA brand and campaign are registered over REST, numbers are assigned to the campaign, and the status webhook reports carrier approval.pySend a batch within your rate limitrate-limited bulk SMSStart one SMS request per documented interval for the number type while leaving carrier delivery timing to the platform.py
Routing & queueing 3
Forward an inbound SMS to other numbersSMS forwarding to a groupSend every text that arrives on your number on to a list of other numbers with the Messaging reply method, prefixed with the sender, without replying to the sender.py tsRun an SMS survey over several messagesSMS survey (text message survey)Text a customer a question, keep track of where each number is in the survey, ask the next question when a reply arrives, re-ask when it does not fit, and stop the moment they say STOP.py tsSend from a number group with sticky sendersticky sender for SMS number poolsWhen you create a number group with sticky_sender: true, the platform picks From numbers out of that pool and holds one per recipient. A compat send names the group as MessagingServiceSid and carries no From.py
Other 2
Tools & integrations 2
Publish events to browsers with PubSubreal-time browser events (PubSub)A PubSub token grants read or write on named channels for a number of minutes. Your server mints one per member, and decides who may write. The browser never holds the project API token.pyText the caller during the callin-call SMSHave an AI agent tool text the caller during a live voice call without exposing the phone number to the model.py yaml
Video
5
Call control 3
Add a phone caller to a video roomPSTN dial-in to a video conferenceCreate a video room through REST, then connect a phone call to that room.yaml pyCreate a video room and join from the browserWebRTC video roomsA room is created over REST, a token is minted per participant, and the browser joins with layouts and screen share.py tsLaunch a prebuilt video conferencehosted video conferencingCreate a themed hosted video conference over REST, then retrieve participant tokens with names and access scopes.py
Monitoring 2
Record a video roomvideo room recordingEnable recording when you create a video room, then list or delete session recordings through the REST API.pyStream a video room to RTMPRTMP live streaming of video roomsStart, update, or stop a video room's RTMP stream through REST using your streaming server URL.py
Fax
2
Nothing matches that filter.
/ to search · Esc to clear