> 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