Asterisk Guide: How to Install Asterisk (Part 2 of 2)

Last week we discussed some of the less effective routes for Asterisk help and documentation.  This week, I’d like to direct you to some of the more efficient ways to attain information on the subject.

An Asterisk Reference Model

“So what am I supposed to do” you ask?  I’ve found that the developers at Digium working so diligently on the Asterisk code base are actually very good at keeping documentation.  What I didn’t know, was that they only seem to keep that documentation in the source releases.  To make sure you’re doing things correctly for YOUR version (I’m assuming 1.6+ but this should suffice for other versions as well) do the following :

  1. Download the source tarball for YOUR version
  2. Uncompress it
  3. Go to the “configs” directory
  4. Read every single file here
  5. Eat some pie (This is an important step)

This accomplishes three things:

•    You now have a sample of *nearly* every config file that Asterisk needs to run.  These can be dropped into your /etc/asterisk directory as they are, and it will help you go a LONG way in getting things setup.
•    These files are immensely commented with helpful hints and usage examples for all of the things you need.
•    You have a belly full of pie.
“But I don’t WANT to comb through all these configuration files to try and figure out what I need and what I don’t.  Can you help me cheat a little?”  Some files are definitely more important than others.  Pay special attention to the following:

•    extensions.conf – The brain of your PBX.  This determines how calls are routed.
•    sip.conf – This is where you configure your phones
•    voicemail.conf – Pretty obvious
•    meetme.conf – Virtual conference rooms
•    queues.conf – Call queues

The rest of the files really depend on a couple of variables.  First, it’s important to know the basic pieces involved in setting up a fully functional PBX.

•    The Asterisk source code
•    Zaptel or DAHDI source that matches your Asterisk version
Asterisk 1.4.22+ will use DAHDI instead of Zaptel
•    If you’re using them, the drivers for your telephony gateway device (PRI card, analog card)
- It should be noted that Zaptel/DAHDI contain the drivers for any Digium based cards.

Zaptel and DAHDI have their own configuration files and you’ll need to understand them as well.  Typically, there are helper tools designed to create these files for you, but that often depends on the type of hardware and drivers that you’re using.

The Zaptel files are:
•    /etc/zaptel.conf
•    /etc/asterisk/zapata.conf

While the latest versions (1.4.22+) will use the DAHDI naming scheme instead:
•    /etc/dahdi/system.conf
•    /etc/asterisk/chan_dahdi.conf

That should go a long way in getting you started.  I realize I didn’t give specifics (as I said I wouldn’t be earlier) but in my opinion, just diving into a working system will still leave you feeling overwhelmed when it comes time to actually configure a dialplan.  If a straight walkthrough is what you want, those are available via Google.

Of course, if all of this seems too daunting a task for the time you have, there are companies who specialize in Asterisk based phone systems.  Using Asterisk allows them (and us) to provide a lower cost solution with a lot of the same bells and whistles as the larger vendors.

Michael McNeilMichael McNeil has been working with Voice Over IP technologies since February 2006 with Dalcon Communication Systems. He specializes in Asterisk: The Open Source PBX, Linux, and Perl development with a short background in Network Security.

Asterisk Guide: How to Install Asterisk (Part 1 of 2)

Whether it’s technical curiosity, or a low-cost business need, a lot of you (if you’re reading this article) have researched or played around with Asterisk: The Open Source PBX. It’s almost too good to be true, right? What’s not to love about a free open source software phone system your company can use that is also highly configurable by yours truly? In this article, I hope to help shed a bit of light on the pros and cons of working with Asterisk.

Let me start out by saying that you can install Asterisk pretty easily if you’re looking for something simple. However, with around 30 potentially large configuration files that need some form of special care, and add to it the hassle with compiling the appropriate packages and drivers to make your telephony hardware function, that walk through the park can quickly turn into a winding maze with strange growling noises from within. It’s not a pretty place to be, especially if you’re spending paid work hours to dedicate yourself to the task.

A Quick Start

First of all, let’s look at a few ways you can speed the process up:

•  AsteriskNow – (http://www.asterisknow.org/)
•  Trixbox – (http://www.trixbox.org)
•  Debian Linux – (Asterisk+Linux+Debian">http://www.voip-info.org/tiki-index.php?page=Asterisk+Linux+Debian)

The above approaches are perfectly fine for average scenarios, but nearly every company/person out there has some sort of special need. Typically it’s a feature available in the latest version of Asterisk, but not currently available in your drop-in product.

I won’t detail any of the major operating system debacles you may come to face. Seriously, that would just take way too much time. I also won’t be covering specifics on compilation. Again, there are too many paths for you to take and it’s unrealistic to think I could cover them all. I just want to try and help you find the quickest answers you need without wasting your time.

Important Resources

Here are some of the avenues I’ve used to get where I am today:

•  Google – (http://google.com) – This is nearly every tech’s best friend
•  Voip-Info – (http://voip-info.org) – A site dedicated to Voice Over IP with huge influence from Asterisk.
•  IRC – (http://java.freenode.net) – You’ll have to register a nickname here and confirm it via the email they send you. Then you can /join #asterisk.

In all honesty, these are the only three tools I ever needed in order to make my way in the Asterisk telephony world at first. Over time, however, I found that voip-info.org didn’t always specify which versions of Asterisk a certain feature was available in. The information there usually provided several different ways to do something, and while some may work in your version the others would crash Asterisk!

IRC is really one of the best places to get the answers you need when troubled with a problem in your Asterisk installation. Sadly, however, there only ever seemed to be a handful of folks who are able (or willing) to give suggestions without a full listing of every configuration file you possess. I certainly understand the argument; Asterisk is an immensely configurable piece of software that can produce widely varying results if you tweak a setting in the wrong way. Still, I despise having to post every single configuration file on the web just so I can wait an hour to find that they couldn’t figure it out either. This probably should go without saying, but I will say it anyway, that going into the IRC channel for help without having some semblance of a working Asterisk installation is a bad idea.

Check in with us next week, and we’ll discuss some better avenues of help for your Asterisk related endeavors.

Michael McNeilMichael McNeil has been working with Voice Over IP technologies since February 2006 with Dalcon Communication Systems. He specializes in Asterisk: The Open Source PBX, Linux, and Perl development with a short background in Network Security.