Home » Technology (Page 87)

Category Archives: Technology

The Most Versatile VoIP Provider: FREE PORTING

Free Asterisk IVR Prompts While They Last

NOTE: For a more current article on setting up an IVR application with Asterisk®, see this Nerd Vittles article.

In its infinite wisdom, Digium® has discontinued its original voice prompt web site and substituted a new (more expensive) site. Obviously, there aren’t a lot of lawyers on the Digium payroll, or they might have mastered why breaching contracts is not a very smart business move. But, who cares? We love all the guys at Digium and all that they’ve done for the Asterisk community. So we’ve decided to forego our litigious instincts and give away the remaining cache of Nerd Vittles voice prompts which were paid for with the hard-earned dollars of Nerd Vittles readers from around the globe. Footnote: Digium has graciously responded to our whining in a comment below. Thanks for the clarification, Jim.

Here’s the deal. We have several dozen free voice prompts which are up for grabs to anyone who requests one. In fairness to everyone, these will be distributed on a first-come, first-served basis. One per customer, please. Each voice prompt is limited to 20 words or less. Hyphenated words, etc. count as multiple words. If your request exceeds 20 words, you lose your place in line. Decisions of Nerd Uno are final. Email your request together with the text for the voice prompt to NoneLeft at mundy dot org. Before you send the email, look at the comments to this posting to be sure the supply of voice prompts has not been exhausted. Once our supply of voice prompts on the original Digium web site is exhausted, this offer expires whether you’ve sent a request or not. All requests must be processed on or before November 21, 2006. Enjoy!

Sorry, but our supply of voice prompts has been exhausted.

Using Your Digium Voice Prompts. Once you receive your prompt from Digium, be aware that it is not in a format that can be used with Asterisk or TrixBox as delivered. To convert it, you can do one of two things.

First, you can use Digium’s conversion tool to convert the file to a usable GSM or WAV format.

Second, you can convert it yourself by copying it to your Asterisk server and running one of the following commands (substituting the name of your file):

sox yourfile.wav -r 8000 -c 1 yourfile.gsm

If sox is used, it has been recommended that you lower the volume a bit and keep the file in wave format for improved quality. For our samples, 50% sounded just right:

sox inputfile.wav -r 8000 -s -c 1 -v 0.5 -w outputfile.wav resample –ql

Once the file is converted, you again have two options to use it. Either copy the file directly to the /var/lib/asterisk/sounds/custom folder and use it in your dialplan.

Or use freePBX’s built-in sounds file tools by choosing Setup->System Recordings with the remastered .wav file stored on your PC or Mac. Once imported, you then have full access to the sound file in creating Digital Receptionists.

NOTE: After importing with the freePBX tools, if you opted to convert the original file to .gsm format, you can substitute the .gsm converted file for the .wav file in the custom folder once you have converted it using one of the first two methods above. Just remember to remove the original .wav file from the folder, or your prompt won’t play.

Special thanks to Arsene Laurent for the conversion tips.


Some Recent Nerd Vittles Articles of Interest…

FON.com WiFi Router Giveaway for $5 Ends Wednesday

FON.comFor those that have been sleeping under a rock these past few months, you may not have heard of a little company called FON Technology which has been seeding the world with low-cost WiFi hotspots by giving virtually anyone with a broadband connection a dual port WiFi router for $5 U.S. or €5 in Europe. If you were lucky enough to be in San Francisco last week, all you had to do was show up to get a free one. The router provides a private, secure WiFi network for your home or office while providing a public port for others to use at little or no cost.

Those who install the FONera WiFi router get a choice of getting half the $3 per day proceeds for each user that connects through their router or getting free WiFi access through all other FONera routers throughout the world. There currently are over 100,000 routers deployed. Over 4,000 more were ordered just last week. That’s the good news. The bad news is that, despite substantial venture capital funding recently from Google and Skype, FON has decided to discontinue the €/$5 program. Beginning November 8, the price of the Wi-Fi routers will increase to $29.95 in the USA and 29 euros in Europe. So here’s your technology hint for this week: ORDER YOUR €/$5 FON ROUTER by visiting their web site. And do it NOW! If you snooze, you lose on this one.

The router is about the size of a pack of cigarettes and has excellent range. We ordered one last week and received it in a couple days. Installation was a snap. And it works as advertised. For Mac users, you will need the latest Airport firmware to use the private network. You can even download the source code for use on other Openwrt-compatible routers if that’s your thing. For a map of currently deployed FON routers around the world, click here. For additional information, visit WiFi Net News or c|net or GigaOM.

Introducing Version 3 of the Plug-and-Play Asterisk IP PBX for Windows

NOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk® has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.

As the old saying goes, "Third Time's the Charm!" It's almost Halloween at Nerd Vittles, and today you get a real treat as we introduce the third generation of the free turnkey (aka preconfigured) Asterisk system for Windows: nv-TrixBox-1.2.3. With a few minor changes, this version is about as rock-solid as any Asterisk system on the planet. Of course, the planets do continue to move so be sure to check back here from time to time and review all the newly posted comments. None of our readers are particularly shy when bugs are discovered. As with the prior versions, it runs on the desktop of any Windows XP home or office computer. If you want a state-of-the-art phone system, look no further. Out of the box, it supports eight extensions and two lines with integrated voicemail and immediate email delivery of your incoming voicemail messages. To add additional extensions takes about 5 seconds. This PBX features Asterisk 1.2.12.1 and is just the ticket for a small business or a school or even a fraternity or sorority house. It's also perfectly suited for your home. You get every imaginable PBX telephony feature including music on hold, call forwarding, and call transfer as well as a preconfigured AutoAttendant which lets your friends and colleagues direct an incoming call to any of your extensions or even your cellphone. For those with the magic password, you can even dial in and get dialtone to make five hours of free calls each week to dozens of countries around the world including all of the U.S. and Canada, most of Europe, South and Central America, Australia and all your Far East favorites including China, Taiwan, Russia, and Japan. And the total cost: about $12.50 for each three months of service. All incoming calls are free, and you even get your very own area code and phone number to pass out to your friends that are still chained to plain old telephones or cellphones. Update: Looking for a similar version for Linux? It's now available here.

And, yes, all your favorite Nerd Vittles applications are preinstalled and ready to go including weather forecasts for 1,000 airports, MailCall for Asterisk to read you your email messages, NewsClips for Asterisk to read you the news, the AsteriDex robodialer complete with a web interface to place your outbound calls and to serve up customized CallerIDs for your incoming calls, TeleYapper to broadcast reminders and messages to your clients or little league team, and our new GabCast (podcasting) Player for Asterisk. Last but not least, you get all of the bundled TrixBox 1.2.3 applications including SugarCRM, FTP and SSH support, PHP, MySQL, Perl, Apache, SendMail, integrated fax-to-email support, calling card billing, and more. Then we've rolled in the latest upgrades of freePBX (2.1.3) and WebMin. And it all runs quite peacefully in a CentOS 4.4 Linux wrapper with the 2.6.9-34 Linux kernel which doesn't appear to have the voice timing problem that reared its ugly head in TrixBox 1.2. To the Tinkerers of the World, a word of caution: don't attempt to run yum update or trixbox-update.sh on this build until you hear from us, or you may break it. freePBX updates still are safe using Tools->ModuleAdmin->Connect to Online Repository.

Prerequisites. To take advantage of all this magic, there are only three things you really need that aren't provided here. First, you'll want a desktop computer from a reputable manufacturer that is less than two years old. It should be running a fully-patched, current version of Windows XP with at least 384MB of RAM and 6 spare gigs of disk space. The more RAM the better, and 1GB is ideal if you'll be using your Windows desktop for other simultaneous tasks. Second, a broadband Internet connection with a network firewall/switch that hands out internal IP addresses using DHCP is required. Finally, you'll need to set up accounts with two Internet Telephony Hosting Providers (ITHPs). And we recommend you go for three! That's where the $12.50 comes in. Everything else you'll need can be downloaded at no cost using links in this article. So let's get started.

Installing the VMware Player. VMware is virtualization software which lets you run another operating system on your desktop. The TrixBox/Asterisk PBX application runs under CentOS Linux which is a RedHat Linux derivative. Your desktop is Windows XP, hence the need for VMware. The VMware Player software is free, and it lets you "play" the nv-trixbox-123 prebundled Linux application in a window on your Windows Desktop. On a current generation PC with plenty of RAM, this VMware application runs as fast as Asterisk on a dedicated Linux machine so don't worry too much about performance. Based upon our testing, it's a non-issue. We're going to provide the preconfigured application (561 megabytes!), but you'll first need to download the free VMware Player and install it on your Windows system. Just follow the prompts and accept the defaults. Once the install completes, reboot your Windows machine.

Overview. As was true in previous builds, what we've done is build a TrixBox system from the ground up. Then we loaded all the Linux, TrixBox, and freePBX updates through version 1.2.3 in addition to the latest build of freepBX. Then we added the dozens of enhancements which we write about each week. Finally we configured the system so that it's ready to go ... out of the box! This version of TrixBox is also unique in that no bugs have (yet) been reported so it should be rock-solid reliable as a production server. And we've even found a fix for the VMware timekeeping problem in previous releases. So, once you secure the system with your own passwords, plug in the account names and passwords provided by your ITHPs, and apply a minor security patch to Asterisk and address the VMware timekeeping problem (equally easy!), you're all set. We'll walk you through plugging in IP telephones, or regular cordless telephones such as our Vtech favorite (below) using a Sipura SPA-1001 (under $60 on Froogle), or downloading a free IP softphone. And, in about 15 minutes, you're done! Phones ring, voicemail works, voicemail messages get delivered to your email account, and music on hold works. We've even provided a working Stealth AutoAttendant that we'll tell you about shortly. And, for all our Mac fans, not to worry. VMware will have a player for your shiny, new Intel-based Mac shortly. Sign up for the beta here.


While you're enjoying your new phone system, you can read all about TrixBox and Asterisk and freePBX using our Quick Reference Guides, and then you can reconfigure the system to your heart's content. If you happen to break something, simply start over by reinstalling the VMware image (which hopefully you will zip up and burn to a CD for safekeeping). In exchange, you'll avoid the all-day knuckle drill of getting everything set up again from scratch. For those that are already TrixBox addicts, you may want to install this version just to take a look at how we've integrated most of the tips and tricks we've written about this past year. And feel free to share your own enhancements as comments to this article. We'll update the VMware image from time to time to take advantage of everyone's suggestions.

Let me also offer my usual apology to our foreign friends. This project necessarily required some assumptions in order to preconfigure everything. So here they are. We've assumed that you live in the United States, and that you place calls by dialing a 1 + a 3-digit area code + a 7-digit number or by dialing a 3-digit area code and a 7-digit number. Our out-of-the box configuration can be easily changed to support other telephone systems and dialplans around the world. Ninety per cent of our readers are in the United States so the system was built with that in mind. We've also left international calling out of the dialplan. It, too, can be added easily. The reason we left international calling out was to minimize the risk of abuse and associated financial problems. While many international calls are free or almost free with the providers we are recommending, there are numerous locations (including most countries surrounded by water not to mention cruise ships circling the globe) where telephone calls are still VERY expensive. Our recommendation is to adjust your dialplan to accommodate international calls where you know what the cost of the calls will be and you're willing to absorb those costs. One other cautionary note, and we'll get started. As configured, this system does not support 911 calls. Some ITHPs support 911, but the ones we're going to be talking about today do not. So plan accordingly NOW!

Finally, a word about bandwidth. This application is huge. The download weighs in at almost 600MB. Don't even try it with a modem! Bandwidth to cover downloads costs money. We've sprung for four terabytes of bandwidth each month just to support downloads of this application ... which is and always will be free. Funding for this bandwidth was provided by some generous readers of our past columns. Thank you! If there are sufficient future donations during the coming months, we'll buy additional bandwidth. Otherwise, the application will vanish when our bandwidth is exhausted. It will be available again on the second day of the coming month until the four terabytes are once again exhausted. So, as they say, the early bird ...

Installing nv-TrixBox 1.2.3. After you have the VMware Player installed, you're ready to download today's application. If you know how to use BitTorrent, please grab the torrent file from here and save our precious bandwidth. Otherwise, our good friends at MojoMonster.com and VMwarez.com have agreed to host this download. So just click on BubbaPCguy's mirror or Jim's VMwarez site, and download the file. If, for some reason, those sites are down or too busy, feel free to download the image from our site by clicking here. Then save the zipped file to your Windows Desktop.

Once the download finishes, click on the nv-trixbox-123.zip file on your Desktop. Choose extract all files. When prompted for the destination to unarchive the files, type C:trixbox and press Enter. Have a cup of coffee while the archive decompresses. When it's finished, run the VMware Player. Accept the license agreement and then browse to the trixbox folder on Drive C and select trixbox.vmx. If you get an error about a missing IDE drive, just tell VMware not to look for it again and continue. When prompted whether to create a new identifier, choose Create and click OK. The Linux Kudzu Configuration Utility may load advising you that it can't find my network card in your computer. Move your cursor to the VMware Player window and click once to give it focus. Then press Enter to run the utility. With Remove Configuration highlighted for the network card, press Enter again. When Configure your network card is highlighted, press Enter again. Finally, when the Configure TCP/IP screen appears, press the Space Bar to select Use Dynamic IP Configuration. Then tab to the OK button and press Enter. Linux will whir away for a minute or two and boot your TrixBox system.

At the Linux login prompt, type root for your username and press Enter. Then type password for your password and press Enter again. We're not going to remind you to press Enter any more. After entering commands in Linux, you press Enter to execute them. Now you're an expert! Once you're logged in, your TrixBox server will tell you the private IP address for your system (to access it with a web browser). Write it down! Now issue the command ifconfig and write down the MAC address of your network card: HWaddr. We'll need them both in a minute.

NOTE: If, for some reason, you get an error about a mismatched IP and MAC address when nv-trixbox-123 loads or if no IP address is shown once you log in as root, it means you've lost Internet connectivity. You can restore it easily once you're logged into your system as root. Just download the fixmacaddr script from here. Then copy it to the /root folder on your server. Now issue the following commands:

cd /root
chmod +x fixmacaddr
./fixmacaddr

If you'd prefer to create the script yourself using an editor (nano -w /root/fixmacaddr), log in as root and cut-and-paste the following code. Save the file (Ctrl-X, Y, then Enter) and then execute the commands above.

#!/bin/bash
mac=`ifconfig -a | grep "HWaddr" | cut -d " " -f 11`
echo "DEVICE=eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0
echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo "BOOTPROTO=dhcp" >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo "HWADDR=$mac" >> /etc/sysconfig/network-scripts/ifcfg-eth0
service network restart

Securing Your TrixBox System. You don't leave your keys in your car at a shopping center, and you don't run a Linux system with a root password of password. There are numerous passwords on this system. If you're going to be the one and only administrator, we recommend setting them all to the same, secure password. Don't forget it, or you go back to Go! Now enter the following commands to reset the passwords:

passwd
passwd admin
passwd-maint
passwd-amp
passwd-meetme

We don't recommend exposing your Asterisk system to the public Internet unless you are an expert in all things Internet ... especially security. This is even more true with this TrixBox system. There are lots of applications running that crackers love to attack: SendMail, FTP, Windows Networking, Apache Web Server, PHP, and even Asterisk. That's why you made a backup CD of the nv-trixbox-123.zip file. Right?

Securing Asterisk. Because of a security vulnerability in the (Cisco) Skinny module of Asterisk, it needs to be disabled. Log into your server as root and edit modules.conf: nano -w /etc/asterisk/modules.conf. Then insert the following line in the [modules] context. Save the file (Ctrl-X, Y, then press Enter) and restart Asterisk: amportal restart.

noload => chan_skinny.so

Securing AsteriDex. Because of a security vulnerability in our very own AsteriDex, you'll need to download and install this simple patch. Log into your Asterisk server as root and issue the following commands:

cd /var/www/html/asteridex
rm -f callboth.php
wget http://nerdvittles.com/trixbox11/callboth.zip
unzip callboth.zip
rm -f callboth.zip
chown asterisk:asterisk callboth.php
chmod 775 callboth.php

Securing and Activating A2Billing. This web-based application allows you to generate and issue calling cards to individuals so that they can place calls remotely through your Asterisk server. If you've always wanted to be just like AT&T, here's your Big Chance! There's very little that you can do with an AT&T calling card that can't be done as well or better by you using A2Billing. And, it won't take an M.B.A. to undercut AT&T's calling card rates and still make buckets of money. All you need now are a few customers. But first, a word of caution. Assuming your Asterisk server has web exposure on the Internet, you need to secure the admin and root passwords in this application whether you use it or not. To access the application, go to http://trixboxIPaddress/a2billing/ using the actual internal IP address of your Asterisk server which you wrote down. Log in as root with a password of myroot. Click on the ADMINISTRATOR tab in the left column and then click Show Administrator. Now click on the Edit button beside each of the two administrator accounts and change the passwords to something secure. If you really would like to learn more about it, documentation for the application is available here. And, if you decide to use the application, you'll need to uncomment six actual dialplan lines in extensions_trixbox.conf and reload Asterisk. But we'll save that for another day.

Securing SugarCRM Contact Management. TrixBox includes the best open source contact management application on the planet, SugarCRM. You access the application with a web browser: http://trixboxIPaddress/crm/ substituting the private IP address of your Asterisk box, of course. Specify admin for your username and password for your password. Whether you use the application or not, change the admin password. It's easy. Just click the Administrator link under Welcome admin. Then click the Change Password button. Complete documentation for the application is available here. If contact management is your thing, knock yourself out, and we'll talk to you next spring when you finish getting everything set up to run your business. It's a great product, but be prepared to invest lots of time in the project if you expect to use it productively.

