Asterisk Hacking

Configuring Your Dial Plan

The dial plan is the logic behind how phone calls are routed through your Asterisk installation. Asterisk runs every incoming call, every outgoing call, and every call in between extensions through the dial plan logic in order to determine where it should go and whether or not it should be completed. The dial plan is contained in extensions.conf, and therefore it can be said that extensions.conf is easily the most important configuration file in Asterisk. Removing extensions.conf is similar to removing a traffic light at a complicated intersection; cars will want to enter and cars will want to leave, but there will be no way to direct them.

extensions.conf is a bit more complicated than a typical configuration file. On top of the usual sections and settings, there is a logical flow similar to a program. Essentially, extensions.conf is one giant script. The sooner you keep this in mind, the easier it will be for you to write a good dial plan.

Contexts, Extensions, and Variables! Oh My!

extensions.conf can be broken down into three major parts: contexts, extensions, and variables. Each has their own unique and important function and needs to work together for a good dial plan to function.

Contexts

To put it simply, contexts are the fences that keep your extensions from getting tangled up in a big mess. A context is a simple way for grouping extension commands based on what the user has dialed. To...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Megohmmeters
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.