Here is my
extensions.conf....
Thanks
Don
;Don't forget to fetch the 'Asterisk Handbook' from
www.asterisk.org!
;Read through it at least once before editing this
file.
;the general 'context' is used to define some
global variables for asterisk.
[general]
;these lines prevent you from rewriting the
extensions.conf from the CLI
;we don't really recommend you try to do so, it's
safer to edit the
;extensions.conf and run 'reload' at the CLI (which
will not drop calls)
static=yes
writeprotect=no
;the dialout context can be included in contexts
which should have access
;to an outside line
;This extension match matches dialing '9' from the
phone on the FXS to
;the outside line.
[dialout]
;first step is to strip the 9 from the call, and
not send it to Ma Bell.
;in short, stripmsd will strip the number of digits
specified from the
;beginning of the dialed string. It will move on to
the next priority
;in the new extension (i.e. _9NXXXXXX became
_NXXXXXX when we stripped
;the '9' For a bit more info do 'show application
stripmsd' from the
;asterisk CLI
;extension matches are preceeded by an underscore.
other chars are either
;absolute digits or 'N' (for any number greater
than 1) or 'X' (for any
;number
exten => _9NXXXXXX,1,StripMSD,1
;Then send the call out the FXO card to our
incoming POTS line.
;BYEXTENSION is a special target we can send
extension matches to.
;It will send the whole matching string as
dialed.
exten =>
_NXXXXXX,2,Dial,Zap/4/BYEXTENSION
[home]
include => mailboxes
;set a music on hold class so we can play music for
our callers when we park
;or transfer them.
exten => s,1,setmusiconhold,default
;set a response timeout so we can terminate the
call or recycle the caller
;through the menu if they don't answer our voice
prompts
exten => s,2,responsetimeout,20
;ring our zaptel channel 1 device for 20 seconds
(the fxs interface, of course)
exten => s,3,Dial,Zap/1|20
;if nobody answers tell them how to use the
voicemail system.
exten => s,4,Playback,thanks
exten => i,1,hangup
[mailboxes]
exten => 100,1,Voicemail,100
exten => 100,2,Hangup
exten => 101,1,Voicemail,101
exten => 101,2,Voicemail,
[bell]
;ignorepat will recieve the digit, but continue the
dialtone. Most useful
;here. It has to be in the starting context of the
incoming channel
ignorepat => 9
;include makes available all of the extensions in
the included
;context in the context the include statement is
placed in. In this case we
;grant access to dial out over the POTS to internal
callers. We could probably
;skip this (since we only have one extenal line an
incoming calers are
;already tying it up and place the extensions in
here in this case, but
;this is a good habit to be in.
include => dialout
;enable call parking and retrieval (see asterisk
handbook>application reference
;>call parking, or 'show application
parkedcalls' in the Asterisk CLI)
include => parkedcalls
;of course we need to be able to check our
voicemail!
exten => 6,1,Goto,home|s|1
exten => 8,1,VoicemailMain
exten => 8,2,Hangup
;and this little routine I add for recording the
initial message. You should
;probably tell the user how to get to the voicemail
boxes set up. No default
;audio file is supplied. You will have to use this
to record a message
;or asterisk will hangup on the caller when it
can't find the file.
exten => 7,1,Record,thanks:gsm
exten => 7,2,Wait,1
exten => 7,3,Playback,thanks