I have been testing out the IVR system in Asterisk, and the below example works fine, traps invalid numbers…but what is distressing is my dialplans are concidered by asterisk as part of the IVR menu options, so if I dial 9+area code+number, the asterisk will pass the call because it qualifies as a valid number! How do I prevent that from happening?
Below is from my extensions.conf file. Callers get sent from a DID to 9000, where treatement is played. Pressing 1 or 2 will send them to queues to get answered.
include => ext-supportmenu
exten => 9000,1,Answer
exten => 9000,2,Wait(1)
exten => 9000,3,SetMusicOnHold(default)
exten => 9000,4,DigitTimeout,4
exten => 9000,5,ResponseTimeout,5
exten => 9000,6,Background(Thankyouforcalling)
exten => 1,1,Background(onemomentplease)
exten => 1,2,Goto(ext-queues,9001,1)
exten => 2,1,Background(onemomentplease)
exten => 2,2,Goto(ext-queues,9002,1)
exten => t,1,Goto(9000,1) ; if timeout play menu again
exten => i,1,Playback(invalid) ; please try another selection
exten => i,2,Goto(9000,1)