[Asterisk-Users] New one on me: How to UN-transfer

Colin Anderson ColinA at landmarkmasterbuilder.com
Thu Mar 16 16:28:28 MST 2006


I'm using a Snom 320 in a CAP position and the receptionist wants to do
blind transfers. OK, no problem so far. Now she has asked me how to
UN-transfer a call, as in, she transfers a call and wants to hook the call
back before it connects (she wanted to tell the caller additional
information for example)

I don't think that this is possible as once my dialplan starts using Dial()
there's no way to interrupt it. But:

[internal-transfer]

exten => _5XXXX,1,SetVar(CALLED=${EXTEN:1:4})
exten => _5XXXX,2,Dial(${CALLED},40,TrM,macro-hookback)
exten => _5XXXX,3,DBGet(TRANSFERSTATUS=transferstatus/${EXTEN:2:4})
exten => _5XXXX,4,gotoIf($["${TRANSFERSTATUS}" = "ATTEMPT_RECALL" ]?5:6)
exten => _5XXXX,5,Dial(12345)
exten => _5XXXX,6,NoOp(Dial back ending)

exten => *7XXXX,1,DBPut(transferstatus/${EXTEN:2:4}=ATTEMPT_RECALL)
exten => h,1,DBDel(transferstatus/${CALLED})

[macro-hookback]
exten => s,1,DBGet(TRANSFERSTATUS=transferstatus/${CALLED})
exten => s,2,GotoIf($["${TRANSFERSTATUS}" = "ATTEMPT_RECALL" ]?3:4)
exten => s,3,Dial(1234)
exten => s,4,NoOp(Macro exiting)

So she transfers, while the call is ringing, she has to go to another line,
dial *7 + extension number, it sets the DB, when the transferred party
answers, hookback macro is run, if the variable according to their extension
is set, dial the call back to the original party. 

I haven't run this; can anyone suggest a better way? Even on the slim chance
this would actually work, the called party would be annoyed by having to
pick up the call then it being disconnected.

Another idea might be to use the same thing as above but do a ZapBarge
instead. 



More information about the asterisk-users mailing list