Ciaran
08/05/2026, 8:35 AMAI Evy
08/05/2026, 8:35 AMAI Evy
08/05/2026, 8:35 AM{{user_number}} as a default system variable for phone calls [(1) ]() . This variable contains the caller's phone number .
For phone calls specifically, {{user_number}} represents the user's phone number, which is the from_number for inbound calls and the to_number for outbound calls .
You can reference it in prompts, tool configurations, and other supported fields using the {{user_number}} syntax . No configuration is required—it's available automatically [(1) ]() [(2) ]() .
In JavaScript code (like in a Code node) , you would access it as dv.user_number instead of using the {{...}} template syntax [(3) ]() .AI Evy
08/05/2026, 8:35 AMAI Evy
08/05/2026, 8:35 AMAI Evy
08/06/2026, 2:04 PMCiaran
08/06/2026, 2:04 PMAI Evy
08/06/2026, 2:04 PMfrom and P-Asserted-Identity headers to the user's number
- Cold transfers using SIP REFER depend on your telephony provider supporting caller ID override for SIP REFER
- If caller ID override isn't supported, the transfer fails
## Key Limitation for Custom Twilio
The sources indicate that showing the user's number as caller ID during transfers is fully supported only for Retell-Twilio numbers (numbers purchased directly through Retell) [(2) ]() . For custom telephony via SIP trunking, you need to contact your provider to enable the necessary permissions .
## What You Can Try
1. **Contact Twilio Support**: Ask them specifically what permissions you need to enable warm transfer (or cold transfer with SIP REFER) with caller ID override for any number
2. **Verify Your Transfer Settings**:
- Check if you're using SIP INVITE (supports caller ID selection) vs SIP REFER (provider-dependent) [(3) ]() [(4) ](AI Evy
08/06/2026, 2:04 PM{{user_number}} to your API via a custom function before or during transfer
- Use the Retell Agent's Number for the actual transfer, but include the original caller info in your API request
The TwiML app approach you mentioned could work as a workaround to intercept and reformat the call before it reaches your third party platform.AI Evy
08/06/2026, 2:04 PMAI Evy
08/06/2026, 2:04 PMCiaran
08/06/2026, 3:23 PMAI Evy
08/06/2026, 3:23 PMAI Evy
08/06/2026, 3:24 PMfrom and P-Asserted-Identity headers to the user's number . For cold transfers using SIP REFER, it's up to the telephony provider to support caller ID override .
If caller ID override isn't supported or properly configured, the transfer fails .
## What's Likely Happening
Since your destination is a Twilio number that triggers an API, Twilio is enforcing caller ID validation rules. It's rejecting calls where the from number (the user's number) isn't authorized in your account.
## Solutions
1. Contact Twilio Support to enable caller ID override permissions for your SIP trunk specifically for transfers to any number
2. Use Custom SIP Headers instead—pass the user's number as metadata (like X-Original-Caller) that your API can read, while keeping the actual caller ID as Retell's Number [(1) ]() [(2) ]() [(3) ](AI Evy
08/06/2026, 3:24 PMAI Evy
08/06/2026, 3:24 PMAI Evy
08/06/2026, 3:24 PMCiaran
08/06/2026, 3:30 PMAI Evy
08/06/2026, 3:30 PMAI Evy
08/06/2026, 3:31 PMX-Original-Caller (must start with X-)
- Header value: {{user_number}}
Your third-party platform's TwiML app or API can then extract this header to get the real caller's number [(3) ]() .
Option 3: Contact Twilio to Enable Permissions
Ask Twilio support to enable caller ID override specifically for your SIP trunk. This requires configuration on their end for custom telephony setups [(1) ](AI Evy
08/06/2026, 3:31 PMAI Evy
08/06/2026, 3:31 PMAI Evy
08/06/2026, 3:31 PMCiaran
08/07/2026, 1:08 PMAI Evy
08/07/2026, 1:08 PMAI Evy
08/07/2026, 1:09 PMX- or be User-To-User (case insensitive) [(1) ]() [(4) ]() [(2) ]() . If your headers don't follow this format, they won't be sent.
## What to Check
1. **Transfer destination format**: Are you transferring to a SIP URI (like sip:user@domain.com) or a PSTN number? Headers only reliably work with SIP URIs [(1) ]() .
2. **Header configuration**: In your Call Transfer functioAI Evy
08/07/2026, 1:09 PMX-
- The configuration persists after publishing
3. **Cold transfer method**: If using cold transfer, check whether you're using SIP INVITE or SIP REFER. For cold transfers with SIP REFER, different telephony providers may or may not honor custom SIP headers [(4) ]() .
If you're transferring to a regular phone number instead of a SIP URI, that's likely why the headers aren't coming through—they get stripped during PSTN conversion.AI Evy
08/07/2026, 1:09 PMAI Evy
08/07/2026, 1:09 PM