michael@202: ; extensions.conf - the Asterisk dial plan michael@202: ; michael@202: ; Static extension configuration file, used by michael@202: ; the pbx_config module. This is where you configure all your michael@202: ; inbound and outbound calls in Asterisk. michael@202: ; michael@202: ; This configuration file is reloaded michael@202: ; - With the "dialplan reload" command in the CLI michael@202: ; - With the "reload" command (that reloads everything) in the CLI michael@202: michael@202: ; michael@202: ; The "General" category is for certain variables. michael@202: ; michael@202: ;[general] michael@202: ; michael@202: ; If static is set to no, or omitted, then the pbx_config will rewrite michael@202: ; this file when extensions are modified. Remember that all comments michael@202: ; made in the file will be lost when that happens. michael@202: ; michael@202: ; XXX Not yet implemented XXX michael@202: ; michael@202: ;static=yes michael@202: ; michael@202: ; if static=yes and writeprotect=no, you can save dialplan by michael@202: ; CLI command "dialplan save" too michael@202: ; michael@202: ;writeprotect=no michael@202: ; michael@202: ; If autofallthrough is set, then if an extension runs out of michael@202: ; things to do, it will terminate the call with BUSY, CONGESTION michael@202: ; or HANGUP depending on Asterisk's best guess. This is the default. michael@202: ; michael@202: ; If autofallthrough is not set, then if an extension runs out of michael@202: ; things to do, Asterisk will wait for a new extension to be dialed michael@202: ; (this is the original behavior of Asterisk 1.0 and earlier). michael@202: ; michael@202: ;autofallthrough=no michael@202: ; michael@202: ; If clearglobalvars is set, global variables will be cleared michael@202: ; and reparsed on an extensions reload, or Asterisk reload. michael@202: ; michael@202: ; If clearglobalvars is not set, then global variables will persist michael@202: ; through reloads, and even if deleted from the extensions.conf or michael@202: ; one of its included files, will remain set to the previous value. michael@202: ; michael@202: ; NOTE: A complication sets in, if you put your global variables into michael@202: ; the AEL file, instead of the extensions.conf file. With clearglobalvars michael@202: ; set, a "reload" will often leave the globals vars cleared, because it michael@202: ; is not unusual to have extensions.conf (which will have no globals) michael@202: ; load after the extensions.ael file (where the global vars are stored). michael@202: ; So, with "reload" in this particular situation, first the AEL file will michael@202: ; clear and then set all the global vars, then, later, when the extensions.conf michael@202: ; file is loaded, the global vars are all cleared, and then not set, because michael@202: ; they are not stored in the extensions.conf file. michael@202: ; michael@202: ;clearglobalvars=no michael@202: ; michael@202: ; If priorityjumping is set to 'yes', then applications that support michael@202: ; 'jumping' to a different priority based on the result of their operations michael@202: ; will do so (this is backwards compatible behavior with pre-1.2 releases michael@202: ; of Asterisk). Individual applications can also be requested to do this michael@202: ; by passing a 'j' option in their arguments. michael@202: ; michael@202: ;priorityjumping=yes michael@202: ; michael@202: ; User context is where entries from users.conf are registered. The michael@202: ; default value is 'default' michael@202: ; michael@202: ;userscontext=default michael@202: ; michael@202: ; You can include other config files, use the #include command michael@202: ; (without the ';'). Note that this is different from the "include" command michael@202: ; that includes contexts within other contexts. The #include command works michael@202: ; in all asterisk configuration files. michael@202: ;#include "filename.conf" michael@202: michael@202: ; The "Globals" category contains global variables that can be referenced michael@202: ; in the dialplan with the GLOBAL dialplan function: michael@202: ; ${GLOBAL(VARIABLE)} michael@202: ; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid michael@202: ; Unix/Linux environmental variables can be reached with the ENV dialplan michael@202: ; function: ${ENV(VARIABLE)} michael@202: ; michael@202: ;[globals] michael@202: ;CONSOLE=Console/dsp ; Console interface for demo michael@202: ;CONSOLE=Zap/1 michael@202: ;CONSOLE=Phone/phone0 michael@202: ;IAXINFO=guest ; IAXtel username/password michael@202: ;IAXINFO=myuser:mypass michael@202: ;TRUNK=Zap/G2 ; Trunk interface michael@202: ; michael@202: ; Note the 'G2' in the TRUNK variable above. It specifies which group (defined michael@202: ; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in michael@202: ; the specified group. The four possible options are: michael@202: ; michael@202: ; g: select the lowest-numbered non-busy Zap channel michael@202: ; (aka. ascending sequential hunt group). michael@202: ; G: select the highest-numbered non-busy Zap channel michael@202: ; (aka. descending sequential hunt group). michael@202: ; r: use a round-robin search, starting at the next highest channel than last michael@202: ; time (aka. ascending rotary hunt group). michael@202: ; R: use a round-robin search, starting at the next lowest channel than last michael@202: ; time (aka. descending rotary hunt group). michael@202: ; michael@202: ;TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) michael@202: ;TRUNK=IAX2/user:pass@provider michael@202: michael@202: ; michael@202: ; Any category other than "General" and "Globals" represent michael@202: ; extension contexts, which are collections of extensions. michael@202: ; michael@202: ; Extension names may be numbers, letters, or combinations michael@202: ; thereof. If an extension name is prefixed by a '_' michael@202: ; character, it is interpreted as a pattern rather than a michael@202: ; literal. In patterns, some characters have special meanings: michael@202: ; michael@202: ; X - any digit from 0-9 michael@202: ; Z - any digit from 1-9 michael@202: ; N - any digit from 2-9 michael@202: ; [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9) michael@202: ; . - wildcard, matches anything remaining (e.g. _9011. matches michael@202: ; anything starting with 9011 excluding 9011 itself) michael@202: ; ! - wildcard, causes the matching process to complete as soon as michael@202: ; it can unambiguously determine that no other matches are possible michael@202: ; michael@202: ; For example the extension _NXXXXXX would match normal 7 digit dialings, michael@202: ; while _1NXXNXXXXXX would represent an area code plus phone number michael@202: ; preceded by a one. michael@202: ; michael@202: ; Each step of an extension is ordered by priority, which must michael@202: ; always start with 1 to be considered a valid extension. The priority michael@202: ; "next" or "n" means the previous priority plus one, regardless of whether michael@202: ; the previous priority was associated with the current extension or not. michael@202: ; The priority "same" or "s" means the same as the previously specified michael@202: ; priority, again regardless of whether the previous entry was for the michael@202: ; same extension. Priorities may be immediately followed by a plus sign michael@202: ; and another integer to add that amount (most useful with 's' or 'n'). michael@202: ; Priorities may then also have an alias, or label, in michael@202: ; parenthesis after their name which can be used in goto situations michael@202: ; michael@202: ; Contexts contain several lines, one for each step of each michael@202: ; extension, which can take one of two forms as listed below, michael@202: ; with the first form being preferred. michael@202: ; michael@202: ;[context] michael@202: ;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...) michael@202: ;exten => someexten,{priority|label{+|-}offset}[(alias)],application,arg1|arg2... michael@202: ; michael@202: ; Included Contexts michael@202: ; michael@202: ; One may include another context in the current one as well, optionally with a michael@202: ; date and time. Included contexts are included in the order michael@202: ; they are listed. michael@202: ; The reason a context would include other contexts is for their michael@202: ; extensions. michael@202: ; The algorithm to find an extension is recursive, and works in this michael@202: ; fashion: michael@202: ; first, given a stack on which to store context references, michael@202: ; push the context to find the extension onto the stack... michael@202: ; a) Try to find a matching extension in the context at the top of michael@202: ; the stack, and, if found, begin executing the priorities michael@202: ; there in sequence. michael@202: ; b) If not found, Search the switches, if any declared, in michael@202: ; sequence. michael@202: ; c) If still not found, for each include, push that context onto michael@202: ; the top of the context stack, and recurse to a). michael@202: ; d) If still not found, pop the entry from the top of the stack; michael@202: ; if the stack is empty, the search has failed. If it's not, michael@202: ; continue with the next context in c). michael@202: ; This is a depth-first traversal, and stops with the first context michael@202: ; that provides a matching extension. As usual, if more than one michael@202: ; pattern in a context will match, the 'best' match will win. michael@202: ; Please note that that extensions found in an included context are michael@202: ; treated as if they were in the context from which the search began. michael@202: ; The PBX's notion of the "current context" is not changed. michael@202: ; Please note that in a context, it does not matter where an include michael@202: ; directive occurs. Whether at the top, or near the bottom, the effect michael@202: ; will be the same. The only thing that matters is that if there is michael@202: ; more than one include directive, they will be searched for extensions michael@202: ; in order, first to last. michael@202: ; Also please note that pattern matches (like _9XX) are not treated michael@202: ; any differently than exact matches (like 987). Also note that the michael@202: ; order of extensions in a context have no affect on the outcome. michael@202: ; michael@202: ; Timing list for includes is michael@202: ; michael@202: ;