Your WebSocket-native agent does not speak SIP signaling or RTP media streams. Bridging these protocols requires deep telephony expertise that most AI teams lack.
Phone number provisioning
Regulatory forms, identity verification, and carrier relationships. Getting a number that rings your AI is harder than building the AI itself.
Codec negotiation
G.711 at 8kHz over PSTN vs. Opus at 48kHz in your browser demo. Transcoding between them without degrading quality or adding latency.
Call control primitives
Transfers, hold, conferencing, recording, IVR fallback. Production calls need these capabilities, and your AI pipeline does not provide them.
Build a Voice AI Agent
fromsignalwire_agentsimportAgentBasefromsignalwire_agents.core.function_resultimportSwaigFunctionResultclassSupportAgent(AgentBase):def__init__(self):super().__init__(name="Support Agent",route="/support")self.prompt_add_section("Instructions",body="You are a customer support agent. ""Greet the caller and resolve their issue.")self.add_language("English","en-US","rime.spore:mistv2")@AgentBase.tool(name="check_order")defcheck_order(self,order_id:str):"""Check the status of a customer order. Args: order_id: The order ID to look up """returnSwaigFunctionResult(f"Order {order_id}: shipped, ETA April 2nd")agent=SupportAgent()agent.run()
import{AgentBase,FunctionResult}from'@signalwire/sdk';constagent=newAgentBase({name:'Support Agent',route:'/support',});agent.promptAddSection('Instructions','You are a customer support agent. Greet the caller and resolve their issue.');agent.addLanguage({name:'English',code:'en-US',voice:'rime.spore:mistv2'});agent.defineTool({name:'check_order',description:'Check the status of a customer order',parameters:{type:'object',properties:{order_id:{type:'string',description:'The order ID to look up'},},required:['order_id'],},handler:(args)=>{returnnewFunctionResult(`Order ${args.order_id}: shipped, ETA April 2nd`);},});agent.run();
packagemainimport("fmt""github.com/signalwire/signalwire-go/pkg/agent""github.com/signalwire/signalwire-go/pkg/swaig")funcmain(){a:=agent.NewAgentBase(agent.WithName("Support Agent"),agent.WithRoute("/support"),)a.PromptAddSection("Instructions","You are a customer support agent. Greet the caller and resolve their issue.")a.AddLanguage(map[string]any{"name":"English","code":"en-US","voice":"rime.spore:mistv2",})a.DefineTool(agent.ToolDefinition{Name:"check_order",Description:"Check the status of a customer order",Parameters:map[string]any{"type":"object","properties":map[string]any{"order_id":map[string]any{"type":"string","description":"The order ID to look up",},},"required":[]string{"order_id"},},Handler:func(argsmap[string]any,rawDatamap[string]any)*swaig.FunctionResult{orderID:=args["order_id"]returnswaig.NewFunctionResult(fmt.Sprintf("Order %v: shipped, ETA April 2nd",orderID),)},})a.Run()}
importcom.signalwire.sdk.agent.AgentBase;importcom.signalwire.sdk.swaig.FunctionResult;importjava.util.List;importjava.util.Map;publicclassSupportAgent{publicstaticvoidmain(String[]args)throwsException{varagent=AgentBase.builder().name("Support Agent").route("/support").build();agent.promptAddSection("Instructions","You are a customer support agent. "+"Greet the caller and resolve their issue.");agent.addLanguage("English","en-US","rime.spore:mistv2");agent.defineTool("check_order","Check the status of a customer order",Map.of("type","object","properties",Map.of("order_id",Map.of("type","string","description","The order ID to look up")),"required",List.of("order_id")),(toolArgs,rawData)->{varorderId=toolArgs.get("order_id");returnnewFunctionResult("Order "+orderId+": shipped, ETA April 2nd");});agent.run();}}
# frozen_string_literal: truerequire'signalwire'agent=SignalWire::AgentBase.new(name:'Support Agent',route:'/support')agent.prompt_add_section('Instructions','You are a customer support agent. Greet the caller and resolve their issue.')agent.add_language(name:'English',code:'en-US',voice:'rime.spore:mistv2')agent.define_tool(name:'check_order',description:'Check the status of a customer order',parameters:{'order_id'=>{'type'=>'string','description'=>'The order ID to look up'}})do|args,_raw|SignalWire::Swaig::FunctionResult.new("Order #{args['order_id']}: shipped, ETA April 2nd")endagent.run
<?phprequire'vendor/autoload.php';useSignalWire\Agent\AgentBase;useSignalWire\SWAIG\FunctionResult;$agent=newAgentBase(['name'=>'Support Agent','route'=>'/support']);$agent->promptAddSection('Instructions','You are a customer support agent. Greet the caller and resolve their issue.');$agent->addLanguage('English','en-US','rime.spore:mistv2');$agent->defineTool(name:'check_order',description:'Check the status of a customer order',parameters:['order_id'=>['type'=>'string','description'=>'The order ID to look up'],],handler:function(array$args):FunctionResult{returnnewFunctionResult("Order {$args['order_id']}: shipped, ETA April 2nd");});$agent->run();
#!/usr/bin/env perlusestrict;usewarnings;uselib'lib';useSignalWire::Agent::AgentBase;useSignalWire::SWAIG::FunctionResult;my$agent=SignalWire::Agent::AgentBase->new(name=>'Support Agent',route=>'/support',);$agent->prompt_add_section('Instructions','You are a customer support agent. Greet the caller and resolve their issue.');$agent->add_language(name=>'English',code=>'en-US',voice=>'rime.spore:mistv2');$agent->define_tool(name=>'check_order',description=>'Check the status of a customer order',parameters=>{order_id=>{type=>'string',description=>'The order ID to look up'},},handler=>sub{my($args,$raw)=@_;returnSignalWire::SWAIG::FunctionResult->new(response=>"Order $args->{order_id}: shipped, ETA April 2nd");},);$agent->run;
#include<signalwire/agent/agent_base.hpp>usingnamespacesignalwire;usingjson=nlohmann::json;classSupportAgent:publicagent::AgentBase{public:SupportAgent():AgentBase("Support Agent","/support"){prompt_add_section("Instructions","You are a customer support agent. ""Greet the caller and resolve their issue.");add_language({"English","en-US","rime.spore:mistv2"});define_tool({.name="check_order",.description="Check the status of a customer order",.parameters={{"order_id",{{"type","string"},{"description","The order ID to look up"}}}},.handler=[](constjson&args,constjson&){autoorder_id=args.value("order_id","unknown");returnswaig::FunctionResult("Order "+order_id+": shipped, ETA April 2nd");}});}};intmain(){SupportAgent().run();}
usingSignalWire.Agent;usingSignalWire.SWAIG;varagent=newAgentBase(newAgentOptions{Name="Support Agent",Route="/support"});agent.PromptAddSection("Instructions","You are a customer support agent. Greet the caller and resolve their issue.");agent.AddLanguage("English","en-US","rime.spore:mistv2");agent.DefineTool("check_order","Check the status of a customer order",new{type="object",properties=new{order_id=new{type="string",description="The order ID to look up"}},required=new[]{"order_id"}},(args,rawData)=>{varorderId=args.TryGetValue("order_id",outvarid)?id:"unknown";returnnewFunctionResult($"Order {orderId}: shipped, ETA April 2nd");});agent.Run();
usesignalwire::agent::AgentBase;usesignalwire::swaig::FunctionResult;useserde_json::json;fnmain(){letmutagent=AgentBase::builder().name("Support Agent").route("/support").build();agent.prompt_add_section("Instructions","You are a customer support agent. Greet the caller and resolve their issue.",&[]).add_language("English","en-US","rime.spore:mistv2");agent.define_tool("check_order","Check the status of a customer order",json!({"type":"object","properties":{"order_id":{"type":"string","description":"The order ID to look up"}},"required":["order_id"]}),Box::new(|args,_raw|{letorder_id=args.get("order_id").and_then(|v|v.as_str()).unwrap_or("unknown");FunctionResult::with_response(&format!("Order {order_id}: shipped, ETA April 2nd"))}),);agent.run();}
What Changes When You Add SignalWire
DIY Telephony Stack
Asterisk dialplan, Perl middleware, Redis queues
SIP trunk configuration and codec debugging
Carrier negotiations and regulatory forms
Custom WebSocket-to-SIP bridge code
Separate vendors for numbers, trunking, and orchestration
Weeks of integration before your first call
SignalWire + Your AI
pip install, define your agent, assign a phone number
SIP, PSTN, and WebRTC handled natively
Phone numbers in one click, no forms
WebSocket, YAML, or SIP URI connection
One platform built by the FreeSWITCH team
Under 10 minutes to first production call
What You Keep, What SignalWire Handles
You Keep
SignalWire Handles
Your LLM (OpenAI, Anthropic, self-hosted)
SIP/RTP/PSTN connectivity
Your STT provider (Deepgram, Whisper, others)
Phone number provisioning
Your TTS provider (ElevenLabs, PlayHT, others)
Codec negotiation and transcoding
Your conversation logic and tools
Call transfers, hold, conferencing
Your deployment infrastructure
Call recording and compliance
Your cost optimization work
Carrier-grade reliability and scale
Under 10 Minutes to First Call
1
Install the SDK
pip install signalwire-agents. No trunk configuration, no carrier negotiations.
2
Define your agent
A Python class or YAML document. Your prompts, your tools, your conversation logic.
3
Get a phone number
One click for US numbers in the SignalWire dashboard. No regulatory forms.
4
Call it
Your AI answers a real phone call. SIP, PSTN, or WebRTC, all handled natively.
SignalWire was founded by the creators of FreeSWITCH, the open-source telecom stack that carriers and enterprises have relied on for two decades. This is the telephony team giving your AI a production-grade phone system.
FAQ
Does SignalWire replace my AI stack?
No. SignalWire has no opinion on which LLM, STT, or TTS you use. Your AI is the brain. SignalWire is the nervous system connecting it to the phone network.
What protocols does SignalWire support?
SIP, PSTN, and WebRTC natively. Your AI connects via WebSocket, Python SDK, or a declarative YAML document. SignalWire handles protocol translation.
How does codec negotiation work?
SignalWire transcodes between G.711 (PSTN), Opus (WebRTC), and other codecs automatically. No manual codec configuration required.
What call control features are included?
Blind and warm transfers, hold, conferencing, recording, IVR fallback, DTMF handling, and call disposition tracking. All available through the SDK or YAML.
What does it cost?
Telephony at carrier rates with no per-agent fees or orchestration surcharges. The native AI option is $0.16/min covering STT, LLM orchestration, and TTS. Transport billed separately at carrier rates. One invoice.
Trusted by 2,000+ companies
Your AI Deserves a Real Phone System
Connect your voice AI to the phone network in under 10 minutes.