Telephony SOP Knowledge Base
SignalWire SDK + SWML + A2P compliance — 47 topics. Agent API at /api/topics
A2P 10DLC Campaign Registry — Brand and Campaign Registration
The Campaign Registry (TCR) is mandatory for 10DLC SMS to US numbers. Covers Brand vs Campaign hierarchy, use case taxonomy, registration flow (3-5 business days), throughput tiers, DCA election, and the December 2025 default-off behaviour for newly purchased numbers.
A2P 10DLC Vetting and Trust Scoring — TCR Brand Tiers
TCR (The Campaign Registry) assigns each registered Brand a Trust Score (0-100) based on vetting tier (Standard, Enhanced, Sole Proprietor). Higher trust → higher per-second throughput, better delivery rates, fewer carrier filtering events. Enhanced Vetting via WMC Global ($40-$60 one-time) is required for the top throughput tier. Sole Proprietor is a separate tier with hard daily caps.
Agent Assist — Real-Time Prompts and Knowledge Surfacing to Live Agents
Agent assist surfaces real-time prompts, knowledge base answers, and CRM context to live human agents during an active call. Pipeline: live transcription (Deepgram/AssemblyAI streaming) → LLM analysis on partial transcript → push suggestions to agent UI via WebSocket. Latency target: under 500ms from caller utterance to suggestion display. Distinct from agent coaching/whisper (which is supervisor voice).
Context Builder — Multi-Step Guided Flows in Python Agents SDK
Use ContextBuilder when an AI agent needs structured, step-by-step conversations. Up to 50 contexts per builder, 100 steps per context. Covers single-context steps, multi-context with cross-context transitions, system_prompt overrides, and create_simple_context.
LiveWire — LiveKit-Compatible API on SignalWire
LiveWire is a LiveKit-compatible API surface from SignalWire — drop-in for code written against `livekit.agents`. Covers AgentServer/Agent/AgentSession, the rtc_session decorator, function_tool, JobContext.connect, no-op interrupt semantics, and the lift-and-shift migration from LiveKit code.
MCP Gateway — Bridge MCP Servers to SignalWire SWAIG
MCPGateway is an HTTP service that exposes MCP-protocol tool servers as SignalWire SWAIG functions. Covers MCPGateway, MCPManager, MCPClient, the config.json shape, session lifecycle, auth/SSL, and the agent-side AgentBase.add_mcp_server pattern.
POM Builder — Prompt Object Model for Agents SDK
PomBuilder constructs structured Markdown or XML prompts for voice AI agents. Sections, subsections, bulleted instructions, incremental additions, serialization, and the relationship between PomBuilder and AgentBase.prompt_add_section.
Agents Skills System — Prefabs, SkillBase, Multi-Instance, and Discovery
Pre-built agent prefabs (ConciergeAgent, FAQBotAgent, InfoGathererAgent, ReceptionistAgent, SurveyAgent) and the custom SkillBase pattern. Covers `add_skill`, multi-instance keying, parameter schemas, REQUIRED_PACKAGES/ENV_VARS validation, and skill discovery directories.
AssemblyAI Transcription — Models, Audio Intelligence, LeMUR
Transcribe call recordings with Universal-2 / Universal-3-Pro models. Sentiment analysis, entity detection (44 types), PII redaction, speaker diarization, summarization. LeMUR applies LLMs across batches of up to 200 hours. Node SDK + REST contract.
Business Hours Logic — Time-of-Day, Day-of-Week, and Holiday Routing
Route calls differently based on time-of-day, day-of-week, holidays, and timezone. SignalWire SWML uses `cond` blocks with date/time variables, or fetches a schedule from an external API. Handle DST correctly with IANA timezone names, treat 5 PM EST as 4 PM EST during DST. Holidays require an external calendar source — hardcoding is brittle.
LiveKit BYO SIP Trunk — Inbound and Outbound with SignalWire
Bridge SignalWire PSTN to LiveKit Agents via BYO SIP. Inbound: PSTN→SignalWire DID→SWML connect→LiveKit SIP domain. Outbound: LiveKit→SignalWire SIP Address→PSTN with TLS transport. Includes exact SWML, recording option, and the app-password requirement.
VAPI BYO SIP Trunk — Inbound and Outbound with SignalWire
Bridge SignalWire PSTN to VAPI AI agents via BYO SIP. Inbound: PSTN→SignalWire DID→SWML connect→VAPI. Outbound: VAPI→SignalWire SIP Address→PSTN. Includes exact SWML, credential setup, IP allowlist, and app-password requirement.
Call Attribution — UTM, GA4, GHL, and Multi-Touch Tracking
Attribute phone calls to the marketing source that drove them: paid ads, organic search, direct, referral. Two primary techniques: dynamic number insertion (DNI) per-source, and session-stitching with stored cookies. Push attribution data to GA4 via Measurement Protocol, to GHL as conversation custom fields, and to revenue dashboards via webhooks.
Call Quality Metrics — MOS, Jitter, Packet Loss, R-Factor
VoIP call quality is measured by MOS (Mean Opinion Score 1.0-5.0), R-factor (0-100), jitter (RTP timing variance), packet loss percentage, and one-way latency (mouth-to-ear). Targets: MOS >= 4.0, jitter < 30ms, packet loss < 1%, latency < 150ms. Most issues trace to network congestion, mis-sized jitter buffers, or codec/MTU misconfiguration.
Call Recording Compliance — One-Party, Two-Party, GDPR, CCPA
US states split into one-party-consent (38 states + federal) and two-party-consent (12 states including CA, FL, IL, PA, WA). Federal Wiretap Act requires one-party minimum. GDPR Article 6 requires lawful basis (typically consent or legitimate interest) plus Article 13/14 transparency notices. CCPA requires consumer notice before recording. Treat every interstate call as two-party-consent territory by default.
Call Routing Strategies — Round-Robin, Skill-Based, Geo, Time-of-Day
Seven primary inbound call routing strategies: simple forward, ring-all, hunt group (sequential), round-robin (load-balanced), skill-based, geo-based, and time-of-day. Each has distinct SWML/LaML patterns and tradeoffs in answer rate, agent fairness, and customer experience. Skill-based requires external state (CRM or DB); the others can run purely in SWML.
Callback Scheduling — Queue-Back, Scheduled Callbacks, and Virtual Hold
Three callback patterns: queue-back (caller keeps place in queue without holding), scheduled callback (caller picks a specific time), and immediate callback (caller hangs up, agent dials when free). Reduces abandonment by 30-50% and lets queue time scale beyond what callers will tolerate on hold. Implemented in SWML via call termination + scheduled outbound dialing.
Cold SMS Engine — Python Sequencer with Slot Windows and GHL Threading
Python-native cold SMS sequencer replacing n8n at scale. Cron-driven, slot-aware, TCPA-compliant. Supabase stores leads + sms_events + opt_outs. Dispatcher runs every 5 minutes, picks due leads by timezone-aware slot windows (morning/midday/evening), sends via Signal House API, mirrors to GHL sub-accounts as conversations + contacts + opportunities. Inbound webhook classifies replies and updates lead state.
Cold Transfer — Blind Transfer via SIP REFER and SWML connect
Cold transfer (blind transfer) is the pattern where the original caller is connected directly to the destination without consultation. The transferring party drops immediately. Implemented in SWML via `connect: { to: ... }` after a brief message, or via SIP REFER without the Replaces header. Faster than warm transfer but caller may have to repeat themselves.
Conference Bridging — SIP Mixers, Mute, Recording, Coaching
Conference bridging mixes 3+ audio streams into a single shared room. SignalWire conferences are named rooms; participants join by routing a call into `connect: { to: conference:name }`. Supports mute/unmute, hold, beep on entry/exit, recording, talk-detection, coaching (whisper), barge-in, and dial-out to add participants mid-call.
DTMF Handling — RFC 2833, SIP INFO, In-band Audio
DTMF (touch-tone) digits travel three ways: in-band audio in the RTP stream, RFC 2833/4733 named telephone events in RTP, or SIP INFO messages out-of-band. RFC 2833 is the default for modern IP telephony. SIP INFO is fallback when codec/transcoding strips RFC 2833 events. In-band fails on low-bitrate codecs and is deprecated for IP-to-IP calls.
Fish Audio TTS — Voice Cloning and the s1 Model
Fish Audio's TTS API and voice-cloning model. Covers /v1/tts request shape (text, reference_id, prosody, latency), the Merlino voice clone (model id 3782f7b...), built-in voice presets, /model voice cloning, pricing ($15 / 1M UTF-8 bytes), and Fish vs ElevenLabs trade-offs.
LaML / Compatibility API — Migrate Twilio Apps to SignalWire
SignalWire's Compatibility API lets Twilio TwiML and REST API apps run on SignalWire with three changes: credentials, base URL, webhook URLs. Covers cXML/LaML response generation, the @signalwire/compatibility-api SDK, supported feature surface, and the 'change the from number' caveat.
Merlino Voice — Fish Audio Cloned Voice for Outbound TTS
Merlino Voice is Mike's custom-cloned voice on Fish Audio used for branded outbound TTS — agent introductions, voicemail drops, IVR greetings, ringless drops. Distinct from generic Fish Audio TTS because the voice model is identity-locked. Voice ID, default parameters (speed 1.0, energy 0.7), audio formats (mp3 16-bit, opus, wav), and SignalWire integration via SWML play verb.
Missed Call Workflows — Text-Back Automation and Recovery
When a caller hangs up before reaching a human, automatically text them within 60 seconds with a contextual message that recovers the conversation. Reduces lost leads 40-70% in service industries. Implemented via call event webhooks (no-answer, busy, voicemail) + SMS API, with GHL or CRM integration for thread continuity.
MMS Handling — Multimedia Messaging on SignalWire
MMS (Multimedia Messaging Service) sends images, audio, video, and vCards alongside text. Max file size 5 MB on most US carriers. Supported MIME types: image/jpeg, image/png, image/gif, audio/mpeg, video/mp4. Carriers transcode aggressively. Send via SignalWire LaML with the `MediaUrl` parameter or via REST `/Messages` with `MediaUrl[]`. Subject to the same A2P 10DLC campaign registration as SMS.
RCS Messaging — RBM, Google Business Messages, Apple RCS
RCS (Rich Communication Services) is the GSMA-standardized SMS successor. Supports rich media, suggested replies, branded sender, read receipts, and typing indicators. Business-to-consumer RCS in the US is delivered via Google's RBM (RCS Business Messaging) platform. Apple began native RCS support in iOS 18 (2024-09). Carrier rollout still in progress; treat RCS as a fallback-enhanced channel, not a replacement for SMS/MMS.
Robocall Mitigation — Carrier Filtering, RMP Filings, and Analytics Tags
Robocall mitigation is the carrier-and-platform-level apparatus that blocks, labels, or filters suspected fraudulent and unwanted calls. Components: STIR/SHAKEN signing, analytics tags (Spam Likely, Scam Likely), carrier-level blocking (T-Mobile Scam Shield, AT&T Call Protect, Verizon Call Filter), FCC Robocall Mitigation Plan (RMP) database filings. Application developers can influence reputation through caller-ID consistency, rate limits, content quality, and answer rates.
Sentiment Analysis Pipeline — Call to Outcome Classification
Process call recordings through transcribe → analyze → score → store pipeline. Transcription via AssemblyAI/Deepgram/SignalWire CI. Sentiment + outcome classification via Claude or GPT with structured JSON output. Extract: service_needed, urgency, intent, conversion_probability, sentiment per turn, key entities. Costs ~$0.01-0.05 per call. Saves structured data to lead pipeline for revenue attribution.
SignalWire AI Receptionist — No-Code Voice Agent in the Portal
Build a voice AI receptionist inside the SignalWire portal without writing code. Covers AI Agent Resource setup, prompt configuration, SWAIG tool definitions in the UI, voice/language picker, assigning to a phone number or as a Call Flow Builder node, and billing model.
SignalWire Call Flow Builder (CFB)
Drag-and-drop visual editor in the SignalWire portal. Generates valid SWML under the hood. Node taxonomy (Handle Call, AI Agent, Forward, Gather, Conditions, Request, Set Variables), variable substitution with `%{...}`, building and deploying flows, and CFB-vs-SWML decision rules.
SignalWire Call Intelligence Pipeline
End-to-end pipeline: inbound call → record_call + live_transcribe + ai → post_prompt extracts structured JSON → webhook saves to DB → dashboard. Includes Relay SDK methods (call.ai, ai_hold, ai_unhold, ai_message), debug webhook streaming, and CRM injection patterns.
SignalWire Python Agents SDK
AgentBase setup, fluent prompt and parameter configuration, the @tool decorator for SWAIG, FunctionResult chaining, and the AgentServer pattern for serving multiple agents on one port.
SMS Best Practices — Consent, Opt-Out, Brand ID, Character Limits
CTIA-aligned SMS rules: opt-in confirmation, opt-out in every message, brand identification, full URLs only, prohibited content list, and the segment math (160 GSM-7 / 70 Unicode, 153/67 per segment when split). Apply to 10DLC and toll-free alike.
STIR/SHAKEN — Caller ID Attestation and the TRACED Act
STIR/SHAKEN is the FCC-mandated framework that cryptographically signs caller ID on IP-based voice calls. Originating carriers attest to caller identity at three levels — A (full), B (partial), C (gateway) — and downstream carriers verify the SIP Identity header to flag spoofed traffic. Required for all US carriers since 2021-06-30 under the TRACED Act.
SWAIG Functions — Live AI Tool Calls
SignalWire AI Gateway functions — JSON schema definitions, the webhook contract, FunctionResult return type, secure tokens, native functions, and the DataMap server-side passthrough alternative.
SWML ai verb — Voice AI Agent Configuration
The `ai` verb creates a real-time voice AI agent: ASR, LLM, TTS in one block. Covers prompt, params, post_prompt, hints, languages, pronounce, SWAIG, global_data, and the post_prompt_url callback contract.
SWML connect — Bridge to PSTN, SIP, or AI Platforms
The `connect` verb bridges the active call to a destination — PSTN, SIP URI, or AI platform endpoint. Covers basic forwarding, simultaneous and sequential dialing, whisper, answer_on_bridge, and SIP URI patterns for BYO trunks.
SWML Context Switch — Multi-Persona AI in One Call
The `context_switch` verb (and FunctionResult.switch_context) lets a live AI agent change persona mid-call. Use cases: triage agent → specialist agent, language change, escalation. Covers consolidate semantics and prompt overrides.
DataMap — Server-Side SWAIG API Passthrough
DataMap executes REST API calls on SignalWire's infrastructure — no webhook on your side. Variable substitution table, GET/POST/foreach patterns, expression-only matching, and the right use cases for DataMap vs a Python @tool handler.
SWML IVR — Prompt, Gather, DTMF, and Speech Input
Build classic IVR menus in SWML using `prompt` and `play` + `cond`. Covers DTMF capture, speech input, terminators, no-input handling, branching to other sections, and loop guards.
SWML — SignalWire Markup Language Overview
SWML is JSON or YAML that defines a call flow. Covers the document shape (version, sections, main), verb categories, expression substitution, and how SWML is served (hosted file, web hook, Call Flow Builder, or generated by Python SDK).
SWML Record and Transcribe — Background Recording, Live Transcription, Tap
Record calls with `record_call` (background, stereo) and `record` (foreground, voicemail). Stream real-time transcripts via `live_transcribe`. Fork audio to a third party with `tap`. Includes status webhook contract and Deepgram/Google speech-engine config.
Toll-Free Verification and Hosted Messaging
Toll-free SMS verification flow (separate from TCR), the Hosted Messaging path for numbers held elsewhere for voice, Letter of Authorization (LOA), and the porting prerequisites. Includes the Sept 30 / Jan 1 form-field changes and Canada-carrier specifics.
Toll-Free vs Short Code — Decision Matrix for High-Volume SMS
Toll-free numbers (800/833/844/855/866/877/888) and short codes (5-6 digit dedicated codes) are the two non-10DLC paths for high-volume A2P SMS. Toll-free: low cost ($2/mo lease, no setup fee), 3 MPS throughput after Toll-Free Verification, weeks to provision. Short code: $1000-1500/month lease, 100+ MPS, 4-12 week provisioning, requires CTIA short code application.
Voicemail Drop — Pre-Recorded Outbound Voicemail Delivery
Voicemail drop is the practice of placing an outbound call, detecting the recipient's voicemail beep, and playing a pre-recorded message — agent never speaks live. Implemented via SignalWire AMD (Answering Machine Detection) + SWML `play` triggered on `machine_end_beep` event. TCPA compliance requires prior express written consent for telemarketing; transactional drops are looser but still rule-bound. Often misused — handle with care.
Warm Transfer — Attended Transfer via SIP REFER and SWML
Warm transfer (attended transfer) is the pattern where the transferring party first speaks with the destination, briefs them, then connects the original caller. Implemented via call holding plus dialing a second leg, or via SIP REFER with attended-transfer semantics. SignalWire supports both via SWML `connect` with hold + connect, or via the Compatibility API `<Dial>` and conference bridging.