VoIPowering your Office with Asterisk�Building a Test Lab, Part 3
Welcome to our final installment in building your own Asterisk@Home test lab. Part 1 covered hardware requirements, and installing Asterisk@Home. Part 2 took us as far as setting up a local PBX and having local extensions calling each other. Today we shall connect to the big bad outside world.
But first, I am going to keep my promise of showing you how to replace the stock Asterisk@Home logo with a logo of your own. You might want to do this just to put your company identity on your Asterisk server, or you may need to reassure a nervous boss who thinks that the name "Asterisk@Home" means it is not suitable for the enterprise. On the contrary, Asterisk@Home is an enterprise powerhouse, so don't let the name get in the way.
Name your logo aaw_logo.png, then copy your logo to the /var/build_aah/www/ directory on the server. Asterisk@Home comes with an SSH server already running, so you can use this command to copy the file from a second PC on your LAN. Of course you must use your own server IP or hostname:
$ scp aaw_logo.png root@aah_server1:/var/build_aah/www/
Now you must log in as root on the Asterisk server. You can do this from the LAN neighbor as well:
$ ssh root@aah_server1
Last login: Tue Apr 11 17:52:43 2006 from 192.168.1.10
Welcome to Asterisk@Home
For access to the Asterisk@Home web GUI use this URL
For help on Asterisk@Home commands you can use from this
command shell type help-aah.
Then download and execute the aah-change-logo script, using these commands:
# wget http://www.voip-info.org/users/415/415/images/396/aah-change-logo.sh.txt
# dos2unix aah-change-logo.sh.txt
# sh aah-change-logo.sh.txt
The script finds and replaces all instances of the logo, so when you're finished you'll see your own logo in AMP. Figure 1 shows what it looks like with an "Asterisk@Work" logo:
Making Internet phone calls
Now it's time to make some calls to the outside world.
All you need is a broadband Internet connection, and a commercial VoIP service provider that does "PSTN termination." PSTN termination means they provide an interface between your Asterisk server and the Public Switched Telephone Network (PSTN). This lets you call anywhere just like normal old-fashioned telephone service. These accounts are not very expensive; if you budget $50 per month for your testing account you should have leftover money every month. You'll get a single phone number and the ability to place and receive calls.
Some extras to considerthough perhaps they are not so important for your test labare migrating an existing phone number and 911 service. Not all providers offer these.
You want a "byod," or bring-your-own-device provider that is friendly to Asterisk, like this sampling of inexpensive, Asterisk-friendly providers:
To get through your firewall you'll need these ports forwarded to your Asterisk server:
If you have a NAT firewall you must edit /etc/asterisk/sip.conf on the server, adding these lines:
externip = 22.214.171.124
localnet = 192.168.1.0/255.255.255.0
If you're not used to editing text files in the console, now is the time to learn, because even with Asterisk@Home you'll have to do this. Asterisk comes with both the vi and Nano text editors. Nano is easy to use. Open files like this:
Basic commands are always displayed when Nano is open, so you'll learn your way around quickly.
Your Digital Receptionist routes incoming calls, so the next step is to set up this feature.
Open Setup -> Digital Receptionist. The first setup window walks you through recording a greeting. The following windows are self-explanatory, and will walk you through setting up your various options. You may have several different Digital Receptionist menus, as Figure 2 shows:
Setting up Ring Groups is optional. Some folks like to have all extensions ring on incoming calls. Asterisk can ring all extensions at once, or one at a time in sequence. Open Setup -> Ring Groups. Select the extensions you want in the group, like Figure 2 shows, and the action to take if no one answers:
Now open Setup -> Incoming Calls. This controls how incoming calls from outside your network are handled at different days and times, as Figure 4 shows:
This is where you put your Digital Receptionists to work.
Now you can test just about any Asterisk function you can think of: different features, different hardware, do load-testing, and various networking tweaks and optimizations. Be sure to bookmark the VoIP Planet glossary, and check back often as we add additional telephony terms to it.
Asterisk: the Open Source PBX
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