I use something like the following for that...
[incomingcall]
exten => s,1,Wait(1)
exten => s,2,Background(somemenu)
; Menu prompts to press 1 to use the relay
exten => s,3,WaitExten()
exten => 1,1,Goto(relay,s,1)
[relay]
exten => s,1,Authenticate(123456|a)
exten => s,2,Goto(${CDR(accountcode)}|1)
exten => 123456,1,Goto(relayauth,s,1)
[relayauth]
exten => s,1,Background(pls-entr-num-uwish2-call)
exten => s,2,WaitExten
exten => _NXXNXXXXXX,1,Dial(SIP/outgoing/${EXTEN})
exten => i,1,Background(invalid)
exten => i,2,Goto(s|1)
Could also play with timeouts too.
On 2/4/06, Ian Darwin <[EMAIL PROTECTED]> wrote:
>
> David Fishburn wrote:
>
> >[EMAIL PROTECTED] 2.5
> >
> >I want to create a setup so that when someone calls (and maybe an
> >autoattendent answers or VM) they can press an internal extension. The
> >external extension will turn around and make an outgoing call to my cell
> >phone.
> >
> >So I was reading through this article:
> >http://www.voip-info.org/tiki-index.php?page=Asterisk%20auto-dial%20out
> >
> >
> >
> That is entirely the wrong page; that page starts off "If you want to
> initiate a call from an external application, there are several ways to
> do this. ..."
>
> That is not what you are talking about (having a program outside
> Asterisk initiating the call);
> you want the all to originate from inside asterisk when certain keys are
> pressed.
>
> >
> >I am not too clear on what Channel is, I am assuming this should be a
> trunk
> >name, so in my case it would be IAX/iax.cc.
> >
> >I am not sure what the Context is referring too though.
> >
> > In this case I am not sure what triggers this .call file. I would
> prefer
> >to use a local extension to make the outgoing call. That way I can
> change
> >the number at will.
> >
> >
>
> It isn't clear from this how much you know or don't about *, but you
> might want to
> read the O'Reilly book (the authors of whom are frequent contributors to
> this list).
> The first few chapters will really clarify your understanding of what
> Channels and
> Contexts are. They will also help you see how to do what you want,
> which sounds
> like it can all be done in the normal dialplan (extensions.conf) file.
> Here's something
> I set up:
>
> exten => 234,1,Dial(SIP/${EXTEN},12,tr)
> exten => 234,n,Dial(IAX2/outunlimitel/${FIan},12,tr)
> exten => 234,n,Voicemail(u${EXTEN})
> exten => 234,n,Hangup
>
> This way if the incoming caller dials 234 they will first get my SIP
> phone but,
> if I don't answer, the call will go out via IAX to the phone number saved
> in the FIan variable; if that call fails, it will go to my voicemail.
> You can rip out
> parts of it to do what you described above.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>