Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to keep original caller on-hold while *trying* a transfer ?

Status
Not open for further replies.

nauliv

Technical User
Feb 7, 2006
40
0
0
US
Hello,


I'm using asterisk for my land lines, and when I am not picking up my SIP phone after couple of rings, I try to dial a cell phone, then if i'm not answering that either, i try another number, and so on.
The problem is when a cell phone is turned off or out of range, it picks up immediately with the voicemail (no rings), and asterisk thinks the line has been picked up and transfers the call.

exten => 123546,Dial(Zap/g1/15554443333)

What I'm trying to do, is when the line is picked up, to play a message saying "press 1 to accept the call", and if the DTMF 1 is not pressed within a short timeframe, then the call is hangup and the next cell phone on the list is dialled.

The "Dial" command is automatically transferring the caller when the line at the other end is answered... How do you keep the original caller on hold, while playing the menu option to the person dialled-out ?

Thanks so much !!
 
Modify Call screening?

Call Screening

How it works is this.

1.) Call comes in and the person is greeted with Please say your name after the tone.
2.) After the person does that it will fire off a call to your extension, cell phone or whatever.
3.) You answer the phone and Asterisk says "You have a call from Person name here."
4.) Asterisk will then ask say, Press 1 to accept the call, 2 to transfer the call or 3 send to voicemail.

[custom-screen]
;screen-record: Please record your name press pound when finished.
;screen-from: You have a call from
;screen-accept: Press 1 to accept 2 to reject, and 3 to transfer.
exten => s,1,Wait(0.2)
exten => s,2,Playback(vm-rec-name)
exten => s,3,SetVar(SCREEN_FILE=/tmp/${CALLERIDNUM}-${EPOCH})
exten => s,4,Record(${SCREEN_FILE}.gsm|2|4)
exten => s,5,Playback(pls-wait-connect-call)
;exten => s,6,Dial(${ARG2},30,mtM(screen^${SCREEN_FILE}))
exten => s,6,Dial(IAX2/prod-server/203,30,mtM(screen^${SCREEN_FILE})); change to your dial command
exten => s,7,Goto(17);VM
;exten => s,17,Voicemail(u${ARG1})exten => s,17,Voicemail(u203@default);change to your voicemail
exten => s,18,Playback(goodbye)
exten => s,19,Hangup
exten => s,107,Goto(17)

exten => h,1,System(/bin/rm ${ARG1}.gsm)

[macro-screen]
;this is called in the Dial statement using M
;ARG1 recorded name to play back
;TODO: add a response timeout, after which the message is repeated
(needed for outgoing zap fxo channels) and absolute timeout, after
which VM is used
;exten => s,1,noop(${ARG1})
exten => s,1,noop(${ARG1})
exten => s,2,Playback(custom/screen-from) ;you have an incoming call from:
exten => s,3,Playback(${ARG1})
;press 1 to accept 2 to reject 3 to transfer
exten => s,4,Read(ACCEPT|custom/screen-accept|1)
exten => s,5,Gotoif($[${ACCEPT} = 1] ?50) ;connect
exten => s,6,Gotoif($[${ACCEPT} = 2] ?30) ;reject to vm
exten => s,7,Gotoif($[${ACCEPT} = 3] ?40) ;TRANSFER
exten => s,8,Gotoif($[${ACCEPT} = 4] ?30:30) ;any thing else vm
exten => s,30,SetVar(MACRO_RESULT=CONTINUE)
exten => s,31,Goto(50)
exten => s,40,Read(TEXTEN|custom/screen-exten|3);ask for extension then set macro to goto that and continue
exten => s,41,Gotoif($[${LEN(${TEXTEN})} = 3]?42:45)
exten => s,42,SetVar(MACRO_RESULT=GOTO:from-internal^${TEXTEN}^1)
exten => s,43,Goto(50)
exten => s,45,Gotoif($[${TEXTEN} = 0] ?46:46);the logic is here to allow transfer to operator, i just didn't imlepent;it yet
exten => s,46,SetVar(MACRO_RESULT=CONTINUE)
exten => s,47,Goto(50)
exten => s,50,System(/bin/rm ${ARG1}.gsm)
exten => h,1,System(/bin/rm ${ARG1}.gsm)

;You need to record these prompts

;screen-from
;screen-accept
;screen-exten

Somehow it would need to be modified to route to the next call instead of vmail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top