extensions.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. The Asterisk dialplan
  2. =====================
  3. The Asterisk dialplan is divided into contexts. A context is simply a group
  4. of extensions. For each "line" that should be able to be called, an extension
  5. must be added to a context. Then, you configure the calling "line" to have
  6. access to this context.
  7. If you change the dialplan, you can use the Asterisk CLI command
  8. "extensions reload" to load the new dialplan without disrupting
  9. service in your PBX.
  10. Extensions are routed according to priority and may be based on any set
  11. of characters (a-z), digits, #, and *. Please note that when matching a
  12. pattern, "N", "X", and "Z" are interpreted as classes of digits.
  13. For each extension, several actions may be listed and must be given a unique
  14. priority. When each action completes, the call continunes at the next priority
  15. (except for some modules which use explicitly GOTO's).
  16. When each action completes, it generally moves to the next priority (except for
  17. some modules which use explicitly GOTO's.
  18. Extensions frequently have data they pass to the executing application
  19. (most frequently a string). You can see the available dialplan applications
  20. by entering the "show applications" command in the CLI.
  21. In this version of Asterisk, dialplan functions are added. These can
  22. be used as arguments to any application. For a list of the installed
  23. functions in your Asterisk, use the "show functions" command.
  24. * Example dial plan
  25. The example dial plan, in the configs/extensions.conf.sample file
  26. is installed as extensions.conf if you run "make samples" after
  27. installation of Asterisk. This file includes many more instructions
  28. and examples than this file, so it's worthwile to read it.
  29. * Special extensions
  30. There are some extensions with important meanings:
  31. s: What to do when an extension context is entered (unless
  32. overridden by the low level channel interface)
  33. This is used in macros, and some special cases.
  34. "s" is not a generic catch-all wildcard extension.
  35. i: What to do if an invalid extension is entered
  36. h: The hangup extension, executed at hangup
  37. t: What to do if nothing is entered in the requisite amount
  38. of time.
  39. T: This is the extension that is executed when the 'absolute'
  40. timeout is reached. See "show function TIMEOUT" for more
  41. information on setting timeouts.
  42. And finally, the extension context "default" is used when either a) an
  43. extension context is deleted while an extension is in use, or b) a specific
  44. starting extension handler has not been defined (unless overridden by the
  45. low level channel interface).