You can connect Grok to a phone number in three ways: use the number the Voice Agent Builder gives you, point your existing number at the agent through a SIP trunk, or bridge a Twilio number to the Grok Voice Agent API with Media Streams. The first two need no code. The third needs a developer.
This is the least glamorous part of a voice agent project, and the one that decides call quality, the caller ID your customers see and a good share of the bill. Below we explain how a call reaches an AI, compare the three routes side by side, show how to keep the number customers already know, and finish with a go-live checklist. It is part of our guide to Grok and phone calls.
Why does an AI need a bridge to answer the phone?
When someone dials your number, the call travels the phone network that carriers have run for more than a century. Grok runs in a data center and only understands digital audio streams. Something has to sit in between.
That something is a carrier that receives the call on your number, turns the caller’s voice into a digital stream, sends it to the AI, and plays the AI’s voice back to the caller, continuously, for the whole call. Three terms describe that bridge in every vendor’s documentation:
- SIP: the protocol that carries phone calls over the internet. A SIP trunk is a virtual line from a carrier that your numbers are attached to.
- Media Streams: Twilio’s feature that sends a call’s live audio to a server you choose.
- μ-law: the audio encoding used on phone lines, sampled at 8 kHz, or 8,000 times per second.
What are the three ways to connect Grok to a phone number?

Which route should you pick?
| A. xAI number | B. SIP trunk | C. Twilio Media Streams | |
|---|---|---|---|
| xAI product | Voice Agent Builder | Voice Agent Builder | Voice Agent API |
| Code needed | No | No | Yes, a small server |
| Keep your number | No, a new number | Yes | Yes, if it is on Twilio |
| Local number outside the US | No during the beta | Yes, if your carrier provides one | Depends on Twilio’s coverage |
| Connection cost | $0.01 per minute | Your carrier’s plan | Twilio’s rates plus hosting |
| Best for | Testing in an hour | Running in production | A custom-built agent |
The deciding question is whether you have a developer. Without one, the Builder with its own number, then a SIP trunk for your real number, covers most needs. We go through what the Builder can do in our Grok Voice Agent Builder review. With a developer, the API opens more options in exchange for a server to maintain.
What happens on the line during a call?
Here is the path of an inbound call when a Grok agent answers through a bridge like Twilio, the most common setup.
A customer dials your number
The call crosses the regular phone network to the carrier hosting your number, a SIP provider or Twilio.
The carrier opens an audio stream
Instead of ringing a desk phone, the carrier opens a connection to your server and streams the call audio in the phone format, μ-law at 8 kHz.
Your server relays the audio to Grok
The server forwards that stream to xAI’s real-time API. In xAI’s example, the μ-law audio passes through unchanged: less processing, less delay.
Grok answers out loud
The model listens, decides and streams its reply back, which your server hands to the carrier and the caller. The loop runs until the call ends.
Transfer or hang up
The agent ends the call, or transfers it to a person when the request is beyond it. The transcript and summary are saved for follow-up.
For the session mechanics on the AI side, including settings, events and per-minute billing, see our Grok Voice Agent API guide.
What is in xAI’s official Twilio example?
xAI’s GitHub repository xai-cookbook includes an example called voice-agent-phone, also documented on xAI’s site. It is a small Node.js and TypeScript server built with Express and WebSockets, which keep a connection open for the whole call so audio can flow both ways. It links a Twilio number to Grok’s real-time API.
Its most useful design choice is not in the code itself: audio stays in μ-law at 8 kHz, the phone network’s native format, from end to end. Every format conversion adds processing and therefore delay. Skipping it saves milliseconds on every exchange, and on a phone call, those milliseconds are what makes the agent sound quick or sluggish.
On a phone call, latency is paid twice: once while the AI thinks, once while the network carries the sound. The best model in the world sounds slow on a bad line.
How much does the connection add to the bill?
Grok’s conversation price, $0.08 per minute today, is only part of the invoice. The connection adds its own cost, which depends on the route:
- The xAI number adds $0.01 per minute in the Voice Agent Builder, so $0.09 all-in. It is the only connection fee xAI publishes.
- A SIP trunk is billed by your carrier: trunk subscription, number rental and minutes, depending on its plan. xAI publishes no SIP surcharge.
- A Twilio bridge is billed by Twilio at its own rates for the number and minutes, plus hosting for the relay server.
Do the math on your real call volume and average length. At a few hundred calls a month, the routes cost about the same. At several thousand, the carrier’s per-minute rate weighs as much as the AI’s.
How do you keep the phone number your customers know?
Changing numbers to deploy a voice agent is a bad trade. You have two situations:
- Your number is already on a SIP-capable carrier. Configure the trunk to deliver calls to the agent. The Builder supports SIP to major telephony providers.
- Your number is with a provider that has no SIP option. Port it to one that does. You keep the digits and change only the carrier. In the US, the FCC sets one business day for simple ports and four business days for others, and you will need a signed Letter of Authorization and an accurate Customer Service Record. Our guide to business phone number porting walks through the process and the mistakes that lose a number.
If you need a new local or toll-free number rather than a ported one, our guide on how to get a virtual phone number covers the options.
What about outbound calls from an AI number?
Answering calls with an AI and placing calls with one are not governed by the same rules. In February 2024, the FCC ruled that AI-generated voices are “artificial” voices under the TCPA, which brings the consent requirements for artificial-voice calls into play. A number that places unwanted automated calls can also get flagged as spam by carriers and call-blocking apps, which hurts every call you make from it afterward, as we explain in why business numbers get marked as spam. We cover what an AI can and cannot do on sales calls in Grok vs. sales reps.
How do you know the line will hold up?
A voice agent already brings its own response time. If the bridge server, or the office connection your team uses when calls are transferred, adds latency, the conversation turns choppy and callers talk over the agent.
Go-live checklist
Work through these in order before an AI answers a real number:
- Pick the route, A, B or C, from the table above, and write down the resulting cost per minute.
- Test on a secondary number or through evening forwarding, never straight on your main line.
- Check the caller ID your callers will see, and whether it looks local to them.
- Measure the line: latency, jitter and packet loss from where the bridge runs.
- Set up the transfer to a person, and test what happens when nobody answers.
- Script the disclosure: the agent says it is an AI and that the call is recorded, in its first sentence.
- Keep a rollback: a forward to your usual phone system you can switch on in a minute.
- Port the number only once the pilot works, with your LOA and CSR ready.
In most setups the agent takes a slice of the calls and your team handles the rest. For them, business numbers on a reliable VoIP system remain the foundation. That is what Skipcall provides for sales teams, from $25 per month (billed annually), no commitment.
The bottom line
Connecting Grok to a real phone number means building a bridge between the phone network and the AI. Without a developer, the Voice Agent Builder gives you a test number, then connects over SIP so the agent can answer the number you already have. With a developer, xAI’s official example bridges a Twilio number to the API while keeping phone audio in its native format. Either way, keep your number by porting it, test the line and the handoff, and keep a rollback ready. For the full picture of xAI’s voice products, head back to our Grok phone calls guide.
Sources: xAI, “Grok Voice Agent Builder” (July 1, 2026) and “Grok Voice 3” (October 14, 2026); xAI documentation, voice-agent-phone example; GitHub xai-org/xai-cookbook; Cobus Greyling, Builder analysis; FCC Declaratory Ruling FCC 24-17 (February 8, 2024).