Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; Static extension configuration file, used by
- ; the pbx_config module. This is where you configure all your
- ; inbound and outbound calls in Asterisk.
- ;
- ; This configuration file is reloaded
- ; - With the "extensions reload" command in the CLI
- ; - With the "reload" command (that reloads everything) in the CLI
- ;
- ; 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
- ;
- ; If autofallthrough is set, then if an extension runs out of
- ; things to do, it will terminate the call with BUSY, CONGESTION
- ; or HANGUP depending on Asterisk's best guess (strongly recommended).
- ;
- ; If autofallthrough is not set, then if an extension runs out of
- ; things to do, asterisk will wait for a new extension to be dialed
- ; (this is the original behavior of Asterisk 1.0 and earlier).
- ;
- autofallthrough=no
- ;
- ; If clearglobalvars is set, global variables will be cleared
- ; and reparsed on an extensions reload, or Asterisk reload.
- ;
- ; If clearglobalvars is not set, then global variables will persist
- ; through reloads, and even if deleted from the extensions.conf or
- ; one of its included files, will remain set to the previous value.
- ;
- clearglobalvars=no
- ;
- ; If priorityjumping is set to 'yes', then applications that support
- ; 'jumping' to a different priority based on the result of their operations
- ; will do so (this is backwards compatible behavior with pre-1.2 releases
- ; of Asterisk). Individual applications can also be requested to do this
- ; by passing a 'j' option in their arguments.
- ;
- priorityjumping=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
- ; variables,
- ; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
- ;
- [globals]
- VOICEPULSE_API_KEY=sdajdghajsd
- ;VOICEPULSE_API_KEY=sdasdasda
- VOICEPULSE_API_PREFIX=VOICEPULSE_
- DID1=2222222222
- DID2=1111111111
- CIDNAME1=blarg
- ; .........................................................
- ; Peers
- ; .........................................................
- VOICEPULSE_GATEWAY_OUT_A=voicepulse01
- VOICEPULSE_GATEWAY_OUT_B=voicepulse02
- ; ---------------------------------------------------------
- ; [arbitrary-name] is the context referred to by the
- ; [voicepulse-in-01] user in iax.conf. This is where your
- ; custom incoming call processing should go.
- ;
- ; For sample purposes, this section will read back the
- ; dialed number and then test DTMF by reading back each
- ; digit pressed by the caller.
- ; ---------------------------------------------------------
- [voicepulse-in] ; <-- Should match the context you have
- ; under [voicepulse-in-01] in iax.conf
- exten => _1${DID1},1,Ringing
- exten => _1${DID1},2,Wait(6)
- exten => _1${DID1},3,Goto(teeheee,s,1)
- exten => _1${DID1},4,Hangup
- exten => _1${DID2},1,Ringing
- exten => _1${DID2},2,Wait(6)
- exten => _1${DID2},3,Voicemail(130)
- exten => _1${DID2},4,Hangup
- exten => a, 1, VoicemailMain(@default)
- exten => a, 2, Hangup
- exten => t,1,Voicemail(110,u)
- exten => i,1,Hangup
- ;
- ; teehee Menu
- ;
- [teehee]
- include => common
- exten => s,1,Answer
- exten => s,2,Dial(SIP/100&SIP/110&SIP/111,15,trx)
- exten => s,3,Voicemail(110,u)
- ;exten => s,3,Background(custom/blargh)
- ;exten => _0,1,Voicemail(100,u)
- ;exten => _1,1,Voicemail(110,u)
- ;exten => _2,1,Voicemail(111,u)
- exten => 999,1,VoicemailMain
- exten => *0*,1,Authenticate(21986129878610249)
- exten => *0*,2,Playback(agent-loginok)
- exten => *0*,3,Goto(outgoing,s,1)
- exten => t,1,Hangup
- exten => i,1,Hangup
- ;
- ; Main Menu
- ;
- [main]
- include => common
- exten => s,1,Answer
- exten => s,2,Background(custom/blargh)
- exten => _0,1,Voicemail(101,u)
- exten => _1,1,Dial(SIP/100,15)
- exten => _1,2,Voicemail(100,u)
- exten => _1,102,Voicemail(100,u)
- exten => _2,1,Dial(SIP/100,15)
- exten => _2,2,Voicemail(100,u)
- exten => _2,102,Voicemail(100,u)
- exten => 999,1,VoicemailMain
- exten => *0*,1,Authenticate(555)
- exten => *0*,2,Playback(agent-loginok)
- exten => *0*,3,Goto(outgoing,s,1)
- exten => t,1,Hangup
- exten => i,1,Hangup
- ;
- ; Select an outgoing context
- ;
- [outgoing]
- include => common
- include => parkedcalls
- exten => s,1,Wait(1)
- exten => _1NXXNXXXXXX,1,Goto(outgoing-voicepulse,${EXTEN},1)
- exten => _21NXXNXXXXXX,1,Goto(outgoing-voicepulse,${EXTEN:1},1)
- exten => 911,1,Dial(SIP/+12129279711@${VOICEPULSE_GATEWAY_OUT_A})
- exten => 999,1,Playback(beep)
- exten => 999,2,VoicemailMain(${CALLERID(number)},s)
- exten => _*91XX,1,Playback(beep)
- exten => _*91XX,2,VoiceMailMain(s${EXTEN:2})
- exten => _*51XX,1,SIPAddHeader(Alert-Info: Ring Answer)
- exten => _*51XX,2,Dial(SIP/${EXTEN:2})
- exten => _*51XX,3,Hangup
- ;exten => *0*,1,Authenticate(555)
- ;exten => *0*,2,Playback(agent-loginok)
- ;exten => *0*,3,Goto(internal,s,1)
- exten => t,1,Hangup
- exten => i,1,Hangup
- ;
- ; Shared Extensions
- ;
- [common]
- exten => _1XX,1,Dial(SIP/${EXTEN},15,X)
- exten => _1XX,2,Voicemail(${EXTEN},u)
- exten => _1XX,102,Voicemail(${EXTEN},u)
- exten => _11XX,1,SIPAddHeader(Alert-Info: Ring Answer)
- exten => _11XX,2,Dial(sip/${EXTEN:1})
- exten => _11XX,3,Voicemail(${EXTEN:1},u)
- exten => _11XX,103,Voicemail(${EXTEN:1},u)
- exten => *3,1,Playback(beep)
- exten => *3,2,Echo
- exten => *7,1,Set(TIMEOUT(digit)=3)
- exten => *7,n,Set(TIMEOUT(response)=5)
- exten => *7,n,Answer
- exten => *7,n,Read(callfrom,beep,11)
- exten => *7,n,Read(callto,beep,11)
- exten => *7,n,NoOp(${callfrom})
- exten => *7,n,NoOp(${callto})
- ;exten => *7,n,SetCIDNum(${callfrom})
- exten => *7,n,Set(CALLERID(name)=Blargggh)
- exten => *7,n,Set(CALLERID(number)=${callfrom})
- exten => *7,n,Dial(SIP/+${callto}@${VOICEPULSE_GATEWAY_OUT_A})
- exten => *7,n,Hangup
- ;
- ; Internal Functions
- ;
- [internal]
- exten => s,1,Wait(1)
- exten => _*1XX,1,Answer()
- exten => _*1XX,n,System(/usr/sbin/asterisk -rx "sip notify polycom-check-cfg ${EXTEN:1}")
- exten => _*1XX,n,Hangup()
- exten => t,1,Hangup
- exten => i,1,Hangup
- ;
- ; Just Voicemail
- ;
- [voicemail-only]
- exten => s,1,Wait(1)
- exten => 999,1,Playback(beep)
- exten => 999,2,VoicemailMain(${CALLERID(number)},s)
- exten => t,1,Hangup
- exten => i,1,Hangup
- [outgoing-voicepulse]
- exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=${DID1},a)
- exten => _1NXXNXXXXXX,2,Set(CALLERID(name)=${CIDNAME1},a)
- exten => _1NXXNXXXXXX,3,Set(TOUCH_MIXMONITOR_FORMAT=wav)
- exten => _1NXXNXXXXXX,4,NoOp(${TOUCH_MIXMONITOR_FORMAT})
- exten => _1NXXNXXXXXX,5,Dial(SIP/+${EXTEN}@${VOICEPULSE_GATEWAY_OUT_A},,X)
- exten => _1NXXNXXXXXX,6,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN},10)
- exten => _1NXXNXXXXXX,10,Dial(SIP/+${EXTEN}@${VOICEPULSE_GATEWAY_OUT_B},,X)
Add Comment
Please, Sign In to add comment