[HELP] Retrieve a transferred call if no one picks up

Hi List,
If I transfer a call to another extension and that extension doesn’t pick up - how do I get the call back?

I’ve looked at SIPPEER functions, ChanIsAvail and stuff like that but it doesn’t look like it will do it…

Some help would be really appreciated…

mylo

it’s been a while since i used Asterisk-based functions for this (generally, a good phone is much better), but IIRC the disconnect option in features.conf can be used for this.

I didn’t realise there was a BLINDTRANSFER argument. I didn’t read the voip-info page well enough, there’s a good example there. I modified it slightly and used it in a macro like this:

[macro-sipextensionReturnTransferFailure]
exten => s,1,Dial(SIP/${ARG1},5,WwTtr)
exten => s,2,Gotoif($["${BLINDTRANSFER}"=""]?3:4)
exten => s,3,Hangup
exten => s,4,NoOp(Sending back to originalparty...${BLINDTRANSFER:0:$[4+${LEN(${ARG1})}]})
exten => s,5,Set(tx=${BLINDTRANSFER:0:$[4+${LEN(${ARG1})}]})
exten => s,6,SetCallerID(RET_${ARG1} <${CALLERIDNUM}>)
exten => s,7,Dial(${tx},,WwtTr)
exten => s,8,Hangup
exten => s,103,Set(tx=${BLINDTRANSFER:0:$[4+${LEN(${ARG1})}]})
exten => s,104,Wait(5)
exten => s,105,SetCallerID(Err_${ARG1} <${CALLERIDNUM}>)
exten => s,106,Dial(${tx},,WwTtr)
exten => s,107,Hangup

works a charm :smile:

the above macro presumes that the extension numbers are of the same length