Retell AI + BulkVS: inbound IP based, outbound registration

Written on October 12, 2026.

This guide connects Bulk Solutions SIP trunks to Retell AI voice agents using Retell's elastic SIP trunking method. Inbound calls use IP-based authentication: Bulk sends the INVITE to Retell's SIP server, sip.retellai.com. Outbound calls use the username and password from a Bulk registration trunk group: you enter them when you import your number into Retell, and Retell sends its calls to sip.bulkvs.com.

Inbound: IP-based Outbound: registration credentials (digest) No SIP REGISTER sip.retellai.com sip.bulkvs.com G.711u (PCMU) · RFC2833

How the integration works

Retell calls the two directions origination and termination. Each one is set up in a different place.

Inbound (origination) · IP based

Caller → Bulk → Retell

A caller dials your Bulk DID. Our SBCs send the INVITE from one of our signaling IPs to sip.retellai.com. Retell finds the number you imported and hands the call to the inbound agent you picked.

Outbound (termination) · registration credentials

Retell → Bulk → PSTN

Your Retell agent places a call. Retell sends the INVITE to the termination URI you saved, sip.bulkvs.com. Bulk challenges with 401/407, Retell answers with your registration trunk username and password, and we finish the call on the PSTN.

Retell does not have a termination URI of its own. sip.retellai.com is its only SIP address, and it is used for inbound only. Your outbound "termination URI" is always the Bulk side: sip.bulkvs.com.

Shared SIP settings

ItemValue
Bulk SIP proxy (termination URI)sip.bulkvs.com, port 5060
Retell SIP server (origination)sip:sip.retellai.com
TransportRetell supports TCP (its default), UDP, and TLS. Bulk accepts UDP and TCP on 5060.
CodecG.711u (PCMU). Retell supports PCMU, PCMA, and G.722; Bulk supports G.711u and G.729a, so PCMU is the match.
DTMFRFC2833
Bulk signaling IPsx.x.x.x
Find the real IPs at Portal -> Interconnection -> Interconnection Instructions
Retell media portsRTP/RTCP on UDP 10000–65535
Inbound authenticationIP-based (Bulk host pointed at sip.retellai.com)
Outbound authenticationDigest username/password from a Bulk registration trunk group (no SIP REGISTER)

Values to collect before you start

Have these ready from both portals. Replace the examples with your own numbers and agent.

Your Bulk DID
Example used below: 3105551000 / +13105551000
Bulk registration credentials
Username and password from your Bulk SIP registration trunk group (outbound only, see below)
Retell agent
An agent already built in the Retell dashboard. For the API you will need its agent ID.
Retell API key (optional)
Only if you import the number with the API instead of the dashboard

Retell IP blocks

Retell publishes these ranges for its SIP traffic. You do not need to add them to Bulk for this setup, but they help when you read logs or set up a firewall.

RangeUsed for
18.98.16.120/30All regions, signaling only
3.42.144.0/23All regions
153.57.128.0/18All regions
143.223.88.0/21Certain United States traffic
161.115.160.0/19Certain United States traffic
These ranges are shared by every Retell customer (some of them are also used by other voice platforms). Allowing them on your Bulk account would let anyone on that platform send calls as you. That is why outbound uses your trunk username and password instead of IP authentication.

Inbound setup (IP based)

Send calls that arrive on your Bulk DID to your Retell agent.

  1. Point the Bulk DID at Retell

    In the Bulk Solutions portal:

    1. Interconnection → Host → Add the Retell SIP host: sip.retellai.com, port 5060. Use the hostname, not one resolved IP, because Retell's addresses can change.
    2. If your portal screen only accepts IPv4, contact Bulk support so we can attach the FQDN for you.
    3. Interconnection → Trunk Group → Add and assign that host to the trunk group.
    4. Inbound → DIDs → Manage and set your telephone number to that trunk group.
    5. Wait 2–3 minutes for the host and trunk group to reach all Bulk SBC nodes.

    Inbound calls are sent from one of our signaling IPs (see Portal -> Interconnection -> Interconnection Instructions) to sip.retellai.com with request URI 1NXXNXXXXXX (example 13105551000).

    Do not assign a Retell DID to a SIP registration trunk group. A registration trunk only delivers inbound calls to the IP that last registered, and Retell never registers.
  2. Import the number into Retell

    Retell only answers calls for numbers it knows about. Do the import in the outbound steps below; one import covers both directions. Pick your agent under the inbound setting so calls are answered.

Outbound setup (registration credentials)

