[Asterisk-Users] Re: how to dial extension with menu

Benjamin West bewest at gmail.com
Wed May 25 09:05:24 MST 2005


Kamran,

You'll need more than just Dial to make it work...
You'll need to ring the phone and then wait for them to answer like this:

exten => 12, 1, Dial(SIP/1200)
exten => 12, 2, Ringing()
exten => 12, 3, Wait(20)
exten => 12, 4, Hangup()


In my example here, dialing 12 at a prompt (or while you are
waiting/background in your example) will dial SIP phone 1200.  Note
that it is not enough to just dial, you must also Ring and Wait.  If
you want to make the extension match the name of the phone, you'll
need to do something like:

exten => 3000, 1, Dial(SIP/3000)
exten => 3000, 2, Ringing()
exten => 3000, 3, Wait(20)
exten => 3000, 4, Hangup()

exten => 4000, 1, Dial(SIP/4000)
exten => 4000, 2, Ringing()
exten => 4000, 3, Wait(20)
exten => 4000, 4, Hangup()

You probably got that EXTEN business from an example that abstracts
this process into something a bit easier to set up en masse.  In the
example I gave you just now, dialing 3000 will ring phone registered
as user 3000, start ringing it, wait for 20 seconds, and then hangup,
if it is never answered.  If it is answered, it will hangup after the
user does, just like you would expect.

Good luck.
Ben

On 5/25/05, Kamran Ahmad <p_kami at yahoo.com> wrote:
> i know there is example in extension.conf
> 
> but that is not working in my case
> 
> i am unable to get the extension pressed by user after
> listening menu
> 
> like how to get when 2000 pressed.
> 
> because it is not dialing 2000
> 
> exten => 6000,1,Background(k-enterexten)
> exten => 6000,2,Wait(2)
> 
> 
> exten=>3000,1,Dial(SIP/${EXTEN})
> exten=>2000,1,Dial(SIP/${EXTEN})
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new Resources site
> http://smallbusiness.yahoo.com/resources/
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list