xAI Grok Voice Integration

    Connect a Vobiz phone number to an xAI Grok voice agent over Direct SIP with TLS - bring your own number in regions where xAI does not provision numbers, including India.

    xAI voice agents answer calls over SIP. Its Direct SIP option lets you attach a phone number you already own, so you can put a Grok agent on a Vobiz number in any region Vobiz serves - including India, where xAI does not provision numbers itself.

    What you'll build

    An inbound calling setup where someone dials your Vobiz number, Vobiz routes the call over TLS to xAI's SIP endpoint, and the Grok agent handles the conversation.

    Architecture

    text
    Caller → Vobiz number → Vobiz inbound trunk → sip.voice.x.ai (TLS) → xAI Grok agent

    Prerequisites

    • xAI account with a voice agent → xAI console
    • Vobiz account → Vobiz Console
    • A Vobiz phone number you want the agent to answer on

    Step 1: Add the number in xAI

    In the xAI console, open your agent and add a new phone number. Select the Direct SIP tab rather than Twilio.

    xAI New phone number dialog with the Direct SIP tab selected, showing the SIP URI and allowed addresses fields

    Fill in the fields:

    FieldValue
    NameAny label that identifies this number
    Phone numberYour Vobiz number in E.164 format, for example +91XXXXXXXXXX
    SIP URIsip:{number}@sip.voice.x.ai;transport=tls
    Allowed addressesThe Vobiz SIP signaling IPs - see below

    The SIP URI field shows {number} as a template. xAI resolves it to the number you entered, so the address Vobiz sends to becomes +91XXXXXXXXXX@sip.voice.x.ai.

    ⚠️ Warning: Keep transport=tls in the SIP URI. The origination URI you create in Step 2 must use the same transport, or the call will not connect.

    Allowed addresses

    Allowed addresses controls which hosts xAI accepts SIP traffic from. Add the Vobiz SIP signaling IPs so calls from your trunk are accepted:

    text
    13.203.7.132 65.2.100.211 13.126.98.234 13.235.11.131 13.233.44.61 3.111.255.163 3.111.128.110 43.204.64.203 15.207.232.91 35.154.133.28

    These are the India signaling IPs. For the full list including RTP media ranges, and for other regions, see IP Whitelisting.

    {/* TODO: confirm whether the Authentication section in the xAI dialog needs credentials for this flow, or whether IP allow-listing alone is sufficient. */}

    Step 2: Create the origination URI in Vobiz

    An origination URI is the SIP destination Vobiz routes inbound calls to. Navigate to Origination URIs and create one pointing at xAI.

    Vobiz Create Origination URI dialog with the xAI SIP address and TLS transport selected

    FieldValue
    URI+91XXXXXXXXXX@sip.voice.x.ai - your number, then the xAI SIP domain
    DescriptionOptional, for example xAI Grok agent
    TransportTLS
    ActiveOn

    ℹ️ Note: Use the same number here that you entered in xAI. The URI is what xAI matches the incoming call against.

    Step 3: Create the inbound trunk

    Navigate to Inbound Trunks and create a trunk that uses the origination URI from Step 2.

    Vobiz Create Inbound Trunk dialog with a trunk name and the xAI origination URI selected as the primary URI

    FieldValue
    Trunk NameAny label, for example xAI
    Primary URISelect the origination URI you created in Step 2

    Two optional sections are available on the same screen:

    • Recording & transcription - turn on call recording for this trunk, then optionally add a recording webhook, AI transcription, and PII redaction. Each depends on the one above it.
    • Webhook configuration - set a URL to receive real-time call events over HTTP. See Callbacks for the event payloads.

    Open the trunk you just created and link your Vobiz number to it under Linked Numbers.

    Vobiz inbound trunk detail showing the primary URI configuration and a linked phone number

    Click Link Numbers, select your number, and confirm. The trunk detail view then shows the number under Linked Numbers (1), and the trunk status reads Enabled.

    At this point the route is complete: the number is linked to the trunk, the trunk points at the origination URI, and the origination URI points at xAI.

    Step 5: Test the integration

    Call your Vobiz number from any phone. The Grok agent should answer and begin the conversation.

    Troubleshooting

    The call rings but the agent never answers

    Check that the number in the Vobiz origination URI exactly matches the number configured in xAI, including the + and country code.

    The call fails immediately

    Confirm the transport is TLS in both places - transport=tls in the xAI SIP URI and TLS on the Vobiz origination URI.

    Calls are rejected by xAI

    Verify the Vobiz SIP signaling IPs are present in the Allowed addresses list on the xAI number. See IP Whitelisting for the current list.

    The number is not reachable at all

    Open the trunk and confirm Status is Enabled and the number appears under Linked Numbers.

    Next steps

    • IP Whitelisting: Full SIP signaling and RTP media IP ranges

    • Callbacks: Receive call events on your own endpoint

    • Call Recording: Record, retrieve, and download calls on this trunk

    • SIP Trunking: How Vobiz trunks route calls