Callers in IVR can make local/LD calls!

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)

Are using @home? Suggest that you take out that script that you are using, and use the Digital Receptionist system that is built into the AMP…it does the scripting conciderably different and it also will address the problems that you are experiencing.

When you say “I dial” - how are you doing this? On a SIP phone connected to Asterisk? While in the menu system, dialing in from the PSTN? And when you say “Callers get sent” to ext-support-menu|9000, what is the context from which they are sent and what does it look like?

I always find the handiest way to understand Asterisk’s “include” statement in the dialplan is that it translates as “can dial”. Therefore if the phone you’re using is in a context that "include"s a context containing outbound numbers, then that context “can dial” outbound numbers.