[Asterisk-Users] (another try) Dialing phone number and extension together to avoid listening to voice menu (incoming call)

Adam Goryachev mailinglists at websitemanagers.com.au
Thu Mar 3 07:04:41 MST 2005


> ***************
> ; defining the voice menu for incoming calls:
> 
> [fhostaffmenu]
> exten => s,1,Ringing			; Make them comfortable with
> some seconds of ringback
> exten => s,2,Answer			; Answer the line

You haven't actually given them any ringing, you need to add this:
exten => s,3,wait(2) ; Give them 2 seconds of ringing

> exten => s,4,DigitTimeout(1)		; Set Digit Timeout to 5 seconds
> exten => s,5,ResponseTimeout(3)	; Set Response Timeout to 10 seconds

Rather than doing the below, if you simply stop all processing at this
point, and don't have any more extensions, then asterisk will wait 3
seconds for the user to press a number, then 1 second for each extra
number. When they don't press a number for more than the 1 second, or
asterisk matches an extension, then it will try to dial the entered
number.

> exten => s,5,Read(mynumber,beep,3)  ; Read DTMF input and save it into
> "mynumber" variable exten =>
> s,6,Macro(fhostaff,${mynumber},SIP/${mynumber}) ; dial the extension
> that is saved in "mynumber"
> ***************

OK, hard to get asterisk to do this, but something like:
exten => _XXX.,Macro(fhostaff,${mynumber},SIP/${mynumber})

So, the user can dial 3 or more digits, and then it will go to your
macro.

You can also add:
exten =>
i,1,playback(some_file_to_say_you_entered_an_invalid_extension_try_again)
exten => i,2,Goto(s,4)

and also:
exten =>
t,1,playback(some_file_to_say_you_did_not_enter_an_extension_try_again)
exten => t,2,Goto(s,4)

I hope that helps you...

Regards,
Adam

-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +61 2 9345 4395                        adam at websitemanagers.com.au
Fax: +61 2 9345 4396                        www.websitemanagers.com.au




More information about the asterisk-users mailing list