1 (now revised) we got as far as installing [email protected] 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 [email protected] test server will
be 192.168.1.10. You will need to substitute your own IP address.)
Changing the AMP Password
[email protected] comes with a handy script for changing the default AMP password, which is “password.” Log into the server as root, then run this command:
Set password for AMP web GUI and maint GUI
Re-type new password:
Updating password for user maint
Starting and Stopping [email protected]
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:
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:
When it runs for the first time, you’ll see this:
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:
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:
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
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.
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