All pastes #1296 Raw Edit

ajfboise extensions.conf

public text v1 · immutable
#1296 ·published 2004-10-06 23:35 UTC
rendered paste body
[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=Zap/1-1                                   ; Trunk interface
TRUNKMSD=1                                      ; MSD digits to strip (usually 1 or 0)
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)
[iaxprovider]
;switch => IAX2/user:[key]@myserver/mycontext
[trunkint]
exten => _9011.,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9011.,n,Congestion
[trunkld]
exten => _91NXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91NXXNXXXXXX,n,Congestion
[trunklocal]
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,n,Congestion
[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91800NXXXXXX,n,Congestion
exten => _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91888NXXXXXX,n,Congestion
exten => _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91877NXXXXXX,n,Congestion
exten => _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _91866NXXXXXX,n,Congestion
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
ignorepat => 9
include => local
include => trunkld
[local]
ignorepat => 9
include => default
include => parkedcalls
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
[macro-stdexten];
exten => s,1,Dial(${ARG2},20)                                   ; 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-.,1,Goto(s-NOANSWER,1)                              ; Treat anything else as no answer

exten => a,1,VoicemailMain(${ARG1})                             ; If they press *, send the user into VoicemailMain

[demo]exten => s,1,Wait,1                     ; Wait a second, just for fun
exten => s,n,Answer                     ; Answer the line
exten => s,n,DigitTimeout,5             ; Set Digit Timeout to 5 seconds
exten => s,n,ResponseTimeout,10         ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => s,n(instruct),BackGround(demo-instruct)        ; Play some instructions

exten => 2,1,BackGround(demo-moreinfo)  ; Give some more information.
exten => 2,n,Goto(s,instruct)

exten => 3,1,SetLanguage(fr)            ; Set language to french
exten => 3,n,Goto(s,restart)                    ; Start with the congratulations

exten => 1000,1,Goto(default,s,1)

exten => #,1,Playback(demo-thanks)              ; "Thanks for trying the demo"
exten => #,n,Hangup                     ; Hang them up.

exten => t,1,Goto(#,1)                  ; If they take too long, give up
exten => i,1,Playback(invalid)          ; "That's not valid, try again"

exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
exten => 500,n,Dial(IAX2/guest@misery.digium.com/s@default)     ; Call the Asterisk demo
exten => 500,n,Playback(demo-nogo)      ; Couldn't connect to the demo site
exten => 500,n,Goto(s,6)                ; Return to the start over message.

exten => 600,1,Playback(demo-echotest)  ; Let them know what's going on
exten => 600,n,Echo                     ; Do the echo test
exten => 600,n,Playback(demo-echodone)  ; Let them know it's over
exten => 600,n,Goto(s,6)                ; Start over

exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)

[default]
include => demo

exten => 7000,1,dial(SIP/anthonysip,20,rt)
exten => 7000,n,Voicemail(u7000)                ; Voicemail (unavailable)
exten => 7000,s+1,Hangup                        ; s+1, same as n
exten => 7000,dial+101,Voicemail(b7000) ; Voicemail (busy)