Aterisk PBX Phone Setup Abridged Pt. 1

At my job I have recently started taking on the responsibility of running the local asterisk box for the semi-startup tech company I work for. Previously they had outsourced the task because they lacked anyone experienced in UNIX enough to carry out the task within my particular office. The company offers Windows based solutions, but have an occasional Linux box running around, such as Asterisk boxes, or VMware virtual servers at our datacenters. Our local Asterisk box runs on CentOS 5.1 with a 23 channel PRI inbound and VOIP phones on our desks. We have several VOIP trunks connecting other systems and users, such as contractors and executives that work from home. I dove into the task not knowing anything about Asterisk, but have learned enough about the setup to modify dialplans and add users. So I decided to build my own from scratch to further my learning. Now being a Fedora user one might expect this to be based on an RPM install. I decided not to go that way. I have future plans for this system that might be non-standard so I felt justified that a good ol fashioned tar ball installation would be best. So let’s start with the basics to give you an idea of how easy it can be to build your own phone system.

First let’s download everything. I used the latest 1.4 stable release of Asterisk. You will need LIBPRI, ZAPTEL, and ASTERISK for a basic loadout. I also opted for ASTERISK-ADDONS just to see what they were. This is about as basic of an install as any other Linux program where you download the source. First download everything and then unpack it with the trusty tar -xvzf command. Now let’s build a phone system. Please keep in mind this was built on my Fedora 7 Desktop/Server double duty machine and everything was run as root user so your mileage may vary.

Change directory to the Libpri directory and issue the following commands.
make clean
make
make install
See it was easy, assuming you didn’t get any compiler errors. Did I mention the Asterisk website?

Next step is to cd over to the Zaptel directory. Before installing the Zaptel modules you will need to satisfy some dependencies for your system. On a Redhat derived system such as my install of Fedora, the big ones you will need are kernel-devel and kernel-headers. Easily accomplished with yum or whatever package manager your distro uses. The first command you run should help you figure out what your lacking all together and even tell you the command to resolve the dependencies. Here we go….
./install_prereq test

Told me I was missing some devel files for USB devices and gave me the following command to fix it.
yum install -y libusb-devel
After yum installed the required libraries I ran the command again to double check.
./install_prereq test
Everything looked good, lets install.
./configure
I ran the following command just to checkout what was going to be built and installed, but canceled off.
make menuconfig
make
make install

And that’s it for Zaptel. It’s installed, now let’s move on to Asterisk.

Ok so cd over to the Asterisk directory. During the installation there is a menu that allows you to check the options that will be installed and the dependencies lacking for anything special. If you know that you want to install a specific feature, use this menu to help you figure out the correct software to install in order to satisfy your dependencies. Also if you have problems compiling a specific portion of the system, you may be able to de-select it in this menu and try the compile again, as long as you know you won’t need it. I did this on a codec that failed to compile, and I have never used it at work, so I just removed it from the install. I did make sure to choose the Ulaw/Alaw and GSM codecs along with all the sound files for my language and codecs chosen. Let’s get started.
./configure
make menuselect
make
make install

The above command will begin downloading everything you need that wasn’t included such as sound files.
make samples
This command was optional, but should provide a base line of configuration files for us to work with in building our system.

If you go ahead and build the addons, they are a simple compile.
./configure
make
make install
make samples

Now you should be able to start the Asterisk server in the foreground with the following command.
asterisk -vvc

See that was easy. You should now have the Asterisk console staring you in the face. Just issue the help command to get an idea of what can be done from the console.

Now a lot of you may ask why in the world would you want to build a phone system unless you do it for a living. So here are some reasons.

  1. You want to connect it with the one at work allowing you some work from home days.
  2. It allows you more control over the phone calls coming into your house, allowing you to dodge telemarketers or control the calling habits of your children.
  3. It allows you to put something else on your resume.
  4. With providers like BroadVoice you can have a VOIP account to the real world, real cheap, with left over hardware, and not have to worry about a contract or specialty adapter boxes.
  5. How cool would it be to have an extension in each room of the house, or have voicemail for each family member.
  6. Conference calls with the family anyone? That’s right Asterisk has builtin conference bridge functionality.

These are just a few reasons you may want to look into Asterisk even as a hobbyist. Now if this is professional, keep this in mind. My company maintains a very brand name VOIP system for a client. This system has not been updated to work on new OS’s and is a patch together of at least 2-3 products to get the functionality needed. Asterisk is free when it comes to licensing, actively maintained. centrally managed, and flexible as hell. Just remeber the philosophy behind the Asterisk community, “It’s just software”. This is meant to reflect the lack of limitations. Being open source, if you can write it, it will do it.

Grandstream GXP-2000 SIP VoIP Phone Dual RJ45 VoIP

Grandstream BudgeTone 200 – VoIP phone – SIP

Asterisk: The Future of Telephony

Share

Discussion Area - Leave a Comment

You must be logged in to post a comment.