SIP Trunking for Voice AI Agents: Setup, Costs, Gotchas
Bundled platform number, BYOC, or your own SIP trunk for a voice AI agent. Real per-minute rates from Twilio, Telnyx, Vapi, Retell, and African carriers, plus codec, concurrency, and caller ID gotchas.

Every voice AI agent needs a way to reach the phone network, and the cheapest demo path becomes the most expensive production path if you pick it by default. The decision is really three options: rent a number bundled inside your voice platform, bring your own carrier over SIP, or run your own SIP trunk connected straight to your agent stack. At low volume the difference is noise; past roughly 10,000 minutes a month it is one of the three largest lines on the bill, alongside the language model and text-to-speech.
This guide walks through what a SIP trunk actually does for an AI agent, what the carriage costs from the main providers, how to connect one step by step, and the codec, concurrency, and caller-ID problems that only show up after launch. It also covers Kenya and East Africa, where the bundled US platforms simply do not sell numbers.
What a SIP trunk does for a voice AI agent
A SIP trunk is the pipe between your software and the public switched telephone network. It replaces physical phone lines with an internet connection that carries calls in both directions. For a voice AI agent specifically, the trunk does five jobs:
- Delivers inbound calls from the PSTN to your agent stack when someone dials your number.
- Places outbound calls from the agent to customers, prospects, or staff.
- Provides the phone numbers (DIDs) your callers see and dial, local or toll-free.
- Carries STIR/SHAKEN attestation so your outbound calls are signed and less likely to be labeled as spam.
- Streams raw audio to your speech-to-text engine in real time. Without a media streaming feature (Twilio Media Streams, Telnyx Media Streaming, or an equivalent RTP fork), the trunk handles call control only and the AI cannot hear or speak.
That last point is what separates a trunk that works for a voice agent from one that merely works for a PBX. Many cheap trunks sold for office phone systems have no way to fork live audio into an application. If the provider cannot stream media, it cannot host an AI agent, whatever the per-minute rate says.
Bundled numbers vs bring your own carrier
There are three realistic ways to give an agent a phone line, and they trade convenience against cost and control.
Bundled platform numbers. Vapi includes phone numbers in its plans and charges nothing extra for its own telephony transport, while Retell charges a flat $0.015 per minute for calls on its telephony (Vapi pricing, Retell pricing). This is the fastest path: you get a number, the audio pipeline is already wired to the models, and concurrency is a plan setting. The costs are a telephony margin baked into the platform and limited country coverage.
BYOC through a CPaaS. You keep your own carrier relationship and connect it to the platform or your stack over SIP. Twilio charges $0.004 per minute in each direction for BYOC trunking, compared with $0.014 outbound and $0.0085 inbound on its full retail voice product (Twilio voice pricing). Vapi passes through Twilio at $0.008 inbound and $0.014 outbound, and Telnyx at $0.0055 per minute. You pay the platform its hosting fee plus the carrier rate, and you own the number and the carrier contract.
Your own SIP trunk. You contract directly with a carrier such as Telnyx, Bandwidth, or a local operator, and your agent infrastructure (a self-hosted stack, LiveKit, or a custom build) registers to the trunk. This is the cheapest carriage at volume and the most control, and it is entirely your problem when calls fail at 2 a.m.
The decision usually comes down to volume, countries, and who owns the number. Under a few thousand minutes a month in a country the platforms cover, bundled is fine. At five-figure monthly minutes, on numbers your business already owns, or in countries the platforms do not serve, you need BYOC or your own trunk.
The per-minute cost stack
Telephony is only one layer of what a voice agent minute costs. Here is a realistic self-managed stack for a US deployment, using published rates:
- Telephony (Telnyx SIP trunk): $0.005 per minute outbound, $0.0032 inbound (Telnyx SIP pricing).
- Speech-to-text (Deepgram Nova-3 streaming): $0.0043 per minute monolingual, $0.0052 multilingual (Deepgram pricing).
- LLM: roughly $0.003 to $0.16 per minute depending on model, on the pass-through rate cards platforms publish.
- Text-to-speech: $0.015 per minute for platform voices, up to $0.06 to $0.10 for premium ElevenLabs voices (Retell rate card).
Add those up for an outbound agent with a mid-range model and standard voices and you land near $0.03 to $0.05 per minute all-in on a self-managed stack, versus roughly $0.07 to $0.31 per minute on a fully bundled pay-as-you-go platform. On 20,000 outbound minutes a month, that gap is $1,000 to $5,000 a month. That is the entire economic argument for owning the trunk.
The counterweight is engineering time. Someone has to configure the trunk, monitor it, and fix it. If you do not have that capacity, the bundled margin is a reasonable fee for not thinking about telephony.
Setting up a trunk, step by step
The mechanics are similar across carriers. Using Telnyx or Twilio BYOC as the example:
- Create the SIP connection. In the carrier portal, create a SIP trunk (Telnyx calls it a SIP connection, Twilio an Elastic SIP trunk). Choose credential-based authentication for a platform integration, or IP-based authentication if your agent server has a static IP.
- Buy or port numbers. Assign DIDs to the trunk. Porting an existing business number takes days to weeks depending on the losing carrier, so start it early.
- Configure the audio path. Enable media streaming or fork audio to your agent stack. This is the step that makes it an AI trunk rather than a phone trunk.
- Set the codec. Force G.711 (PCMU for North America, PCMA elsewhere). More on why below.
- Point inbound calls at your agent. Set the trunk webhook or SIP URI to your platform inbound endpoint (Vapi and Retell both publish one per agent) or your own server.
- Register outbound caller ID. Verify number ownership so the carrier can sign calls with STIR/SHAKEN attestation.
- Test with real phones. Call from mobile networks, not just softphones. Check one-way audio, transcription quality, and failover before routing real customers.
Expect a day of work for a clean setup and a week if porting is involved.
Codec, latency, and concurrency gotchas
These are the failure modes that do not appear in the demo.
Codec choice hits transcription accuracy. G.711 is uncompressed 64 kbps audio and gives speech-to-text the cleanest signal. G.729 is aggressively compressed and measurably degrades transcription accuracy, which directly hurts the agent's comprehension. If your trunk or PBX transcodes to G.729 by default, force G.711 end to end. Opus is excellent but not universally supported across the PSTN, so it is fine inside your stack and risky at the carrier edge.
Latency is additive. Every leg adds delay: PSTN to carrier, carrier to your stack, STT, LLM, TTS, and back. A carrier with points of presence near your users and your compute region matters more than a fraction of a cent per minute. This is one reason Telnyx, which owns its network, is popular for voice AI, and why routing Kenyan calls through a US region feels sluggish.
Concurrency models punish bursty agents. AI fleets spike: an outbound campaign can spin up 200 simultaneous calls in under a minute. Metered per-minute trunks absorb that. Channel-based trunks, where you pre-buy a fixed number of concurrent paths, either make you over-provision or fail calls with a 503 at the ceiling. Telnyx prices inbound channels at $12 per month for the first ten if you want predictable capacity, and carriers also gate outbound calls-per-second. Know your peak before you pick the model.
Transfers keep billing. Retell's billing note is typical: the AI fee stops when a call transfers to a human, but the telephony leg keeps billing for the rest of the call. Design your warm transfer flow with that in mind.
Caller ID trust and compliance
Outbound agents live or die on answer rates, and answer rates live or die on caller ID reputation.
In the US, STIR/SHAKEN attestation signs your calls so terminating carriers can verify they are not spoofed. Getting the highest A-tier attestation requires the trunk provider to verify that you own the numbers you present, which is a real onboarding step, not a checkbox. Branded caller ID, which displays your business name on the recipient's phone, typically costs $5 to $20 per month per number plus a one-time setup of $500 to $2,000, according to Ringlyn's 2026 SIP trunk pricing comparison.
Other line items that surprise buyers: emergency calling registration runs about $1.50 per month per number on Telnyx, call recording is an extra $0.002 per minute, and toll-free inbound is more expensive than local inbound almost everywhere ($0.022 per minute on Twilio, $0.015 on Telnyx). Kenya has its own rules on recording consent for AI voice agents, which apply regardless of which trunk carries the call.
Kenya and East Africa: your actual options
Vapi and Retell do not sell Kenyan numbers, so a voice agent answering a Nairobi line needs a local carrier. The realistic options:
- Africa's Talking. A regular Safaricom or Airtel number costs KES 5,000 setup plus KES 2,000 monthly (before VAT). Local inbound is KES 0.50 per minute and outbound KES 2.50 per minute. SIP agent outgoing calls are KES 0.25 per minute, one call per second is free, and each extra CPS is KES 3,000 per month (Africa's Talking voice pricing). It also offers BYOC if you want to keep an existing carrier.
- Sautikit. A Nairobi voice API built for AI agents, with Kenyan numbers, KES 3 per minute outbound and free inbound, and a media-stream fork for bringing your own model.
- AfriQ Networks. An SLA-backed Kenyan SIP trunk at KES 3 per minute, prepaid, with unlimited channels at no channel cost and one Kenyan DID included.
Uganda and Tanzania are pricier on Africa's Talking: a Ugandan regular number is UGX 200,000 setup and UGX 40,000 monthly with outgoing calls at UGX 290 per minute, while Tanzanian outgoing runs TZS 60 per minute. The pattern across the region is the same: inbound is cheap, outbound mobile termination is expensive, and toll-free is a premium product, not a default.
The typical architecture is a local trunk or API for the Kenyan leg, bridged to an agent stack hosted wherever the models run. We covered the Kenya-specific wiring in how to connect voice AI to Kenyan phone numbers.
When BYOC is the wrong choice
Owning the trunk is not always right.
- Your volume is small. Under a few thousand minutes a month, the bundled margin costs less than the engineering hours to maintain a trunk.
- You have no one to run it. A trunk is infrastructure. If nobody on the team has touched SIP before, start bundled and revisit at scale.
- You need many countries fast. Provisioning local trunks country by country is slow. CPaaS coverage across 100-plus locales is genuinely hard to replicate.
- Your use case is a short pilot. Prove the agent works on bundled telephony, then migrate. Migrating a number to BYOC later is routine; rebuilding a failed pilot is not.
Common mistakes to avoid: choosing a trunk with no media streaming, leaving the codec at the PBX default, ignoring outbound CPS limits until a campaign fails, and budgeting only the per-minute rate while forgetting number rental, emergency calling fees, recording, and branded caller ID.
Frequently asked questions
How much does a SIP trunk for a voice AI agent cost per month? Carriage runs $0.003 to $0.008 per minute on metered US trunks, plus $1 to $3 per month per number and small fees for recording and emergency registration. A 20,000-minute month costs roughly $80 to $160 in pure carriage on Telnyx rates, before the AI stack itself.
Can I keep my existing business phone number? Yes. That is the main point of BYOC. You port the number to the new carrier or, with some providers, keep your current carrier and route calls over SIP without porting. Porting takes days to weeks, so start it before you build.
Do I need Twilio to connect a voice agent to the phone network? No. Twilio is one option among several. Telnyx, Bandwidth, Plivo, and regional carriers all offer SIP trunks with media streaming, and platforms like Vapi and Retell bundle telephony so you may not need a separate carrier at all.
Why does my AI agent misunderstand callers more on the phone than in web demos? Usually the codec. Web demos send clean wideband audio; a phone call transcoded to G.729 loses frequencies that speech-to-text needs. Force G.711 end to end and check that no PBX in the path is transcoding silently.
What is the difference between a SIP trunk and a voice API like Africa's Talking? A SIP trunk is raw carriage: your infrastructure registers to it and handles the call logic. A voice API wraps the carriage in REST calls and XML or JSON actions, so you write application code instead of managing SIP sessions. APIs are faster to build on; raw trunks are cheaper and more flexible at scale.
How many simultaneous calls can one trunk handle? On metered trunks, concurrency is effectively elastic up to your account limit, though outbound calls-per-second is gated separately. On channel-based trunks, you get exactly what you paid for and excess calls fail. Size for your peak campaign, not your average day.
Where to go from here
The telephony layer is rarely the hardest part of a voice agent, but it is the part that decides whether the economics work at scale and whether the agent can hear callers properly. If you are weighing bundled against BYOC, or trying to get a Kenyan or East African number onto an AI agent stack, our custom builds team designs and ships voice agents end to end, and our AI employees can run the phone line as one duty of a broader digital employee. Book a call and we will map the trunk options for your volume and countries. For the wider budget picture beyond telephony, see our voice AI implementation cost breakdown.
About AI Agents Plus Editorial
AI automation expert and thought leader in business transformation through artificial intelligence.



