Welcome to our final installment in building your own [email protected] test lab.
1 covered hardware requirements, and installing [email protected] 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 [email protected] 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 “[email protected]” means it is
not suitable for the enterprise. On the contrary, [email protected] 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. [email protected] 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 [email protected]_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 [email protected]_server1
[email protected]'s password:
Last login: Tue Apr 11 17:52:43 2006 from 192.168.1.10
Welcome to [email protected]
For access to the [email protected] web GUI use this URL
For help on [email protected] commands you can use from this
command shell type help-aah.
[[email protected] ~]#
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 “[email protected]” 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 consider—though perhaps they are not so important for your
test lab—are migrating an existing phone number and 911 service. Not all providers
You want a “byod,” or bring-your-own-device provider that is friendly to Asterisk,
like this sampling of inexpensive, Asterisk-friendly providers:
Every provider has their own Asterisk setup instructions, so be sure to follow them, because there is no generic configuration that works for all of them. When you configure Asterisk to use one of these providers, this is called setting up a new trunk. You’ll need both an incoming and an outgoing trunk.
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 = 220.127.116.11
localnet = 192.168.1.0/255.255.255.0
For “externip” use your own public IP, and “localnet” is your LAN. Be sure to check the instructions of your service provider for any special firewall configurations.
If you’re not used to editing text files in the console, now is the time to
learn, because even with [email protected] 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
TCP/IP Network Administration, Third Edition is a great networking reference