[general]
static=yes
writeprotect=no
[globals]
;CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
;IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
;TRUNK=CAPI ; Trunk interface
;TRUNKMSD=1 ; MSD digits to strip (usually 1
or 0)
;TRUNK=IAX2/user:pass@provider
TRUNK=Modem/g1
TRUNKMSD=1
;
; 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.
;
;
[local]
;
; 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
;
[default]
;**************************** Ankommend Start ******************************
; Voicebox von SIP Phones intern
exten => 99/_[1-9].,1,Answer
exten => 99/_[1-9].,2,Wait(1)
exten => 99/_[1-9].,3,VoicemailMain(s${CALLERIDNUM})
exten => 99/_[1-9].,4,Hangup
; Voicebox von irgendeinem internen Telefon aus
exten => 98,1,Answer
exten => 98,2,Wait(1)
exten => 98,3,VoiceMailMain
exten => 98,4,HangUp
; SIPGATE einkommend
exten => xxxxx,1,Dial(SIP/55,66)
exten => xxxxx,2,Dial(Modem/g1:13579,12)
exten => xxxxx,3,Voicemail(u55)
exten => xxxxx,4,Hangup
; Ruf ankommend auf MSN 1
exten => MSN1,1,Dial(SIP/55,66)
exten => MSN1,2,Dial(Modem/g1:13579,12)
exten => MSN1,3,Voicemail(u55)
exten => MSN1,4,Hangup
; Ruf ankommend auf MSN 2 (FAX)
exten => 67890,1,SetVar(CALLEDFAX=${EXTEN})
exten => 67890,2,Answer
exten => 67890,3,Goto(fax,${EXTEN},1)
; Voicebox_Abfrage von extern
exten => MSN3,1,Answer
exten => MSN3,2,Wait(1)
exten => MSN3,3,VoiceMailMain
exten => MSN3,4,HangUp
;**************************** Ankommend Stop ******************************
;**************************** Abgehend Start ******************************
; extern Gespraeche zu SIPGATE mit Kennziffer * . EXTERN:1 scheidet den * ab !!!
exten => _*.,1,SetCallerId,SIPID
exten => _*.,2,Dial(SIP/${EXTEN:1}@sipgate-1,30,trg)
exten => _*.,3,Hangup
; externe Gespraeche zur ISDN Karte mit Kennziffer 0
exten => _0.,1,Dial(Modem/g1:${EXTEN:1},60,r)
exten => _0.,2,Playback(invalid)
exten => _0.,3,Hangup
[sip-out]
exten => _X.,1,SetCallerId,xxxxxx
exten => _X.,2,Dial(SIP/${EXTEN}@sipgate-out,30,trg)
exten => _X.,3,Hangup
;**************************** Abgehend Stop ******************************
;**************************** FAX Scripte Start ******************************
[macro-faxreceive]
exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${CALLEDFAX}/${UNIQUEID})
exten => s,2,DBGet(EXTEMAIL=${MACRO_EXTEN}/xEmail)
exten => s,3,NoOP()
exten => s,4,DBGet(EXTNAME=${MACRO_EXTEN}/xName)
exten => s,5,NoOP()
exten => s,6,DBGet(EXTCOMPANY=${MACRO_EXTEN}/xCompany)
exten => s,7,rxfax(${FAXFILE}.tif)
exten => s,103,SetVar([email protected])
exten => s,104,Goto(7)
exten => s,105,SetVar(EXTNAME=Unknown)
exten => s,106,Goto(7)
exten => s,107,SetVar(EXTCOMPANY=Company)
exten => s,108,Goto(7)
[fax]
exten => 67890,1,Macro(faxreceive)
exten => h,1,System(/etc/asterisk/mailfax "${CALLERIDNUM}" "${CALLEDFAX}" "${EXTNAME}" "${EXTEMAIL}" "${FAXFILE}" "${EXTCOMPANY}")
;**************************** FAX Scripte Stop ******************************