VoIP Cookbook: More on Asterisk's Dialplan
One of the most difficult parts in configuring a telephone exchange is the configuration of dialplan. Asterisk dialplan configuration is in the extensions.conf file, which is usually located in /etc/asterisk/extensions.conf. Dial controls what needs to be carried out when there is incoming or outgoing call. In other words, dialplan controls the pattern of calls in our softswitch.
Extensions.conf is configured based on a number of modules containing definitions or static parameter settings. These modules are also known as context, defined by the system administrator. In context, there two parts, general and global. The former, available in the the top part of extensions.conf, allows us to set a number of main configurations for extensions in Asterisk. The latter allows us to define a number of variables of global constants and initialize the values. Once these parts of context are set, the rest of content of extensions.conf file is taken by the Dialplan. So Dialplan consists of contexts, with every context consisting of extensions.
In addition, there is also Macro, a special type of context, labeled by the name defined by the user who typically uses macro-prefix. Macro can be executed repeatedly, behaving similar to the subroutine in programming language.
Each section in extensions.conf begins with a name written in square brackets, so as to make extensions.conf's structure similar to .ini file in Windows.
More Detailed
- VoIP Cookbook: Pattern Extension
- VoIP Cookbook: Attaching context
- VoIP Cookbook: The Extension Pattern
- VoIP Cookbook: Extension
- VoIP Cookbook: Predefined Extension Names
- VoIP Cookbook: Defining Extension
- VoIP Cookbook: An interesting Extension Examples
- VoIP Cookbook: Variable and Equation
- VoIP Cookbook: Reloading
- VoIP Cookbook: Forwarding to another Asterisk