System information

exten => #,1,Verbose(1,
same => n,Directory() ;
exten => 0,1,Verbose(1,
same => n,Dial(SIP/operator) ; Operator extension/queue
exten => i,1,Verbose(1,
same => n,Playback(invalid)
same => n,Goto(s,menuprompt)
exten => t,1,Verbose(1,
same => n,Goto(0,1)
; You will want to have a pattern match for the various extensions
; that you'll allow external callers to dial
; BUT DON'T JUST INCLUDE THE LocalSets CONTEXT
; OR EXTERNAL CALLERS WILL BE ABLE TO MAKE CALLS OUT OF YOUR SYSTEM
; WHATEVER YOU DO HERE, TEST IT CAREFULLY TO ENSURE EXTERNAL CALLERS
; WILL NOT BE ABLE TO DO ANYTHING BUT DIAL INTERNAL EXTENSIONS
exten => _1XX,1,Verbose(1,Call to an extension starting with '1'
same => n,Goto(InternalSets,${EXTEN},1)
Delivering Incoming Calls to the Auto Attendant
Any call coming into the system will enter the dialplan in the context defined for what-
ever channel the call arrives on. In many cases this will be a context named incoming,
or from-pstn, or something similar. The calls will arrive either with an extension (as
would be the case with a DID) or without one (which would be the case with a tradi-
tional analog line).
Whatever the name of the context, and whatever the name of the extension, you will
want to send each incoming call to the menu. Here are a few examples:
[from-pstn] ; an analog line that has context=from-pstn (typically a DAHDI channel)
exten => s,1,Goto(main_menu,s,1)
[incoming] ; a DID coming in on a channel with context=incoming (PRI, SIP, or IAX)
exten => 4169671111,1,Goto(main_menu,s,1)
Depending on how you configure your incoming channels, you will generally want to
use the Goto() application if you want to send the call to an auto attendant. This is far
neater than just coding everything in the incoming context.
Building Your Auto Attendant | 339