Is the sip header field called ‘Refer-To’ can be collected via SIP_HEADER ? if not how to do this in the dialplan ?

best regards,

Conceptually, no dialplan is run for REFER requests. Whilst Asterisk doesn’t physically generate an INVITE when a blind transfer can be processed locally, I doubt that the exact behavour is well specified. For an attended transfer, the dialplan is started by an INVITE without any Refer-To, so I wouldn’t expect the dialplan to have any visibility of the REFER request.

302 responses will generate a new INVITE, either to the Refer-To destination, or to a local channel, depending on the setting of promiscredir. In the second case, I wouldn’t expect any SIP header information to be available, as the channel running the dialplan wouldn’t be a SIP channel. In the first case, I would expect the information to reflect the INVITE that was finally sent.

Some channel variables are set on redirections, and there are COLP functions.

What are you actually trying to achieve?

Thanks for reply,

I 'm wondering if it could be possible to dial to a host directly, for exemple :

exten => _XXXX,1,Dial(SIP/host_name) (or ip address)

I have hundreds of SIP clients and in don’t want to configure each of them in the asterisk’s files config.

In my scenario :

A call B
B try an attended transfer to C (I have hundreds of C clients)

A and B is well configured in asterisk but C doesn’t (most of the time).


If the phone is doing the enquiry leg bypassing Asterisk, there are some options with domain in their name which may help Asterisk handle REFER/Replaces to non-local numbers. However, I suspect they are relatively unused, so you find them buggy.