;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your
; inbound and outbound calls in Asterisk.
;
;
; The "General" category is for certain variables.
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified. Remember that all comments
; made in the file will be lost when that happens.
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no
; You can include other config files, use the #include command (without the ';')
; Note that this is different from the "include" command that includes contexts within
; other contexts. The #include command works in all asterisk configuration files.
;#include "filename.conf"
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental variable
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
;CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
;TRUNK=Zap/g2 ; Trunk interface
;TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider
;
; Any category other than "General" and "Globals" represent
; extension contexts, which are collections of extensions.
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal. In patterns, some characters have special meanings:
;
; X - any digit from 0-9
; Z - any digit from 1-9
; N - any digit from 2-9
; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
; . - wildcard, matches anything remaining (e.g. _9011. matches
; anything starting with 9011 excluding 9011 itself)
;
; For example the extension _NXXXXXX would match normal 7 digit dialings,
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension.
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred. One may include another
; context in the current one as well, optionally with a
; date and time. Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority,application(arg1,arg2,...)
;exten => someexten,priority,application,arg1|arg2...
;
; Timing list for includes is
;
; <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern. The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;
;
; Here are the entries you need to participate in the IAXTEL
; call routing system. Most IAXTEL numbers begin with 1-700, but
; there are exceptions. For more information, and to sign
; up, please go to www.gnophone.com or www.iaxtel.com
;
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
;ignorepat => 9
include => sip-phones
include => outgoing
;include => default
;
; You can use an alternative switch type as well, to resolve
; extensions that are not known here, for example with remote
; IAX switching you transparently get access to the remote
; Asterisk PBX
;
; switch => IAX2/user:password@bigserver/local
[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20,t) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => s-CHANUNAVAIL,1,BackGround(vm-unknown-caller)
exten => s-CHANUNAVAIL,2,Hangup
exten => s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain
[sip-phones]
include => outgoing
exten => 1020,1,Dial(SIP/lars,20,Ttr)
exten => 1021,1,Dial(SIP/rasmus,20,Ttr)
exten => 1022,1,Dial(SIP/christian,20,Ttr)
exten => 1023,1,Dial(SIP/skipp,20,Ttr)
exten => 1024,1,Dial(SIP/dennis,20,Ttr)
exten => 1025,1,Dial(SIP/poul-erik,20,Ttr)
exten => 1026,1,Dial(SIP/lasse,20,Ttr)
exten => 1027,1,Dial(SIP/køkken,20,Ttr)
exten => 1028,1,Dial(SIP/kasse,20,Ttr)
exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; "That's not valid, try again"
exten => #,1,Playback(privacy-thankyou) ; "Thanks for trying the demo"
exten => #,2,Hangup ; Hang them up.
exten => 1000,1,Dial(SIP/lars&SIP/rasmus&SIP/christian&SIP/skipp&SIP/dennis&SIP/poul-erik&SIP/køkken&SIP/kasse,20,tr)
exten => 1000,2,Hangup
;exten => 1001,1,Ringing
;exten => 1001,2,Wait(2)
;exten => 1001,3,VoicemailMain,s9999
;exten => 254,1,Goto(incoming,s,1)
;exten => _2XXX,1,Dial(IAX2/wallin:kina22@www.skipp.dk/${EXTEN}@skipp.dk)
exten => 1051,1,Answer
exten => 1051,2,MusicOnHold()
exten => h,1,Hangup
[incoming]
exten => s,1,Goto(sip-phones,1000,1)
[outgoing]
;exten => _0.,1,Dial(Modem/g1/59441490:${EXTEN:1},20,R)
exten => _.,1,Dial(Modem/g1/59441490:${EXTEN},20,R)
exten => _.,2,Hangup
;exten => _00.,1,Dial(Modem/g1/59441490:${EXTEN},20,R)