[Asterisk-Users] IVR dial by extension option..

Robert P. McKenzie rmckenzi at rpmdp.com
Sat Mar 11 07:27:24 MST 2006


Brillian, thanks very much.  I had actually tried the second context myself but looking back at my attempts I can see
where I went wrong.

Thanks again for the help.

Cheers!!!

Time Bandit wrote:
>>When going option 5 you can dial some extensions such as 2802, it goes to the extension (all extens start with 28 on the
>>system).  However, just dialing something random like 2929 sends the caller to option 2 of the main menu or 1010 sends
>>the caller to menu option 1 from the main menu.  Dialing something like 8080 returns the user to the top of the main
>>menu as defined by the exten => i of the main menu.
>>
>>How can I ensure that only valid extensions can be dialed and anything except a number starting with say 28 can be dialed?
> 
> 
> Remove your include of extensions definition from you main menu
> (include => lcl-extensions)
> 
> Change your option 5 to something like this:
> exten => 5,1,Goto(lcl-ivr-dialext,s,1)
> exten => 5,2,Hangup
> 
> Now, create a new context to dial by extension
> 
> [lcl-ivr-dialext]
> include => lcl-extensions
> exten => s,1,Set(TIMEOUT(digit)=5)              ; Dial Extension
> exten => s,2,Set(TIMEOUT(response)=10)
> exten => s,3,Background(LCL/prompt-60) ; This prompt should tell to
> press * to return to the main menu
> exten => s,4,WaitExten(15)
> 
> exten => *,1,Goto(lcl-ivr-main,s,7)                          ; Return
> to main menu
> 
> exten => i,1,Playback(pbx-invalid)          ; invalid exten
> exten => i,2,Wait(1)
> exten => i,3,Goto(s,3)                          ; Return to menu after
> a time out
> 
> exten => t,1,Goto(lcl-ivr-main,s,7)                          ; Return
> to main menu after a time out
> 
> hth
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Robert P. McKenzie, CSTA, MBCS     |   GammaRay Technical Services Ltd
rmckenzi at rpmdp.com                 |             rob at gammaray-tech.com
http://www.uk-experience.com       |      http://www.gammaray-tech.com
               Fancy some fun?  http://www.thewetwilly.com
    Ecademy Profile:   http://www.ecademy.com/user/robertmckenzie



More information about the asterisk-users mailing list