· — Dishant Sethi ·Jul 7, 2026·8 min read

How to Give an AI Voice Agent a Phone Number with Cloudonix

How to connect VAPI, Retell, and ElevenLabs voice agents to the public phone network with Cloudonix SIP trunking — the cx-vcc CLI, inbound routing, outbound BYOC, and passing data via SIP headers.

Key Takeaways

  • A voice agent platform (VAPI, Retell, ElevenLabs) handles the conversation; it needs a SIP trunk like Cloudonix to reach the public phone network and own a dialable number.
  • The fastest path is the cx-vcc CLI: one service command creates the connector and returns a Credential ID and a <UUID>.sip.cloudonix.net gateway; one addnumber command attaches an E.164 number.
  • Inbound calls route with CXML — <Dial><Service provider="vapi">+E164</Service></Dial> — while outbound uses bring-your-own-carrier (BYOC) credentials pointed at the Cloudonix gateway.
  • You pass call context to the agent through SIP headers (<Header name="X-first_name" value="Andrew"/>), which map to template variables inside the agent.
  • Cloudonix bills by session rather than per minute, with a forever-free tier of 500 sessions/month — useful for prototyping a number before committing.

Voice agent platforms have gotten very good at the conversation. VAPI, Retell, and ElevenLabs will run a low-latency STT → LLM → TTS loop that sounds natural. What none of them are is a phone company. To let a customer dial a number and reach your agent — or to have the agent call out — you need a SIP trunk that bridges the platform to the public switched telephone network (PSTN) and supplies a real, dialable number. Prodinit is a Cloudonix implementation partner and builds this bridge for production voice agents.

To give an AI voice agent a phone number with Cloudonix, you create a SIP trunk connector between Cloudonix and the agent platform, attach an E.164 phone number to it, and route calls with CXML or a platform dashboard. Cloudonix handles carrier connectivity, SIP negotiation, and transcoding through its built-in SBC; the agent platform handles the conversation. The same trunk carries inbound and outbound calls.

Why a Voice Agent Needs a SIP Trunk at All

A SIP trunk is the link between SIP-capable software and telephone carriers. Voice agent platforms expose a SIP endpoint, but they do not sell phone numbers in every region, operate a session border controller, or maintain direct relationships with the carriers that actually terminate calls on the PSTN. Cloudonix does all three, and abstracts the carrier side so the agent platform never negotiates SIP with a carrier directly.

This matters because the market is moving onto the phone. The AI voice agents market was estimated at $2.54B in 2025 and is projected to reach $35.24B by 2033 — a 39.0% CAGR (Grand View Research). Most of that value is in agents that take and make actual calls — appointment reminders, support lines, outbound qualification — not browser widgets. The phone number is the product, and the trunk is what makes it real.

Cloudonix positions this explicitly as "AI voice trunking": a SIP abstraction that connects an AI voice agent to any phone system, cloud or on-premise, and advertises support across a wide range of agent platforms (Cloudonix). Cloudonix also maintains formal partnerships with agent vendors — Retell lists Cloudonix as an app partner (Retell AI) — which is why the per-platform setup is documented end to end.

The Fastest Path: the cx-vcc CLI

Cloudonix's recommended setup method is the cx-vcc command-line tool, which provisions the trunk connector in two commands. The first creates the service connector to your agent platform and returns the credentials you'll need; the second attaches a phone number to it. For VAPI, the connector command looks like this (Cloudonix VAPI docs):

cx-vcc service \
  --provider vapi \
  --apikey YOUR_VAPI_API_KEY \
  --name "My SIP Trunk" \
  --domain your-domain

That returns a Credential ID and a gateway address of the form <UUID>.sip.cloudonix.net. You then attach a number:

cx-vcc addnumber --domain your-domain --provider vapi --number +12127773456

The same two-command shape works for Retell (--provider retell) and ElevenLabs (--provider 11labs), with the API key swapped for the corresponding platform. Numbers are always E.164. From here the difference between platforms is small but real, so it's worth taking each in turn.

VAPI: Inbound Routing and Outbound BYOC

VAPI supports both directions through the Cloudonix trunk. For inbound, you declare the number to VAPI via its API — supplying the SIP URI and the assistantId that should answer — then route incoming calls with a CXML <Dial><Service provider="vapi"> directive. For outbound, you register a byo-sip-trunk credential inside VAPI that points at your <UUID>.sip.cloudonix.net gateway, attach a byo-phone-number, and place calls through VAPI's /call/phone endpoint (Cloudonix VAPI docs).

