VoIPowering your Office with Asterisk�Building a Test Lab, Part 2

By the end of this episode, your test system will be up and running and you'll be making calls.

By Carla Schroder | Posted Apr 10, 2006
Page of   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

In Part 1 (now revised) we got as far as installing Asterisk@Home on our test server, changing the root password, and hooking up our little test LAN. Today we'll change the Asterisk Maintenance Portal (AMP) password, perform echo tests, and test local calling and voicemail. (Note: In this article, the IP address of the Asterisk@Home test server will be 192.168.1.10. You will need to substitute your own IP address.)

Changing the AMP Password
Asterisk@Home comes with a handy script for changing the default AMP password, which is "password." Log into the server as root, then run this command:

# passwd-maint
-------------------------------------------
Set password for AMP web GUI and maint GUI
User: maint
-------------------------------------------

New password:
Re-type new password:
Updating password for user maint

Starting and Stopping Asterisk@Home
To shutdown or reboot the server, fire up AMP and click the Maintenance command. You'll see the server status—four green bars are what you want to see here—and Reboot and Shutdown buttons.

Local Asterisk Testing
To start out, get softphones and USB headsets for the clients. There are dozens of softphones with all sorts of feature sets and price ranges. Some only work with specific VoIP providers, so be careful what you get. In this article we'll use the CounterPath X-LIte phone. It is free of cost and runs on Linux, Mac OSX, and Windows. USB headsets are inexpensive and save a lot of hassles; they will obviate the need a sound card on the PC, and sound quality is decent.

First we'll set up two new extensions on the Asterisk server. In AMP, click the Setup tab. Find the General Settings tab on the left-side menu. This is easy stuff, you don't need me to tell you what to do here. You can even leave it at the defaults for now. Hover the cursor over the different options to activate the tooltips.

Now let's set up two extensions for the two test clients. Click the Extensions button, then select SIP. SIP (Session Initiation Procotol) is the most common VoIP protocol. Fill it out like the screen in Figure 1:

Figure 1

While you're testing, it might be easier to use the same password for both the login (which is entered in the "secret" box) and voicemail. The "secret" can be any standard combination of letters and numbers; for the voicemail password, be sure to use numbers only, since it will be entered on a telephone keypad.

When you're finished, click the Submit button. You'll see a red bar across the top of the screen that you must click to apply the changes. Add a second user in the same manner.

Now we'll configure the two clients.

Configuring the X-Lite Phone on Linux
Download and unpack the X-Lite softphone into whatever directory you want to run it from. It is a single executable. Start it up from the directory it is stored in with this command:

# ./xtensoftphone

When it runs for the first time, you'll see this:

$ ./xtensoftphone
I/O warning : failed to load external entity "/home/carla/.Xscrc"

No worries, ignore it. The phone will open, and a wizard will appear to walk you through sound testing and adjustment. Then it opens the screen where you enter your user settings. Using our example from Figure 1, enter this information:

Enable: yes
Username: 202 (your extension)
Authorization User: 202
Password: 1234 [your login password, or "secret"]
DomainRealm: 192.168.1.20 [your Asterisk server IP]
SIP Proxy: 192.168.1.20 [your Asterisk server IP again]

Now close out the configuration screen and the telephone. Then open the phone again with the ./xtensoftphone command. You should see something like Figure 2:

Figure 2

It logs in to the server as soon as you start it up. Now you can perform an echo test. Dial *43 and click the green phone icon. You will hear a woman's pleasant contralto voice explaining how to perform the test. Just speak, and everything you say is echoed back to you. Click the red icon to hang up. Anytime you wish to change the settings, run ./xtensoftphone and click the little icon to the right of the Clear button. This opens the settings menu—go to System Settings—> Sip Proxy.

Confusingly, you'll see other documentation that tells you that the echo test command is *45. This is incorrect, and you'll get a busy signal if you try it.

You can have nice menu icons instead of running a text command if you like. I don't have room to give a howto, because it depends on your desktop environment or window manager. I can give you a hint: on KDE use the menu editor, which you find by right-clicking on the K icon on the lower-left panel. In Gnome, install and use the excellent Alacarte menu editor. In other environments, you're on your own.

Configuring the X-Lite Phone on Windows and Mac OSX
The configuration screens are just the same as on Linux. The two main differences are you won't have an audio setup wizard run the first time, and menu icons are created for you.

Testing Local Calling
Now you have a real live functioning local PBX. To call other extensions, dial the extension number. Leave messages and retrieve voicemail. To configure or fetch your voicemail, hit *98. You'll be prompted for your extension number and voicemail password.

Here we are at the end already, and we're just getting warmed up. Come back next week for part three, where we will connect to the outside world and set up some typical PBX functions. At that point you'll be equipped to give Asterisk a thorough thrashing before putting it into production.

Resources
Asterisk: the Open Source PBX
Asterisk@Home
Voip-Info.org
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

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter