Rewriting "FROM" SIP header

I am working with a CCaaS offering and using Twilio to provide a SIP trunk. I have one queue that redirects the inbound call back out the Twilio SIP trunk to a number on the PSTN. When that call is redirected, the CCaaS uses the callerid of the incoming caller in the FROM field of the SIP request it sends back to Twilio, and Twilio drops the call with an “unverified number” error.

I would like to use Asterisk as a simple SBC and have the CCaaS redirect the call to Asterisk, then have Asterisk rewrite the FROM header to the CCaaS inbound number provided by Twilio, then forward the call on to Twilio.

Does this sound like a feasible solution, and could someone please point me to documentation around rewriting the SIP headers? I’ve not used Asterisk in more that 15 years and ahve basically forgotten everything I ever knew :frowning:

The user part of From: is set to ${CALLERID(num)}, unless forced to a specific value in the outgoing endpoint definition, in which case it can’t be changed on the fly.

you may also Ask Twilio if adding a History or Diversion with your phone number will allow a 3party FROM
as they are probaly rejeting the call as it do not indicate that you are forwarding the call

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.