Give Retell the Bulk registration trunk username and password. Retell sends its INVITE to sip.bulkvs.com and answers our digest challenge. No REGISTER is sent, and no Retell IP addresses need to be added to your Bulk account.

  1. Create a Bulk registration trunk group

    In the Bulk portal go to Interconnection → Trunk Group - Manage → SIP Registration Trunk Group → Create.

  2. Copy the Bulk credentials

    Go to Interconnection → Trunk Group - Manage and open the registration trunk group. Copy the username and password. Keep them private; they authorize calls on your account.

  3. Import the number in the Retell dashboard

    In Retell open Phone Numbers, click +, then Connect to your number via SIP trunking. Fill in the form like this:

    Retell fieldWhat to enter
    Phone Number+13105551000 (E.164: plus, country code, then the number with no spaces)
    Termination URIsip.bulkvs.com
    Outbound TransportUDP or TCP
    SIP Trunk User NameYOUR_BULK_TRUNK_USERNAME
    SIP Trunk PasswordYOUR_BULK_TRUNK_PASSWORD
    NicknameAnything that helps you remember it

    Click Test SIP Connection. Retell sends a SIP OPTIONS to sip.bulkvs.com without placing a call. A 2xx answer means our proxy is reachable. Then click Save and bind your agent for inbound and outbound calls.

    When Bulk replies to an INVITE with a 401 or 407 challenge, Retell resends it with the username and password you entered.

  4. Add the X-Challenge SIP header

    BulkVS needs every outbound INVITE from Retell to carry a custom SIP header named X-Challenge with the value 1. This header tells our switch to send the 401/407 digest challenge, so Retell can answer it with your trunk username and password. Without it, the call may be rejected before Retell ever gets asked for the password.

    In the dashboard, open Make Outbound Call on your imported number. Under Custom SIP Headers, click + Add, type X-Challenge in the X-Header-Name box and 1 in the Value box, then click Call.

    From the API, add the header to the call request with Retell's custom_sip_headers field (shown in the next step). Retell only allows outbound header names that start with X-, and X-Challenge follows that rule. See Retell's guide: Set custom SIP headers.

    Add the header on every outbound call you start, from the dashboard or the API.
  5. Place a call from Retell

    Start a test call from the dashboard, or use Retell's create phone call API with your imported number as the caller. Save this as call.json; it already includes the X-Challenge header:

    {
      "from_number": "+13105551000",
      "to_number": "+13105551212",
      "custom_sip_headers": {
        "X-Challenge": "1"
      }
    }

    Then send it to Retell:

    curl -X POST https://api.retellai.com/v2/create-phone-call \
      -H "Authorization: Bearer YOUR_RETELL_API_KEY" \
      -H "Content-Type: application/json" \
      -d @call.json

    Bulk accepts destinations as 1NXXNXXXXXX@sip.bulkvs.com or NXXNXXXXXX@sip.bulkvs.com, and Retell's E.164 format works too.

Caller ID rules

The from number must be a number on your Bulk account in one of these formats. Any other caller ID format is rejected:

FormatExample
10 digits3105551000
11 digits13105551000
E.164+13105551000

Import with the Retell API (optional)

The dashboard steps above do the same thing. Use this if you set numbers up from code.

Save this as import.json. The trunk fields go at the top level of the body:

{
  "phone_number": "+13105551000",
  "termination_uri": "sip.bulkvs.com",
  "sip_trunk_auth_username": "YOUR_BULK_TRUNK_USERNAME",
  "sip_trunk_auth_password": "YOUR_BULK_TRUNK_PASSWORD",
  "transport": "UDP",
  "nickname": "Bulk Solutions main line",
  "inbound_agents": [
    { "agent_id": "YOUR_RETELL_AGENT_ID", "weight": 1 }
  ],
  "outbound_agents": [
    { "agent_id": "YOUR_RETELL_AGENT_ID", "weight": 1 }
  ]
}

Then send it to Retell:

curl -X POST https://api.retellai.com/import-phone-number \
  -H "Authorization: Bearer YOUR_RETELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d @import.json

phone_number and termination_uri are required. transport can be TCP, UDP, or TLS and defaults to TCP. Retell never shows the password again after you save it.

Test plan

Inbound · IP based

Bulk → Retell

  1. Dial your Bulk DID from a mobile phone.
  2. Confirm your Retell agent answers.
  3. Open the call history in Retell and confirm the call shows up on your imported number.
  4. Confirm two-way audio.
Outbound · digest

Retell → Bulk

  1. Run Test SIP Connection on the number first.
  2. Add the X-Challenge: 1 custom SIP header to the call.
  3. Place a call to a number you control.
  4. Answer and confirm caller ID is your Bulk DID.
  5. Press a few keys if your agent uses menus (RFC2833).

Troubleshooting

SymptomWhat to check
Inbound call never reaches RetellBulk host, trunk group, and DID assignment. Wait 2–3 minutes after changes. Confirm the host is sip.retellai.com and the DID is on the IP trunk group, not a registration trunk group.
Inbound reaches Retell but no agent answersThe number was not imported into Retell, or no inbound agent is bound to it. Confirm it was imported as +13105551000. If it still fails, send us the Call-ID so we can check the number format we send.
Test SIP Connection: 401/407Supply both the trunk username and password, or re-copy them from Interconnection → Trunk Group - Manage.
Test SIP Connection: no responseCheck the termination URI is sip.bulkvs.com, port 5060, and the transport is UDP or TCP (not TLS).
Test passes but outbound calls failThe test only checks OPTIONS. Bulk may require an active registration before accepting digest INVITEs on some accounts. Send the Call-ID to support so we can review the SIP ladder.
Outbound rejected, or Bulk never sends an auth challengeConfirm the custom SIP header X-Challenge: 1 is set on the call: in the Make Outbound Call dialog under Custom SIP Headers, or in custom_sip_headers on the API request.
Outbound rejected caller IDFrom number is not 10-digit, 11-digit, or +1 E.164, or it is not on your Bulk account.
Call connects with no audioConfirm G.711u (PCMU) was picked, and that no firewall blocks UDP 10000–65535 toward Retell.

Need help?

If you get stuck on either side, send us the DID, trunk group name, approximate call time, and a Call-ID. We can pull the SIP ladder from our network.

Bulk Solutions support
Phone: 855-906-0901 or 310-906-0901
Email: support@bulkvs.com
Portal: interconnection, trunk groups, and DIDs

Related guide: LiveKit + BulkVS · BulkVS SIP trunking
Retell documentation for custom telephony: docs.retellai.com/deploy/custom-telephony · Retell custom SIP headers