Dialplan
Contexts keep different parts of the dialplan from interacting with one another: it means that an extension that is defined in one context is completely isolated from extensions in any other context, unless interaction is specifically allowed.Â
There are two default contexts coming with Asterisk: global and default. New contexts can be created in order to provide security: for example, by using contexts correctly, you can give certain callers access to features (such as long-distance calling) that aren't made available to others. Â
Extensions
Extensions are identifiers given to a specific line.Â
In Asterisk an extension defines a sequence of steps (each step containing an application) that Asterisk will take that call through.Â
Within each context, we can define as many extensions as required: hen a particular extension is triggered (by an incoming call or by digits being dialed), Asterisk starts executing steps defined in dialplan for that extension. It is the extensions, therefore, that specify what happens to calls as they make their way through the dial plan.
The Extension is made by:
- name or number
- priority (steps in a sequence)
- applications (commands performing some actions on the call)
Priorities
Each extension can have multiple steps, called priorities, which are executed sequentially. Each priority inside an extension can have a name (label). The dialplan logic will design how to jump between different priorities.Â
Applications
Each application performs a specific action such as playing a sound, accepting touch-tone input, dialing a channel, hanging up the call, and so on.
Some applications, such as Answer()and Hangup(), need no other instructions to do their jobs, while other applications require additional information. These pieces of information, called arguments, can be passed on to the applications to affect how they perform their actions.Â