MIME-Construct: Wherefore Art Thou? A Linux utility, MIME-Construct, made it easy to convert images (like faxes) to PDF documents and also facilitated the emailing of just about any document. Unfortunately, it came up missing in TrixBox, and it's difficult to install because of all the Linux dependencies. So here's a simple solution that restores the original functionality of MIME-construct thanks to the programming genius of Rob Thomas. Since Rob's fax-process.pl code (included in freePBX) mimics the old MIME-construct application, the simple solution was just to tweak it a bit for Nerd Vittles and TrixBox compatibility and then copy a renamed version into the PATH (remember the DOS PATH!) on your Linux box. Log in as root and issue these commands, and you'll be back in the fax-to-email business with TrixBox:

cd /usr/local/bin
wget http://nerdvittles.com/trixbox123/mime-construct
chmod +x mime-construct

Reserving An IP Address in Your Router. Your PBX has to consistently boot up with the same IP address or your phones (and calls) won't be able to find the Mother Ship. Since we're using DHCP to initially obtain the IP address, we need to tell your router to always hand out this same address to your TrixBox system. Almost all routers make it easy to preassign DHCP addresses. Use a web browser to access your router's configuration screens. What we're looking for is generally under the tab for LAN IP Setup or DHCP Configuration and is usually called something like Reserved IP table. Just add an entry and call it Asterisk PBX and specify the IP address and MAC address that you wrote down above. Now each time you reboot your Asterisk server, your router will assign it this same IP addreess.

Linux 101. If you're new to Linux and/or Asterisk, here are a few commands you'll need from time to time. And, if you didn't already know, you don't just pull the plug on a Linux system ... even if it's running in a window on your Windows Desktop. Linux caches lots of stuff to speed up processing. So always shut things down gracefully if your data matters.

df -h ... Free disk space remaining on your Linux system. Be sure you always have the required 6GB of Windows space for this app!
logout ... Logs you out of the Linux system.
Ctrl-Alt ... Gives your Windows cursor back and lets you run other Windows apps until you click again in the nv-TrixBox window.
asterisk -r ... Runs the Asterisk Command Line Interface (CLI) after you've logged in as root.
quit ... Exits gracefully from the Asterisk CLI
amportal restart ... Restarts Asterisk.
/etc/webmin/start ... Starts up WebMin, the Swiss Army Knife of Linux. Access it with a web browser: https://TrixBoxIPaddress:10000/
shutdown -h now ... Shut down your Linux system right now. Wait for VMware Player window to close!
shutdown -r now ... Reboot your Linux system right now.
nano -w filename ... Edit any file in your Linux system. Ctrl-X, Y, then Enter saves your changes.
cd dirname ... Changes to another directory below current directory.
cd /dirname ... Changes to another directory below the root directory.
ls ... The Linux equivalent of dir to get a directory listing.
cd /var/www/html ... Home of the TrixBox web server files accessed at http://TrixBoxIPaddress/ or https://TrixBoxIPaddress/
cd /var/lib/asterisk/agi-bin ... Home of the TrixBox and Asterisk scripts for Asterisk apps.
cd /var/lib/asterisk/sounds ... Home of Allison and all the voices prompts that make up the Asterisk system.
cd /etc/asterisk ... Home of all the Asterisk, TrixBox, and freePBX configuration files.

Adding Plain Old Phones. Before your new PBX will be of much use, you're going to need something to make and receive calls, i.e. a telephone. For today, you've got three choices. Option #1 and the best home solution is to use a Plain Old Telephone or your favorite cordless phone set (with 8-10 extensions) if you purchase a little device (the size of a pack if cigs) known as a Sipura SPA-1001. It's under $60. Be sure you specify that you want an unlocked device, meaning it doesn't force you to use a particular service provider. Once you get it, plug the SPA-1001 into your LAN, and then plug your phone instrument into the SPA-1001. Your router will hand out a private IP address for the SPA-1001 to talk on your network. You'll need the IP address of the SPA-1001 in order to configure it to work with Asterisk. After you connect the device to your network and a phone to the device, pick up the phone and dial ****. At the voice prompt, dial 110#. The Sipura will tell you its DHCP-assigned IP address. Write it down and then access the configuration utility by pointing your web browser to that IP address.

Once the configuration utility displays in your web browser, click Admin Login and then Advanced in the upper right corner of the web page. When the page reloads, click the Line1 tab. Scroll down the screen to the Proxy field in the Proxy and Registration section of the form. Type in the private IP address of your Asterisk system which you wrote down previously. Be sure the Register field is set to Yes and then move to the Subscriber Information section of the form. The preconfigured extensions are set up as 500 through 508 with voicemail activated for extension 500 presently. To keep things simple, enter House Phone as the Display Name. Enter 500 as the User ID. Enter 1234 as the Password, and set Use Auth ID to No. Click the Submit All Changes button and wait for your Sipura to reset. In the Line 1 Status section of the Info tab, your device should show that it's Registered. You're done. Pick up the phone and dial 611 to get a current weather report or dial 511 to get today's news headlines.

Using an IP Softphone. If you're like us, you've gone to all this trouble downloading your fancy new PBX, and you sure as hell don't want to wait a week for your Sipura 1001 to arrive before trying it out. So here's the quick and dirty solution. There's software that will run on your Windows, Mac, or Linux desktop that acts like a telephone. You obviously need speakers and a microphone on your system for this to work. Assuming you have those, go to CounterPath's web site and download X-Lite for your favorite OS. There's a manual there, too, but you probably won't need it. Once the download completes, click on it to start the install. Accept the obnoxious license agreement and install the software in the default directory. Unless you want X-Lite to load every time you restart your machine, uncheck the Launch on Startup checkbox. Reboot your system and, if it's also running your TrixBox system, restart it first. Then run the X-Lite application. Click No to turn off X-Lite's spyware. When the "SIP Accounts" window opens, click the Add button and fill in the following data:

Display Name ... House Phone
User name ... 500
Password ... 1234
Auth. User Name ... 500
Domain ... the IP address of your TrixBox system

Leave the other defaults and click on the Check Voicemail tab. For the Number to Dial to Check Voicemail, enter *97. Then click OK and Close. If your Windows Firewall is doing what it's supposed to, it will probably block the connection to your Asterisk system. When prompted, tell it to allow future connections. If this happens and X-Lite does not register with your Asterisk system, click the Down Arrow at the top of the softphone (Show Menu). Click SIP Account Settings, Properties, OK, and Close again. You now should be registered. Dial 611 and get your first weather report. To exit from X-Lite, click the Down Arrow and then Exit.

Using a SIP Phone with Your System. There's loads of SIP Phone hardware in the marketplace, some better than others. We've written about some of them on Nerd Vittles, and you can use Google or the Asterisk forums to get a good feel for which ones work and which ones are a waste of money. If you want the bleeding edge phone that supports virtually every feature that Asterisk has to offer, then the GrandStream GXP-2000 is the phone for you. We use one and love it. Some of my colleagues think it is better suited for the non-business environment. In any case, it's a great phone to learn about Asterisk. With careful shopping, you can find one for about $80. Don't buy support or an extended warranty. They're both a waste of money. You configure the phone almost identically to softphone shown above. For home use, we still think the SPA-1001 and a good 5.8 GHz cordless phone system with multiple handsets is the way to go.

Adding Internet Telephony Hosting Providers. Just as you need an account with an Internet Service Provider to reach Google or Yahoo or Dreadful AOL, if you want to make phone calls to folks with Plain Old Telephones outside your Asterisk system, then you've got to have telephone trunks to carry conversations from you to them and back again. For the default system today, we've preconfigured it to support an outbound trunk from VoipDiscount.com and an inbound and outbound trunk from StanaPhone.com. Before you sign up for anything, read our two articles about these providers by clicking on the links in this paragraph. In a nutshell, VoipDiscount.com provides incredibly cheap outbound calling to a number of countries. However, you have to cough up about $12.50 every three months to keep your account "current." They're also a little slick in that they frequently change calling rates and calling locations which are free. Having said all that, it's still the best calling deal on the planet. You just need to understand the ground rules and the slippery slope issues so you don't get blind-sided. StanaPhone provides free DID numbers in a New York area code and free incoming calls for those with an account. Even their charges for outbound calls are quite reasonable. To get your system working, you'll need to go to each of these providers' web sites using Internet Explorer on a Windows PC, sign up for an account, and download their softphones. That's the only way you can figure out what your account name and password are. We also recommend you put $10 in your StanaPhone account. Then, based upon reports from lots of users, you'll never have to worry about them disconnecting your free incoming service or your free phone number. Again, read our two articles which will tell you everything you need to know. Don't worry about all the settings, we've taken care of all of that for you. The objective is to get your free phone number and your account names and passwords. Then we'll plug those into your Asterisk system so you can start enjoying free incoming calls and mostly free outbound calls. Once you get your account numbers and passwords, move on to the next step, and we'll show you how to plug them into your Asterisk system and begin making and receiving calls.

There are others who want a local phone number and more reliable service. For them, we continue to recommend TelaSIP. $14.95 a month for 3 months than $19.95 gets you unlimited calling in the U.S. and two phone numbers (DIDs) in your choice of area codes. If you want to start out on a pay-as-you-go plan, $5.95 a month gets you a local phone number and 2¢ per minute outbound calls in the U.S. They don't provide a lot of hand-holding, but their service is rock-solid reliable. For a list of all our service provider reviews, go here. Or just read our Internet Telephony Provider Shootout to see why TelaSIP remains our top pick. If you decide to go with TelaSIP, our Newbie's Guide to TrixBox 1.2.3 will show you how to configure it.

Configuring Your TrixBox System. This should take you less than five minutes! We've eliminated most of the configuration hassles with your new Asterisk system by preconfiguring almost everything. About all that you'll need to do to get a fully-functioning system is to plug in your account names and passwords for your two ITHPs and enter your email address for delivery of your voicemails and faxes. Here's how.

Using a web browser, point it to the IP address of your new TrixBox system. When the TrixBox Main Menu appears, click System Administration. When prompted for your username, enter maint followed by the password you configured for your system above. When the Configuration and Administration Menu appears, click freePBX. freePBX is another open source project that puts an incredibly simple but complete web interface on your Asterisk PBX. When the freePBX Main Menu displays, click Setup. Now click Trunks in the left column of the display. On the Trunks setup screen in the right column, you'll see that we've preconfigured two trunks: one for voipdiscount and one for stanaphone. Click on SIP/voipdiscoun to display the voipdiscount setup screen. Scroll down to the PEER Details section. Replace yourname with your account name in three places: authuser, fromuser, and username. Replace yourpassword with your password in the line which reads secret=yourpassword. Now scroll to the Registrationsection at the bottom of the screen. Replace yourname:yourpassword@sip.sipdiscount.com with your actual account name and password. Leave everything else as it is. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

We're going to make similar changes in the Stanaphone trunk settings. Click on SIP/stanaphone to display the StanaPhone setup screen. In the Outbound Caller ID field, enter the 10-digit phone number you were assigned by Stanaphone. In the Peer Details section, replace youraccountnumber in username=youracctnumber with your assigned account number, not your phone number! Replace yourpassword in secret=yourpassword with your assigned password. Repeat the drill in the User Details section on the form. Then, in the Registration String, carefully plug in your account number, then a colon, then your password, then @sip.stanaphone.com/, then your assigned 10-digit phone number. Leave everything else as it is. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

If you want voicemails delivered to you by email, you'll need to plug in your email address. Click on Extensions in the left column of freePBX. Then click Home - 500 in the right column to display the settings for extension 500. Scroll down to the VoiceMail and Directory section of the form, and enter your email address in the email address field. Then change the Email Attachment field to Yes. If you'd like the system to automatically delete your voicemails after emailing them to you (with the message), change the Delete Vmail option to Yes. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk. Your system now is fully operational.

If you'd like to add support for transferring calls to your cellphone, click Misc Destinations in the left column of freePBX, and then click Cellphone in the right column. Enter your 10-digit cellphone number in the Dial field. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

If you'd like to add fax support so that incoming faxes to your Stanaphone number get emailed to you, click on General Settings in the left column. Scroll down to Email address to have faxes emailed to and plug in your email address. Do NOT change the origination email address, or you won't receive anything. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

Setting the Default Time Zone. Your TrixBox system is set to use Eastern daylight or standard time (depending upon the time of the year) as the default time zone. This matters when you're scheduling reminders and wake up calls. If it's not correct for your location, the easiest way to change the time zone is using WebMin. Log into your server as root and issue the following command to start WebMin: /etc/webmin/start. Then, using a web browser, go to: https://TrixBoxIPaddress:10000/. Log into WebMin with the username root and the password you assigned to your root account. At the WebMin Main Menu, click Hardware then System Time. Scroll down to the TimeZone section and use the pull-down menu to select the desired time zone. Then click the Save button immediately below the Time Zone field. When you restart your TrixBox system, the time zone will be correct, and WebMin will automatically be shut down.

Making VMware Keep Correct Time. Until recently, the only sure-fire way to make sure VMware kept the same time as your hardware clock was to use a cron job which polled a time server for the correct time and then reset the VMware/Linux clock every few minutes. That's been fixed, and we'll show you how to patch the boot loader to fix it. But, first, while you're using WebMin, let's disable the time-setting cron job. From the main WebMin menu, choose Hardware->System Clock. In about the middle of the page is an option to Synchronize (the time) on Schedule. Just set it to No and Save your change. Now go to the command prompt on your server and make certain you are logged in as root. Edit the boot loader (nano -w /boot/grub/grub.conf) and move down to line 16 which begins with the word "kernel." Edit that line so that it looks like the following and save your change (Ctrl-X, Y, then Enter). Then reboot your system (shutdown -r now). HINT: Everything after "noapic" is new stuff to be added, and it all must be appended to the end of the existing line.

kernel /vmlinuz-2.6.9-34.0.2.EL ro root=LABEL=/ acpi=off noapic nosmp nolapic clock=pit

Taking Your TrixBox For A Spin. For a list of Feature Codes supported by your new system, click on Feature Codes in freePBX and print the list. Pick up a phone and dial any one of them. To make an outgoing call, take a phone off-hook and dial either a 10-digit number in the U.S. or 1+10-digit number. Then, using a cellphone or someone else's POTS phone, dial your Stanaphone number to be sure it's working. You should get a welcome message, and then your phone or softphone will ring.

We call the welcome message a Stealth AutoAttendant. What that means is that, while the message is playing, you can do some other things with your system. For example, by pressing 1, your call will immediately ring extension 500 on your system. Pressing 2 will ring extension 501. Pressing 3 will ring your cellphone. Pressing 8 and entering 56789# will give you dial tone to make a long distance call through your PBX. Pressing nothing will cause all of the extensions on your system to ring two seconds after the message completes.

DISA Security. Getting remote dialtone can be a dangerous thing in the wrong hands so let's put your own password (of any length) on the DISA function that is triggered by pressing 8 above. Click DISA in the left column of freePBX and then DialTone in the right column. Now enter a PIN that will let you sleep well at night ... knowing that you are paying for all outbound DISA calls. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

The Nerd Vittles Collection. We'll wrap it up for this week by pointing you to some tutorials for the Nerd Vittles applications that are preloaded in this TrixBox build. AsteriDex and MailCall require some quick configuration so take a look at the tutorials. You also may want to change the Telephone Reminders default password of 123 in line 28 of /etc/asterisk/extensions_trixbox.conf. If you do, remember to restart Asterisk for the change to take effect.

AsteriDex - The Poor Man's Rolodex (http://TrixBoxIPaddress/asteridex/)

NewsClips for Asterisk - Get the News By Telephone (Dial 511)

MailCall for Asterisk - Get Your Email By Telephone (Dial 555)

Weather Reports by Airport Code - Get the Latest Weather Forecasts for 1,000 U.S. Cities (Dial 611)

Telephone Reminders for Asterisk - Appointment Reminders By Telephone (Dial 123)

GabCast Studio for Asterisk - Create and Play PodCasts Using Your Phone (Dial *422 and 422)

TeleYapper Message Broadcasting System - Deliver Appointment Reminders and Important Info to Any Custom Calling List (Dial 674)

What To Do Next. Once your new PBX is humming away, here are the next steps. First, you'll want to upgrade freePBX to version 2.2.x. The tutorial to walk you through the drill can be found here. Last but not least, you'll want to apply the latest Asterisk security patches to prevent a denial of service attack on your system. The tutorial for that can be found here.

Where To Go From There. If you're new to the Asterisk world, you have lots of fun (and learning) ahead of you. The best place to start is our Newbie's Tutorial. We've already done most of the work for you. It's an easy read which covers many topics that we didn't get to today. So start there. You'll also want to get plugged into the TrixBox Forums. That's the place to ask questions after you do some reading. Posting support questions on Nerd Vittles just doesn't work because of the cumbersome blog format. Don't email me questions either! About 20,000 pages of our tutorials get downloaded each day so we hope you'll understand why free, individualized tech support is not possible. We do accept thank you notes with or without donations to the site. Finally, take a look at our catalog of articles, projects, and Asterisk resource links. You'll find just about everything you'll ever need there. Enjoy!


Nerd Vittles Demo Hot Line. You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include NewsClips for Asterisk (latest news headlines in dozens of categories), MailCall for Asterisk with password 1111 (retrieve your email by phone), and Nerd Vittles Weather Forecasts by U.S. Airport Code. Just call our number (shown in the left margin) and take any or all of them for a spin. The sound quality may not be perfect due to performance limitations of our ancient Intel 386 demo machine. But the price is right.

Nerd Vittles Fan Club Map. Thanks for visiting! We hope you'll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don't know the difference in the last two, here's the best definition we've found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We're always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you're visiting as well.

Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host up to 6 domains with 50GB of disk storage and 999GB of monthly bandwidth. Free domain registration is included for as long as you have an account. That almost doubles last month's deal, and it really doesn't get any better than that. Their hosting services are flawless! We oughta know. We've tried the best of them. If you haven't tried a web hosting provider, there's never been a better time. Just use our link. You get a terrific hosting service, and we get a little lunch money.


Some Recent Nerd Vittles Articles of Interest...

As Easy As 1-2-3: The Newbie’s Guide to TrixBox 1.2.3

NOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk® has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.

