Skip to content

SIP Trunks for AI Voice Agents (Vapi, LiveKit)

How to connect a SIP trunk to AI voice agent platforms such as ElevenLabs, Vapi, LiveKit and Retell: setup steps, codecs, latency, routes and rules.

Updated 20 October 2026

AI voice agent platforms such as ElevenLabs, Vapi, LiveKit and Retell can connect to the phone network through your own SIP trunk: you point the trunk at the platform's SIP address for inbound calls, give the platform your trunk's address and credentials for outbound calls, and agree on codecs and security. A good trunk keeps latency low, delivers your caller ID and accepts AI calling as a declared traffic type.

Why use a SIP trunk for AI voice agents?

Each platform offers numbers through built-in telephony partners, which is the fastest way to start. A bring-your-own SIP trunk is worth it when you need:

  • Numbers or termination in countries the built-in option does not cover.
  • Lower cost at volume, by buying minutes at wholesale rates.
  • Your existing numbers and caller IDs, already registered and reputable.
  • The same carrier for AI agents and human agents, so routing and billing stay in one place.

If SIP trunks are new to you, start with what is SIP trunking.

How do you connect a SIP trunk to an AI voice platform?

  1. Inbound: create the number on your trunk and route it to the platform's SIP URI. On the platform, import the number and attach it to an agent.
  2. Outbound: on the platform, enter your trunk's SIP address and either username and password (digest authentication) or allowlist the platform's IP addresses on your trunk.
  3. Transport and security: choose UDP, TCP or TLS as both sides support. ElevenLabs, for example, documents TLS transport and media encryption, and asks you to allowlist its SIP server IP range.
  4. Codecs: offer G.711 first; it avoids transcoding. See VoIP codecs G.711 and G.729.
  5. Number format: send and expect numbers in E.164 format. See E.164 number format.
  6. Test inbound, outbound, DTMF, transfers to human agents and hang-up handling.

ElevenLabs, Vapi, LiveKit and Retell SIP trunking

All four document a bring-your-own SIP trunk setup, with the same building blocks: an inbound SIP endpoint on the platform, an outbound trunk definition with your provider's address and credentials, and number import. Field names and supported options change between releases, so follow each platform's current SIP trunking guide and ask your trunk provider for its connection details (SIP host, port, transport, authentication method, IP ranges).

What makes a good route for AI voice calls?

RequirementWhy it matters for AI agents
Low latency and jitterEvery extra delay makes the agent sound slow and causes people to talk over it
No transcodingTranscoding adds delay and degrades audio, which hurts speech recognition. See VoIP transcoding
CLI deliveryPeople answer recognizable numbers; non-CLI routes lower answer rates
Reliable DTMFAgents often read keypad input for menus and verification
Enough channels and CPSAI agents scale to many parallel calls quickly. See VoIP channels and CPS
Per second billingAI calls are often short

Choose a trunk point of presence close to the platform's region, and watch post dial delay and call quality and MOS in your CDRs.

Which rules apply to AI voice agent calls?

Inbound AI agents answering customers who call you raise few telecom issues. Outbound AI calls are regulated: in the US, the FCC ruled in February 2024 that AI-generated voices are "artificial" voices under the TCPA, so outbound AI calls need prior express consent, and written consent for telemarketing, plus do-not-call and calling hour rules. Rules differ by country, and some also require telling people they are talking to an AI. See are auto dialers legal. Declare AI calling to your route supplier: undeclared automated traffic is cut quickly.

Routes for AI voice platforms

VoIPMatcher sources VoIP termination for CPaaS and AI voice platforms from carriers that accept the traffic. Request a route for your AI voice agent with destinations, expected concurrent calls and use case.

Frequently asked questions

Do I need my own SIP trunk for an AI voice agent?

Not always. Most AI voice platforms can sell you numbers and calling through a built-in telephony partner. Bringing your own SIP trunk makes sense when you need numbers in more countries, lower per minute costs at volume, specific caller IDs, or routes your platform's partner does not offer.

Which codec is best for AI voice agents?

G.711 is the safest choice on phone networks: it is supported everywhere and avoids transcoding, which adds delay and can hurt speech recognition. Wideband codecs such as Opus sound better but work only where both sides and the route support them. Avoid routes that transcode to low bitrate codecs.

Can AI voice agents make outbound sales calls?

Technically yes, but the rules are strict. In the US, the FCC treats AI-generated voices as artificial voices under the TCPA, so outbound calls need prior express consent, and prior express written consent for telemarketing, plus do-not-call and calling hour rules. Other countries have their own rules, and route suppliers will ask about the use case.

How much latency is acceptable for an AI voice agent call?

For natural conversation, the total delay between the caller finishing a sentence and hearing the reply should stay as short as possible, ideally around a second or less. The network path is only part of it; speech recognition, the language model and voice synthesis add most of the delay. Choose routes and regions that keep network delay low.

Need a route?

Send the destination, route type and target rate. We reply with what we can deliver.

More guides

All guides
VoIP routes What Is VoIP Traffic? Wholesale Voice Traffic Types What VoIP traffic is in wholesale voice: conversational, call center, dialer and calling card traffic, and why carriers price, accept or refuse each type. VoIP routes What Is SIP Trunking? How SIP Trunks Work What a SIP trunk is, how SIP trunking connects a PBX to the phone network, what you need to set one up and how it compares with VoIP and PRI. VoIP routes Are Auto Dialers Legal? TCPA and Dialer Rules Are auto dialers illegal? The US TCPA rules on consent, prerecorded voice, abandoned calls and do-not-call lists as of 2026, and why rules differ by country. VoIP routes Spam Likely on Business Calls: Causes and Fixes Why business calls show Spam Likely or Scam Likely, how call analytics label numbers, and the legitimate fixes: registration, attestation, consent and volume. VoIP routes VoIP Route Types: Premium vs Standard Routes Compared VoIP route types compared: premium vs standard (white) wholesale routes on quality, CLI, path and price, and which traffic needs each grade. VoIP routes Breakouts in a VoIP Rate Deck: Mobile, Fixed, Operator What a breakout is in a VoIP rate deck: how mobile, fixed and operator breakouts are priced, how prefixes decide the rate and how to buy by breakout. VoIP routes Dedicated vs Shared Ports on VoIP Routes: Which to Buy Dedicated vs shared ports on wholesale VoIP routes: reserved capacity versus a shared pool, what each costs and which traffic needs its own ports. VoIP routes G.711 vs G.729: VoIP Codecs, Bandwidth and Quality G.711 vs G.729 compared: bandwidth per call, voice quality, DTMF and fax, licensing and which VoIP codec wholesale carriers usually accept.