[general]
static=yes
writeprotect=yes
autofallthrough=no
clearglobalvars=yes
priorityjumping=no
; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental
; variables,
; ${${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, group 2 in zapata.conf
PHONE1=Zap/1
PHONE2=Zap/2
PHONE3=Zap/3
PHONE4=Zap/5
PHONE5=Zap/6
PHONE6=Zap/7
PHONEALL=Zap/1&Zap/2&Zap/3&Zap/5&Zap/6&Zap/7
PIZZA=3
PHONEBOOK=4
VOICEMAIL=5
EXT1=81
EXT2=82
EXT3=83
EXT5=85
EXT6=86
EXT7=87
SIP_KEITH=61
SIP_MATT=62
SIP_CHRIS=63
SIP_MUNROE=64
SIP_SABRINA=65
SIP_KEMMERER=66
KEITH=6103907404 ; 1
KRIEBZ=12672180786 ; 2
ROE=12158341846 ; 3
CHRIS=18487023556 ; 4
SABRINA=19085812393 ; 5
KEMMERER=6106537400 ; 6
CHAD=17178087485 ; 7
STEVE=6102176459 ; 8
JAMIE=19045016009 ; 9
VICTORY=6108672773 ; 1
POMODORO=6103170899 ; 2
NICKS=6108653366 ; 3
DOMINOS=6108652700 ; 4
PIZZAHUT=6109749555 ; 5
PAPAJOHNS=6106910100 ; 6
PENN=6108663532 ; 7
WESTGATE=6108651393 ; 8
LEHIGH=6108661088 ; 9
HUNANINN=6108688878 ; ?
;
; g: select the lowest-numbered non-busy Zap channel
; (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy Zap channel
; (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last
; time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last
; time (aka. descending rotary hunt group).
;
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;
; 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)
; ! - wildcard, causes the matching process to complete as soon as
; it can unambiguously determine that no other matches are possible
;
; For example the extension _NXXXXXX would match normal 7 digit dialings,
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension. The priority
; "next" or "n" means the previous priority plus one, regardless of whether
; the previous priority was associated with the current extension or not.
; The priority "same" or "s" means the same as the previously specified
; priority, again regardless of whether the previous entry was for the
; same extension. Priorities may be immediately followed by a plus sign
; and another integer to add that amount (most useful with 's' or 'n').
; Priorities may then also have an alias, or label, in
; parenthesis after their name which can be used in goto situations
;
; 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[+offset][(alias)],application(arg1,arg2,...)
;exten => someexten,priority[+offset][(alias)],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.
;
[trunkld]
;
; Long distance context accessed through trunk
;
exten => _91NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
;exten => _901141101275340404
exten => _9011411,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[trunklocal]
;
; Local ten-digit dialing accessed through trunk interface
;
exten => _9NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
; 911 support, anyone?
exten => 911,1,Dial(${TRUNK}/911)
exten => 9911,1,Dial(${TRUNK}/911)
[trunktollfree]
;
; Long distance context accessed through trunk interface
;
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
[longdistance]
;
; Master context for long distance
;
include => local
include => trunkld
[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
include => internal
include => parkedcalls
include => trunklocal
include => trunktollfree
[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(mainmenu,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(mainmenu,s,1) ; If they press #, return to start
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
[nagios]
exten => s,1,Background(demo-congrats)
exten => s,n,Hangup
[submenu]
;not currently used
exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback
exten => s,n,Wait,2
exten => s,n,Background(demo-congrats)
exten => s,n,WaitExten
exten => 1,1,Goto(internal,livingroom,1)
exten => 2,1,Goto(internal,kitchen,1)
exten => 3,1,Goto(internal,basement,1)
[phonebook]
exten => s,1,Background(custom/cell-menu)
exten => s,n,WaitExten
exten => 1,1,Ringing
exten => 1,n,Dial(${TRUNK}/${KEITH},60,t)
exten => 2,1,Ringing
exten => 2,n,Dial(${TRUNK}/${KRIEBZ},60,t)
exten => 3,1,Ringing
exten => 3,n,Dial(${TRUNK}/${ROE},60,t)
exten => 4,1,Ringing
exten => 4,n,Dial(${TRUNK}/${CHRIS},60,t)
exten => 5,1,Ringing
exten => 5,n,Dial(${TRUNK}/${SABRINA},60,t)
exten => 6,1,Ringing
exten => 6,n,Dial(${TRUNK}/${KEMMERER},60,t)
exten => 7,1,Ringing
exten => 7,n,Dial(${TRUNK}/${CHAD},60,t)
exten => 8,1,Ringing
exten => 8,n,Dial(${TRUNK}/${STEVE},60,t)
exten => 9,1,Ringing
exten => 9,n,Dial(${TRUNK}/${JAMIE},60,t)
exten => 0,1,Goto(phonebook,s,1)
[pizza]
exten => s,1,Background(custom/pizza-menu)
exten => s,n,WaitExten
exten => 1,1,Dial(${TRUNK}/${VICTORY},60,t)
exten => 2,1,Dial(${TRUNK}/${POMODORO},60,t)
exten => 3,1,Dial(${TRUNK}/${NICKS},60,t)
exten => 4,1,Dial(${TRUNK}/${DOMINOS},60,t)
exten => 5,1,Dial(${TRUNK}/${PIZZAHUT},60,t)
exten => 6,1,Dial(${TRUNK}/${PAPAJOHNS},60,t)
exten => 7,1,Dial(${TRUNK}/${PENN},60,t)
exten => 8,1,Dial(${TRUNK}/${WESTGATE},60,t)
exten => 9,1,Dial(${TRUNK}/${LEHIGH},60,t)
exten => 0,1,Goto(pizza,s,1)
[invalid]
;
; invalid extensions
exten => s,1,Playback(pbx-invalid)
exten => s,n,Wait(1)
exten => s,n,Hangup()
[incoming]
exten => s,1,Zapateller(answer|nocallerid)
exten => s,n,PrivacyManager
exten => s,n,Dial(${PHONEALL},30,t)
exten => s,n,Hangup
;exten => s,1,Answer
;exten => s,2,Background(hawaii)
;exten => s,3,Set(TIMEOUT(response)=5)
;exten => s,4,Set(TIMEOUT(digit)=5)
;exten => i,1,Goto(s,3)
;exten => t,1,Dial(Zap/7,30,t)
;exten => t,2,Hangup
;exten => f,1,Goto(fax,1)
exten => fax,1,Set(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => fax,n,rxfax(${FAXFILE})
exten => fax,n,Hangup
exten => 833939,1,Dial(${PHONEALL})
[internal]
ignorepat => 9
include => longdistance
;
; 2 conference rooms
exten => 2,1,Answer()
exten => 2,n,Background(conference-call)
exten => 2,n,Wait(1)
exten => 2,n,Background(press)
exten => 2,n,SayNumber(20)
exten => 2,n,Wait(1)
exten => 2,n,SayNumber(21)
exten => 2,n,Wait(1)
exten => 2,n,SayNumber(22)
exten => 2,n,Wait(1)
exten => 2,n,SayNumber(23)
exten => 2,n,Wait(1)
exten => 2,n,SayNumber(24)
exten => 2,n,Wait(1)
exten => 2,n,Background(or)
exten => 2,n,SayNumber(25)
exten => 2,n,WaitExten
exten => 2,n,Hangup()
;
exten => 20,1,MeetMe(20,i)
exten => 21,1,MeetMe(21,i)
exten => 22,1,MeetMe(22,i)
exten => 23,1,MeetMe(23,i)
exten => 24,1,MeetMe(24,i)
exten => 25,1,MeetMe(25,i)
;
; 3
exten => ${PIZZA},1,Goto(pizza,s,1)
;
; 4
exten => ${PHONEBOOK},1,Goto(phonebook,s,1)
;
; 5
exten => ${VOICEMAIL},1,VoicemailMain
exten => ${VOICEMAIL},n,Hangup
;
; 6
exten => ${SIP_KEITH},1,Macro(stdexten,${SIP_KEITH},Sip/erekson)
exten => ${SIP_MATT},1,Macro(stdexten,${SIP_MATT},Sip/kriebel)
exten => ${SIP_CHRIS},1,Macro(stdexten,${SIP_CHRIS},Sip/creswell)
exten => ${SIP_MUNROE},1,Macro(stdexten,${SIP_MUNROE},Sip/sollog)
exten => ${SIP_SABRINA},1,Macro(stdexten,${SIP_SABRINA},Sip/sabrina)
exten => ${SIP_KEMMERER},1,Macro(stdexten,${SIP_KEMMERER},Sip/kemmerer)
;
; 7 is parking lot
;
; 8 (81 - 86)
exten => ${EXT1},1,Macro(stdexten,${EXT1},${PHONE1})
exten => ${EXT2},1,Macro(stdexten,${EXT2},${PHONE2})
exten => ${EXT3},1,Macro(stdexten,${EXT3},${PHONE3})
exten => ${EXT4},1,Macro(stdexten,${EXT4},${PHONE4})
exten => ${EXT5},1,Macro(stdexten,${EXT5},${PHONE5})
exten => ${EXT6},1,Macro(stdexten,${EXT6},${PHONE6})
;
; invalid extensions
exten => 1,1,Goto(invalid,s,1)