Sip redirect at network level

I would like to redirect an incoming call from a sip provider to an external number. I can do this by matching the incoming call to an extension which I then send to a bit of dialplan which then dials out on a spare channel to the external number. This is not difficult.

However is there another method which simply informs the inbound sip provider to forward the call to another number and thus reduce the number of active calls passing through the asterisk server?

The application in this instance will be handling a lot of redirections out to PSTN and we would prefer to have this handled by the incoming sip provider rather than keep asterisk in the loop.

Any ideas?

Thanks

Transfer. It is not well tested. Your ITSP may will not support SIP redirections. If they do, they will almost certainly charge the new leg as though it were an outgoing call. Asterisk can only initiate blind transfers.

Thanks. Do you have an example? I’m struggling to see how it is used?

It doesn’t appear in any of my books.

Thanks

It is not difficult to use. The parameter is the SIP URI with “sip:” replaced by “SIP/”.

So currently when a call comes in I am matching the extension to execute some dial plan.

exten => s,n,Dial(SIP/1234567890@samesipprovider,60,rt)

It looks like I am already using the format of sip uri you are suggesting

Is this where you are suggesting the Transfer parameter is set?

Thanks

The bit after the @ must be what the peer expects. It will not go near sip.conf.