The detail teams miss is passing context into the call. You attach SIP headers inside the <Dial> block, and they surface as template variables in the agent:

<Dial>
  <Header name="X-first_name" value="Andrew"/>
  <Service provider="vapi">+12127773456</Service>
</Dial>

Header names must be alphanumeric plus underscores and prefixed with X-, and they map to VAPI template variables so the agent can greet the caller by name or branch on account data (Cloudonix VAPI CXML example). This is how you turn a generic agent into a context-aware one without a mid-call API round trip.

Retell and ElevenLabs: Dashboard-Driven Setup

Retell and ElevenLabs lean on their own dashboards to register the number, with Cloudonix supplying the SIP termination. Cloudonix's own documentation notes that "Retell SIP trunking isn't trunking in the popular SIP sense, it is mostly a workflow" — you create the connector with cx-vcc service --provider retell, then import the number in Retell's Phone Numbers dashboard using the Cloudonix inbound SIP URI (<UUID>.sip.cloudonix.net) as the termination URI, with the E.164 number and a nickname (Cloudonix Retell docs). Inbound calls then route with <Dial><Service provider="retell">.

ElevenLabs follows the same dashboard pattern with one naming quirk worth flagging: the provider identifier is 11labs in the cx-vcc CLI but elevenlabs in the CXML <Service provider="elevenlabs"> tag. In the ElevenLabs Conversational AI dashboard you go to Phone Numbers → Import number → From SIP Trunk, name it, enter the E.164 number, and set the Cloudonix inbound domain as the outbound address, using your ElevenLabs API key (Cloudonix ElevenLabs docs). Get the provider-id naming right and these connect cleanly; get it wrong and the trunk silently fails to route.

No-Code and Pricing Notes

If you'd rather not script the call flow, Cloudonix exposes its voice operations as Make.com modules — Say, Play, Gather, Record, Transfer, Conference, and a Custom CXML module for raw call-flow injection — so you can build inbound logic visually and still drop to CXML where you need control (Cloudonix Make.com docs). For a team prototyping a number, this shortens the path to a first working call considerably.

On cost, Cloudonix bills by session rather than per minute, which makes spend predictable for high-volume agents. The forever-free tier covers 500 sessions per month with 2 concurrent calls, and paid plans start at $69/month (Starter) and $119/month (Professional) at the time of writing, plus a 14-day full-feature trial with no card (Cloudonix pricing). The exact definition of a "session" is not spelled out on the public pricing page, so confirm how your call patterns map to sessions with Cloudonix before you model production cost.

Get Prodinit's AI engineering guides in your inbox

Deep-dives on production LLMs, voice AI, and MLOps — published weekly. No sales emails.

Frequently Asked Questions

Yes. VAPI, Retell, and ElevenLabs all expose a SIP endpoint, and a SIP trunk provider like Cloudonix supplies the dialable phone number and carrier connectivity. You create a trunk connector (the cx-vcc CLI is the fastest route), attach an E.164 number, and route inbound calls with CXML or the platform's dashboard. The agent platform runs the conversation; Cloudonix runs the telephony.

Inbound calls are customers dialing your agent's number; the call lands on Cloudonix and routes to the agent via <Dial><Service> or a dashboard-registered number. Outbound calls are the agent dialing a customer, which uses bring-your-own-carrier (BYOC) credentials pointed at the Cloudonix gateway. The same Cloudonix trunk carries both directions — you configure each independently.

With Cloudonix and VAPI you pass context using SIP headers inside the <Dial> block — for example <Header name="X-first_name" value="Andrew"/>. Header names must be alphanumeric with underscores and prefixed X-, and they map to template variables in the agent. This lets the agent personalize the greeting or branch on account data without a separate mid-call API call.

No. Cloudonix uses session-based pricing rather than per-minute billing, which it frames as more predictable for infrastructure-style usage. The free tier includes 500 sessions per month with 2 concurrent calls, and paid plans begin at $69/month. Because the platform does not publish a precise per-session definition, confirm how your specific call volume and durations translate into sessions before estimating cost.

Stay ahead in AI engineering.

Get the latest insights on building production AI systems, be the first to explore approaches that actually work beyond the demo.

Start a Project →