Today we'll show you how to install the latest and greatest TrixBox 1.2.3 in about an hour. It is by far the best Asterisk-based IP PBX on the planet... especially once you add all of the Nerd Vittles goodies. It's been a painful couple of months in the TrixBox community, but the wait is over. Whether you're a casual home user or a gigantic call center processing millions of calls a month, this IP PBX can do it all reliably. And the best news: everything is FREE except the hardware on which to run your new system. For our new, automatic installation procedure, try PBX-in-a-Flash™. It's free, too!

What makes the TrixBox implementation really shine is freePBX 2.1.3 which brings to the table an incredibly simple yet powerful, upgradable web-based GUI to totally manage your PBX. And TrixBox adds all of the Asterisk bells and whistles you could ever ask for in an integrated PBX: full-featured database management, simple hooks to high-level application development tools such as PHP and Perl, an Apache web server, the MySQL DBMS, integrated voicemail and fax-to-email support, contact management, calling card billing, hardware autoconfiguration for Digium hardware as well as phone autoconfiguration for Cisco, Aastra, GrandStream, and Snom phones. In addition, you get built in Microsoft networking support, an integrated text-to-speech system, and loads of free utility software applications for Asterisk compliments of Nerd Vittles. And, yes, TrixBox 1.2.3 still fits on a single CD! For those new to Nerd Vittles, be aware that we make slipstream changes to articles as users discover things we've missed. Yes, we're human! So check for Comments before you begin or subscribe to our Comments RSS Feed. And, last but not least, be sure to add yourself to the Nerd Vittles Fan Club Map. So let's get started.

HOT TIP: For a turnkey version of TrixBox 1.2.3 that runs on your Windows desktop and includes the entire setup we'll be discussing as well as an out-of-the-box setup for 10 extensions and two VoIP providers, click here.

The Game Plan. Because of WordPress article length limitations and our own limited attention span, we're just going to cover the basics in this Guide. We'll leave a lot of the bells and whistles for future articles. We'll get your TrixBox system running so that you can make your first call. And we also will get your TrixBox system properly configured to support all of the dozens of Nerd Vittles' free applications.

Hardware Setup. You have two choices for hardware to run this new system. The first is to dedicate a machine to TrixBox and download the TrixBox ISO image to burn a bootable CD. Once you create the TrixBox CD, you simply boot your dedicated PC with the new CD. It will erase and reformat your hard disk for use with Linux and the included Linux and Asterisk applications. If you just want to experiment with TrixBox and don't plan to put the system into production other than for a few simultaneous calls, then you may prefer our PBX-in-a-Flash™ image. With this approach, you install VMware on your existing Windows XP system. Then you run Linux and the TrixBox application in a window on your Windows PC. It does not require a dedicated machine, and it's still FREE. We've found the performance to be virtually identical to running TrixBox on a dedicated PC provided your Windows machine has at least 512MB to 1GB of RAM. See our previous article for step-by-step instructions on the VMware installation process.

