[Asterisk-Users] Re: Pickup an unanswered line

Holger Schurig hs4233 at mail.mn-solutions.de
Tue Jul 27 03:17:22 MST 2004


> So we need to wait for 10 seconds, before we can answer the line.
> It would be great if it is possible (by dialing 8) Asterisk picks up a
> ringing line and puts it through to the accepting softphone.

I don't know if this is possible. Maybe it works like this (pseudo-code), 
I actually don't yet work with goto, setvar and such.

s,1,Wait(1)
s,2,Goto(x$VAR=x,1,3)
s,3,Wait(2)		; wait again so that you can setup the handset
s,4,Dial($VAR)

8,1,SetGlobalVar(VAR,SIP/gs101)



When the PSTN rings, you go into this endless loop of Wait(1) and the Goto 
that tests for the existence of VAR. You could actually use Wait(0.25) if 
you like.

When you now dial 8, the VAR is set to a Sip phone. You can do more magic 
here to set it to the phone that called the 8, I'll leave the details to 
you.

If this happens, then the loop above ends, but waits 2 more seconds to 
give you time to put the phone back onto the hook. Then it calls the 
phone. Without the Wait() it would probably be busy ...




More information about the asterisk-users mailing list