Deploying a new Asterisk PBX is not a trivial task, so the wise admin first
sets up a test lab. This three-part subseries will show you how to be up and
running in an hour, and how to spend little or no money in the process. You
should have knowledge of basic networking and Linux system administration. If
you need some help with these, see Resources,
below.
It doesn’t take much to set up a test lab. A minimal setup requires:
- For the Asterisk server: a PC with a Pentium III CPU or equivalent, a ten-gigabyte
hard drive, a network interface card, and 256 megabytes of RAM . Do not share
this machine; use it only to run Asterisk. - Two client PCs equipped with network cards, softphones, soundcards, speakers
and microphones, or headsets. - A hub or switch to connect the three computers.
Our Asterisk installation will completely overwrite the hard drive, so back up
anything you want to save.
Softphones are software VoIP clients, like the excellent SJPhone, which runs on Linux, Mac OS X, and Windows.
USB headsets are nice, like this Logitech model. You don’t need a sound card if you use one of these.
Of course you may test any hardware you like, such as analog phone adapters, IP phones, and various types of server interfaces. Please see VoIPowering Your Office with Asterisk – Part 2 for a discussion of available hardware. You may also wish to read VoIPowering Your Office with Asterisk – Part 1 for additional background information.
Getting the Software
In this series and in upcoming articles we’re going to use Asterisk@Home. Don’t let the name mislead you, because Asterisk@Home is not a stripped-down edition for home users. It’s a sophisticated, customized Asterisk implementation that is perfect for the enterprise. Some call it “Asterisk on Steroids” because it integrates an array of great add-ons, including the CentOS Linux operating system:
- Asterisk PBX
- Asterisk Management Panel, a web-based graphical management interface. Asterisk contains several dozen configuration files, so AMP will save your time and sanity many times over
- Flash Operator Panel, a Flash-based real-time monitor for watching and managing all PBX activity
- CentOS Linux CentOS is a free clone of Red Hat Enterprise Linux, so it’s a stable, mature, heavy-duty server operating system
- OpenSSH for secure encryption
- SugarCRM for managing contacts. SugarCRM integrates phone calls, text messages, faxes, emails, and tasks and scheduling
- Festival Speech Engine, for rendering text-to-speech
A complete list can be found on the excellent Asterisk@Home Wiki.
You may download
either an .iso image to create a bootable installation CD, or a compressed
tar archive to install on an existing Linux or Unix server. In this series
we’ll stick with the .iso, since that is the fastest and easiest. It’s about
a 509-megabyte download. Get the most recent stable version, which as of this
writing is asteriskathome-2.7.iso. Don’t use the beta versions unless
you know what you are doing.
Installing Asterisk@Home
Once you have created your installation CD, use it to boot up your Asterisk
server. Remember, this overwrites your entire hard drive. First CentOS will
install. The entire installation is automated- you won’t partition or select
packages. You do need to be present when the CentOS installation is finished,
because you’ll need to remove the installation CD. After reboot the Asterisk@Home
installation will take place. Nothing to do here except have a cup of tea while
it works. You’ll probably have time for two cups and a biscuit, as the Asterisk
installation takes around 30 minutes.
Configuring the Asterisk Server
Your first chore after installation is completed is to change the root password.
Login to Asterisk using the default root login, which is the username “root”
and the terribly secret password “password.” Then use the passwd command to
create a new password:
# passwd
Changing password for root
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully
Next, configure networking. If your Asterisk@Home machine is on a subnet served by
a DHCP server, the installer will get its networking configuration from the
DHCP server. If you don’t have a DHCP server, networking will not be configured.
Either way you should give your Asterisk@Home server a static IP. Do this with
the netconfig command. This brings up a graphical configuration menu.
Make sure that “Use dynamic IP configuration (BOOTP/DHCP)” is not checked. Then
enter your chosen IP address, netmask, default gateway, and primary nameserver.
You should have Internet access, so the default gateway is the IP of your Internet
gateway, and the primary nameserver is either the DNS server of your Internet
provider, or a local caching nameserver.
When you’re finished, restart networking to apply the changes:
# /etc/init.d/network restart
This is a good time to assign IPs to the client PCs so they are on the same
subnet as the Asterisk server, and to connect all the computers to the hub or
switch if you haven’t already.
Now you want the Asterisk Management Portal. Fire up a Web browser on one
of the client PCs and enter http://[asterisk IP address]. This opens the AMP
Web management page. Click on “Asterisk Management Portal (AMP)” to log in.
The default AMP user is “maint”, and the default password is “password”.
That’s as far as we’re going today. Come back next week to learn how to change
the AMP password, create extensions, set up basic functions, make some actual
phone calls, and how to replace the Asterisk@Home logo with your own logo.
Resources
Asterisk: the Open Source PBX
Asterisk@Home
Voip-Info.org
Asterisk has been ported to other operating systems, though keep in mind that
it is best-supported on Linux:
Asterisk OS Platforms
My very own Linux
Cookbook is designed for beginning-to-intermediate Linux system administrators
and users
TCP/IP Network
Administration, Third Edition is a great networking reference
Nice installation howto
for Linux newbies