For today, however, we're assuming you've opted for the dedicated machine install: pure Linux on a clean machine. So begin by downloading the TrixBox ISO image from here and burn a CD (click here if you need a refresher course). Using your dedicated PC, insert the CD you made, plug your machine into the Internet, and turn it on. Then watch while TrixBox loads CentOS/4.4 (with an older Linux kernel that doesn't break voice applications!) and all the Asterisk and Linux goodies imaginable: Apache, SendMail, Asterisk Mail, SugarCRM, MySQL, PHP, phpMyAdmin, SSH, Bluetooth, freePBX, the Flash Operator Panel, Call Detail Reporting, and on and on. We've covered how to use most of the Linux products in our Mac HOW-TO's (see sidebar), and they work exactly the same way with TrixBox 1.2.3 so have a look around Nerd Vittles. There's plenty to keep you busy from now until Christmas. Remember! This install will reformat (aka ERASE) your hard disk before it begins, but it will warn you first. When you're prompted to create your root user password, type in something you can remember ... and write it down!

Upgrading TrixBox from a Prior Version of Asterisk@Home. In a nutshell, YOU CAN'T. But there is a way to put most of Humpty back together again once you've installed the new system. Before you begin, understand that you are doing this AT YOUR OWN RISK. NO GUARANTEES. If that bothers you, don't do it! The real trick is to do a little printing and copying of your old data before you insert that TrixBox installation disk. Step 1 is to make a full backup of your old system to a different server before you begin. If you don't know how, read our step-by-step instructions on the subject here. Step 2 is to make another copy of some of the critical files in your system. Duplicates of all of these will also be part of your backup. We typically build directories on a separate server which match the ones we'll be copying over from the old Asterisk system. Here are the directories (including all the subdirectories therein) that we always duplicate. Before you just blindly copy our list, stop and think whether there are special things you do on your existing Asterisk system or special apps that you run. Then find those files and make copies of all of them, too. The important piece in making a successful copy of some of these files is to shut down Asterisk (amportal stop) and MySQL (/etc/init.d/mysqld stop) before you begin. NOTE to CRM users: There's a new version of CRM in TrixBox so it's unlikely that you can restore the databases. Check your current version of AAH (help-aah) and see if there is an option (bundle-crm) to pack up CRM to move it to another machine. If so, do it and follow the instructions. We don't use Sugar so we haven't tested this upgrade option. Here are the directories you'll want to back up:

/var/lib/asterisk/agi-bin
/var/www/html
/var/lib/asterisk/sounds/custom
/var/lib/mysql
/root
/etc/asterisk

Then there are a couple of individual files that you'll also want to preserve:

/etc/hosts
/etc/crontab

The third step is to take screenshots of every screen you've built using the Asterisk Management Portal (AMP) or a prior version of freePBX. Start in the Setup tab and go right down the list of features. For each option in which you have multiple entries (e.g. Extensions and Trunks), call up each entry and print out the full page. Be especially careful in printing the Trunks entries and make sure you write down every line in the PEER Details and USER Details because those which are out of view will not get printed using a screen print. You'll need to manually fill in the ones that aren't displayed. The same goes for Registration Strings which often scroll out of view on the screen. Finally, using CLI (asterisk -r), make a copy of all your Asterisk database entries: database show. And, using phpMyAdmin, make a backup of any MySQL databases that you'd prefer not to lose, especially Airports, asteridex, sugarcrm, and mya2billing if you use and have added or changed data in any of those applications. Now save all this information in a safe place until we finish the new install.

Loading CentOS/4 and TrixBox 1.2.3. Here's how the install went for us, and we'll walk you through getting everything set up so that it can be used as a production server. Once the install begins, you can expect to eat up about 25 minutes with the CentOS 4.4 install. Just be sure to create your new root user password before you walk away, or it will still be sitting there waiting when you return. Once Linux is installed, the TrixBox CD will eject itself. You need to be present to remove the CD before the system reboots and begins the Asterisk 1.2.12.1 compile and install. That takes about 25 more minutes to complete.

Securing Your Passwords. When the install is finished and reboots again, log in as root with the password you assigned. Type help-trixbox for a listing of the other passwords that need to be changed. Change them all NOW!

passwd admin
passwd-maint
passwd-amp
passwd-meetme

Securing and Activating A2Billing. This web-based application allows you to generate and issue calling cards to individuals so that they can place calls remotely through your Asterisk server. If you've always wanted to be just like Ma Bell, here's your Big Chance! There's very little that you can do with an AT&T calling card that can't be done as well or better using A2Billing. And, it won't take an M.B.A. to undercut AT&T's calling card rates and still make buckets of money. All you need now are a few customers. But first, a word of caution. Assuming your Asterisk server has web exposure on the Internet, you need to secure the admin and root passwords in this application whether you use it or not. To access the application, go to http://192.168.0.104/a2billing/ using the actual internal IP address of your Asterisk server. Log in as root with a password of myroot. Click on the ADMINISTRATOR tab in the left column and then click Show Administrator. Now click on the Edit button beside each of the two administrator accounts and change the passwords to something secure. If you really would like to learn more about it, documentation for the application is available here. And, if you decide to use the application, you'll need to uncomment six actual dialplan lines in /etc/asterisk/extensions_trixbox.conf and reload Asterisk. Be sure to use a separate DID for this application and point it to custom-callingcard,s,1. We'll have a terrific new VoIP provider with dirt cheap DID rates to tell you about shortly so stay tuned!

;[custom-callingcard]
;exten => s,1,Answer
;exten => s,2,Wait,2
;exten => s,3,DeadAGI,a2billing.php
;exten => s,4,Wait,2
;exten => s,5,Hangup

Securing SugarCRM Contact Management. TrixBox includes the best open source contact management application on the planet, SugarCRM. You access the application with a web browser: http://192.168.0.104/crm/ substituting the private IP address of your Asterisk box, of course. We're going to stop repeating the substitution tip from here on. Whenever you see a reference to 192.168.something, just substitute the private IP address of your TrixBox server. Once the SugarCRM login screen appears, specify admin for your username and password for your password. Whether you use the application or not, change the admin password. It's easy. Just click the Administrator link under Welcome admin. Then click the Change Password button. Complete documentation for the application is available here. If contact management is your thing, knock yourself out, and we'll talk to you next spring when you finish getting everything set up to run your business. It's a great product, but be prepared to invest lots of time in the project if you expect to use it productively. If all you need is a phone dialer and a database that can display CallerID info for your friends and business associates, our AsteriDex product will be a better fit, and it takes about 2 seconds to enter each new person into the AsteriDex database.

If It Ain't Broke, Don't Fix It! Your new TrixBox includes a great utility to keep itself up to date. You simply log into your system as root and issue this command: trixbox-update.sh update. If the update script has also been updated, you'll need to run the command twice. That's the good news. The bad news is that these updates have broken TrixBox systems about as many times as they've fixed a problem. Our advice is to leave the update utility alone for the time being and only run it after someone you trust verifies that it won't bring your system down like a house of cards. The same applies to yum update. In earlier 1.2.x versions, this loaded a new Linux kernel which broke speech applications on many systems. What you'll have with TrixBox 1.2.3 is a very stable, secure system so don't break it by randomly adding new stuff. You've been warned.

Upgrading TrixBox to Support MailCall. The new TrixBox MailCall application needs POP3 and IMAP support for PHP in order to log into and read email messages to you over the phone using your email account. TrixBox 1.2.x versions are missing full PHP-IMAP support. Here's how to install what you'll need for versions 1.2 through 1.2.2. Log into your TrixBox system as root and issue the following commands in order.

cd /root
wget http://nerdvittles.com/trixbox122/libc-client-2002e-14.i386.rpm
wget http://nerdvittles.com/trixbox122/php-imap-4.3.11-2.8.i386.rpm
rpm -Uvh libc*
rpm -Uvh php*
apachectl restart

cd /var/www/html
wget http://nerdvittles.com/trixbox11/test.zip
unzip test.zip
rm -f test.zip

TrixBox 1.2.3 fixed part of the problem by including php-imap but left out the libc-client library so it still won't work without doing the following:

cd /root
wget http://nerdvittles.com/trixbox122/libc-client-2002e-14.i386.rpm
rpm -Uvh libc*
apachectl restart

cd /var/www/html
wget http://nerdvittles.com/trixbox11/test.zip
unzip test.zip
rm -f test.zip

To be sure everything went according to plan, use your web browser now to access http://192.168.0.104/test.php and be sure imap appears in the list of enabled libraries. Once you finish this tutorial, you should be all set to install the MailCall for Asterisk application.

Updating freePBX to the Latest Release. There's a more stable version of freePBX which isn't included in the TrixBox 1.2.3 build. Here's how to install it. Log into your server as root and issue the following commands:

cd /usr/src/
svn co https://svn.sourceforge.net/svnroot/amportal/freepbx/tags/2.1.3 freepbx-2.1.3
cd freepbx-2.1.3
./install_amp

Securing Asterisk. Because of a security vulnerability in the (Cisco) Skinny module of Asterisk, it needs to be disabled. Log into your server as root and edit modules.conf: nano -w /etc/asterisk/modules.conf. Then insert the following line in the [modules] context. Save the file and restart Asterisk: amportal restart.

noload => chan_skinny.so

Activating Bluetooth Support. Once the updates are completed, activate Bluetooth support if you plan to use it with our Follow-Me Phoning proximity detection application. Run setup, down arrow to System Services, press ENTER, down arrow to bluetooth and press the space bar, tab to OK, press ENTER, tab twice to Quit and press ENTER.

Activating Apache HTTPS Support. If you want secure Internet web access to your server, log into your system as root and issue these commands. Once https support is installed, you can access freePBX securely: https://AsteriskServerIPaddress.

yum -y install mod_ssl
shutdown -r now

Asterisk Info Application Is Back. One of the nice applications that previously was bundled in Asterisk@Home was Asterisk Info. It gave a detailed summary of many critical components in Asterisk including a listing of active SIP and IAX peers and registry entries. This is especially helpful when you're setting up new providers and want to see whether you're getting connected successfully. The application vanished in TrixBox 1.0, but it's back in TrixBox 1.1. You can run the application using a web browser pointed to the correct IP address of your server: http://192.168.0.104/. Then choose Asterisk Info from the TrixBox Configuration and Administration page. Or access it directly: http://192.168.0.104/maint/asterisk_info.php.

Simplifying SSH Access. If you're going to be connecting to other servers from your new TrixBox system using SSH or SCP, then build your new RSA key pair now. This lets you use SSH and SCP (secure copy) without having to enter a password each time. You can also automate backups and proximity detection scripts as we've explained previously here. Log in to your new TrixBox server as root. From the command prompt, issue the following command: ssh-keygen -t rsa. Press the enter key three times. You should see something similar to the following. The file name and location in bold below is the information we need:

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
1d:3c:14:23:d8:7b:57:d2:cd:18:70:80:0f:9b:b5:92 root@asterisk1.local

Now copy the file in bold above to your other Asterisk servers, Linux machines, and Macs. There's probably a way on PCs as well, but we've all but given up on that platform where security matters so you're on your own there. From your TrixBox server using SCP, the command should look like the following (except use the private IP address of each of your other Asterisk or Linux servers instead of 192.168.0.104). Provide the root password to your other servers (one at a time) when prompted to do so.

scp /root/.ssh/id_rsa.pub root@192.168.0.104:/root/.ssh/authorized_keys

On a Mac running Mac OS X, the command would look like this (using your username and your Mac's IP address, of course):

For user access only: scp /root/.ssh/id_rsa.pub wardmundy@192.168.0.104:/Users/wardmundy/.ssh/authorized_keys
For full root access: scp /root/.ssh/id_rsa.pub root@192.168.0.104:/var/root/.ssh/authorized_keys

Once the file has been copied to each server, try to log in to your other server from your new TrixBox server with the following command using the correct destination IP address, of course:

ssh root@192.168.0.104

You should be admitted without entering a password. If not, repeat the drill or read the complete article and find where you made a mistake. Now log out of the other server by typing exit.

Installing WebMin. We don't build Linux systems without installing WebMin, the Swiss Army knife of the Linux World. You can use it to start and stop services, check logs, adjust startup scripts, manage cron jobs, babysit your SendMail server, and many, many other tasks that are downright painful without it. If you ever need help from others, WebMin is a great tool for letting others help you.

There are lots of ways to install WebMin. WebMin now is part of the TrixBox yum repository so, after logging in as root, just issue the following command: yum -y install webmin.

WebMin runs its own web server on port 10000. To start WebMin, issue this command: /etc/webmin/start. You access it with a web browser pointed to the IP address of your Asterisk box (i.e. replace 192.168.0.108) at the correct port address, e.g. http://192.168.0.108:10000. Note, https support won't work on port 10000 without a bit of additional tweaking! The login name is root. Then type in your root password and press enter. The main WebMin screen will display. We really don't want the WebMin server starting up each time the OS reboots so do the following. Once you're logged in to WebMin, choose System->Bootup and Shutdown and then click on webmin. Click the No button beside Start at boot time, and then click the Save button. To stop WebMin when you're finished using it, issue this command: /etc/webmin/stop. You can restart it any time you need it, and then use a web browser to access it. But there's no need to waste processing resources. For complete WebMin documentation, click here.

[Note: This appears to be temporarily broken in the latest version of WebMin so try it again in a few days if it hangs during the Net::SSLeay install.] If you're going to be accessing WebMin from outside your firewall, you really don't want to be logging in as root over an unencrypted connection so let's enable https support for WebMin. While still logged into WebMin, click WebMin->WebMin Config->SSL Encryption. Now click Install Net::SSLeay Perl Module. Once the module is downloaded, click the Continue With Install button. The make and make install process will take a minute or two. Once you get the completed sucessfully message, click Return to WebMin. Choose WebMin->WebMin Config->SSL Encryption again. At the bottom of the form, click the Create Now button to create your SSL key. Click Return to WebMin again. Then choose WebMin->WebMin Config->SSL Encryption once more. Change the Enable SSL if available option to Yes, leave the other defaults, and save your changes. Henceforth, you can log into your server using HTTPS: https://TrixBoxIPaddress:10000/.

IP Configuration for Asterisk. We need a consistent IP address or domain name both on your internal network and externally if you expect to receive incoming calls reliably. There are three pieces to the IP configuration: (1) setting the internal IP address of your Asterisk server, (2) configuring a fully-qualified (external) domain name for your new server which will always point to your router/firewall, and (3) configuring your router to transfer incoming Asterisk packets to your Asterisk server. Here's how.

First, log into your server as root using your new password. Now type ifconfig eth0 (that's "e-t-h-zero") then enter, and write down both your inet addr and your HWaddr on the Ethernet 0 interface, eth0. Inet addr is the internal IP address of your Asterisk box assigned by your DHCP server (i.e. your router/firewall). HWAddr is the MAC address of your Asterisk server's eth0 network card. To assure a consistent internal IP address, you can either configure your router/DHCP server to make certain that it always hands out this same address to your Asterisk machine, or you can manually configure an IP address for this machine which is not in the range of addresses used by your DHCP server. Almost all routers now make it easy to preassign DHCP addresses so we prefer option 1. It's generally under the tab for LAN IP Setup or DHCP Configuration and is generally called something like Reserved IP table. Just add an entry and call it Asterisk PBX and specify the IP address and MAC address that you wrote down above. Now each time you reboot your Asterisk server, your router will assign it this same IP addreess.

To assure a consistent external address is a little trickier. Unless you have a static (fixed) IP address, you'll want to use a Dynamic DNS service such as dyndns.org and configure your router to always advertise its external IP address to dyndns.org. DynDNS.org will take care of revising the IP address associated with your domain name when your ISP changes your dynamic IP address. Then you can configure your VoIP provider account using your fully-qualified dyndns.org domain name, e.g. windswept.dyndns.org provides access to our beach house network even though Time Warner cable hands out dynamic IP addresses which change from time to time.

Now you'll need to log into your router and redirect certain incoming UDP packets to the internal IP address of your Asterisk machine. If you want external access to the Apache web server on your Asterisk machine, then map TCP port 80 to the internal IP address of your Asterisk system. For WebMin external access, map TCP port 10000 to your Asterisk system. If you want remote access to your Asterisk system via SSH, then map TCP port 22 to the internal IP address of your Asterisk system. If you want external IP phones or other Asterisk servers to be able to communicate with your Asterisk system, then map the following UDP port ranges to the internal IP address of your Asterisk system:

SIP 5004-5082
RTP 10001-20000
IAX 4569

For more details, read our full article on the subject.

Finally, you'll need to tell Asterisk about some of this. Edit the sip.conf file (nano -w /etc/asterisk/sip.conf) and add the following entries in the [general] section of the file using your fully-qualified domain name for your server and the private IP address range used behind your router/firewall (typically 192.168.0.0 or 192.168.1.0 with most home routers):

externhost = yourdomainname.dyndns.org
localnet=192.168.0.0/255.255.255.0
nat=yes

Designing Your PBX System. For those new to the Asterisk world, we'll be using a web-based GUI to configure Asterisk to meet your needs. Step 1 is to get away from your computer and sit down with a piece of paper. Now lay out how you'd like your new system to operate. How many phones will you have? Will they be software-based phones or good old phones you can put on a desktop? Will they be POTS phones (plain old touchtone phones), cordless POTS phones, SIP phones, IAX phones, or cordless SIP phones? How will you make and receive calls? Are you going to use an existing Ma Bell phone line or VoIP trunk lines from one or more VoIP providers? What should happen when incoming calls arrive? Do you want the caller to get an AutoAttendant message ("Hi. You've reached the Mundy's. Press 1 for Mary, 2 for Ward, or 3 to leave a message.") or do you just want all of your phones to start ringing? What should happen when no one answers or the line is busy? Do you want the calls transferred to a cell phone, another POTS phone, or just sent to voicemail? Which voicemail account? Should all busy phones send callers to the same voicemail account, or do you want one for each phone? What should happen once voicemail arrives? Do you want the phone to ring once a minute? Do you want the message waiting indicator to illuminate? Do you want the voicemail message to be emailed to you? Do you also want it preserved so that you can retrieve it from a touchtone phone? Do you want to be paged with the number of the person that called you?

ATTN: "Type A" Males. With apologies to our female readers, here's a tip for all the guys. If you have a wife (and want to keep her) or if you have teenage daughters (and want to avoid being killed in your sleep), you'd better get most of this PBX design right if you plan to use Asterisk to replace your existing home phone system. Otherwise, the day after you install your new system, a typical discussion with your spouse will begin with something like this: "What was wrong with our old phones that just rang when someone called and I could actually hear what they were saying when I answered?" With that caveat in mind, let's jump right in to freePBX.

Today's Objective. Keeping in mind that there are a million ways to configure and customize a PBX, we're going to walk you through a very simple setup today. Our objective is to get Asterisk and freePBX configured so that you can make a call and receive a call. In our next article, we'll start adding all the bells and whistles. But, for today, we'll show you how to set up an incoming and an outgoing VoIP trunk so you can make and receive free calls (at least in the U.S.) using a free softphone. When no one answers, the call will be sent to voicemail. And, when a voicemail message is left, the message will be emailed to you. We'll leave integration of existing POTS phones and phone lines for another day.

Choosing VoIP Providers. As you will quickly learn, choosing VoIP providers is an art, not a science. And it can be a slippery slope. A provider that is great one day can turn into an absolute nightmare the next. Take BroadVoice, for example. They used to be one of our favorites. Then the CEO left, and the company's business practices, uh, changed to put it charitably. You can read all about it on this forum or at the Better Business Bureau's site. All it takes is a change in leadership or direction at the company headquarters to go from first to worst overnight. So the best advice we can offer about choosing providers is this. Stay Flexible! Don't put all your eggs in one basket. And don't be in a hurry to disconnect your Ma Bell line and transfer your number until you are pretty confident about your provider. Six months is an absolute minimum, and a year is probably better. VoIP providers come and go at about the same pace as fast food restaurants in a new community.

Having said all of that, we have some providers we really like and some that we don't. YMMV! The basic idea in switching to Voice Over IP technology was to save money... not just for the provider, but for you, too. So PRICE MATTERS. There are typically three types of VoIP service: all-you-can-eat at a fixed monthly price, pay-as-you-go at a per minute (or part of a minute) rate, and free. Some providers only offer outbound service, and others offer incoming and outgoing calls. To receive calls, you've got to have an account with a provider that will give you a phone number unless you want to only get calls from other users of that provider's service, e.g. Skype. You don't have to use the same provider for inbound and outbound calls, and you are better off with backup providers for BOTH inbound and outbound calls.

If you select an all-you-can-eat plan, you basically get the right to make (or receive) ONE phone call at a time to a certain geographic area. This may be a state, an area code, or a country depending upon where you live and which provider you choose. The best of these in the U.S. is TelaSIP at $14.95 a month for unlimited US48 calling for the first three months, then $19.95. The runner-up is Axvoice which has a broader variety of plans including an unlimited international calling plan at $22.99 a month. Be aware of the fine print with all-you-can-eat providers. Some such as Teliax don't really offer unlimited calling even though they call it that. What they offer is unlimited calling up to some monthly cap of minutes. For example, with Teliax, up to 1500 minutes a month are "free" and then you pay 2¢ per minute thereafter. They're not really free because you've paid a $24.99 monthly fee for the initial 1,500 minutes. Then there's our old favorite BroadVoice which now offers unlimited calling with a little asterisk. After you drill down to the third level in their web pages, you'll see this in the fine print: "* Significant restrictions apply to Unlimited Plans." If you violate their undefined "normal residential usage patterns", you agree in advance to let them retroactively charge you 5¢ per minute for every call you've made since you signed up... plus $300/hour in in-house legal fees for successful collection. I wonder if they pay their staff attorneys that much? Their terms of use give them unfettered discretion in defining what's appropriate and inappropriate use. And, arguably, even having multiple people in your household use your "unlimited plan" violates their terms of service. So, unless you've recently won the lottery or just enjoy litigation, here's our best advice on BroadVoice: JUST SAY NO!

You'll also want to consider an incoming call provider that gives you one or more DIDs (phone numbers) in regions of some country or countries that you care about. Remember, with a local number, other local folks in that region can call you at no cost. This still matters. TelaSIP will give you a DID in the U.S. with free incoming calls for $5.95 a month. With AxVoice, it's $8.99 but you get three DIDs although there's no way to tell which one's ringing. Our new favorite for incoming calls is les.net at $3.99 a month in the U.S., and they've just added a slew of new cities (over 300 in the U.S. and Canada) which aren't yet shown on their web site. They also have terrific support for Asterisk and will have some more surprises in the next couple weeks.

And then there are pay-as-you-go providers for outbound calling. Usually there are no simultaneous call limitations because you're paying by the minute per call. Some of these providers charge in whole minute increments while others round calls to as little as six second billing increments. With some you get to specify your CallerID number while others always show the calls as Anonymous. Some leave their rates the same for six months or more. Others change their rates almost daily. You don't want to have to visit a web site each time your phone rings to determine what it will cost to pick up the phone. So be alert in choosing a pay-as-you-go provider. The best of the bunch in our opinion is Voxee.com at about a penny a minute for U.S. calls and only slightly more for calls to many international destinations.

Finally there are the (almost) free providers. Here's a good rule of thumb. Enjoy it while it lasts. Don't expect free or even almost free to last forever. And, most importantly, READ THE FINE PRINT. It costs the provider something to offer the service and, if they're giving the service away, there IS a catch. You just have to be smart enough to figure out what it is. The best freebies at the moment are VoipDiscount.com for free outbound calls to numerous countries including the U.S. for four months, FreeDigits.com for free incoming DIDs, free incoming calls, and free incoming fax service, and Stanaphone.com for free incoming DIDs and free incoming calls. See our complete list of VoIP Provider reviews for additional information and setup instructions.

If you just want to experiment with your new system and don't want to cough up much money, here's a good way to get your feet wet. Sign up for a free incoming DID number and free incoming calls with Stanaphone's Stana-IN service and sign up with VoIPDiscount.com for almost free outbound calls up to 300 minutes a week for four months. You'll need a Windows machine to initially sign up for both of these services. See our tutorials for details. You won't have a phone number in your local area code, but folks will be able to call you. If you want a number in your local area code and you live in the U.S., sign up for TelaSIP's basic service at $5.95 a month which gets you a local phone number and free unlimited incoming calls ... one at a time. Outbound calls in the U.S. are 2¢ a minute which gives you a good backup to your free VoIPDiscount outbound calling service. There are no obnoxious terms of service or hidden fees with TelaSIP. Just use the service for residential calling.

Downloading a Free Softphone. Unless you already have an IP phone, the easiest way to get started and make sure everything is working is to install an IP softphone. You can download a softphone for Windows, Mac, or Linux from CounterPath. Or download the pulver.Communicator or the snom 360 Softphone which is a replica of perhaps the best IP phone on the planet. Here's a new IAX softphone for all platforms that's great, too, and it requires no installation: Idefisk. All are free! Just install and then configure with the IP address of your TrixBox server. For username and password, use the extension number and password which we'll set up shortly with freePBX. Once you make a few test calls, don't waste any more time. Buy a decent SIP telephone. We think the best value in the marketplace with excellent build quality and feature set is the $85 GrandStream GXP-2000. It has support for four lines, speaks CallerID numbers, has a lighted display, and can be configured for autoanswer with a great speakerphone. Short of paying over double for the snom 360, that's as good as desktop phones get. If you want to use Asterisk throughout your home, buy a good 5.8GHz wireless phone system with plenty of extensions such as the Uniden 8866 which we use (see ad below) and then purchase an SPA-3000 to connect up both your home phone line and all your cordless phones. Our tutorial will show you how.


Initial Setup of freePBX. You still access freePBX just as you accessed the Asterisk Management Portal (AMP), by pointing a web browser to the internal IP address of your new Asterisk system. Once you get to the main TrixBox screen, choose System Administration and then freePBX. When prompted for your username and password, the username is still maint. Enter the password you assigned to freePBX/AMP when you configured your system. In the old days, AMP came preconfigured with everything they thought you'd need to use it. With the new freePBX architecture, you first have to install and enable the modules you want to use. And now others can write modules to expand the capabilities of freePBX without futzing around in the basic source code. You get to these modules by choosing Tools->Module Admin from the main freePBX menu. Unlike some applications, there's really no reason not to activate all of the available modules since they won't slow down Asterisk. The only performance hit is when you click the Red Bar to reload freePBX. The more modules you've activated, the longer it will take to reload freePBX (which isn't very long) since freePBX queries each module to see if changes need to be applied. So, in the Module Administration screen, click on each Module shown in the list and then Enable the Selected Modules. Now click Connect to Online Module Repository, select all the Modules in the list, and choose Download and Install the available modules. Repeat the drill one more time to get all of the modules from the Online Repository. Click the Red Bar to save your updates. From time to time, you need to revisit this page, connect to the online repository, and upgrade the modules in your freePBX system as new bug fixes are released.

As you can see, there are two types of Modules: Local Modules and Online Modules. Local Modules are the pieces that make freePBX work on your local machine. Online Modules provides access to modules which are available for download over the Internet. And Online Modules tells you which ones are newer than the ones currently on your system. HINT to Rob: Before too long, we wouldn't be surprised to see an option to email you notices when new modules are released or older ones are updated. freePBX is nothing short of fantastic for the Asterisk community if we do say so.

Last but not least, for each Module, there now is online documentation. You can read about all the Module pieces by clicking here. Once you complete the above steps, you're ready to set up your new system.

Configuring freePBX Trunks. When you click the Setup tab in freePBX, the first thing you'll notice is there are a lot more options. Start by adding your Trunks. This works pretty much like it always has. Choose ZAP, IAX2, SIP, or ENUM for each trunk and proceed accordingly. Down the road, the grand plan is to have sample settings for each provider on line here. Very cool!

For our sample setup today, we'll configure SIP trunks for Stanaphone, TelaSIP, and VoipDiscount. For each provider, click on the Setup->Trunks tab in freePBX. Then click Add SIP Trunk. After you complete the entries for each provider, click Submit Changes and then the Red Bar.

StanaPhone Trunk Setup. Here are the entries for the Stanaphone SIP trunk. For Outbound CallerID, enter the phone number assigned to you by StanaPhone. For Maximum Channels, enter 1. Leave the Dial Rules and Dial Prefix blank for the time being.

For Outgoing Settings, enter a Trunk Name of stanaphone. For Peer Details, enter the following using your assigned username and password. Be very careful to match the upper and lower case settings in your assigned password.

host=sip.stanaphone.com
insecure=very
nat=yes
secret=yourpassword
type=peer
username=yourusername

For Incoming Settings, enter a USER Context of from-pstn. This tells Asterisk to process incoming calls through this context in your dialplan. For USER Details, enter the following using your assigned username and password:

canreinvite=no
dtmfmode=rfc2833
host=sip.stanaphone.com
insecure=very
nat=yes
secret=yourpassword
type=peer
username=yourusername

For the Registration String, enter the following using your assigned username, password, and 347 phone number:

yourusername:yourpassword@sip.stanaphone.com/3471234567

Click the Submit Changes button and then click on the Red Bar to save your trunk settings and reload Asterisk. To be sure you have properly registered with Stanaphone, run the Asterisk_Info application which we installed above using your correct IP address: http://192.168.0.108/maint/asterisk_info.php. Under SIP Peers, you should see an entry for sip.stanaphone.com showing a state of Registered. If not, check your username and password entries for typos.

TelaSIP Trunk Setup. Here are the entries for the TelaSIP SIP trunk. For your Outbound Caller ID, fill in the local phone number provided by Telasip. For Maximum Channels, enter 1. For Dial Rules, enter the following:

1|NXXNXXXXXX
NXXNXXXXXX

In the Outgoing Settings section, name your trunk telasip-gw and then enter the following PEER details using your TelaSIP-assigned username and password:

context=from-pstn (if that doesn't work use: from-trunk)
dtmfmode=rfc2833
host=gw3.telasip.com
insecure=very
secret=yourpassword
type=peer
username=yourusername
fromuser=yourusername
sendrpid=yes

Leave the Incoming Settings User Context and User Details blank. For your Registration string, enter the following: yourusername:yourpassword@gw3.telasip.com using your actual username and password assigned by TelaSIP. Click Submit Changes and then the red bar to restart Asterisk. Use Asterisk_Info as we did with Stanaphone to be sure you are registering successfully with TelaSIP.

VoipDiscount Trunk Setup. Here are the entries for the VoipDiscount SIP trunk. Create a SIP trunk for the service with a Trunk Name of voipdiscount. VoipDiscount doesn't support an outbound CallerID number so leave it blank. The Outgoing Dialing Rules in the U.S. should look like this:

001+NXXNXXXXXX
00+1NXXNXXXXXX

Add the following PEER Details in Outgoing Settings using your own username (in three places!) and password. Leave the Incoming Settings blank.

allow=ulaw&alaw
authuser=yourusername
disallow=all
fromdomain=sipdiscount.com
fromuser=yourusername
host=sip.sipdiscount.com
insecure=very
nat=yes
qualify=yes
secret=yourpassword
sendrpid=yes
type=peer
username=yourusername

For the Registration String, enter the following using your own username and password:

yourusername:yourpassword@sip.sipdiscount.com

Click the Submit Changes button and click the Red Bar to update Asterisk. Use Asterisk_Info as we did with Stanaphone to be sure you are registering successfully with VoipDiscount.

When you have your Trunks set up, you'll need a way to call out (Outbound Routes), to call in (Inbound Routes), and to process incoming calls: a Digital Receptionist, a Call Queue, a Custom Application, DISA, or a phone to ring (Extensions). For today, we'll get the phones to ring. Then we'll tackle the other options in Parts II and III.

Configuring Outbound Routes. Outbound routes are the rules that determine how calls that are dialed from an extension on your system get processed. The idea here is that you set up a list of priorities. Then, based upon the number dialed, the outbound rules figure out how to route the call. We're going to start with a simple Outbound Route called Everything which will process all calls that are not handled by another Outbound Route. Click Setup->Outbound Routes->Add Route and enter the following:

Route Name ... Everything
Route Password ... [leave it blank]
Pin Set ... [leave it blank]
Emergency Dialing ... [leave it blank]
Dial Patterns: (adjust these if you wish to permit international calls!)
1NXXNXXXXXX
NXXNXXXXXX
Trunk Sequence:
0 sip/voipdiscount
1 sip/telasip-gw

Once you've made all the entries, click the Submit Changes button and then the Red Bar to reload Asterisk. You will be able to place calls by dialing either an area code and phone number or 1 plus an area code and phone number. For international callers, our previous articles will walk you through configuring the dial strings to support various countries. Now you should see two Outbound Routes in your route list. We want to delete the other route so just click on it and then choose Delete Route and click the Red Bar to save your changes. Now there should be only the Everything route in your Outbound Routes list. We'll leave it like that for today, but down the road, we'll add options for emergency calls, toll-free calls, in-state calls, and international calls. After we make those additions, the Everything route will be used as our lowest priority catch-all for calls that don't qualify for processing by another route.

Setting Up Extensions. To add a new extension and voicemail account to your system, click Setup->Extensions->Add SIP Extension and enter the following:

Extension Number ... 500
Display Name ... Office
Extension Options
Direct DID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
DID Alert Info ... [leave blank]
Outbound CID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
Emergency CID ... [your 10-digit TelaSIP phone number if you have one; otherwise, leave blank]
Record Incoming ... On Demand
Record Outgoing ... On Demand
Device Options
secret ... 1234
dtmfmode ... rfc2833
Voicemail & Directory ... Enabled
voicemail password ... 1234
email address ... yourname@yourdomain.com [if you want voicemail messages emailed to you]
pager email address ... yourname@yourdomain.com [if you want to be paged when voicemail messages arrive]
email attachment ... yes [if you want the voicemail message included in the email message]
play CID ... yes [if you want the CallerID played when you retrieve a message]
play envelope ... yes [if you want the date/time of the message played before the message is read to you]
delete Vmail ... yes [if you want the voicemail message deleted after it's emailed to you]
vm options ... callback=from-internal [to enable automatic callbacks by pressing 3,2 after playing a voicemail message]
vm context ... default

Configuring Inbound Routes. Just as we had to tell Asterisk how to process outbound calls, you also have to define what to do with incoming calls from each of your inbound trunks. Be aware that different service providers have implemented SIP and IAX differently. One of the best providers for proper SIP implementation is TelaSIP because you can route incoming calls based upon the DID numbers associated with each trunk. So you could have one incoming trunk from TelaSIP with multiple DID numbers (for each of your children, for example). Each DID then could be routed to a specific extension, and each extension could have its own CallerID number for outbound calls ... even though you might only have one TelaSIP trunk line. So, to outside callers, it would appear that each individual had his or her own phone line even though everyone might be sharing one or two trunks.

For today, we'll get a default inbound route established, and we'll save the gee whiz stuff for later. To create a Default Inbound Route for your calls, choose Setup->Inbound Routes->Add Route. Then enter the following:

DID Number ... [leave blank]
CallerID Number ... [leave blank]
Zaptel Channel ... [leave blank]
Fax Extension ... disabled
Fax Email ... [leave blank]
Fax Detection Type ... none
Pause After Answer ... [leave blank]
Privacy Manager ... no
Alert Info ... [leave blank]
Destination: ... Core: Office 500

Click Submit and then OK when you're warned that this will create a default incoming route for your calls. Down the road as you add additional incoming routes, the new routes will take precedence unless there's no matching DID in which case this default route will be used.

If you want to create a separate incoming route for your Stanaphone calls just to see how it works, click Add Incoming Route and enter the following:

DID Number ... [your 10-digit Stanaphone number]
CallerID Number ... [leave blank]
Zaptel Channel ... [leave blank]
Fax Extension ... freePBX default
Fax Email ... [leave blank]
Fax Detection Type ... NVfax
Pause After Answer ... 2
Privacy Manager ... no
Alert Info ... [leave blank]
Destination: ... Core: voice mailbox 500

The trick to learn here is that if you want an incoming DID to go straight to voicemail, you need a slight pause to let Asterisk get properly set up for the call or the first couple seconds of your voicemail announcement will be cut off. By adding two seconds of fax detection, everything will work swimmingly.

Allowing Anonymous Inbound SIP Calls. One final step, and your incoming calls should start arriving without a "this number is not in service" message. Choose Setup->General Settings and scroll to the bottom of the page. Under Security Settings, change Allow Anonymous Inbound SIP Calls from No to Yes and click Submit Changes and then the Red Bar. Once this change is made, inbound calls from Stanaphone will work reliably.

Activating Email Delivery of Messages. When you're out and someone leaves you a voicemail message or a fax, TrixBox and freePBX will let you forward that voicemail message or fax to your email address as a .wav file or PDF document. Or you can have the system send an instant message to your cell phone or pager telling you who called, what their phone number was, and how long a voicemail message the person left for you. Or you can do both. In addition, you can tell the system whether to delete the voicemail from your Asterisk server after sending it to your email account. In short, you now can manage all of your incoming email and voicemail from a single place, your email client.

You don't have to be a Linux expert to make this work. But you do have to master one concept. The Linux SendMail server imposes restrictions on who can send messages to eliminate the risk of spam. So ... THE SENDER DOMAIN FOR OUTBOUND EMAIL MESSAGES MUST MATCH THE SENDER DOMAIN OF YOUR ASTERISK SERVER AND YOUR SENDMAIL SERVER. Some Internet Service Providers also block email messages from downstream SendMail servers to reduce SPAM. Try the steps below to determine if the latter is a problem.

First, make this adjustment to the /etc/hosts file on your server. Edit the hosts file: nano /etc/hosts. Move the cursor to the second line which reads 127.0.0.1 asterisk1.local , and then move the cursor over the first letter of the first domain name shown, usually asterisk1.local. Now type in trixbox.dyndns.org and add a space after your entry. Don't erase the existing entry! Save your settings: Ctrl-X, y, enter. Now restart network services on your Asterisk machine: service network restart.

While not required for delivery of email messages, you'll still want to modify the email message which delivers your voicemails so that it includes IP address of your Asterisk system. You'll actually click on this link in the email messages to retrieve your voicemails over the web so make sure the address is Internet accessible. Also, don't do this using the TrixBox editor, or you'll mess up the formatting of the email message. You can download a fresh copy here if you need it. Instead, use nano: nano -w /etc/asterisk/vm_email.inc. Press Ctrl-W, type AMPWEBADDRESS, and press the enter key. Delete the word AMPWEBADDRESS and then type either the fully-qualified domain name for your Asterisk server or the private IP address if you only want to read your emails from behind your firewall. When you start typing, the text display may jump all over the place because of word wrap. Don't freak out. You haven't messed anything up. Once you complete your entry, don't erase or change anything else. Save the file: Ctrl-X,Y, then enter.

This step IS required to get emails delivered. Edit vm_general.inc: nano -w /etc/asterisk/vm_general.inc. Change the serveremail entry of vm@asterisk to vm@trixbox.dyndns.org. Then save your configuration and restart Asterisk: amportal restart. To get faxes delivered, adjust the Email From address of the faxes in freePBX->Setup->General Settings: fax@trixbox.dyndns.org. Note that these "from" addresses don't actually have to be working email addresses. They just need to match the domain that was entered in the hosts file and in the SendMail config file (below).

While still logged into your server as root, switch to the directory where the SendMail configuration file is stored: cd /etc/mail. Make a backup of the config file: cp sendmail.cf sendmail.cf.bak. Then issue the following command: echo CGtrixbox.dyndns.org >> sendmail.cf. Now restart SendMail on your server: /etc/rc.d/init.d/sendmail restart.

If your voicemails and faxes still don't get delivered to your email accounts, your ISP may be blocking downstream mail servers (that's you). Take a look at this link which will show you how to designate your ISP as your SMTP smart host using SendMail.

Activating the Nerd Vittles Weather Forecasts in TrixBox. TrixBox 1.2.3 includes the Flite text-to-speech engine as well as the Nerd Vittles weather forecasting system. To use it, just dial 611 from a phone on your system and enter a 3-character airport code to retrieve the weather forecast. TrixBox comes with support for about 50 airports. You can easily expand it to 1,000 airports by following along in Part II of our Weather Tutorial. It'll take you about 15 minutes. For complete instructions, read the full article here.

Activating Nerd Vittles CallerID on Steroids in TrixBox. We've previously written an application that will let your Asterisk PBX look up CallerID names for incoming calls from Google, and AnyWho, and your own AsteriDex database. The article explaining how to configure and install calleridname.agi is available here. And you can download the application here. Once you have installed and configured the AGI script, you can skip over the autoattendant changes mentioned in the article. Instead, make this simple change to your freePBX extensions.conf file. Point your brower to your TrixBox system and choose System Administration->Config Edit->extensions.conf. Then click on macro-user-callerid in the left column. Delete the existing contents and replace it with the following. NOTE: This only works with freePBX 2.1.3 so be sure you have that version installed before making the following change! Better yet, make a backup copy of extensions.conf first.

[macro-user-callerid]
exten => s,1,GotoIf($["${CHANNEL:0:5}" = "Local"]?report)
exten => s,n,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start)
exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM})
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => s,n,GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?chknamelen)
exten => s,n,Set(CALLERID(all)=${AMPUSERCIDNAME} < ${AMPUSER}>)
exten => s,n(chknamelen),GotoIf($[${LEN(${CALLERID(name)})} > 0]?report)
exten => s,n,AGI(calleridname.agi)
exten => s,n(report),NoOp(Using CallerID ${CALLERID(all)})

; overrides callerid out trunks
; arg1 is trunk
; macro-user-callerid should be called _before_ using this macro

Click the Update button to save your changes and then reload Asterisk. Activate the services you wish to use in calleridname.agi making sure you've adjusted permissions on the file by following our previous tutorial, and you're all set.

Useful Functions on Your TrixBox System. Here's the complete list of functions that will work out of the box from any extension on your TrixBox system:

  • 611 The Latest Weather Forecast
  • *62 Schedule a Wakeup Call
  • *65 Decipher Extension Number of Any Phone
  • *70 Activate Call Waiting
  • *71 Deactivate Call Waiting
  • *72 Enable Call Forwarding (include forwarding number to avoid prompt)
  • *73 Disable Call Forwarding
  • *90 Enable Call Forwarding on Busy (include forwarding number to avoid prompt)
  • *91 Disable Call Forwarding on Busy
  • *78 Enable Do Not Disturb
  • *79 Disable Do Not Disturb
  • *97 Access Voicemail for Calling Extension
  • *98 Access Voicemail with Prompt for Mailbox Number
  • The Nerd Vittles Collection. We'll wrap it up for this week by pointing you to some tutorials for the Nerd Vittles applications that are preloaded in our VMware TrixBox build. You may also want to add these to your stand-alone TrixBox system. Each one takes less than 15 minutes to install.

    AsteriDex - The Poor Man's Rolodex (http://TrixBoxIPaddress/asteridex/)

    NewsClips for Asterisk - Get the News By Telephone (Dial 511)

    MailCall for Asterisk - Get Your Email By Telephone (Dial 555)

    Weather Reports by Airport Code - Get the Latest Weather Forecasts for 1,000 U.S. Cities (Dial 611)

    Telephone Reminders for Asterisk - Appointment Reminders By Telephone (Dial 123)

    GabCast Studio for Asterisk - Create and Play PodCasts Using Your Phone (Dial *422 and 422)

    TeleYapper Message Broadcasting System - Deliver Appointment Reminders and Important Info to Any Custom Calling List (Dial 674)

    Where To Go From Here. If you're new to the Asterisk world, you have lots of fun (and learning) ahead of you. After you finish this tutorial, you'll want to get plugged into the TrixBox Forums. That's the place to ask questions after you do some reading. Posting support questions on Nerd Vittles just doesn't work because of the cumbersome blog format. Don't email me questions either! We only accept thank you notes. Finally, take a look at our catalog of articles, projects, and Asterisk resource links. You'll find just about everything you'll ever need there. Enjoy!


    Some Recent Nerd Vittles Articles of Interest...

    Introducing Nerd Vittles’ PBX-in-a-Flash

    This is a research week for us, but we wanted to take a minute or two and tell you what we’re working on. It’s called PBX-in-a-Flash™, and it’s a self-contained PBX on a flash drive that includes the best of TrixBox, and Asterisk®, and freePBX, and Apache, and MySQL, and phpMyAdmin, and, of course, all the Nerd Vittles goodies. All you’ll do is plug it into your favorite Windows machine and watch it whir away installing everything with just one mouse click. We hope to have a version for Linux as well down the road a bit. When the install finishes, you can remove the flash drive and keep it as a backup, or you can erase the flash drive and use it to store your favorite music or photos. Or, better yet, pass it along to a friend. Then crank up the software in a window on your desktop machine, plug in a phone or load your softphone, and you’re in the IP telephony business with your very own PBX, weather station, news center, and kitchen sink.

    Down the road, we’ll find someone to actually bundle PBX-in-a-Flash™ with their flash drives. But, for now, we’re going to play Santa Claus early. To celebrate our 150th column, we’re giving away one of these each week for the next six weeks to the person who leaves the best comment on Nerd Vittles. It can be a tip, a correction, or just a comment about something on Nerd Vittles that really helped you get started with Asterisk. Be sure to post your comment with a correct email adddress. It won’t be published on the site but will be used to contact you if you are our Commenter Extraordinaire. All winners should expect to receive your PBX-in-a-Flash™ units before Christmas … this year. It’s our way of thanking all of you for making Nerd Vittles one of the best Asterisk resources on the web.

    P.S. A new, stable TrixBox 1.2.2 is now available including a new VMware build. Make sure you apply the following patch after installation. Thanks, Andrew!


    Nerd Vittles Fan Club Map. Thanks for visiting! We hope you’ll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don’t know the difference in the last two, here’s the best definition we’ve found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We’re always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you’re visiting as well.

    Nerd Vittles Demo Hot Line. You now can take a number of Nerd Vittles projects for a test drive… by phone! The current demos include NewsClips for Asterisk (latest news headlines in dozens of categories), MailCall for Asterisk with password 1111 (retrieve your email by phone), and Nerd Vittles Weather Forecasts by U.S. Airport Code. Just call our number (shown in the left margin) and take any or all of them for a spin. The sound quality may not be perfect due to performance limitations of our ancient Intel 386 demo machine. But the price is right.

    Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host up to 6 domains with 30GB of disk storage and 750GB of monthly bandwidth. Free domain registration is included for as long as you have an account. That almost doubles last month’s deal, and it really doesn’t get any better than that. Their hosting services are flawless! We oughta know. We’ve tried the best of them. If you haven’t tried a web hosting provider, there’s never been a better time. Just use our link. You get a terrific hosting service, and we get a little lunch money.

    Want More Projects? For a complete catalog of all our previous Asterisk projects, click here. For the most recent articles, click here and just scroll down the page.

    Headline News for the Busy Executive and the Lazy Loafer. Get your Headline News the easy way: Planet Asterisk, Planet Gadget, Planet Mac, and Planet Daily. Quick read, no fluff.

    Got a PDA or Web-Enabled Smartphone? Check out our new PDAweather.org site and get the latest weather updates and forecasts from the National Weather Service perfectly formatted for quick download and display on your favorite web-enabled PDA, cellphone, or Internet Tablet. And, of course, it’s all FREE!

    Introducing Version 2 of the Plug-And-Play Asterisk IP PBX for Windows

    NOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk® has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.

    It's birthday week at Nerd Vittles, and today you get the party favor as we introduce the second generation of our free turnkey (aka preconfigured) Asterisk system: nv-TrixBox-1.1.2. As with the first version, it runs on the desktop of any Windows XP home or office computer. If you want a state-of-the-art phone system, look no further. Out of the box, it supports eight extensions and two lines with integrated voicemail and immediate email delivery of your incoming voicemail messages. To add additional extensions takes about 5 seconds. This PBX features the latest build of Asterisk (1.2.12.1) and is just the ticket for a small business or a school or even a fraternity or sorority house. It's also perfectly suited for your home. You get every imaginable PBX telephony feature including music on hold, call forwarding, and call transfer as well as a preconfigured AutoAttendant which lets your friends and colleagues direct an incoming call to any of your extensions or even your cellphone. For those with the magic password, you can even dial in and get dialtone to make five hours of free calls each week to dozens of countries around the world including all of the U.S. and Canada, most of Europe, South and Central America, Australia and all your Far East favorites including China, Taiwan, Russia, and Japan. And the total cost: about $12.50 for each three months of service. All incoming calls are free, and you even get your very own area code and phone number to pass out to your friends that are still chained to plain old telephones or cellphones.

    And, yes, all your favorite Nerd Vittles applications are preinstalled and ready to go including weather forecasts for 1,000 airports, MailCall for Asterisk to read you your email messages, NewsClips for Asterisk to read you the news, the AsteriDex robodialer complete with a web interface to place your outbound calls and to serve up customized CallerIDs for your incoming calls, and our new GabCast (podcasting) Player for Asterisk. Last but not least, you get all of the bundled TrixBox 1.1 applications including the latest upgrade of freePBX (2.1.2), SugarCRM, Samba for Windows networking, FTP and SSH support, WebMin, PHP, MySQL, Perl, Apache, SendMail, integrated fax-to-email support, calling card billing, and more. And it all runs quite peacefully in a CentOS 4.3 Linux wrapper with the 2.6.9-34 Linux kernel which doesn't appear to have the timing problems that reared their ugly heads in CentOS 4.4 and TrixBox 1.2. We've used Andrew's trixbox numbering scheme to indicate that this build began with TrixBox 1.1 and includes the 1.1.1 updates as well as the latest versions of Asterisk and freePBX. Hence, version 1.1.2 is born. While it's not quite the latest and greatest everything that you'd find in TrixBox 1.2, it has one advantage running on almost all VMware Windows platforms: it works! And, to the Tinkerers of the World, a word of caution: don't attempt to run yum update or trixbox-update.sh on this build, or you'll break it. freePBX updates are safe using Tools->ModuleAdmin->Connect to Online Repository.

    Prerequisites. To take advantage of all this magic, there are only three things you really need that aren't provided here. First, you'll want a desktop computer from a reputable manufacturer that is less than two years old. It should be running a fully-patched, current version of Windows XP with at least 384MB of RAM and 3 spare gigs of disk space. The more RAM the better, and 1GB is ideal if you'll be using your Windows desktop for other simultaneous tasks. Second, a broadband Internet connection with a network firewall/switch that hands out internal IP addresses using DHCP is required. Finally, you'll need to set up accounts with two Internet Telephony Hosting Providers (ITHPs). And we recommend you go for three! That's where the $12.50 comes in. Everything else you'll need can be downloaded at no cost using links in this article. So let's get started.

    Installing the VMware Player. VMware is virtualization software which lets you run another operating system on your desktop. The TrixBox/Asterisk PBX application runs under CentOS Linux which is a RedHat Linux derivative. Your desktop is Windows XP, hence the need for VMware. The VMware Player software is free, and it lets you "play" the nv-trixbox-112 prebundled Linux application in a window on your Windows Desktop. On a current generation PC with plenty of RAM, this VMware application runs as fast as Asterisk on a dedicated Linux machine so don't worry too much about performance. Based upon our testing, it's a non-issue. We're going to provide the preconfigured application (all 658.29 megabytes of it!), but you'll first need to download the free VMware Player and install it on your Windows system. Just follow the prompts and accept the defaults. Once the install completes, reboot your Windows machine.

    Today's Game Plan. As was true in version 1 of nv-trixbox, what we've done is build a TrixBox 1.1 system from the ground up. Then we loaded all the Linux, TrixBox, and freePBX updates through version 1.1.1 in addition to the latest builds of Asterisk and freepBX. Then we added the dozens of enhancements which we write about each week. Finally we configured the system so that it's ready to go ... out of the box! Once you secure the system with your own passwords and plug in the account names and passwords provided by your ITHPs, you're all set. We'll walk you through plugging in IP telephones, or regular cordless telephones such as our Vtech favorite (below) using a Sipura SPA-1001 (under $60 on Froogle), or downloading a free IP softphone. And, in about 15 minutes, you're done! Phones ring, voicemail works, voicemail messages get delivered to your email account, and music on hold works. We've even provided a working Stealth AutoAttendant that we'll tell you about shortly. And, for all our Mac fans, not to worry. VMware will have a player for your shiny, new Intel-based Mac shortly. Sign up for the beta here.


    While you're enjoying your new phone system, you can read all about TrixBox and Asterisk and freePBX using our Quick Reference Guides, and then you can reconfigure the system to your heart's content. If you happen to break something, simply start over by reinstalling the VMware image (which hopefully you will zip up and burn to a CD for safekeeping). In exchange, you'll avoid the all-day knuckle drill of getting everything set up again from scratch. For those that are already TrixBox addicts, you may want to install this version just to take a look at how we've integrated most of the tips and tricks we've written about this past year. And feel free to share your own enhancements as comments to this article. We'll update the VMware image from time to time to take advantage of everyone's suggestions.

    Let me also offer my usual apology to our foreign friends. This project necessarily required some assumptions in order to preconfigure everything. So here they are. We've assumed that you live in the United States, and that you place calls by dialing a 1 + a 3-digit area code + a 7-digit number or by dialing a 3-digit area code and a 7-digit number. Our out-of-the box configuration can be easily changed to support other telephone systems and dialplans around the world. Ninety per cent of our readers are in the United States so the system was built with that in mind. We've also left international calling out of the dialplan. It, too, can be added easily. The reason we left international calling out was to minimize the risk of abuse and associated financial problems. While many international calls are free or almost free with the providers we are recommending, there are numerous locations (including most countries surrounded by water not to mention cruise ships circling the globe) where telephone calls are still VERY expensive. Our recommendation is to adjust your dialplan to accommodate international calls where you know what the cost of the calls will be and you're willing to absorb those costs. One other cautionary note, and we'll get started. As configured, this system does not support 911 calls. Some ITHPs support 911, but the ones we're going to be talking about today do not. So plan accordingly NOW!

    Finally, a word about bandwidth. This application is huge. The download weighs in at over 700MB. Don't even try it with a modem! Bandwidth to cover downloads costs money. We've sprung for a terabyte of bandwidth each month just to support downloads of this application ... which is and always will be free. Funding for this bandwidth was provided by some generous readers of our past columns. Thank you! If there are sufficient future donations during the coming months, we'll buy additional bandwidth. Otherwise, the application will vanish when the terabyte of bandwidth is exhausted. It will be available again on the 11th day of the coming month until the terabyte is once again exhausted. So, as they say, the early bird ...

    Installing nv-TrixBox 1.1.2a. After you have the VMware Player installed, you're ready to download today's application. If you know how to use BitTorrent, please grab the torrent file from here and save our precious bandwidth. Otherwise, our good friends at VMwarez.com and MojoMonster.com have agreed to host this download. So just click here or BubbaPCguy's mirror, and download the file. If, for some reason, those sites are down, you can download the image from our site by clicking here. Then save the zipped file to your Windows Desktop.

    Once the download finishes, click on the nv-trixbox-112a.zip file on your Desktop. Choose extract all files. When prompted for the destination to unarchive the files, type C:trixbox and press Enter. Have a cup of coffee while the archive decompresses. When it's finished, run the VMware Player. Accept the license agreement and then browse to the trixbox folder on Drive C and select trixbox.vmx. If you get an error about a missing IDE drive, just tell VMware not to look for it again and continue. When prompted whether to create a new identifier, choose Create and click OK. The Linux Kudzu Configuration Utility may load advising you that it can't find my network card in your computer. Move your cursor to the VMware Player window and click once to give it focus. Then press Enter to run the utility. With Remove Configuration highlighted for the network card, press Enter again. When Configure your network card is highlighted, press Enter again. Finally, when the Configure TCP/IP screen appears, press the Space Bar to select Use Dynamic IP Configuration. Then tab to the OK button and press Enter. Linux will whir away for a minute or two and boot your TrixBox system.

    At the Linux login prompt, type root for your username and press Enter. Then type password for your password and press Enter again. We're not going to remind you to press Enter any more. After entering commands in Linux, you press Enter to execute them. Now you're an expert! Once you're logged in, your TrixBox server will tell you the private IP address for your system (to access it with a web browser). Write it down! Now issue the command ifconfig and write down the MAC address of your network card: HWaddr. We'll need them both in a minute.

    NOTE: If, for some reason, you get an error about a mismatched IP and MAC address when trixbox-112a loads or if no IP address is shown once you log in as root, it means you've lost Internet connectivity. You can restore it easily once you're logged into your system as root. Just issue the following commands:

    cd /root
    ./fixmacaddr

    Securing Your TrixBox System. You don't leave your keys in your car at a shopping center, and you don't run a Linux system with a root password of password. There are numerous passwords on this system. If you're going to be the one and only administrator, we recommend setting them all to the same, secure password. Don't forget it, or you go back to Go! Now enter the following commands to reset the passwords:

    passwd
    passwd admin
    passwd-maint
    passwd-amp
    passwd-meetme

    We don't recommend exposing your Asterisk system to the public Internet unless you are an expert in all things Internet ... especially security. This is even more true with this TrixBox system. There are lots of applications running that crackers love to attack: SendMail, FTP, Windows Networking, Apache Web Server, PHP, and even Asterisk. As delivered, this system includes a Windows share of the entire TrixBox system which is wide open and requires no password to access it. This makes it easy for you to copy stuff to your new system from any Windows, Mac, or Linux machine. It also makes it incredibly easy for an outsider to totally destroy your system. That's why you made a backup CD of the nv-trixbox-112.zip file. Right?

    Securing and Activating A2Billing. This web-based application allows you to generate and issue calling cards to individuals so that they can place calls remotely through your Asterisk server. If you've always wanted to be just like AT&T, here's your Big Chance! There's very little that you can do with an AT&T calling card that can't be done as well or better by you using A2Billing. And, it won't take an M.B.A. to undercut AT&T's calling card rates and still make buckets of money. All you need now are a few customers. But first, a word of caution. Assuming your Asterisk server has web exposure on the Internet, you need to secure the admin and root passwords in this application whether you use it or not. To access the application, go to http://trixboxIPaddress/a2billing/ using the actual internal IP address of your Asterisk server which you wrote down. Log in as root with a password of myroot. Click on the ADMINISTRATOR tab in the left column and then click Show Administrator. Now click on the Edit button beside each of the two administrator accounts and change the passwords to something secure. If you really would like to learn more about it, documentation for the application is available here. And, if you decide to use the application, you'll need to uncomment six actual dialplan lines in extensions_trixbox.conf and reload Asterisk. But we'll save that for another day.

    Securing SugarCRM Contact Management. TrixBox includes the best open source contact management application on the planet, SugarCRM. You access the application with a web browser: http://trixboxIPaddress/crm/ substituting the private IP address of your Asterisk box, of course. Specify admin for your username and password for your password. Whether you use the application or not, change the admin password. It's easy. Just click the Administrator link under Welcome admin. Then click the Change Password button. Complete documentation for the application is available here. If contact management is your thing, knock yourself out, and we'll talk to you next spring when you finish getting everything set up to run your business. It's a great product, but be prepared to invest lots of time in the project if you expect to use it productively.

    Reserving An IP Address in Your Router. Your PBX has to consistently boot up with the same IP address or your phones (and calls) won't be able to find the Mother Ship. Since we're using DHCP to initially obtain the IP address, we need to tell your router to always hand out this same address to your TrixBox system. Almost all routers make it easy to preassign DHCP addresses. Use a web browser to access your router's configuration screens. What we're looking for is generally under the tab for LAN IP Setup or DHCP Configuration and is usually called something like Reserved IP table. Just add an entry and call it Asterisk PBX and specify the IP address and MAC address that you wrote down above. Now each time you reboot your Asterisk server, your router will assign it this same IP addreess.

    Linux 101. If you're new to Linux and/or Asterisk, here are a few commands you'll need from time to time. And, if you didn't already know, you don't just pull the plug on a Linux system ... even if it's running in a window on your Windows Desktop. Linux caches lots of stuff to speed up processing. So always shut things down gracefully if your data matters.

    df -h ... Free disk space remaining on your Linux system. Be sure you always have the required 3GB of Windows space for this app!
    logout ... Logs you out of the Linux system.
    Ctrl-Alt ... Gives your Windows cursor back and lets you run other Windows apps until you click again in the nv-TrixBox window.
    asterisk -r ... Runs the Asterisk Command Line Interface (CLI) after you've logged in as root.
    quit ... Exits gracefully from the Asterisk CLI
    amportal restart ... Restarts Asterisk.
    /etc/webmin/start ... Starts up WebMin, the Swiss Army Knife of Linux. Access it with a web browser: https://TrixBoxIPaddress:10000/
    shutdown -h now ... Shut down your Linux system right now. Wait for VMware Player window to close!
    shutdown -r now ... Reboot your Linux system right now.
    nano -w filename ... Edit any file in your Linux system. Ctrl-X, Y, then Enter saves your changes.
    cd dirname ... Changes to another directory below current directory.
    cd /dirname ... Changes to another directory below the root directory.
    ls ... The Linux equivalent of dir to get a directory listing.
    cd /var/www/html ... Home of the TrixBox web server files accessed at http://TrixBoxIPaddress/ or https://TrixBoxIPaddress/
    cd /var/lib/asterisk/agi-bin ... Home of the TrixBox and Asterisk scripts for Asterisk apps.
    cd /var/lib/asterisk/sounds ... Home of Allison and all the voices prompts that make up the Asterisk system.
    cd /etc/asterisk ... Home of all the Asterisk, TrixBox, and freePBX configuration files.

    Adding Plain Old Phones. Before your new PBX will be of much use, you're going to need something to make and receive calls, i.e. a telephone. For today, you've got three choices. Option #1 and the best home solution is to use a Plain Old Telephone or your favorite cordless phone set (with 8-10 extensions) if you purchase a little device (the size of a pack if cigs) known as a Sipura SPA-1001. It's under $60. Be sure you specify that you want an unlocked device, meaning it doesn't force you to use a particular service provider. Once you get it, plug the SPA-1001 into your LAN, and then plug your phone instrument into the SPA-1001. Your router will hand out a private IP address for the SPA-1001 to talk on your network. You'll need the IP address of the SPA-1001 in order to configure it to work with Asterisk. After you connect the device to your network and a phone to the device, pick up the phone and dial ****. At the voice prompt, dial 110#. The Sipura will tell you its DHCP-assigned IP address. Write it down and then access the configuration utility by pointing your web browser to that IP address.

    Once the configuration utility displays in your web browser, click Admin Login and then Advanced in the upper right corner of the web page. When the page reloads, click the Line1 tab. Scroll down the screen to the Proxy field in the Proxy and Registration section of the form. Type in the private IP address of your Asterisk system which you wrote down previously. Be sure the Register field is set to Yes and then move to the Subscriber Information section of the form. The preconfigured extensions are set up as 500 through 508 with voicemail activated for extension 500 presently. To keep things simple, enter House Phone as the Display Name. Enter 500 as the User ID. Enter 1234 as the Password, and set Use Auth ID to No. Click the Submit All Changes button and wait for your Sipura to reset. In the Line 1 Status section of the Info tab, your device should show that it's Registered. You're done. Pick up the phone and dial 611 to get a current weather report or dial 511 to get today's news headlines.

    Using an IP Softphone. If you're like us, you've gone to all this trouble downloading your fancy new PBX, and you sure as hell don't want to wait a week for your Sipura 1001 to arrive before trying it out. So here's the quick and dirty solution. There's software that will run on your Windows, Mac, or Linux desktop that acts like a telephone. You obviously need speakers and a microphone on your system for this to work. Assuming you have those, go to CounterPath's web site and download X-Lite for your favorite OS. There's a manual there, too, but you probably won't need it. Once the download completes, click on it to start the install. Accept the obnoxious license agreement and install the software in the default directory. Unless you want X-Lite to load every time you restart your machine, uncheck the Launch on Startup checkbox. Reboot your system and, if it's also running your TrixBox system, restart it first. Then run the X-Lite application. Click No to turn off X-Lite's spyware. When the "SIP Accounts" window opens, click the Add button and fill in the following data:

    Display Name ... House Phone
    User name ... 500
    Password ... 1234
    Auth. User Name ... 500
    Domain ... the IP address of your TrixBox system

    Leave the other defaults and click on the Check Voicemail tab. For the Number to Dial to Check Voicemail, enter *97. Then click OK and Close. If your Windows Firewall is doing what it's supposed to, it will probably block the connection to your Asterisk system. When prompted, tell it to allow future connections. If this happens and X-Lite does not register with your Asterisk system, click the Down Arrow at the top of the softphone (Show Menu). Click SIP Account Settings, Properties, OK, and Close again. You now should be registered. Dial 611 and get your first weather report. To exit from X-Lite, click the Down Arrow and then Exit.

    Using a SIP Phone with Your System. There's loads of SIP Phone hardware in the marketplace, some better than others. We've written about some of them on Nerd Vittles, and you can use Google or the Asterisk forums to get a good feel for which ones work and which ones are a waste of money. If you want the bleeding edge phone that supports virtually every feature that Asterisk has to offer, then the GrandStream GXP-2000 is the phone for you. We use one and love it. Some of my colleagues think it is better suited for the non-business environment. In any case, it's a great phone to learn about Asterisk. With careful shopping, you can find one for about $80. Don't buy support or an extended warranty. They're both a waste of money. You configure the phone almost identically to softphone shown above. For home use, we still think the SPA-1001 and a good 5.8 GHz cordless phone system with multiple handsets is the way to go.

    Adding Internet Telephony Hosting Providers. Just as you need an account with an Internet Service Provider to reach Google or Yahoo or Dreadful AOL, if you want to make phone calls to folks with Plain Old Telephones outside your Asterisk system, then you've got to have telephone trunks to carry conversations from you to them and back again. For the default system today, we've preconfigured it to support an outbound trunk from VoipDiscount.com and an inbound and outbound trunk from StanaPhone.com. Before you sign up for anything, read our two articles about these providers by clicking on the links in this paragraph. In a nutshell, VoipDiscount.com provides incredibly cheap outbound calling to a number of countries. However, you have to cough up about $12.50 every three months to keep your account "current." They're also a little slick in that they frequently change calling rates and calling locations which are free. Having said all that, it's still the best calling deal on the planet. You just need to understand the ground rules and the slippery slope issues so you don't get blind-sided. StanaPhone provides free DID numbers in a New York area code and free incoming calls for those with an account. Even their charges for outbound calls are quite reasonable. To get your system working, you'll need to go to each of these providers' web sites using Internet Explorer on a Windows PC, sign up for an account, and download their softphones. That's the only way you can figure out what your account name and password are. We also recommend you put $10 in your StanaPhone account. Then, based upon reports from lots of users, you'll never have to worry about them disconnecting your free incoming service or your free phone number. Again, read our two articles which will tell you everything you need to know. Don't worry about all the settings, we've taken care of all of that for you. The objective is to get your free phone number and your account names and passwords. Then we'll plug those into your Asterisk system so you can start enjoying free incoming calls and mostly free outbound calls. Once you get your account numbers and passwords, move on to the next step, and we'll show you how to plug them into your Asterisk system and begin making and receiving calls.

    There are others who want a local phone number and more reliable service. For them, we continue to recommend TelaSIP. $14.95 a month gets you unlimited calling in the U.S. and a local phone number in your choice of area code. If you want to start out on a pay-as-you-go plan, $5.95 a month gets you a local phone number and 2¢ per minute calls in the U.S. They don't provide a lot of hand-holding, but their service is rock-solid reliable. For a list of all our service provider reviews, go here. Or just read our Internet Telephony Provider Shootout to see why TelaSIP remains our top pick. If you decide to go with TelaSIP, our Newbie's Guide to TrixBox will show you how to configure it.

    Configuring Your TrixBox System. This should take you less than five minutes! We've eliminated most of the configuration hassles with your new Asterisk system by preconfiguring almost everything. About all that you'll need to do to get a fully-functioning system is to plug in your account names and passwords for your two ITHPs and enter your email address for delivery of your voicemails and faxes. Here's how.

    Using a web browser, point it to the IP address of your new TrixBox system. When the TrixBox Main Menu appears, click System Administration. When prompted for your username, enter maint followed by the password you configured for your system above. When the Configuration and Administration Menu appears, click freePBX. freePBX is another open source project that puts an incredibly simple but complete web interface on your Asterisk PBX. When the freePBX Main Menu displays, click Setup. Now click Trunks in the left column of the display. On the Trunks setup screen in the right column, you'll see that we've preconfigured two trunks: one for voipdiscount and one for stanaphone. Click on SIP/voipdiscoun to display the voipdiscount setup screen. Scroll down to the PEER Details section. Replace yourname with your account name in three places: authuser, fromuser, and username. Replace yourpassword with your password in the line which reads secret=yourpassword. Now scroll to the Registrationsection at the bottom of the screen. Replace yourname:yourpassword@sip.sipdiscount.com with your actual account name and password. Leave everything else as it is. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

    We're going to make similar changes in the Stanaphone trunk settings. Click on SIP/stanaphone to display the StanaPhone setup screen. In the Outbound Caller ID field, enter the 10-digit phone number you were assigned by Stanaphone. In the Peer Details section, replace youraccountnumber in username=youracctnumber with your assigned account number, not your phone number! Replace yourpassword in secret=yourpassword with your assigned password. Repeat the drill in the User Details section on the form. Then, in the Registration String, carefully plug in your account number, then a colon, then your password, then @sip.stanaphone.com/, then your assigned 10-digit phone number. Leave everything else as it is. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

    If you want voicemails delivered to you by email, you'll need to plug in your email address. Click on Extensions in the left column of freePBX. Then click Home - 500 in the right column to display the settings for extension 500. Scroll down to the VoiceMail and Directory section of the form, and enter your email address in the email address field. Then change the Email Attachment field to Yes. If you'd like the system to automatically delete your voicemails after emailing them to you (with the message), change the Delete Vmail option to Yes. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk. Your system now is fully operational.

    If you'd like to add support for transferring calls to your cellphone, click Misc Destinations in the left column of freePBX, and then click Cellphone in the right column. Enter your 10-digit cellphone number in the Dial field. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

    If you'd like to add fax support so that incoming faxes to your Stanaphone number get emailed to you, click on General Settings in the left column. Scroll down to Email address to have faxes emailed to and plug in your email address. Do NOT change the origination email address, or you won't receive anything. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

    Setting the Default Time Zone. Your TrixBox system is set to use Eastern daylight or standard time (depending upon the time of the year) as the default time zone. This matters when you're scheduling reminders and wake up calls. If it's not correct for your location, the easiest way to change the time zone is using WebMin. Log into your server as root and issue the following command to start WebMin: /etc/webmin/start. Then, using a web browser, go to: https://TrixBoxIPaddress:10000/. Log into WebMin with the username root and the password you assigned to your root account. At the WebMin Main Menu, click Hardware then System Time. Scroll down to the TimeZone section and use the pull-down menu to select the desired time zone. Then click the Save button immediately below the Time Zone field. When you restart your TrixBox system, the time zone will be correct, and WebMin will automatically be shut down.

    Taking Your TrixBox For A Spin. For a list of Feature Codes supported by your new system, click on Feature Codes in freePBX and print the list. Pick up a phone and dial any one of them. To make an outgoing call, take a phone off-hook and dial either a 10-digit number in the U.S. or 1+10-digit number. Then, using a cellphone or someone else's POTS phone, dial your Stanaphone number to be sure it's working. You should get a welcome message, and then your phone or softphone will ring.

    We call the welcome message a Stealth AutoAttendant. What that means is that, while the message is playing, you can do some other things with your system. For example, by pressing 1, your call will immediately ring extension 500 on your system. Pressing 2 will ring extension 501. Pressing 3 will ring your cellphone. Pressing 8 and entering 56789# will give you dial tone to make a long distance call through your PBX. Pressing nothing will cause all of the extensions on your system to ring two seconds after the message completes.

    DISA Security. Getting remote dialtone can be a dangerous thing in the wrong hands so let's put your own password (of any length) on the DISA function that is triggered by pressing 8 above. Click DISA in the left column of freePBX and then DialTone in the right column. Now enter a PIN that will let you sleep well at night ... knowing that you are paying for all outbound DISA calls. When you finish, click the Submit Changes button and then the Red Bar to reload Asterisk.

    What Time Is It? On some computers (mostly high end ones as it happens), VMware has a hard time keeping the correct time. Since many telephony applications are time sensitive, you'll want to monitor this for a few days and see if your system is having problems. Logging in to your server and typing date will display what time your computer thinks it is. We've added a cron job to this application that updates the time using NTP every 10 minutes. That should resolve the problem. If not, post a comment and let us know.

    The Nerd Vittles Collection. We'll wrap it up for this week by pointing you to some tutorials for the Nerd Vittles applications that are preloaded in this TrixBox build. AsteriDex and MailCall require some quick configuration so take a look at the tutorials. You also may want to change the Telephone Reminders default password of 123 in line 28 of /etc/asterisk/extensions_trixbox.conf. If you do, remember to restart Asterisk for the change to take effect.

    AsteriDex - The Poor Man's Rolodex (http://TrixBoxIPaddress/asteridex/)

    NewsClips for Asterisk - Get the News By Telephone (Dial 511)

    MailCall for Asterisk - Get Your Email By Telephone (Dial 555)

    Weather Reports by Airport Code - Get the Latest Weather Forecasts for 1,000 U.S. Cities (Dial 611)

    Telephone Reminders for Asterisk - Appointment Reminders By Telephone (Dial 123)

    GabCast Studio for Asterisk - Create and Play PodCasts Using Your Phone (Dial *422 and 422)

    Where To Go From Here. If you're new to the Asterisk world, you have lots of fun (and learning) ahead of you. The best place to start is our Newbie's Tutorial. We've already done most of the work for you. It's an easy read which covers many topics that we didn't get to today. So start there. You'll also want to get plugged into the TrixBox Forums. That's the place to ask questions after you do some reading. Posting support questions on Nerd Vittles just doesn't work because of the cumbersome blog format. Don't email me questions either! We only accept thank you notes. Finally, take a look at our catalog of articles, projects, and Asterisk resource links. You'll find just about everything you'll ever need there. Enjoy!

    Nerd's Corner. If you've been following TrixBox developments recently, you know that there were some technical problems with TrixBox 1.2 on some platforms, especially VMware builds such as our bundle. We don't work under the hood of our car, and we're not especially comfortable under the hood of Linux or Asterisk either. So, it's been a difficult couple of weeks trying to come up with a mix of products that provides the latest Asterisk and frePBX builds as well as a stable operating environment. Thanks to Rob of freePBX fame and Bubba, one of the very best troubleshooters in the TrixBox business, we've come up with a compromise package that works great with VMware and the Nerd Vittles goodies, but could still use a little debugging for anyone that wants to run it on a standalone Linux machine. Why? Because we got everything to work reliably except zaptel which never would compile on our VMware platform. Our solution was pretty simple. We just disabled it in /etc/asterisk/modules.conf because zaptel isn't supported under VMware anyway. And, no, Asterisk doesn't use it for timing any longer so the missing zaptel module shouldn't cause you any headaches. If one of the geniuses gets it working again, we'll post an update in a comment to this article. But, as we said, zaptel is an academic exercise in the VMware world anyway so ... not to worry! Zaptel has been fixed in the version 2a image which is now available for download.



    Nerd Vittles Demo Hot Line. You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include NewsClips for Asterisk (latest news headlines in dozens of categories), MailCall for Asterisk with password 1111 (retrieve your email by phone), and Nerd Vittles Weather Forecasts by U.S. Airport Code. Just call our number (shown in the left margin) and take any or all of them for a spin. The sound quality may not be perfect due to performance limitations of our ancient Intel 386 demo machine. But the price is right.

    Nerd Vittles Fan Club Map. Thanks for visiting! We hope you'll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don't know the difference in the last two, here's the best definition we've found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We're always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you're visiting as well.

    Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host up to 6 domains with 30GB of disk storage and 750GB of monthly bandwidth. Free domain registration is included for as long as you have an account. That almost doubles last month's deal, and it really doesn't get any better than that. Their hosting services are flawless! We oughta know. We've tried the best of them. If you haven't tried a web hosting provider, there's never been a better time. Just use our link. You get a terrific hosting service, and we get a little lunch money.


    Some Recent Nerd Vittles Articles of Interest...

    Introducing the Cisco 7970 WonderPhone … Or Is It?

    Cisco 7970

    We didn't know quite how to begin this article so we decided to try and find a picture that sums up what you're up against installing a Cisco 7970 color IP telephone with Asterisk®. The disturbing part of this photo is that it shows the lengths to which Cisco will go to provide literally picture-perfect documentation for how to hang this phone on a wall while there is close to ZERO documentation for how to use it as a SIP telephone with anything other than Cisco's proprietary CallManager telephone system. It's almost like they don't want it used that way. LOL! Since the entire world is moving to SIP, Cisco obviously needed to be able to say they supported SIP ... but just barely. If you've never had to deal with Cisco or, better yet, Cisco's web site, lucky you! For those of us that ran Internet services in a former life, there was Cisco or Cisco when it came to routers. Luckily, that's not the case in the IP telephony business, and fortunately it's now changed in the router business as well. Guess why? Creativity and software quality have gone down the rat hole. And Cisco shareholders wonder why their company is losing market share.

    It wasn't quite right to reduce Cisco's beautiful (and I do mean beautiful) new COLOR IP telephone to a nuts-and-bolts image. But we're trying to paint a picture of how it works, not how it looks. The good news for Asterisk users is that IF you ever get the 7970 working with your Asterisk system, you'll never go back. The quality of calls with the Cisco 7970G is head-and-shoulders above all of the competition. Embarrassingly good! Having said that, it's more than a little disappointing to encounter Version 8 of their SIP firmware and discover that it functions about like a .8 beta release of most telephony software. Many things don't work. Some buttons still crash the phone. And it appears that Cisco has little or no intention to make things much better ever. You might be asking, "Why would a company act like this?" It's really pretty simple: monopoly (they wish!) and money (ditto!). The phone can be purchased for under $500 from many on line retailers such as our favorite (shown above). The CallManager license adds another $250 to the retail price of each and every phone. You'd want a monopoly, too, with that sort of pricing structure.

    SPECIAL NOTE: We have one, gently used Cisco 7970 for sale. It actually was used to prepare this article. Make us an offer, or we'll make you a deal you can't refuse. If you're interested, contact us.

    So how do we get the damn phone to work with Asterisk? Well, here's where it gets a little tricky. The first thing you should do is watch Kerry Garrison's great video on setting up the phone. You'll find it at AsteriskTutorials.com. What you'll learn in the tutorial is that most of the configuration of the phone is done through XML config files which are ordinary text files with nested (special) keywords in brackets that tell the phone how and what to do when. You then copy these config files to a TFTP server and reboot the phone after pointing it to the IP address of your TFTP server. If you don't have a TFTP server, Kerry will even tell you about a great one for Windows that you can download for free: TFTPd32.

    Welcome to TFTP Hell. As with everything Cisco, there are a few instant gotcha's with the installation process. First, Cisco provides no documentation with the phone and has published no documentation on the XML config files. Why? Monopoly and Money. The official answer would be that you don't need to know nothin' 'bout no stinkin' config files. Just use (buy!) their CallManager, and it generates the config files out of thin air. Now you get it. The only problem with the Cisco Scenario is that then your phone will only talk to the CallManager, not Asterisk. In fairness, we should note that Cisco documentation is available for the SIP firmware on the phone, but it all pertains to CallManager. Big surprise there. And, by the way, be sure to order the phone with SIP firmware, not SCCP, and a 7970 Power Supply or you're really S.O.L. with a dim phone to boot. So it's Go Back to Go time.

    The second gotcha is that the phone has to know where to find the TFTP server before you can change anything. You can't manually set the TFTP IP address with something like telnet or ssh. That would be too simple. You can set it on the phone keypad provided the existing firmware is configured to allow changes. The default firmware load isn't. So what's left? Well, you'll need a DHCP server that understands Option 66. Most don't. What Option 66 does is store the IP address of your favorite TFTP server so that when a client obtains an IP address for IP access, it also can obtain an IP address for a TFTP server containing updated config files... or new firmware. If you don't have a router with DHCP that supports Option 66, not to worry. TFTPd32 includes it as well.

    Gotcha #3 is that you can't just run TFTPd32 on your LAN and expect things to work. Why? Because your existing LAN probably already has a DHCP server (without Option 66) that's already handing out IP addresses. Can't we just disable our existing DHCP server? Absolutely, but you'll wipe out any preconfigured IP addresses that depend upon your DHCP pool of IP numbers which is the way most mere mortals reserve IP addresses on LANs without having to manually configure IP addresses, and subnet masks, and DNS server addresses for every device on your LAN. So ... the quickest, pain-free way to get started is to boot up a Windows machine on your network. Then replace the network cable connected to your PC with a crossover cable. Now connect the other end of the crossover cable to your shiny new Cisco phone. When the phone is rebooted, it will find the only remaining DHCP server in town (with Option 66 which you must set to match the first number in your DHCP pool since this number will be grabbed by your Windows machine when you plug in the crossover cable): the TFTPd32 DHCP server. If this sounds convoluted, hang on to your hat 'cause we're just getting started. Remember, we haven't changed anything yet!

    Cisco 7970The Right Way, The Wrong Way, and The Cisco Way. While we're on a roll with DHCP and TFTP, let's assume for a moment that we already have your phone making calls through your Asterisk server which it isn't, of course. Now you've decided that you'd like a different ring tone or picture on your phone. Can the phone handle it? Absolutely. Is it intuitive? No way. To perform either of these feats of magic, the drill goes something like this. You create another XML config file for both the pictures and the ring tones. Then you load the config files in a secret place on your TFTP server. Then you copy your new ring tones and cover art to the same secret locations. Now you go to each phone and drill down through layer after layer of menu options until you finally come to a screen which will display available ring tones or background images. The phone then will kick off a TFTP session using your TFTP server (which hopefully is still on line). Once it retrieves the file names or thumbnails after querying the XML config file, you get a list of choices. Highlight the desired choice and the phone makes another TFTP connection to download the desired file into your phone. Rube Goldberg would be proud of what Cisco engineers have been able to dream up. I'd fire all of them. Here's a silly idea. Ever heard of HTTP and a web page. There's even HTML support already on the damn phone. Of course, it doesn't work, but who cares. Why fix it when you can dream up an installation scenario like this one? Who in their right mind would ever design an installation system which forces you to keep an insecure TFTP server running on your network all the time?

    Call us picky, but here's another little detail. One disgruntled employee with a crossover cable and a notebook computer running TFTPd, and your entire Cisco phone system runs the very real risk of being toast. The problem with Option 66 is that whoever has physical access to your phones can wreak all sorts of havoc since the phones will connect to any available TFTP server. Holding down the pound key for 10 seconds while the phone reboots and then pressing all 12 buttons on the phone's dialpad (in order), and your phone is now MY PHONE. And, this is from a company that has been thinking about network security longer than almost anybody. We should point out that there is a phonePassword field in the config file which defaults to blank, and it may or may not help on the security front. My guess is that most companies never touch it. And, with the ink barely dry on our maintenance contract and given the other configuration quirks of this phone, we were reluctant to test this password feature for fear of turning the device into little more than a boat anchor. We'll leave that testing for you to try out on your new $500 phone. If there's some other, more obtuse security feature (such as tftpDefault) that we've missed, we're pretty confident that some diehard Cisco cheerleader will point it out to us in a comment shortly. In the meantime, we'll continue our head scratching. Memo to Cisco: There are lots of reasons that folks expect documentation with their equipment. Not the least of these is SECURITY.

    Earth to Asterisk. Can You Read Me? Well, enough of the Cisco bashing. We really do want to get this phone working with Asterisk. And did we mention? We wouldn't trade the Cisco 7970 for ANY other phone on the planet. The voice quality with both the headset and the speakerphone is that good! For openers, to use the phone with Asterisk, you'll need at least Asterisk 1.2 to get any connectivity. Asterisk 1.09 won't cut it. And the 7970 ought to work fine with any version of TrixBox as well as Asterisk@Home versions going back to 2.0, all of which include at least Asterisk 1.2. Now for the fun part.

    First, download the Sample Config Files from Kerry Garrison's AsteriskTutorials.com site. Unzip the file which will give you a configs folder with three files. Turn your phone over and write down the MAC address which is the number beginning with 00 and consists of 12 hex digits. Rename the SEP000E84E8E3D5.cnf.xml file substituting the MAC address you wrote down for 000E84E8E3D5 in the existing file name. If this config file name doesn't include the actual MAC adddress of your phone, your phone won't process any updates. Now press the Settings button on your phone. It's the one on the right side with a check mark on it. Then press 5, 3 and write down the version of the firmware that's loaded on your phone. If it doesn't start with SIP, send it back and tell the vendor that you requested a Cisco 7970 with SIP firmware. Unless the firmware version is SIP70.8-0-3S, you'll need to change the firmware version in both the SEP config file we renamed above and also in the XMLDefault.cnf.xml file. Use the Windows TextEdit program to search for SIP70.8-0-3S and replace it with the firmware version you wrote down.

    Before we get too far along, let's be sure that your phone is locked in such a way that you can't manually specify a TFTP server's IP address. Press the Settings button again and then 2, 8. A closed padlock should appear in the upper right corner of the display. Pressing **# will attempt to unlock the phone. The padlock should open within a few seconds. If so, there may also be a new, gold Edit tab above the second (of six) softkey buttons on your phone. If the Edit button is not dimmed out, then you can press it and manually enter an IP address for a TFTP server. Otherwise, you'll need to go through the knuckle drill we 've previously outlined using a crossover cable. Be aware that each time you change or reenter the TFTP IP address, your phone will automatically reconnect to the TFTP server to check for updates as soon as you Save the IP address. This is worth remembering because it's an easy way to force a config reload on your phone.

    We're almost ready to set up an extension to connect to your Asterisk server. But first, you'll need to be sure you have created an available SIP extension on your Asterisk system. Using AMP or freePBX, choose the Extensions option and Add a new SIP extension. Choose an available extension number and password. In the Device Options section, set the qualify field to No and set the mailbox option to something like 500@default instead of 500@device (using your chosen extension number, of course). Set up a voicemail account with the same password you specified for the extension. Then Submit your changes and click the Red Bar to reload Asterisk.

    Now we're ready to edit the SEPxxxxxxxxxxxx.cnf.xml file using NotePad. First, search for 192.168.5.50 and replace every instance with the internal IP address of your Asterisk box. It should come as no surprise that Cisco has a different way of handling SIP connections through NAT and a firewall, and it's not yet compatible with the way the rest of the world (including Asterisk) do it. So, for the time being, forget using a 7970 outside your firewall unless you enjoy Water Torture. Beginning on line 10 of the file, you'll see two entries that look like this:

    <datetemplate>M/D/Y</datetemplate>
    <timezone>Pacific Standard/Daylight Time</timezone>

    The top line tells the phone to display the date as MO/DA/YR with time in 24-hour military time. If you'd prefer a 12-hour clock with am and pm indications, add a lower case a immediately after the Y. Change Pacific on the second line to match your time zone. Leave the rest of it alone unless you live in a freaky Daylight Savings location. If you do, you'll know what I'm talking about. Otherwise, don't worry about it.

    The 7970 theoretically can support 8 extensions on the eight buttons along the top right side of the phone. That only seems to work if all the designated extensions are housed on the same Asterisk server, i.e. one IP address. Here's what a typical entry for an extension should look like. To add another one, just duplicate the code, increment the line button number, and enter the appropriate settings for the next extension.

    <line button="1">
    <featureID>9</featureID>
    <featureLabel>Ext. 400</featureLabel>
    <proxy>192.168.0.108</proxy>
    <port>5060</port>
    <name>400</name>
    <displayName>Ward Mundy</displayName>
    <autoAnswer>
    <autoAnswerEnabled>2</autoAnswerEnabled>
    </autoAnswer>
    <callWaiting>3</callWaiting>
    <authName>400</authName>
    <authPassword>1234</authPassword>
    <sharedLine>false</sharedLine>
    <messageWaitingLampPolicy>1</messageWaitingLampPolicy>
    <messagesNumber>*97</messagesNumber>
    <ringSettingIdle>4</ringSettingIdle>
    <ringSettingActive>5</ringSettingActive>
    <contact>7b452e87-4496-4762-e11f-b26751a1884b</contact>
    <forwardCallInfoDisplay>
    <callerName>true</callerName>
    <callerNumber>false</callerNumber>
    <redirectedNumber>false</redirectedNumber>
    <dialedNumber>true</dialedNumber>
    </forwardCallInfoDisplay>
    </line>

    We've shown the entries that worked for us. Most of the entries can be left alone. Just change the Proxy entry to the IP address of your Asterisk box. Then enter your extension number in featureLabel, name, and authName. Enter a displayName for calls from this extension, and enter your extension password in authPassword.

    In addition to using these eight buttons for Extensions, you also can use them for Speed Dial entries. And these entries can be any sequence that your Asterisk server understands. For example, you could assign *8 to a button to do a Call Pickup. Here's what the entry would look like to assign this to the eighth button:

    <line button="8">
    <featureID>2</featureID>
    <featureLabel>Call Pickup</featureLabel>
    <speedDialNumber>*8</speedDialNumber>
    </line>

    Aside from assuring that the featureID code is 2, you can assign a Speed Dial entry to any button number and label it any way you choose. The speedDialNumber should be the exact string of numbers you would normally dial to place the call using the dialpad of your phone.

    There are some other entries in the Config file, you'll want to take a look at. Near the bottom of the file you'll find settingsAccess. If this is set to zero, you'll want to change it to 1 so that you can avoid the TFTP knuckle drill we've outlined above. Once this configuration change is loaded into the phone, you should be able to manually enter a TFTP IP address as we described above.

    Finally, there's a group of entries in the vendorConfig section of the file that determine when the 7970's display will be active and for how long. The entries look like this:

    <daysDisplayNotActive>1,7</daysDisplayNotActive>
    <displayOnTime>08:00</displayOnTime>
    <displayOnDuration>10:30</displayOnDuration>
    <displayIdleTimeout>01:00</displayIdleTimeout>

    These are self-explanatory for the most part. The first line tells the phone which days of the week not to turn on the display automatically. If you want it on every day, delete 1,7. The displayOnTime tells the phone what time of day in your time zone to turn on the display (24 hour clock). The next line tells the phone how many hours and minutes to leave the display lit. And the last line tells the phone how long to leave the phone lit up when you manually turn on the display by pressing the sixth Display button (which will display a green light when the phone display is off).

    To load the configuration changes we've made above, just copy the three files in your Config directory to the default directory you set up on your TFTP server. Then unplug the phone and plug it back in once you have your TFTP server with its DHCP server configured and running.

    After reading the next paragraph, we think you'll understand why we're abbreviating the implementation step with this phone. I'd venture to say that not one of our daily readers is going to buy this phone after reading our review. If some of you prove us wrong with your comments, we'll be glad to add the missing pieces. Or you can go here and find most of the information you'll need to get started. Here are a few helpful hints on replacing the default photo and ring tone on the phone. A link for dozens of ring tones appears earlier in the column. Step 2 is to create a distinctiveringlist.xml file and put it in the root directory of your TFTP server together with the .raw sound files. In the XML file, you merely list the sound files. And it looks like this:

    <CiscoIPPhoneRingList>
    <Ring>
    <DisplayName>Fun 1</DisplayName>
    <FileName>CTU1.raw</FileName>
    </Ring>
    </CiscoIPPhoneRingList>

    To load a new Ring Tone for your first extension, crank up the TFTP server. Then press the Settings button on your phone followed by 1, 1, 2. Then follow the prompts to Select your desired Ring Tone for each extension.

    You do something similar for photos except you need two PNG images for each photo you want to make available for display on the phone. One is a thumbnail (80x53) and the other is the photo itself (320x212 in 12 bit color). Don't worry about the 12 bits. The phone will convert 16 bit images, but keep the full-size images relatively small, e.g. 100K. Once you have your photos, create a Desktops folder off the root directory of your TFTP server. Then create a subdirectory inside it called 320x212x12. Using Notepad, create an XML file there and name it List.xml. Capitalization matters! Sample entries are shown below. Now copy all of your images to the 320x212x12 folder.

    <CiscoIPPhoneImageList>
    <ImageItem Image="TFTP:Desktops/320x212x12/MyGirlsTN.png" URL="TFTP:Desktops/320x212x12/MyGirls.png"/>
    </CiscoIPPhoneImageList>

    To change the desktop photo, crank up your TFTP server. Then press the Settings button on the phone followed by 1, 2. Then pick the desired photo and press the Select button. Save your change and you're done.

    In theory, there are all sorts of other neat things you should be able to do with this phone. For example, there's a message waiting light. Doesn't work. Then there's a stutter dial tone with message waiting. Doesn't work. The phone is designed to display a listing of Phonebook Entries out of an XML file on your web site when you press the Directory button. Doesn't work. It's also supposed to display a page of helpful tips when you hit the question mark button. Doesn't work. Then there's the ability to run a web-based XML application. No cigar there either. And, when you answer a call on the phone, don't dare press the Transfer button unless you like watching core dumps. Fortunately, # transfers still work with Asterisk. Well, you get the idea. And this is Version 8? Can you even imagine what Version 1 looked like? And the sad part of all of this: the Cisco 7970 probably has the best voice quality of any telephone we've ever used. And we've used lots of them. Here's how we've decided to use the phone in our pure-VoIP environment. It's a variant of the old adage: "Don't Call Us, We'll Call You." We put the 7970 on a separate table in our high tech office and, whenever we need to talk to someone important, we'll call from our cushiest chair using this phone. For the rest of our incoming calls and our voicemail, we'll use another phone ... that works and better supports IP telephony but sounds more like a cellphone call. So, if you get a crystal-clear call from us, you can stand a little taller knowing how important you are. It's a call from the Cisco 7970!

    The Hobson's Choice for most folks boils down to this. Do you want great sounding IP phone calls with a phone that costs two to five times as much as other IP phones while giving up virtually every other feature that has made IP telephony great? While it will let you retrieve your voicemail messages from your Asterisk server, unfortunately you'll never know you have a message unless you dial in regularly and manually check. This phone has been pitched as the perfect phone for the busy executive. The first busy executive that misses an important meeting because the message waiting lamp never lit up, and this phone would be out the window. Too bad!

    Perhaps more than any other American company, Cisco is responsible for getting IP telephony off the ground. So it's especially disappointing to see what an absolutely crappy job they've passed off to the Internet community as their SIP offering. If you're one of their corporate customers, we hope you'll take the time to drop a line to John Chambers at Cisco and give him your thoughts. Cisco didn't get to where they are today with software that just barely passes the smell test.


    Nerd Vittles Fan Club Map. Thanks for visiting! We hope you'll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don't know the difference in the last two, here's the best definition we've found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We're always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you're visiting as well.

    Nerd Vittles Demo Hot Line. You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include NewsClips for Asterisk (latest news headlines in dozens of categories), MailCall for Asterisk with password 1111 (retrieve your email by phone), and Nerd Vittles Weather Forecasts by U.S. Airport Code. Just call our number (shown in the left margin) and take any or all of them for a spin. The sound quality may not be perfect due to performance limitations of our ancient Intel 386 demo machine. But the price is right.

    Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host up to 6 domains with 30GB of disk storage and 750GB of monthly bandwidth. Free domain registration is included for as long as you have an account. That almost doubles last month's deal, and it really doesn't get any better than that. Their hosting services are flawless! We oughta know. We've tried the best of them. If you haven't tried a web hosting provider, there's never been a better time. Just use our link. You get a terrific hosting service, and we get a little lunch money.

    Want More Projects? For a complete catalog of all our previous Asterisk projects, click here. For the most recent articles, click here and just scroll down the page.

    Headline News for the Busy Executive and the Lazy Loafer. Get your Headline News the easy way: Planet Asterisk, Planet Gadget, Planet Mac, and Planet Daily. Quick read, no fluff.

    Got a PDA or Web-Enabled Smartphone? Check out our new PDAweather.org site and get the latest weather updates and forecasts from the National Weather Service perfectly formatted for quick download and display on your favorite web-enabled PDA, cellphone, or Internet Tablet. And, of course, it's all FREE!

    Tricking Out Your TrixBox

    With apologies to the original Comic BookNOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk® has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.

    For those that thought we’d dropped off the face of the planet, good news. Not yet. If you haven’t heard, there’s a new version of TrixBox, 1.2. And we’ve given it the old college try for a week or two with about that same results pictured in this old comic book. On some platforms, it runs just fine. On others, including our VMware for Windows machines, it’s a nightmare. The voice synthesis system is again broken, freePBX can’t reload Asterisk without completely shutting down and restarting Asterisk (amportal restart). And there appear to be all sorts of interrupt or timing problems that we’ve never seen before … going back to Asterisk@Home 1.2. We attribute many of the problems to a new version of CentOS and Asterisk, both of which are bundled into the TrixBox 1.2 package, but who knows. What we do know is TrixBox 1.2 is a little too Bleeding Edge for our taste, and most of the Nerd Vittles goodies that depend upon the Flite speech engine no longer work on many machines. We have seven systems in our testing lab (aka home) so it’s not like we haven’t tried. And others are reporting much the same thing. Our testing primarily focused on VMware builds for Windows implementations using the .iso image, and that was a total bust. So, at least for now, TrixBox 1.1.1 and the Nerd Vittles VMware Build are the way to go if you want to run a TrixBox system and Asterisk PBX on your Windows Desktop. And, steer clear of the trixbox-update shell unless you’re damn sure you have a system that is compatible with the new 1.2 code. How do you know? Beats me. With that disappointing intro, we thought we’d step back this week and cover some tips and tricks for configuring your TrixBox 1.1.1 system for the real world. And, if you’re one of the lucky ones with a machine that works reliably under 1.2, most of this stuff should work for you as well.

    One other comment about TrixBox 1.2, and we’ll shut up about it. Andrew Gillis almost single-handedly puts these TrixBox builds together. And he does an incredible job with it. The issues that sometimes arise are rarely of his making. It’s usually a bug in a product he’s bundling that causes the bundle to come down like a house of cards. So, just to be clear, these problems are not of Andrew’s making. We’re confident that he put together the 1.2 build with the same attention to detail that he always employs. It just happens that this time we ended up with a rotten apple somewhere in the mix. Within a couple weeks, someone will find the culprit and there will be another clean build without the problems. Having said all that, these problems do highlight the need for Andrew to consider opening up the development process a bit so that he can get some talented assistance. Folks can’t live without a phone system for several weeks while bugs are sorted out. And, unfortunately, the old adage still applies: “You can always spot the pioneers by the arrows in their backs." The arrows in our back account for the brevity of this week’s column. Our apologies!

    freePBX Feature Codes. Thanks to freePBX, your TrixBox system comes with dozens of PBX bells and whistles. These include call forwarding of many flavors, call waiting, zap barge, do not disturb, gabcast, talking clock, talking extension numbers, and more. For a list of the codes, open freePBX with a web browser (http://yourIPaddress/admin/) and navigate to Setup->Feature Codes. You also can disable any of them if you’d like.

    Transferring an Answered Call to Another Extension. To transfer a call you’ve already answered, press the pound key (#), and then dial the extension number using your permissible dialplan dial strings. This can be another extension, or it could be an outside call (e.g. to your cellphone) as long as your dialplan supports it.

    Transferring an Answered Call to Your VoiceMail. To transfer an incoming call that you’ve already answered to your voicemail, press the pound key (#), and then dial your own extension number.

    Transferring an Unanswered Call to Your VoiceMail. Suppose you want to not answer a call and immediately transfer the call to your voicemail. Just press the Hangup button with X-Lite or with a cordless phone connected to an SPA-1001. Note: You must have voicemail activated on the extension that’s receiving the call.

    Retrieving Your VoiceMail Messages. If you want to access voicemail messages for the extension from which you are calling, just pick up the phone and dial *97. To access voicemail for any other extension, pick up any phone and dial *98. You’ll be prompted for the voicemailbox number and password for the desired account.

    Returning VoiceMail Message Calls With One Button. Calling back a person that left you a voicemail is easy. When setting up VoiceMail for the extension, be sure to include callback=from-internal in the vm-options field in freePBX. Then, once you listen to a voicemail message, choose advanced options (3) and then option 2 to return the call.

    Putting Calls on Hold with Asterisk. You can easily put any call on hold with Asterisk by quickly pressing and releasing the switchhook or flash button. Your caller will get your default Music on Hold until you return to the call by pressing the flash button again.

    Communicating with the freePBX Developers for Online Support. If you have a problem that you can’t find an answer to after Googling and visiting both the TrixBox and freePBX forums, you may want to take advantage of the IRC client built into freePBX. Just open up freePBX with your browser and navigate to Tools->Online Support. Then click Start IRC and enter a nickname that’s unique to you. When prompted for username and password, enter maint and the password you assigned when you set up your system. HINT: The reigning PBX King lives in Australia so evenings (Australia time) are a good time to pose hard questitons.


    AsteriDex for Smartphones. For those of you using our AsteriDex RoboDialer for Asterisk, we’ve got a new piece of code for you if you happen to have a smartphone or PDA phone and want access to your AsteriDex database for dialing. You’ll need something like a Blackberry, 6700 smartphone, Treo 650 or 700 that includes a real web browser (not WAP!) and web service from your cellphone provider. Install AsteriDex using the link above. Then open up port 80 on your firewall and point it to the private IP address of your TrixBox system so that you can access the web server running on your TrixBox system. To install the software, log into your server as root and execute the following commands:

    cd /var/www/html
    mkdir cellphone
    cd cellphone
    wget http://nerdvittles.com/wp-content/cellphone.zip
    unzip cellphone.zip
    rm -f cellphone.zip
    chown asterisk:asterisk index.php
    chmod 775 index.php

    Now you can access your AsteriDex database entries from the web browser on your cellphone by pointing the browser to: http://PublicIPaddress/cellphone/ or http://AsteriskFQDN/cellphone/. If your smartphone is fairly "smart" you can also dial any number in your AsteriDex database by simply clicking on the desired phone number. At least with Sprint cellphones, you also have the option of sending a text message to anyone with a cellphone by clicking on any phone number entry. Please note that these outbound calls will be made directly through your cellphone provider, not through your Asterisk system (as was the case with the original AsteriDex web-dialing project). The reason is pretty simple. Most smartphones don’t support simultaneous use of your web browser and phone so there’s no way for your Asterisk box to call you without getting your voicemail. Yes, we did try it!

    Additional Tips and Tricks. Have you got a favorite trick you use with your TrixBox system? Add it as a comment below and share it with the rest of your nerdly brethren.


    Nerd Vittles Demo Hot Line. You now can take a number of Nerd Vittles projects for a test drive… by phone! The current demos include NewsClips for Asterisk (latest news headlines in dozens of categories), MailCall for Asterisk with password 1111 (retrieve your email by phone), and Nerd Vittles Weather Forecasts by U.S. Airport Code. Just call our number (shown in the left margin) and take any or all of them for a spin. The sound quality may not be perfect due to performance limitations of our ancient Intel 386 demo machine. But the price is right.

    Nerd Vittles Fan Club Map. Thanks for visiting! We hope you’ll take a second and add yourself to our Frappr World Map compliments of Google. In making your entry, you can choose an icon: guy, gal, nerd, or geek. For those that don’t know the difference in the last two, here’s the best definition we’ve found: "a nerd is very similar to a geek, but with more RAM and a faster modem." We’re always looking for the best BBQ joints on the planet. So, if you know of one, add it to the map while you’re visiting as well.

    Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has raised the bar again on hosting services. For $6.95 a month, you can host up to 6 domains with 30GB of disk storage and 750GB of monthly bandwidth. Free domain registration is included for as long as you have an account. That almost doubles last month’s deal, and it really doesn’t get any better than that. Their hosting services are flawless! We oughta know. We’ve tried the best of them. If you haven’t tried a web hosting provider, there’s never been a better time. Just use our link. You get a terrific hosting service, and we get a little lunch money.

    Want More Projects? For a complete catalog of all our previous Asterisk projects, click here. For the most recent articles, click here and just scroll down the page.

    Headline News for the Busy Executive and the Lazy Loafer. Get your Headline News the easy way: Planet Asterisk, Planet Gadget, Planet Mac, and Planet Daily. Quick read, no fluff.

    Got a PDA or Web-Enabled Smartphone? Check out our new PDAweather.org site and get the latest weather updates and forecasts from the National Weather Service perfectly formatted for quick download and display on your favorite web-enabled PDA, cellphone, or Internet Tablet. And, of course, it’s all FREE!