Hey Everyone, my users are forwarding from their number to my Twilio number which I have set up with a SIP trunk to Retell. I can’t seem to fetch the original phone number in Retell but see it in Twilio. Has anyone solved this yet?
When using elastic SIP trunking with Twilio, you can pass the original forwarded number to Retell using custom SIP headers(1).
For inbound calls, custom SIP headers (those starting with X- or x-) are automatically received and extracted by Retell(1). These headers become available in call.custom_sip_headers and are automatically added to your collection of dynamic variables(1).
To access the original number, you’ll need to configure Twilio to pass it as a custom SIP header (starting with X-). Once configured, you can access it in Retell by stripping the X- or x- prefix from the header name(1).
For example, if Twilio sends a header like X-Original-Number, it will appear in Retell as Original-Number in your dynamic variables(1).