:::::::::::::: extensions.conf :::::::::::::: ; ; Static extension configuration file, used by ; the pbx_config module. This is where you configure all your ; inbound and outbound calls in OpenPBX. ; ; 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 OpenPBX's best guess (strongly recommended). ; ; If autofallthrough is not set, then if an extension runs out of ; things to do, openpbx will wait for a new extension to be dialed ; (this is the original behavior of OpenPBX 1.0 and earlier). ; autofallthrough=yes ; ; If clearglobalvars is set, global variables will be cleared ; and reparsed on an extensions reload, or OpenPBX reload. ; ; If clearglobalvars is not set, then global variables will persist ; through reloads, and even if deleted from the extensions.conf or ; one if 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 OpenPBX). 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 openpbx 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 ; #include extensions/allfiles.conf :::::::::::::: extensions/allfiles.conf :::::::::::::: #include extensions/globals.conf #include extensions/internal.conf #include extensions/dial-out.conf #include extensions/macros-std.conf #include extensions/linetests.conf #include extensions/inbound-sip.conf #include extensions/delayed-dial.conf :::::::::::::: extensions/delayed-dial.conf :::::::::::::: [delayed-dial] exten => _X#.,1,NoOp() exten => _X#.,n,Wait(${CUT(EXTEN,#,1)}) exten => _X#.,n,Set(NUMLIST=${EXTEN:2}) exten => _X#.,n,Set(CHANS=) exten => _X#.,n,Goto(delayed-dial-real|${NUMLIST}|1) [delayed-dial-real] exten => _X.#X.,1,Set(CHANS=${CHANS}SIP/${CUT(EXTEN,#,1)}&) exten => _X.#X.,n,Set(NUMLIST=${CUT(EXTEN,#,2-)}) exten => _X.#X.,n,Goto(${NUMLIST}|1) include => delayed-dial-final [delayed-dial-final] exten => _X.,1,Set(CHANS=${CHANS}SIP/${EXTEN}) exten => _X.,n,NoOp(Dialing channels ${CHANS}) exten => _X.,n,Dial(${CHANS}) :::::::::::::: extensions/dial-out.conf :::::::::::::: [dial-out] exten => _9X.,1,NoOp(${CALLERID(name)} calling ${EXTEN:1}) exten => _9X.,n,Goto(dial-out-real|${EXTEN:1}|1) [dial-out-real] ; Local number - dialled without the area code exten => _ZXXXXXX,1,Goto(0113${EXTEN}|1) ; National number exten => _0ZX.,1,Macro(dial-out|${EXTEN}) ; International number exten => _00ZX.,1,Macro(dial-out|${EXTEN}) ; Fallback include => dial-out-fallback [dial-out-fallback] ; fallback - just dial the number exten => _X.,1,Macro(dial-out|${EXTEN}) [macro-dial-out] exten => s,1,NoOp(-- dialling number ${ARG1}) exten => s,n,Set(DC_PRE=${CUT(DIALOUT_CHAN,%,1)}) exten => s,n,Set(DC_SUF=${CUT(DIALOUT_CHAN,%,2-)}) exten => s,n,Dial(${DC_PRE}${ARG1}${DC_SUF}|${TIMEOUT_OUTBOUND}|${DOPT_OUTBOUND}) exten => s,n,Hangup() :::::::::::::: extensions/globals.conf :::::::::::::: [globals] DIALEXT_CHAN=SIP/% DIALOUT_CHAN=SIP/%@lvdx-out ; Channel used for dial out. Macro replaces % with number to dial DIALOUT_PREFIX=9 ; Prefix for dial out LOCAL_NUMPAT=ZXXXXXX ; Pattern for a local number LOCAL_AREACODE=113 ; Area code of local area LOCAL_COUNTRYCODE=44 ; Country code for local country LOCAL_AREAPREFIX=0 ; Prefix for an area code LOCAL_COUNTRYPREFIX=00 ; Prefix for a country code ; Dial Timeouts (blank for no timeout) TIMEOUT_INTERNAL=30 ; for internal calls TIMEOUT_INBOUND=45 ; for inbound calls TIMEOUT_OUTBOUND= ; Dial Options DOPT_INTERNAL=tT DOPT_INBOUND=t DOPT_OUTBOUND=T ; Operator numbers OPERATORS=Local/0#202@delayed-dial&Local/10#201#203@delayed-dial&Local/20#205#206#207#208@delayed-dial ;OPERATOR_DELAY=10 OPERATOR_VMBOX=0 :::::::::::::: extensions/inbound-sip.conf :::::::::::::: [inbound-sip] exten => 02080358509,1,Macro(std-inbound|main-lvdx) :::::::::::::: extensions/internal.conf :::::::::::::: [internal] include => internal-extensions include => linetests include => dial-out [internal-extensions] exten => _20X,1,NoOp(${CALLERID(all)} dialing extension ${EXTEN}) exten => _20X,n,Macro(std-ext|${EXTEN}|INTERNAL|1|0) exten => _20X,n,Hangup() exten => 0,1,Macro(std-inbound|main-lvdx) :::::::::::::: extensions/linetests.conf :::::::::::::: [linetests] exten => 8001,1,Milliwatt() :::::::::::::: extensions/macros-std.conf :::::::::::::: [macro-std-exten] exten => s,1,NoOp() exten => s,n,Set(EXT=${ARG1}) exten => s,n,Set(TYPE=${ARG2}) exten => s,n,Set(DO_VM=${ARG3}) exten => s,n,Set(DELAY=${ARG4}) exten => s,n,NoOp() exten => s,n,Wait(${DELAY}) exten => s,n,Dial(SIP/${EXT}|${TIMEOUT_${TYPE}}|${DOPT_${TYPE}}) exten => s,n,GotoIf(${DO_VM}?std-exten-vm) exten => s,n,Hangup() exten => s,n(std-exten-vm),NoOp() exten => s,n,Set(VMBOX=${SIPPEER(${EXT}:mailbox)}) exten => s,n,Goto(vm_${DIALSTATUS}|1) exten => vm_BUSY,1,Voicemail(sb${VMBOX}) include => macro-std-exten-vm-unavailable [macro-std-exten-vm-unavailable] exten => vm_.,1,Voicemail(su${VMBOX}) [macro-std-inbound] exten => s,1,NoOp(Incomming call from ${CALLERID(num)} on line ${ARG1}) exten => s,n,Dial(${OPERATORS}|${TIMEOUT_INBOUND}|${DOPT_INBOUND}) exten => s,n,Voicemail(sb${OPERATOR_VMBOX}) exten => s,n,Hangup()