Subscribe

Asterisk Dial Plan: What is it?

I decided that I’d like to go back to the basics with Asterisk, so here is the first post in this series.

What is the dial plan? Basically the dial plan is how you tell Asterisk what you want it to do. It can be very long and involved, calling all sorts of outside protocols and scripts. On the other hand, it can be as short as a three line call forwarding application.

Here is a short example of how it may look.

exten => s,1,Answer
exten => s,2,Wait(2)
exten => s,3,Dial(503)

See how easy that was? Now let’s take it apart and see what we’ve got.

exten =>
This is how each line MUST start in the dialplan. I have yet to see an exception when you are handcoding your dialplans. This tells Asterisk that there is a command to be followed on the particular line.

s
This is the extention name. It can be a digit of any kind. In this case, since it is the beginning of a context (which we will discuss later) we can leave it as “s” for start. Lets say that you were trying to reach extention 200. In the part of the dial plan that you are coming into that particular extention, you would need to replace the “s” with 200. We will get into more of an example later.

1, 2, or 3
This is pretty much just the order to follow. See how they consecutively keep adding one to each line? Just keep it up and you won’t have any trouble.

Answer, Wait, or Dial
This is the command that is issued to Asterisk, telling it what to do. There are a whole lot of these, and for a pretty good list of them, make sure to check out Voip-Info.

Those are the basic basics of the Asterisk dial plan, from this you should be able to write… well… not very much. So keep your eyes here because I’ll be posting more on this in a little bit.

(Visited 34 times, 1 visits today)

Don't miss a post! Subscribe to the RSS feed or by email today!

AddThis Social Bookmark Button
Related posts:
    No related posts

2 Responses to “Asterisk Dial Plan: What is it?”

  1. Willie Pralour Says:

    I am new getting involved with asterisks testing for my company. We are presently using the old option 11 and later planning to switch to asterisk. I find your blog helpful for me as a beginner. So please keep this going. Any advice that you can give will be greatly appreciated.

    Thanks
    Willie

  2. Pleaes, Tell me with Asterisk can we configure ordinary touch tone fones except of ip based fones. I’ll be waiting for your reply.



© 2007 Asterisk VOIP Tips | Powered by WordPress | Theme originally by Bob, heavily tweaked.