Public feed #724010

Stuff

public text v1 · immutable
Raw Edit
·published 2007-10-03 07:30 UTC
rendered paste body
sip.conf


[111]
type=peer
username=111
fromuser=111
secret=111
host=dynamic
;callerid=linksys
context=office
dtmfmode=rfc2833
;mailbox=70125
qualify=yes

[222]
type=peer
username=222
fromuser=222
secret=222
host=dynamic
;callerid=linksys
context=office
dtmfmode=rfc2833
;mailbox=70125
qualify=yes
~

extensions.conf

[general]
static=yes
writeprotect=yes

[globals]

; 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.
;


[default]
exten => #,1,Hangup                     ; Hang them up.

; A timeout and "invalid extension rule"
exten => t,1,Goto(i,1)                  ; If they take too long, give up
exten => i,1,Playback(invalid)          ; "That's not valid, try again"
exten => i,2,Hangup			; Hang them up.


exten => h,1,DeadAGI(agistardead.agi)
exten => h,1,Hangup

exten => 198,1,Ringing
exten => 198,2,Wait(2)
exten => 198,3,VoicemailMain

exten => 199,1,Ringing
exten => 199,2,Wait(2)
exten => 199,3,AGI(agistarvoicemail.agi)
exten => 199,4,VoicemailMain(s${VOICEMAIL})

exten => 500,1,Ringing
exten => 500,2,Wait(2)
exten => 500,3,DateTime
exten => 500,4,Hangup			; Hang them up.

exten => 501,1,Ringing
exten => 501,2,Wait(2)
exten => 501,3,Playback(tt-monkeysintro)	
exten => 501,4,Playback(tt-somethingwrong)	
exten => 501,5,Playback(tt-monkeys)	    
exten => 501,6,Playback(privacy-thankyou)	    
exten => 501,7,Hangup			; Hang them up.

exten => 502,1,Ringing
exten => 502,2,Wait(2)
exten => 502,3,Playback(demo-echotest)	; Let them know what's going on
exten => 502,4,Echo			; Do the echo test
exten => 502,5,Playback(demo-echodone)	; Let them know it's over
exten => 502,6,Hangup			; Hang them up.
exten => 505,1,WaitMusicOnHold(30) 
exten => 505,2,Congestion 

exten => 503,1,Ringing
exten => 503,2,Wait(2)
exten => 503,3,Playback(believe-its-free)	
exten => 503,4,Hangup			; Hang them up.

exten => 112,1,Ringing
exten => 112,2,Wait(1)
exten => 112,3,Playback(no-112-2)	
exten => 112,4,Hangup			; Hang them up.

exten => 911,1,Ringing
exten => 911,2,Wait(1)
exten => 911,3,Playback(no-911-2)	
exten => 911,4,Hangup			; Hang them up.

exten => 999,1,Ringing
exten => 999,2,Wait(1)
exten => 999,3,Playback(no-112-2)	
exten => 999,4,Hangup			; Hang them up.

exten => _810XXX.,1,Playback(beep)  
exten => _810XXX.,2,Hangup			; Hang them up.

exten => _89XXXX.,1,Playback(beep)  
exten => _89XXXX.,2,Hangup			; Hang them up.

;exten => 70222,1,Dial(SIP/70222,20)

;exten => 421818,1,Dial(SIP/${EXTEN}@70444,20,rT)

include => astbill-custom
include => 70555
include => local-sip
include => astartelecom-iax
include => parkedcalls

[astartelecom-iax]

; exten => _XXXXXX.,1,AGI(agiastar.agi,00${EXTEN}|${CALLERIDNUM})
; The parameter ${CALLERIDNUM} is used when using ANI/CLI for authentication
; It makes ${CALLERIDNUM} = accountcode. This is used in some Asterisk / SER implementations

exten => _XXXXXX.,1,AGI(agiastar.agi,${EXTEN})
exten => _XXXXXX.,2,GotoIf($["${BILLSTATUS}" = "NOCREDIT"]?20)
exten => _XXXXXX.,3,GotoIf($["${BILLSTATUS}" = "NOACCOUNT"]?20)
exten => _XXXXXX.,4,GotoIf($["${BILLSTATUS}" = "INVALID"]?30)
exten => _XXXXXX.,5,Set(CALLERID(all)=${ASTCALLERID}) 
;exten => _XXXXXX.,6,Dial(${DIALSTRING})
exten => _XXXXXX.,6,Dial(SIP/${EXTEN}@70555,45,rT)

exten => _XXXXXX.,20,Playback(beep)  
exten => _XXXXXX.,21,Playback(not-enough-credit)   ; Tells them they do not have enough money
exten => _XXXXXX.,22,Hangup

exten => _XXXXXX.,30,Playback(beep)  
exten => _XXXXXX.,31,Playback(that-is-not-rec-phn-num)             ; "That is not a recognized phone number."
exten => _XXXXXX.,32,Hangup


[macro-stdexten]
;  Standard extension macro:
;  ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well

exten => s,1,AGI(astlocal.agi,${ARG1})
exten => s,2,Dial(${DIALSTRING},20)			; Ring the interface, 20 seconds maximum
exten => s,3,Goto(s-${DIALSTATUS},1)			; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

exten => s-NOANSWER,1,Voicemail(u${VOICEMAIL})		; 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${VOICEMAIL})		; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Goto(default,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(${VOICEMAIL})		; If they press *, send the user into VoicemailMain

[local-sip]
exten => _7XXXX,1,Macro(stdexten,${EXTEN})


[incomming-numbers]
; A timeout and "invalid extension rule"
exten => t,1,Hangup                  ; If they take too long, give up
exten => h,1,Hangup 

exten => 08701111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20)
exten => 08701111111,2,Voicemail,u70223
exten => 08701111111,3,Congestion 
exten => 08701111111,102,Voicemail,b70223
exten => 08701111111,103,Congestion 
exten => 08701111112,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20)
exten => 08701111112,2,Voicemail,u70223
exten => 08701111112,3,Congestion 
exten => 08701111112,102,Voicemail,b70223
exten => 08701111112,103,Congestion 
exten => 02071111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20)
exten => 02071111111,2,Voicemail,u70223
exten => 02071111111,3,Congestion 
exten => 02071111111,102,Voicemail,b70223
exten => 02071111111,103,Congestion 

; free world dialup number
exten => 111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20,r)
exten => 111111,2,Voicemail,u70223
exten => 111111,102,Voicemail,b70223

[astbill-incoming]
; Default Context for Provider Trunks and Incoming Numbers
; Still under development. AstBill-0.9.0.9

[incomingsipgate] 
exten => h,1,Hangup 
exten => 1111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20)
;exten => 1111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228,20,tr)
exten => 1111111,2,Voicemail,u70223
exten => 1111111,3,Congestion 
exten => 1111111,102,Voicemail,b70223
exten => 1111111,103,Congestion 

[ip24] 
exten => h,1,Hangup 
exten => 11111111,1,Dial(SIP/70223&IAX2/70224&SIP/70228)
exten => 11111111,2,Voicemail,u70223
exten => 11111111,3,Congestion 
exten => 11111111,102,Voicemail,b70223
exten => 11111111,103,Congestion 

[office]
exten => 111,1,Dial(SIP/111,20)
exten => 222,1,Dial(SIP/222,20)
exten => 421818,1,Dial(SIP/${EXTEN}@111,20)
#