All outbound calls fail immediately with this error in Retell logs: SIP status code: 400

I’m trying to make outbound calls from a Retell agent using Twilio Elastic SIP Trunking (custom telephony setup).

The Twilio SIP trunk is configured with:

  • Elastic SIP Trunk

  • Termination URI set

  • Credential List authentication (username + password)

  • A Twilio phone number attached to the trunk

  • The number imported into Retell

Goal:

Make outbound calls from Retell → through Twilio SIP trunk → to PSTN numbers (US and international).

Problem:

All outbound calls fail immediately with this error in Retell logs:
SIP status code: 400
SIP error category: invalid_destination
INVITE failed: sip status: 400: Invalid From Header

This happens for:

  • US numbers

  • International numbers

  • Any destination tested

Calls do not complete, and Twilio appears to reject the INVITE due to the “From” header.
Already tried:

  • Verified the Twilio number is attached to the SIP trunk

  • Configured a SIP Header Manipulation policy to replace the “From number” with the trunk’s phone number (E.164 format)

  • Recreated Credential List and confirmed username/password match in Retell

  • Verified Termination URI formatting

  • Checked geographic permissions

  • Tested multiple destination numbers

  • Deleted and re-imported the number into Retell

The error remains consistent: 400 Invalid From Header.

Based on the “Invalid From Header” error you’re experiencing with Twilio Elastic SIP Trunking, here are the key configuration areas to verify:

Termination URI Configuration

Check your Termination SIP URI for any spaces and remove them(1). You should use a localized termination URI that’s near your region(1). You can expand and view your localized URIs in the Twilio console(1).

Authentication Setup

For your elastic SIP trunk to accept outbound requests from Retell, you need to whitelist IP addresses or create auth with username and password(1).

If you opted for the auth route, you need to specify the username and password when importing the number to Retell(1). When importing via the API, use the sip_trunk_auth_username and sip_trunk_auth_password fields(2).

Verify your username and credentials are correct - the username is different from the friendly name shown in the credential list(1).

SIP Header Manipulation for Caller ID

To display your verified caller ID properly, configure SIP Header Rules in Twilio(1):

  1. Navigate to Elastic SIP Trunking → Trunks → [your trunk] → Termination(1)
  2. Scroll down to Header Manipulation and open “View all SIP header manipulation policies”(1)
  3. Create a policy with a request rule(1)
  4. Set these values(1):
    • SIP header field: From number
    • Action: Replace with
    • Value: Your caller ID in E.164 format (e.g. +18881230987)
  5. Return to the Termination tab and select the new header manipulation policy from the dropdown(1)

You need at least one number purchased from Twilio in your SIP trunk for the caller ID to be applied(1).

Import Configuration

When importing the number to Retell, supply the termination SIP URI you set up in Twilio(1). If you have set up auth via credentials, supply the username and password as well(1).

Geographic Permissions

Search “geo” to find the “Voice Geographic Permissions” setting(1). Choose “Elastic Sip Trunking” in the selector and select the countries you would like to dial(1).

Since you’ve already tried header manipulation, verify that the policy is actually selected in your trunk’s Termination settings and that the E.164 format is exact. Also confirm your IP whitelisting includes Retell’s IP block: 18.98.16.120/30 (All regions), 143.223.88.0/21 (certain United States traffic), 161.115.160.0/19 (certain United States traffic)(3).

Hello @edwinp02

Can you share the call id?