Indicate that INVITE is a ‘transferred call’ by using “REFER” or “302 Moved”

We have a FreePBX where an inbound call (via IVR) shall be unconditionally transferred to an external number.

The problem is that the SIP-trunk provider does not accept the transferred call since the From-Field in the INVITE does not contain a number that is ‘owned by the trunk provider’.

What we need is to indicate that this INVITE is a ‘transferred call’ by using “REFER” or “302 Moved” in the INVITE so that it can be accepted by the trunk-provider.

Does anybody know how this can be achieved?

I’d add another outbound trunk to a provider that allows you to set the From-Field to whatever you want. You don’t need a number with that provider - just set up an outbound connection.

Set up the IVR so that it sends the call to that outbound and off you go.

1 Like

Thanks for the answer but changing to another outbound trunk provider is not an option to us.

I’d really like to know if there is any possible way to do this with FreePBX.


The Transfer() application issues a redirect or refer. You can probably do something like this:

Edit /etc/asterisk/extensions_custom.conf and add a new context.

[transfer-using-refer] exten => _X.,1,Transfer(SIP/${EXTEN}@providerhost)

then make a custom destination in FreePBX that sends calls to the number using this syntax for the target:


Lastly, choose the new custom destination you created as a target from your IVR.

I haven’t tested this.