BlindTransfer issue


Actually I am looking for help for do the blindtransfer of incoming calls to other sip trunk number and make asterisk channel free.

I have configured the vocalcity sip channel in my asterisk pbx. I am accepting incoming calls on vocalcity sip channels and want to do the blind transfer using same vocalcity sip channel to other number. Please see my below sample code.

exten => s,1,Answer()
exten => s,n,Playback(vm-from)
exten => s,n,SayDigits(${CALLERID(ani)})
exten => s,n,Dial(SIP/VH375312/101,Tt) ;here I am doing blindtransfer by using Tt paramater
exten => s,n,Hangup()

But this above code is not working, it still show the active channel in asterisk.

Can you please anyone help me how deal this issue before. I am using Asterisk 1.8.1 version.

Looking forward the reply.



You need to use the Tranfer application not the Dial application.

Note that Asterisk is a back to back user agent and there is no optimisation of features transfer when using SIP with the source and destination user agents the same, so you can only do a transfer if the decision is made by the dialplan and no local user is called.

Also note that, in 1.6, error handling in Transfer was poor, and, as it is very little used it probably hasn’t improved that much.

Hi David,

Thanks for your reply.

I have tried the Transfer application, but it is not working.

exten => s,n,Transfer(SIP/VH375312/101)

It is going to drop the calls once the above function call.

Can suggest me is there anything wrong ?



What follows SIP/ in a Transfer must be the SIP URI that the peer expects to see. That means it must be in user@domain format and the domain must be a real domain, not the name of a section in sip.conf. (I think you can have just the user part, in which case the domain will be your own address, but that might result in the call being forwareded back to you!)

This, of course, assumes that the peer is prepared to accept transfers.

Note that an ITSP who accepts a transfer is likely to charge you for the outgoing leg as though you had made the call with Dial.

One other thing to note is that the way that a transfer is achieved is very different depending on whether or not you have answered the call. If you don’t answer, Asterisk will close the call with a status 302 response. If you do answer, it will send a REFER request and then track the resulting responses and incoming NOTIFY requests. REFER is rather less likely to be supported than 302.

Hi David,

Thanks. Its works.

I did with user@domain format.

Thanks again. I am really appreciate your help.



Hi David,

One more thing.

I want to change the caller id before Tranfer call. How it will work ?

I have used SIPAddHeader and Set(CallerID(num)=123456). Both not worked.

exten => s,n,Set(CALLERID(name)=“123456”)
exten => s,n,SipAddHeader(P-Asserted-Identity: sip:123456}

Can you suggest me how I can use that.



You can’t. The SIP standards and de facto standards for transfers are not that well developed and don’t support the mechanisms that would be used for this on a Dial.

If you do a pre-answer transfer, you may find that Set(REDIRECTING()) will set a Diversion header, which the may or may not be handled by the upstream system in the way you want. I don’t think anything like that is defined for REFER.