asterisk/extensions.conf

changeset 310
73d852a30c9a
parent 309
2ff4e4701310
child 311
263143ec0fb2
     1.1 --- a/asterisk/extensions.conf	Sun Mar 20 19:27:35 2011 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,614 +0,0 @@
     1.4 -; extensions.conf - the Asterisk dial plan
     1.5 -;
     1.6 -; Static extension configuration file, used by
     1.7 -; the pbx_config module. This is where you configure all your 
     1.8 -; inbound and outbound calls in Asterisk. 
     1.9 -; 
    1.10 -; This configuration file is reloaded 
    1.11 -; - With the "dialplan reload" command in the CLI
    1.12 -; - With the "reload" command (that reloads everything) in the CLI
    1.13 -
    1.14 -;
    1.15 -; The "General" category is for certain variables.  
    1.16 -;
    1.17 -;[general]
    1.18 -;
    1.19 -; If static is set to no, or omitted, then the pbx_config will rewrite
    1.20 -; this file when extensions are modified.  Remember that all comments
    1.21 -; made in the file will be lost when that happens. 
    1.22 -;
    1.23 -; XXX Not yet implemented XXX
    1.24 -;
    1.25 -;static=yes
    1.26 -;
    1.27 -; if static=yes and writeprotect=no, you can save dialplan by
    1.28 -; CLI command "dialplan save" too
    1.29 -;
    1.30 -;writeprotect=no
    1.31 -;
    1.32 -; If autofallthrough is set, then if an extension runs out of
    1.33 -; things to do, it will terminate the call with BUSY, CONGESTION
    1.34 -; or HANGUP depending on Asterisk's best guess. This is the default.
    1.35 -;
    1.36 -; If autofallthrough is not set, then if an extension runs out of 
    1.37 -; things to do, Asterisk will wait for a new extension to be dialed 
    1.38 -; (this is the original behavior of Asterisk 1.0 and earlier).
    1.39 -;
    1.40 -;autofallthrough=no
    1.41 -;
    1.42 -; If clearglobalvars is set, global variables will be cleared 
    1.43 -; and reparsed on an extensions reload, or Asterisk reload.
    1.44 -;
    1.45 -; If clearglobalvars is not set, then global variables will persist
    1.46 -; through reloads, and even if deleted from the extensions.conf or
    1.47 -; one of its included files, will remain set to the previous value.
    1.48 -;
    1.49 -; NOTE: A complication sets in, if you put your global variables into
    1.50 -; the AEL file, instead of the extensions.conf file. With clearglobalvars
    1.51 -; set, a "reload" will often leave the globals vars cleared, because it
    1.52 -; is not unusual to have extensions.conf (which will have no globals)
    1.53 -; load after the extensions.ael file (where the global vars are stored).
    1.54 -; So, with "reload" in this particular situation, first the AEL file will
    1.55 -; clear and then set all the global vars, then, later, when the extensions.conf
    1.56 -; file is loaded, the global vars are all cleared, and then not set, because
    1.57 -; they are not stored in the extensions.conf file.
    1.58 -;
    1.59 -;clearglobalvars=no
    1.60 -;
    1.61 -; If priorityjumping is set to 'yes', then applications that support
    1.62 -; 'jumping' to a different priority based on the result of their operations
    1.63 -; will do so (this is backwards compatible behavior with pre-1.2 releases
    1.64 -; of Asterisk). Individual applications can also be requested to do this
    1.65 -; by passing a 'j' option in their arguments.
    1.66 -;
    1.67 -;priorityjumping=yes
    1.68 -;
    1.69 -; User context is where entries from users.conf are registered.  The
    1.70 -; default value is 'default'
    1.71 -;
    1.72 -;userscontext=default
    1.73 -;
    1.74 -; You can include other config files, use the #include command
    1.75 -; (without the ';'). Note that this is different from the "include" command
    1.76 -; that includes contexts within other contexts. The #include command works
    1.77 -; in all asterisk configuration files.
    1.78 -;#include "filename.conf"
    1.79 -
    1.80 -; The "Globals" category contains global variables that can be referenced
    1.81 -; in the dialplan with the GLOBAL dialplan function:
    1.82 -; ${GLOBAL(VARIABLE)}
    1.83 -; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid
    1.84 -; Unix/Linux environmental variables can be reached with the ENV dialplan
    1.85 -; function: ${ENV(VARIABLE)}
    1.86 -;
    1.87 -;[globals]
    1.88 -;CONSOLE=Console/dsp				; Console interface for demo
    1.89 -;CONSOLE=Zap/1
    1.90 -;CONSOLE=Phone/phone0
    1.91 -;IAXINFO=guest					; IAXtel username/password
    1.92 -;IAXINFO=myuser:mypass
    1.93 -;TRUNK=Zap/G2					; Trunk interface
    1.94 -;
    1.95 -; Note the 'G2' in the TRUNK variable above. It specifies which group (defined
    1.96 -; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
    1.97 -; the specified group. The four possible options are:
    1.98 -;
    1.99 -; g: select the lowest-numbered non-busy Zap channel
   1.100 -;    (aka. ascending sequential hunt group).
   1.101 -; G: select the highest-numbered non-busy Zap channel
   1.102 -;    (aka. descending sequential hunt group).
   1.103 -; r: use a round-robin search, starting at the next highest channel than last
   1.104 -;    time (aka. ascending rotary hunt group).
   1.105 -; R: use a round-robin search, starting at the next lowest channel than last
   1.106 -;    time (aka. descending rotary hunt group).
   1.107 -;
   1.108 -;TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)
   1.109 -;TRUNK=IAX2/user:pass@provider
   1.110 -
   1.111 -;
   1.112 -; Any category other than "General" and "Globals" represent 
   1.113 -; extension contexts, which are collections of extensions.  
   1.114 -;
   1.115 -; Extension names may be numbers, letters, or combinations
   1.116 -; thereof. If an extension name is prefixed by a '_'
   1.117 -; character, it is interpreted as a pattern rather than a
   1.118 -; literal.  In patterns, some characters have special meanings:
   1.119 -;
   1.120 -;   X - any digit from 0-9
   1.121 -;   Z - any digit from 1-9
   1.122 -;   N - any digit from 2-9
   1.123 -;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
   1.124 -;   . - wildcard, matches anything remaining (e.g. _9011. matches 
   1.125 -;	anything starting with 9011 excluding 9011 itself)
   1.126 -;   ! - wildcard, causes the matching process to complete as soon as
   1.127 -;       it can unambiguously determine that no other matches are possible
   1.128 -;
   1.129 -; For example the extension _NXXXXXX would match normal 7 digit dialings, 
   1.130 -; while _1NXXNXXXXXX would represent an area code plus phone number
   1.131 -; preceded by a one.
   1.132 -;
   1.133 -; Each step of an extension is ordered by priority, which must
   1.134 -; always start with 1 to be considered a valid extension.  The priority
   1.135 -; "next" or "n" means the previous priority plus one, regardless of whether
   1.136 -; the previous priority was associated with the current extension or not.
   1.137 -; The priority "same" or "s" means the same as the previously specified
   1.138 -; priority, again regardless of whether the previous entry was for the
   1.139 -; same extension.  Priorities may be immediately followed by a plus sign
   1.140 -; and another integer to add that amount (most useful with 's' or 'n').  
   1.141 -; Priorities may then also have an alias, or label, in 
   1.142 -; parenthesis after their name which can be used in goto situations
   1.143 -;
   1.144 -; Contexts contain several lines, one for each step of each
   1.145 -; extension, which can take one of two forms as listed below,
   1.146 -; with the first form being preferred. 
   1.147 -;
   1.148 -;[context]
   1.149 -;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...)
   1.150 -;exten => someexten,{priority|label{+|-}offset}[(alias)],application,arg1|arg2...
   1.151 -;
   1.152 -; Included Contexts
   1.153 -;
   1.154 -; One may include another context in the current one as well, optionally with a
   1.155 -; date and time.  Included contexts are included in the order
   1.156 -; they are listed.
   1.157 -; The reason a context would include other contexts is for their 
   1.158 -; extensions.
   1.159 -; The algorithm to find an extension is recursive, and works in this
   1.160 -; fashion: 
   1.161 -;	 first, given a stack on which to store context references, 
   1.162 -;           push the context to find the extension onto the stack...
   1.163 -;    a) Try to find a matching extension in the context at the top of 
   1.164 -;       the stack, and, if found, begin executing the priorities
   1.165 -;       there in sequence.
   1.166 -;    b) If not found, Search the switches, if any declared, in
   1.167 -;       sequence.
   1.168 -;    c) If still not found, for each include, push that context onto 
   1.169 -;       the top of the context stack, and recurse to a).
   1.170 -;    d) If still not found, pop the entry from the top of the stack; 
   1.171 -;       if the stack is empty, the search has failed. If it's not, 
   1.172 -;       continue with the next context in c).
   1.173 -; This is a depth-first traversal, and stops with the first context 
   1.174 -; that provides a matching extension. As usual, if more than one
   1.175 -; pattern in a context will match, the 'best' match will win.
   1.176 -; Please note that that extensions found in an included context are
   1.177 -; treated as if they were in the context from which the search began.
   1.178 -; The PBX's notion of the "current context" is not changed.
   1.179 -; Please note that in a context, it does not matter where an include
   1.180 -; directive occurs. Whether at the top, or near the bottom, the effect 
   1.181 -; will be the same. The only thing that matters is that if there is 
   1.182 -; more than one include directive, they will be searched for extensions 
   1.183 -; in order, first to last.
   1.184 -; Also please note that pattern matches (like _9XX) are not treated
   1.185 -; any differently than exact matches (like 987). Also note that the
   1.186 -; order of extensions in a context have no affect on the outcome.
   1.187 -;
   1.188 -; Timing list for includes is 
   1.189 -;
   1.190 -;   <time range>|<days of week>|<days of month>|<months>
   1.191 -;
   1.192 -; Note that ranges may be specified to wrap around the ends.  Also, minutes are
   1.193 -; fine-grained only down to the closest even minute.
   1.194 -;
   1.195 -;include => daytime|9:00-17:00|mon-fri|*|*
   1.196 -;include => weekend|*|sat-sun|*|*
   1.197 -;include => weeknights|17:02-8:58|mon-fri|*|*
   1.198 -;
   1.199 -; ignorepat can be used to instruct drivers to not cancel dialtone upon
   1.200 -; receipt of a particular pattern.  The most commonly used example is
   1.201 -; of course '9' like this:
   1.202 -;
   1.203 -;ignorepat => 9
   1.204 -;
   1.205 -; so that dialtone remains even after dialing a 9.
   1.206 -;
   1.207 -
   1.208 -;
   1.209 -; Sample entries for extensions.conf
   1.210 -;
   1.211 -;
   1.212 -;[dundi-e164-canonical]
   1.213 -;
   1.214 -; List canonical entries here
   1.215 -;
   1.216 -;exten => 12564286000,1,Macro(stdexten,6000,IAX2/foo)
   1.217 -;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})
   1.218 -
   1.219 -;[dundi-e164-customers]
   1.220 -;
   1.221 -; If you are an ITSP or Reseller, list your customers here.
   1.222 -;
   1.223 -;exten => _12564286000,1,Dial(SIP/customer1)
   1.224 -;exten => _12564286001,1,Dial(IAX2/customer2)
   1.225 -
   1.226 -;[dundi-e164-via-pstn]
   1.227 -;
   1.228 -; If you are freely delivering calls to the PSTN, list them here
   1.229 -;
   1.230 -;exten => _1256428XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Expose all of 256-428 
   1.231 -;exten => _1256325XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Ditto for 256-325
   1.232 -
   1.233 -;[dundi-e164-local]
   1.234 -;
   1.235 -; Context to put your dundi IAX2 or SIP user in for
   1.236 -; full access
   1.237 -;
   1.238 -;include => dundi-e164-canonical
   1.239 -;include => dundi-e164-customers
   1.240 -;include => dundi-e164-via-pstn
   1.241 -
   1.242 -;[dundi-e164-switch]
   1.243 -;
   1.244 -; Just a wrapper for the switch
   1.245 -;
   1.246 -;switch => DUNDi/e164
   1.247 -
   1.248 -;[dundi-e164-lookup]
   1.249 -;
   1.250 -; Locally to lookup, try looking for a local E.164 solution
   1.251 -; then try DUNDi if we don't have one.
   1.252 -;
   1.253 -;include => dundi-e164-local
   1.254 -;include => dundi-e164-switch
   1.255 -;
   1.256 -; DUNDi can also be implemented as a Macro instead of using 
   1.257 -; the Local channel driver. 
   1.258 -;
   1.259 -;[macro-dundi-e164]
   1.260 -;
   1.261 -; ARG1 is the extension to Dial
   1.262 -;
   1.263 -; Extension "s" is not a wildcard extension that matches "anything".
   1.264 -; In macros, it is the start extension. In most other cases, 
   1.265 -; you have to goto "s" to execute that extension.
   1.266 -;
   1.267 -; For wildcard matches, see above - all pattern matches start with
   1.268 -; an underscore.
   1.269 -;exten => s,1,Goto(${ARG1},1)
   1.270 -;include => dundi-e164-lookup
   1.271 -
   1.272 -;
   1.273 -; Here are the entries you need to participate in the IAXTEL
   1.274 -; call routing system.  Most IAXTEL numbers begin with 1-700, but
   1.275 -; there are exceptions.  For more information, and to sign
   1.276 -; up, please go to www.gnophone.com or www.iaxtel.com
   1.277 -;
   1.278 -;[iaxtel700]
   1.279 -;exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)
   1.280 -
   1.281 -;
   1.282 -; The SWITCH statement permits a server to share the dialplan with
   1.283 -; another server. Use with care: Reciprocal switch statements are not
   1.284 -; allowed (e.g. both A -> B and B -> A), and the switched server needs
   1.285 -; to be on-line or else dialing can be severly delayed.
   1.286 -;
   1.287 -;[iaxprovider]
   1.288 -;switch => IAX2/user:[key]@myserver/mycontext
   1.289 -
   1.290 -;[trunkint]
   1.291 -;
   1.292 -; International long distance through trunk
   1.293 -;
   1.294 -;exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
   1.295 -;exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.296 -
   1.297 -;[trunkld]
   1.298 -;
   1.299 -; Long distance context accessed through trunk
   1.300 -;
   1.301 -;exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
   1.302 -;exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.303 -
   1.304 -;[trunklocal]
   1.305 -;
   1.306 -; Local seven-digit dialing accessed through trunk interface
   1.307 -;
   1.308 -;exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.309 -
   1.310 -;[trunktollfree]
   1.311 -;
   1.312 -; Long distance context accessed through trunk interface
   1.313 -;
   1.314 -;exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.315 -;exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.316 -;exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.317 -;exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
   1.318 -
   1.319 -;[international]
   1.320 -;
   1.321 -; Master context for international long distance
   1.322 -;
   1.323 -;ignorepat => 9
   1.324 -;include => longdistance
   1.325 -;include => trunkint
   1.326 -
   1.327 -;[longdistance]
   1.328 -;
   1.329 -; Master context for long distance
   1.330 -;
   1.331 -;ignorepat => 9
   1.332 -;include => local
   1.333 -;include => trunkld
   1.334 -
   1.335 -;[local]
   1.336 -;
   1.337 -; Master context for local, toll-free, and iaxtel calls only
   1.338 -;
   1.339 -;ignorepat => 9
   1.340 -;include => default
   1.341 -;include => trunklocal
   1.342 -;include => iaxtel700
   1.343 -;include => trunktollfree
   1.344 -;include => iaxprovider
   1.345 -
   1.346 -;Include parkedcalls (or the context you define in features conf)
   1.347 -;to enable call parking.
   1.348 -;include => parkedcalls
   1.349 -;
   1.350 -; You can use an alternative switch type as well, to resolve
   1.351 -; extensions that are not known here, for example with remote 
   1.352 -; IAX switching you transparently get access to the remote
   1.353 -; Asterisk PBX
   1.354 -; 
   1.355 -; switch => IAX2/user:password@bigserver/local
   1.356 -;
   1.357 -; An "lswitch" is like a switch but is literal, in that
   1.358 -; variable substitution is not performed at load time
   1.359 -; but is passed to the switch directly (presumably to
   1.360 -; be substituted in the switch routine itself)
   1.361 -;
   1.362 -; lswitch => Loopback/12${EXTEN}@othercontext
   1.363 -;
   1.364 -; An "eswitch" is like a switch but the evaluation of
   1.365 -; variable substitution is performed at runtime before
   1.366 -; being passed to the switch routine.
   1.367 -;
   1.368 -; eswitch => IAX2/context@${CURSERVER}
   1.369 -
   1.370 -;[macro-trunkdial]
   1.371 -;
   1.372 -; Standard trunk dial macro (hangs up on a dialstatus that should 
   1.373 -; terminate call)
   1.374 -;   ${ARG1} - What to dial
   1.375 -;
   1.376 -;exten => s,1,Dial(${ARG1})
   1.377 -;exten => s,n,Goto(s-${DIALSTATUS},1)
   1.378 -;exten => s-NOANSWER,1,Hangup
   1.379 -;exten => s-BUSY,1,Hangup
   1.380 -;exten => _s-.,1,NoOp
   1.381 -
   1.382 -;[macro-stdexten];
   1.383 -;
   1.384 -; Standard extension macro:
   1.385 -;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
   1.386 -;   ${ARG2} - Device(s) to ring
   1.387 -;
   1.388 -;exten => s,1,Dial(${ARG2},20)			; Ring the interface, 20 seconds maximum
   1.389 -;exten => s,2,Goto(s-${DIALSTATUS},1)		; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
   1.390 -
   1.391 -;exten => s-NOANSWER,1,Voicemail(${ARG1},u)	; If unavailable, send to voicemail w/ unavail announce
   1.392 -;exten => s-NOANSWER,2,Goto(default,s,1)		; If they press #, return to start
   1.393 -
   1.394 -;exten => s-BUSY,1,Voicemail(${ARG1},b)		; If busy, send to voicemail w/ busy announce
   1.395 -;exten => s-BUSY,2,Goto(default,s,1)		; If they press #, return to start
   1.396 -
   1.397 -;exten => _s-.,1,Goto(s-NOANSWER,1)		; Treat anything else as no answer
   1.398 -
   1.399 -;exten => a,1,VoicemailMain(${ARG1})		; If they press *, send the user into VoicemailMain
   1.400 -
   1.401 -;[macro-stdPrivacyexten];
   1.402 -;
   1.403 -; Standard extension macro:
   1.404 -;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
   1.405 -;   ${ARG2} - Device(s) to ring
   1.406 -;   ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority)
   1.407 -;   ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)`
   1.408 -;
   1.409 -;exten => s,1,Dial(${ARG2},20|p)			; Ring the interface, 20 seconds maximum, call screening 
   1.410 -						; option (or use P for databased call screening)
   1.411 -;exten => s,2,Goto(s-${DIALSTATUS},1)		; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
   1.412 -
   1.413 -;exten => s-NOANSWER,1,Voicemail(${ARG1},u)	; If unavailable, send to voicemail w/ unavail announce
   1.414 -;exten => s-NOANSWER,2,Goto(default,s,1)		; If they press #, return to start
   1.415 -
   1.416 -;exten => s-BUSY,1,Voicemail(${ARG1},b)		; If busy, send to voicemail w/ busy announce
   1.417 -;exten => s-BUSY,2,Goto(default,s,1)		; If they press #, return to start
   1.418 -
   1.419 -;exten => s-DONTCALL,1,Goto(${ARG3},s,1)		; Callee chose to send this call to a polite "Don't call again" script.
   1.420 -
   1.421 -;exten => s-TORTURE,1,Goto(${ARG4},s,1)		; Callee chose to send this call to a telemarketer torture script.
   1.422 -
   1.423 -;exten => _s-.,1,Goto(s-NOANSWER,1)		; Treat anything else as no answer
   1.424 -
   1.425 -;exten => a,1,VoicemailMain(${ARG1})		; If they press *, send the user into VoicemailMain
   1.426 -
   1.427 -;[macro-page];
   1.428 -;
   1.429 -; Paging macro:
   1.430 -;
   1.431 -;       Check to see if SIP device is in use and DO NOT PAGE if they are
   1.432 -;
   1.433 -;   ${ARG1} - Device to page
   1.434 -
   1.435 -;exten => s,1,ChanIsAvail(${ARG1}|js)			; j is for Jump and s is for ANY call
   1.436 -;exten => s,n,GoToIf([${AVAILSTATUS} = "1"]?autoanswer:fail)
   1.437 -;exten => s,n(autoanswer),Set(_ALERT_INFO="RA")			; This is for the PolyComs
   1.438 -;exten => s,n,SIPAddHeader(Call-Info: Answer-After=0)	; This is for the Grandstream, Snoms, and Others
   1.439 -;exten => s,n,NoOp()					; Add others here and Post on the Wiki!!!!
   1.440 -;exten => s,n,Dial(${ARG1}||)
   1.441 -;exten => s,n(fail),Hangup
   1.442 -
   1.443 -
   1.444 -;[demo]
   1.445 -;
   1.446 -; We start with what to do when a call first comes in.
   1.447 -;
   1.448 -;exten => s,1,Wait(1)			; Wait a second, just for fun
   1.449 -;exten => s,n,Answer			; Answer the line
   1.450 -;exten => s,n,Set(TIMEOUT(digit)=5)	; Set Digit Timeout to 5 seconds
   1.451 -;exten => s,n,Set(TIMEOUT(response)=10)	; Set Response Timeout to 10 seconds
   1.452 -;exten => s,n(restart),BackGround(demo-congrats)	; Play a congratulatory message
   1.453 -;exten => s,n(instruct),BackGround(demo-instruct)	; Play some instructions
   1.454 -;exten => s,n,WaitExten			; Wait for an extension to be dialed.
   1.455 -
   1.456 -;exten => 2,1,BackGround(demo-moreinfo)	; Give some more information.
   1.457 -;exten => 2,n,Goto(s,instruct)
   1.458 -
   1.459 -;exten => 3,1,Set(LANGUAGE()=fr)		; Set language to french
   1.460 -;exten => 3,n,Goto(s,restart)		; Start with the congratulations
   1.461 -
   1.462 -;exten => 1000,1,Goto(default,s,1)
   1.463 -;
   1.464 -; We also create an example user, 1234, who is on the console and has
   1.465 -; voicemail, etc.
   1.466 -;
   1.467 -;exten => 1234,1,Playback(transfer,skip)		; "Please hold while..." 
   1.468 -					; (but skip if channel is not up)
   1.469 -;exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
   1.470 -
   1.471 -;exten => 1235,1,Voicemail(1234,u)		; Right to voicemail
   1.472 -
   1.473 -;exten => 1236,1,Dial(Console/dsp)		; Ring forever
   1.474 -;exten => 1236,n,Voicemail(1234,b)		; Unless busy
   1.475 -
   1.476 -;
   1.477 -; # for when they're done with the demo
   1.478 -;
   1.479 -;exten => #,1,Playback(demo-thanks)	; "Thanks for trying the demo"
   1.480 -;exten => #,n,Hangup			; Hang them up.
   1.481 -
   1.482 -;
   1.483 -; A timeout and "invalid extension rule"
   1.484 -;
   1.485 -;exten => t,1,Goto(#,1)			; If they take too long, give up
   1.486 -;exten => i,1,Playback(invalid)		; "That's not valid, try again"
   1.487 -
   1.488 -;
   1.489 -; Create an extension, 500, for dialing the
   1.490 -; Asterisk demo.
   1.491 -;
   1.492 -;exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
   1.493 -;exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default)	; Call the Asterisk demo
   1.494 -;exten => 500,n,Playback(demo-nogo)	; Couldn't connect to the demo site
   1.495 -;exten => 500,n,Goto(s,6)		; Return to the start over message.
   1.496 -
   1.497 -;
   1.498 -; Create an extension, 600, for evaluating echo latency.
   1.499 -;
   1.500 -;exten => 600,1,Playback(demo-echotest)	; Let them know what's going on
   1.501 -;exten => 600,n,Echo			; Do the echo test
   1.502 -;exten => 600,n,Playback(demo-echodone)	; Let them know it's over
   1.503 -;exten => 600,n,Goto(s,6)		; Start over
   1.504 -
   1.505 -;
   1.506 -;	You can use the Macro Page to intercom a individual user
   1.507 -;exten => 76245,1,Macro(page,SIP/Grandstream1)
   1.508 -; or if your peernames are the same as extensions
   1.509 -;exten => _7XXX,1,Macro(page,SIP/${EXTEN})
   1.510 -;
   1.511 -;
   1.512 -; System Wide Page at extension 7999
   1.513 -;
   1.514 -;exten => 7999,1,Set(TIMEOUT(absolute)=60)
   1.515 -;exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d)
   1.516 -
   1.517 -; Give voicemail at extension 8500
   1.518 -;
   1.519 -;exten => 8500,1,VoicemailMain
   1.520 -;exten => 8500,n,Goto(s,6)
   1.521 -;
   1.522 -; Here's what a phone entry would look like (IXJ for example)
   1.523 -;
   1.524 -;exten => 1265,1,Dial(Phone/phone0,15)
   1.525 -;exten => 1265,n,Goto(s,5)
   1.526 -
   1.527 -;
   1.528 -;	The page context calls up the page macro that sets variables needed for auto-answer
   1.529 -;	It is in is own context to make calling it from the Page() application as simple as 
   1.530 -;	Local/{peername}@page
   1.531 -;
   1.532 -;[page]
   1.533 -;exten => _X.,1,Macro(page,SIP/${EXTEN})
   1.534 -
   1.535 -;[mainmenu]
   1.536 -;
   1.537 -; Example "main menu" context with submenu
   1.538 -;
   1.539 -;exten => s,1,Answer
   1.540 -;exten => s,n,Background(thanks)		; "Thanks for calling press 1 for sales, 2 for support, ..."
   1.541 -;exten => s,n,WaitExten
   1.542 -;exten => 1,1,Goto(submenu,s,1)
   1.543 -;exten => 2,1,Hangup
   1.544 -;include => default
   1.545 -;
   1.546 -;[submenu]
   1.547 -;exten => s,1,Ringing					; Make them comfortable with 2 seconds of ringback
   1.548 -;exten => s,n,Wait,2
   1.549 -;exten => s,n,Background(submenuopts)	; "Thanks for calling the sales department.  Press 1 for steve, 2 for..."
   1.550 -;exten => s,n,WaitExten
   1.551 -;exten => 1,1,Goto(default,steve,1)
   1.552 -;exten => 2,1,Goto(default,mark,2)
   1.553 -
   1.554 -;[default]
   1.555 -;
   1.556 -; By default we include the demo.  In a production system, you 
   1.557 -; probably don't want to have the demo there.
   1.558 -;
   1.559 -;include => demo
   1.560 -
   1.561 -;
   1.562 -; An extension like the one below can be used for FWD, Nikotel, sipgate etc.
   1.563 -; Note that you must have a [sipprovider] section in sip.conf
   1.564 -;
   1.565 -;exten => _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r)
   1.566 -
   1.567 -; Real extensions would go here. Generally you want real extensions to be
   1.568 -; 4 or 5 digits long (although there is no such requirement) and start with a
   1.569 -; single digit that is fairly large (like 6 or 7) so that you have plenty of
   1.570 -; room to overlap extensions and menu options without conflict.  You can alias
   1.571 -; them with names, too, and use global variables
   1.572 -
   1.573 -;exten => 6245,hint,SIP/Grandstream1&SIP/Xlite1,Joe Schmoe ; Channel hints for presence
   1.574 -;exten => 6245,1,Dial(SIP/Grandstream1,20,rt)	; permit transfer
   1.575 -;exten => 6245,n(dial),Dial(${HINT},20,rtT)	; Use hint as listed
   1.576 -;exten => 6245,n,Voicemail(6245,u)		; Voicemail (unavailable)
   1.577 -;exten => 6245,s+1,Hangup			; s+1, same as n
   1.578 -;exten => 6245,dial+101,Voicemail(6245,b)	; Voicemail (busy)
   1.579 -;exten => 6361,1,Dial(IAX2/JaneDoe,,rm)		; ring without time limit
   1.580 -;exten => 6389,1,Dial(MGCP/aaln/1@192.168.0.14)
   1.581 -;exten => 6390,1,Dial(JINGLE/caller/callee) ; Dial via jingle using labels
   1.582 -;exten => 6391,1,Dial(JINGLE/asterisk@digium.com/mogorman@astjab.org) ;Dial via jingle using asterisk as the transport and calling mogorman.
   1.583 -;exten => 6394,1,Dial(Local/6275/n)		; this will dial ${MARK}
   1.584 -
   1.585 -;exten => 6275,1,Macro(stdexten,6275,${MARK})	; assuming ${MARK} is something like Zap/2
   1.586 -;exten => mark,1,Goto(6275|1)			; alias mark to 6275
   1.587 -;exten => 6536,1,Macro(stdexten,6236,${WIL})	; Ditto for wil
   1.588 -;exten => wil,1,Goto(6236|1)
   1.589 -
   1.590 -;If you want to subscribe to the status of a parking space, this is
   1.591 -;how you do it. Subscribe to extension 6600 in sip, and you will see
   1.592 -;the status of the first parking lot with this extensions' help
   1.593 -;exten => 6600,hint,park:701@parkedcalls
   1.594 -;exten => 6600,1,noop
   1.595 -;
   1.596 -; Some other handy things are an extension for checking voicemail via
   1.597 -; voicemailmain
   1.598 -;
   1.599 -;exten => 8500,1,VoicemailMain
   1.600 -;exten => 8500,n,Hangup
   1.601 -;
   1.602 -; Or a conference room (you'll need to edit meetme.conf to enable this room)
   1.603 -;
   1.604 -;exten => 8600,1,Meetme(1234)
   1.605 -;
   1.606 -; Or playing an announcement to the called party, as soon it answers
   1.607 -;
   1.608 -;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg))
   1.609 -;
   1.610 -; For more information on applications, just type "core show applications" at your
   1.611 -; friendly Asterisk CLI prompt.
   1.612 -;
   1.613 -; "core show application <command>" will show details of how you
   1.614 -; use that particular application in this file, the dial plan. 
   1.615 -; "core show functions" will list all dialplan functions
   1.616 -; "core show function <COMMAND>" will show you more information about
   1.617 -; one function. Remember that function names are UPPER CASE.

mercurial