Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;!
- ;! Automatically generated configuration file
- ;! Filename: extensions.conf (/etc/asterisk/extensions.conf)
- ;! Generator: Manager
- ;! Creation Date: Fri Oct 19 14:21:22 2012
- ;!
- ; extensions.conf - the Asterisk dial plan
- ;
- ; 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 "dialplan 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 "dialplan save" 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. This is the default.
- ;
- ; 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 extenpatternmatchnew is set (true, yes, etc), then a new algorithm that uses
- ; a Trie to find the best matching pattern is used. In dialplans
- ; with more than about 20-40 extensions in a single context, this
- ; new algorithm can provide a noticeable speedup.
- ; With 50 extensions, the speedup is 1.32x
- ; with 88 extensions, the speedup is 2.23x
- ; with 138 extensions, the speedup is 3.44x
- ; with 238 extensions, the speedup is 5.8x
- ; with 438 extensions, the speedup is 10.4x
- ; With 1000 extensions, the speedup is ~25x
- ; with 10,000 extensions, the speedup is 374x
- ; Basically, the new algorithm provides a flat response
- ; time, no matter the number of extensions.
- ;
- ; By default, the old pattern matcher is used.
- ;
- ; ****This is a new feature! *********************
- ; The new pattern matcher is for the brave, the bold, and
- ; the desperate. If you have large dialplans (more than about 50 extensions
- ; in a context), and/or high call volume, you might consider setting
- ; this value to "yes" !!
- ; Please, if you try this out, and are forced to return to the
- ; old pattern matcher, please report your reasons in a bug report
- ; on https://issues.asterisk.org. We have made good progress in providing
- ; something compatible with the old matcher; help us finish the job!
- ;
- ; This value can be switched at runtime using the cli command "dialplan set extenpatternmatchnew true"
- ; or "dialplan set extenpatternmatchnew false", so you can experiment to your hearts content.
- ;
- ;extenpatternmatchnew=no
- ;
- ; If clearglobalvars is set, global variables will be cleared
- ; and reparsed on a dialplan 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.
- ;
- ; NOTE: A complication sets in, if you put your global variables into
- ; the AEL file, instead of the extensions.conf file. With clearglobalvars
- ; set, a "reload" will often leave the globals vars cleared, because it
- ; is not unusual to have extensions.conf (which will have no globals)
- ; load after the extensions.ael file (where the global vars are stored).
- ; So, with "reload" in this particular situation, first the AEL file will
- ; clear and then set all the global vars, then, later, when the extensions.conf
- ; file is loaded, the global vars are all cleared, and then not set, because
- ; they are not stored in the extensions.conf file.
- ;
- clearglobalvars = no
- ;
- ; User context is where entries from users.conf are registered. The
- ; default value is 'default'
- ;
- ;userscontext=default
- ;
- ; You can include other config files, use the #include command
- ; (without the ';'). Note that this [globals]
- FEATURES =
- DIALOPTIONS =
- RINGTIME = 20
- FOLLOWMEOPTIONS =
- PAGING_HEADER = Intercom
- [default]
- [macro-stdexten]
- exten = s,1,Set(__DYNAMIC_FEATURES=${FEATURES})
- exten = s,2,Set(ORIG_ARG1=${ARG1})
- exten = s,3,GotoIf($["${FOLLOWME_${ARG1}}" = "1"]?6:4)
- exten = s,4,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
- exten = s,5,Goto(s-${DIALSTATUS},1)
- exten = s,6,Macro(stdexten-followme,${ARG1},${ARG2})
- exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
- exten = s-NOANSWER,2,Goto(default,s,1)
- exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
- exten = s-BUSY,2,Goto(default,s,1)
- exten = _s-.,1,Goto(s-NOANSWER,1)
- exten = a,1,VoicemailMain(${ORIG_ARG1})
- [macro-stdexten-followme]
- exten = s,1,Answer
- exten = s,2,Set(ORIG_ARG1=${ARG1})
- exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
- exten = s,4,Set(__FMCIDNUM=${CALLERID(num)})
- exten = s,5,Set(__FMCIDNAME=${CALLERID(name)})
- exten = s,6,Followme(${ORIG_ARG1},${FOLLOWMEOPTIONS})
- exten = s,7,Voicemail(${ORIG_ARG1},u)
- exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
- exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
- exten = s-BUSY,2,Goto(default,s,1)
- exten = _s-.,1,Goto(s-NOANSWER,1)
- exten = a,1,VoicemailMain(${ORIG_ARG1})
- [macro-pagingintercom]
- exten = s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})
- exten = s,2,Page(${ARG1},${ARG2})
- exten = s,3,Hangup
- [conferences]
- [ringgroups]
- exten = 6400,1,Goto(ringroups-custom-1,s,1)
- exten = 6401,1,Goto(ringroups-custom-2,s,1)
- [queues]
- [voicemenus]
- [voicemailgroups]
- [directory]
- [page_an_extension]
- [pagegroups]
- [asterisk_guitools]
- exten = executecommand,1,System(${command})
- exten = executecommand,n,Hangup()
- exten = record_vmenu,1,Answer
- exten = record_vmenu,n,Playback(vm-intro)
- exten = record_vmenu,n,Record(${var1},0,500,k)
- exten = record_vmenu,n,Playback(vm-saved)
- exten = record_vmenu,n,Playback(vm-goodbye)
- exten = record_vmenu,n,Hangup
- exten = play_file,1,Answer
- exten = play_file,n,Playback(${var1})
- exten = play_file,n,Hangup
- [macro-local-callingrule-cid-0.1]
- exten = s,1,Set(CALLERID(all)=${IF($[${LEN(${ARG4})} > 2]?${ARG4}:)})
- exten = s,n,Goto(${ARG1},${ARG2},${ARG3})
- [macro-trunkdial-failover-0.3]
- exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)
- exten = s,n,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)
- exten = s,n,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})
- exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
- exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
- exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
- exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})
- exten = s,n,Goto(1-dial,1)
- exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})
- exten = 1-setgbobname,n,Goto(s,3)
- exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})
- exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})
- exten = 1-fmsetcid,n,Goto(s,4)
- exten = 1-dial,1,Dial(${ARG1})
- exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
- exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
- exten = 1-CHANUNAVAIL,n,Hangup()
- exten = 1-CONGESTION,1,Dial(${ARG2})
- exten = 1-CONGESTION,n,Hangup()
- exten = 1-out,1,Hangup()
- [globals]
- FEATURES =
- DIALOPTIONS =
- RINGTIME = 20
- FOLLOWMEOPTIONS =
- PAGING_HEADER = Intercom
- trunk_1 = DAHDI/g1
- group_1 = DAHDI/g1
- timeinterval_caallcenter = *,mon-fri,*,*
- timeinterval_day = *,mon-fri,*,*
- [queue-member-manager]
- exten = handle_member,1,Verbose(2, Looping through queues to log in or out queue members)
- exten = handle_member,n,Set(thisActiveMember=${CHANNEL(channeltype)}/${CHANNEL(peername)})
- exten = handle_member,n,Set(queue_field=2)
- exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})})
- exten = handle_member,n,While($[${EXISTS(${thisQueueXtn})}])
- exten = handle_member,n,Macro(member-loginlogout)
- exten = handle_member,n,Set(queue_field=$[${queue_field} + 1])
- exten = handle_member,n,Set(thisQueueXtn=${CUT(QUEUES,\,,${queue_field})})
- exten = handle_member,n,EndWhile()
- [macro-member-loginlogout]
- exten = s,1,Verbose(2, Logging queue member in or out of the request queue)
- exten = s,n,Set(thisQueue=${thisQueueXtn})
- exten = s,n,Set(queueMembers=${QUEUE_MEMBER_LIST(${thisQueue})})
- exten = s,n,Set(field=1)
- exten = s,n,Set(logged_in=0)
- exten = s,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})})
- exten = s,n,While($[${EXISTS(${thisQueueMember})}])
- exten = s,n,GotoIf($["${thisQueueMember}" != "${thisActiveMember}"]?check_next)
- exten = s,n,Set(logged_in=1)
- exten = s,n,ExitWhile()
- exten = s,n(check_next),Set(field=$[${field} + 1])
- exten = s,n,Set(thisQueueMember=${CUT(queueMembers,\,,${field})})
- exten = s,n,EndWhile()
- exten = s,n,MacroIf($[${logged_in} = 0]?q_login:q_logout)
- [macro-q_login]
- exten = s,1,Verbose(2, Logging ${thisActiveMember} into the ${thisQueue} queue)
- exten = s,n,AddQueueMember(${thisQueue},${thisActiveMember})
- exten = s,n,Playback(silence/1)
- exten = s,n,ExecIf($["${AQMSTATUS}" = "ADDED"]?Playback(agent-loginok):Playback(an-error-has-occurred))
- [macro-q_logout]
- exten = s,1,Verbose(2, Logged ${thisActiveMember} out of ${thisQueue} queue)
- exten = s,n,RemoveQueueMember(${thisQueue},${thisActiveMember})
- exten = s,n,Playback(silence/1)
- exten = s,n,ExecIf($["${RQMSTATUS}" = "REMOVED"]?Playback(agent-loggedoff):Playback(an-error-has-occurred))
- [CallingRule_extensions]
- exten = o,1,Goto(default,6000,1)
- exten = _#6XXX,1,Set(MBOX=${EXTEN:1}@default)
- exten = _#6XXX,n,VoiceMail(${MBOX})
- exten = a,1,VoicemailMain(${MBOX})
- exten = 6100,1,VoiceMailMain(${CALLERID(num)}@default)
- [CallingRule_landline]
- exten = X,1,Macro(trunkdial-failover-0.3,${group_1}/${EXTEN:0},,trunk_1,,gas line)
- [CallingRule_safcom]
- exten = _07XXXXXXXX,1,Macro(trunkdial-failover-0.3,${group_1}/${EXTEN:0},,trunk_1,)
- [DLPN_safcomgsm]
- include = CallingRule_extensions
- include = CallingRule_landline
- include = CallingRule_safcom
- include = default
- include = parkedcalls
- include = conferences
- include = ringgroups
- include = voicemenus
- include = queues
- include = voicemailgroups
- include = directory
- include = pagegroups
- include = page_an_extension
- [DID_trunk_1_timeinterval_caallcenter]
- [DID_trunk_1_default]
- [DID_trunk_1_timeinterval_callcenter]
- exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ]?SetCallerPres(unavailable))
- exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ]?Set(CALLERID(all)=unknown <0000000>))
- exten = s,3,Goto(ringroups-custom-1,s,1
- [DID_trunk_1]
- include = DID_trunk_1_timeinterval_day,${timeinterval_day}
- include = DID_trunk_1_timeinterval_caallcenter,${timeinterval_caallcenter}
- include = DID_trunk_1_timeinterval_caallcenter,${timeinterval_caallcenter}
- include = DID_trunk_1_default
- [DID_trunk_1_timeinterval_day]
- exten = s,1,ExecIf($[ "${CALLERID(num)}"="" ]?SetCallerPres(unavailable))
- exten = s,2,ExecIf($[ "${CALLERID(num)}"="" ]?Set(CALLERID(all)=unknown <0000000>))
- exten = s,3,Goto(ringroups-custom-2,s,1)
- [ringroups-custom-2]
- exten = s,1,NoOp(callc2)
- exten = s,n,Dial(SIP/6006,7,${DIALOPTIONS}i)
- exten = s,n,Dial(SIP/6004,7,${DIALOPTIONS}i)
- exten = s,n,Dial(SIP/6010,7,${DIALOPTIONS}i)
- exten = s,n,Goto(default,6004,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement