Home » Technology » Telephony (Page 76)

Category Archives: Telephony

The Most Versatile VoIP Provider: FREE PORTING

Week #2: PBX in a Flash … The Lean, Mean Asterisk Machine

Doesn’t seem like only two weeks ago today that we introduced PBX in a Flash to the world. And there’s already been one reported bug. Not to worry. It was trivial. I do know that our development elves have been hard at it ever since the release date. Joe Roper, who is responsible for much of the initial offering, has fielded close to 1,000 questions on the forums while already developing content for the next ISO release. But it’s not as if there is any big hurry. As promised, the first release has been rock-solid reliable. Compare that to the other options out there in Telephony Land, and you’ll come to appreciate why PBX in a Flash has become a big hit for experimenters and Asterisk® consultants looking to rapidly deploy a stable, all-purpose telephony server. There already have been close to 10,000 downloads of PBX in a Flash from our download sites. And over half of those were using torrents with download times of under 15 minutes for the 628MB ISO. Finally, we have enough free bandwidth to support the worldwide demand. And our special thanks go to all the great Nerd Vittles supporters who have made that happen. The huge initial demand gave us an opportunity to test DreamHost’s Files Forever service where you pay $5 per download for unlimited bandwidth. It, too, worked like a champ. Once you’ve coughed up your five bucks and downloaded the ISO image, you can email the download link to one additional friend at a time. And each friend then can download the ISO without paying another nickel. No, we did not make enough on the downloads to fund free cruises for Joe and Tom. Sorry about that. In fact, the "profits" barely covered the costs of my weekly supply of Krispy Kremes.

Meanwhile, Tom King has been incredibly busy building our bricks-and-mortar scripts repository that is going to make PBX in a Flash the all-purpose solution for any telephony requirement. He also wrote a step-by-step tutorial for installing PBX in a Flash that includes screen shots of every single step in the process. If you haven’t visited pbxinaflash.org, you’re missing a treat.

Finally: A Real Backup Solution for Asterisk. If we had to tally the votes for the single-most requested feature addition for Asterisk systems, it would be an easy-to-use backup and restore system that makes recovery from a serious disk failure painless. Today’s your day. Tom King has just released his Whole Disk Backup System for PBX in a Flash that takes ISO-style snapshots of your entire PBX in a Flash system. And, when the dreaded day for a system restore arrives, it’s as simple as inserting your backup CD or DVD and rebooting on any new PC of your choice. How much simpler can it get? If you have been one of the hundreds of thousands of Asterisk users who never has had a reliable, full backup of your telephony system, sleep easy tonight. Those days are officially over!

Developer’s Corner. There’s also a new PBX in a Flash Development Environment that brings every development tool to your Asterisk desktop including X Windows with KDE, Anaconda for creating your own custom ISO’s, and, of course, tons of binaries to handle any development task you can imagine. It also downloads, installs, and recompiles the lastest and greatest version of Asterisk whenever you decide you want it. For those new to Linux that just want to add a graphical interface with X Windows-KDE, there’s a script to install that as well. There’s even a tutorial that will show you how to control your PBX in a Flash system remotely using the VNC graphical user interface.

If you happen to just want the latest, greatest version of Asterisk installed, there’s a simple script to handle that for you, too. It’ll even figure out what the latest version is so you don’t have to worry about mixing and matching components. Using this script, you also can add Asterisk 1.2 sound file support as well as Digium®’s High Performance Echo Cancellation (HPEC) System. You’ll need to acquire a license for HPEC from Digium.

First Steps. If you’re just getting started with PBX in a Flash, here’s our recommended approach. Download and read the initial Nerd Vittles tutorial and Tom’s Installation Guide. Then download and install the system either on a dedicated PC or on a Windows or Mac desktop using the VMware option. Once you finish configuring your system in accordance with our tutorials, go to the Nerd Vittles Forums and read the postings in the Open Discussion, Help, and Bug Fixes forums. Then take a look at the Providers forum and our Best of Nerd Vittles Providers and make your selections. Now you should be ready to go. Visit pbxinaflash.org and download your favorite scripts, and you’ll be off to the races.

Asterisk 1.4.15 Security Fixes. The two security issues that were patched today in Asterisk 1.4.15 are not required in the default install of PBX in a Flash. Unless you’re using the Postgres modules, there’s nothing to fear.

Coming Attractions. For those interested in monitored or hosted service for your PBX in a Flash system, we plan to tackle those options shortly. In the meantime, keep a sharp lookout on pbxinaflash.org. New content is added almost every day. Happy Birthday to Us! Two weeks and counting!! Yippee!!!


Some Recent Nerd Vittles Articles of Interest…

Introducing PBX in a Flash: The Lean, Mean Asterisk Machine

Well, it's Hammer Time at Nerd Vittles, time to put up or shut up. And we've never been accused of being a wallflower. If you've longed for the good ol' days of Asterisk@Home, welcome back to the new steroid-enhanced version. Today we're proud to introduce the first release of PBX in a Flash for Linux, Windows, and Macs. It's a lean, mean Asterisk® machine designed to meet the needs of hobbyists as well as business users. And you won't find the word "beta" in the rest of this article. Our extra special thanks go to Joe Roper, Tom King, and Tony Vincent for their untiring efforts in moving this project from a dream to reality. Just measure the 3 weeks of development work in this project against the years in some other projects, and you will have a good idea about the incredible contribution these guys have made! Nothing's ever perfect, but this is a good one folks. And you need to give it a try to see what we've all been missing this past year. Text-to-speech works, Bluetooth works, the platform is open, the install scripts are available for your use. We believe it is sufficiently reliable on Day 1 for a production environment. It may be two weeks past Halloween, but this is a real treat!

UPDATE: This article now qualifies as ancient. Click here for the latest and greatest.

Our design model differs from other Asterisk implementations. The .iso download gives you a rock-solid CentOS 5 Linux implementation which is designed for installation on a dedicated machine. Yes, your hard disk will be erased. Once Linux is installed, the system will reboot and fetch the latest, greatest collection of add-on's. Once the install completes, you'll have a high-performance turnkey Asterisk PBX that's easy to upgrade with a simple migration path to either managed PBX service or hosted PBX service. You never have to migrate if you don't want to, and the stand-alone product will always have virtually identical functionality minus the peace of mind that comes with managed or hosted PBX service. In short, the stand-alone product isn't ever going to be crippleware to entice you to migrate. We'll have more about the managed and hosted options in coming weeks. There also will be a script shortly to transform your system from a solid, lean run-time system into an Asterisk development platform. In the meantime, PBX in a Flash includes Asterisk 1.4.13, FreePBX 2.3.1, Apache, MySQL, PHP, phpMyAdmin, SendMail, Perl, Flite, and much more. Once we're sure we have a stable base platform (and we're pretty sure!), you'll be able to choose from dozens (if not hundreds) of scripts to add all of the Nerd Vittles goodie bag: AsteriDex, Weather Reports, News Feeds, Email by Phone, TeleYapper, Telephone Reminders, Podcasts by Phone, and on and on. There will also be fax support, turnkey phone scripts, hosting providers with free DIDs and minutes to get you started, and loads of new stuff from developers who already are working on compatible add-on's. You add features when you need additional functionality. Otherwise, you skip the bloatware. And you can add your own feature requests to the growing Wish List on the Nerd Vittles Forum. Visit today and sign up. Just like everything else at Nerd Vittles, it won't cost you a dime.

For those that don't have a dedicated Linux machine, we've got a VMware version of PBX in a Flash for you today as well. It'll run on almost any fairly new Windows XP or Vista Desktop as a virtual Linux server. Just download and install the free VMware Player. For Mac users, you'll have to buy and install VMware Fusion. Then download and unzip pbxinaflash.zip (4K) into C:\pbxinaflash. The directory name is important, or nothing will work! Next, download the pbxinaflash.iso into C:\pbxinaflash from your favorite download site. Now open Windows Explorer and double-click on the .vmx file in your C:\pbxinaflash folder. And presto! You've got a PBX in a Flash... about 30 minutes to be exact. That wasn't too hard, was it?

For those with a dedicated Linux machine, our goal today is to get everyone off on the right foot with a clean, reliable install. If you have problems with the install or spot a bug, post your questions and suggestions on the Nerd Vittles Forum. We can't stress strongly enough that this is a collaborative adventure, and you are cordially invited to participate as not only a user but also a contributor. Whether that contribution takes the form of developing scripts or merely contributing bandwidth for .iso downloads, all of us will appreciate your efforts! Nerd Vittles is donating the first ten terabytes of download bandwidth each month. After that, we need some help. Send us an email with your location if you would be willing to co-host the pbxinaflash.iso. Money donations through the PayPal link at the top of this page also buy bandwidth. We average over 50,000 visitors a week so we're going to need some help to keep the lights on. Ultimately, we hope to let others host the ISO downloads. That will free up our bandwidth to maintain and host the PBX in a Flash script collection. All ISO images will include a checksum to make it easy for you to verify that you have The Real McCoy. At the initial installation prompt, simply type linux mediacheck and press the <Enter> key. The size of the ISO image is 658,966,528 bytes.

Our Apologies. We want to apologize for the difficulties some of you are experiencing downloading our new baby. Apparently, a few others are equally excited about its release. Here's the problem. There are LOTS of you! Our download site, pbxinaflash.net, originally was used not only for ISO downloads, but it also provided the VMware modules and install scripts that bring PBX in a Flash to life for everybody. Without access to pbxinaflash.net, no one could complete the install process. Because of the hammering the site was taking with all of the huge ISO downloads, it meant that even those that got the ISO could not complete the install because, by then, they probably lost access to the site. Don't worry. You can reboot later to finish the installation. In fairness to everyone, we took the following steps. We now have five download sites in operation with more to come. You also can obtain a free torrent as well as the VMware modules and install scripts from pbxinaflash.net and most of the other sites. If all of the free download sites are busy, we have put up a pay-as-you-go download site as well. The way this works is that you pay $5 with a credit card to download the ISO. You then can email the link to a friend who pays nothing for the download. When that friend releases the link that is provided, you can give it to another friend at no cost. Only the original download is not free, but it is dirt cheap and provides lots of backup bandwidth. So, if you get in a crunch, spring for the $5. Otherwise, check back at a different time of day and try again. Or better yet, use the torrent. You'll have it by morning. The more torrents that are seeded, the easier this will be for everyone during the mad rush. Our apologies!!

Getting Started with PBX in a Flash. Just like all the other offerings, you need to begin this adventure by downloading the ISO image for PBX in a Flash (628.44 MB). As new locations for ISO downloads come on line, we will add them to the download list. Just click on the location nearest to you. Once you've got the image in hand, use your favorite tool to burn it to a bootable CD. You're going to need a dedicated PC for this installation unless you're using VMware to run PBX in a Flash on your Windows or Mac desktop. A current PC in the $200-$300 price range from your favorite Big Box store should perform nicely as a dedicated Linux machine. We recommend at least 512MB of RAM and more won't hurt. And, remember, your hard disk will first be erased by this install. You've been warned... twice.

On the machine you wish to use for your new PBX in a Flash system, insert the CD containing the pbxinaflash.iso and then reboot. After reading the initial prompts and warnings, press the Enter key to begin the installation. Or, if you want to first check the media for corruption, type linux mediacheck and then press the <Enter> key. For Windows users, be sure you're doing this in the VMware window on your Desktop and not on the main screen of your PC! Erase the existing partition and accept the default for the partition layout when prompted. Then choose your time zone and leave the UTC system clock option unchecked. Next choose a root password for your new system. Make it secure, and write it down. We plan to use this password for virtually everything on your new system. The install process begins. This includes MySQL, Apache, PHP, CUPS, Samba, WebMin, Subversion, SendMail, Yum, Bluetooth support, SSL, Perl, Python, the kernel development package, and much more. In about 15 minutes depending upon the speed of your PC, the system will reboot. Be sure you eject the CD, or it will get installed again, and again. HINT: Hang around your machine at about the 15 minute mark. After reboot, the system will start up with CentOS 5, then download and install Asterisk and FreePBX, and search for the necessary installation scripts in the /scripts folder on pbxinaflash.net. If you don't have Internet connectivity, then the installation cannot complete. When the installation finishes, reboot your system and log in as root. The IP address of your PBX in a Flash system will also be displayed once you log in. Write it down, too. We'll need it in a minute.

Now that you've logged in a root, you should see the IP address displayed with the following command prompt: root@pbx:~/. If instead you see bash displayed as the command prompt and it's not green, then the installation has not completed. This is probably due to network problems. Fix these, then reboot and watch for the eth0 connection to complete. Assuming it doesn't fail the second time around, the installation will continue. Likewise, if you do not have DHCP on your network, the installation will fail because the PBX will not be given an IP address. Simply type netconfig, fill in the blanks and reboot. The install will recommence. You can obtain the IP address of your server at any time by issuing the ifconfig command.

There are three important things to do to complete the installation. First, from the command prompt, run genzaptelconf. This sets up your ZAP hardware as well as a timing source for conferencing. Second, decide how to handle the IP address for your PBX in a Flash server. The default is DHCP, but you don't want the IP address of your PBX changing. Phones and phone calls need to know how to find your PBX, and if your internal IP address changes because of DHCP, that's a problem. You have two choices. Either set your router to always hand out the same DHCP address to your PBX in a Flash server by specifying its MAC address in the reserved IP address table of your router, or run netconfig at the command prompt and assign a permanent IP address to your server. If you experience problems with the process, see this message thread on the forum. The third configuration requirement probably accounts for more beginner problems with Asterisk systems than everything else combined. Read the next section carefully and do it now!

Getting Rid of One-Way Audio. There are some settings you'll need to add to /etc/asterisk/sip_custom.conf if you want to have reliable, two-way communications with Asterisk: nano -w /etc/astersk/sip_custom.conf. The entries depend upon whether your Internet connection has a fixed IP address or a DHCP address issued by your provider. In the latter case, you also need to configure your router to support Dynamic DNS (DDNS) using a service such as dyndns.org. If you have a fixed IP address, then enter settings like the following using your actual public IP address and your private IP subnet:

externip=180.12.12.12
localnet=192.168.1.0/255.255.255.0      (NOTE: The first 3 octets need to match your private IP addresses!)

If you have a public address that changes and you're using DDNS, then the settings would look something like the following:

externhost=myserver.dyndns.org
localnet=192.168.0.0/255.255.255.0      (NOTE: The first 3 octets need to match your private IP addresses!)

Once you've made your entries, save the file: Ctrl-X, Y, then Enter. Reload Asterisk: amportal restart. If you assigned a permanent IP address, reboot your server: shutdown -r now.

Activating Email Delivery of Voicemail Messages. We've previously shown how to configure systems to reliably deliver email messages whenever a voicemail arrives unless your ISP happens to block downstream SMTP mail servers. Here's the link in case you need it. As it happens, you really don't have to use a real fully-qualified domain name to get this working. So long as the entry (such as pbx.dyndns.org) is inserted in both the /etc/hosts file and /etc/asterisk/vm_general.inc with a matching servermail entry of vm@pbx.dyndns.org (as explained in the link above), your system will reliably send emails to you whenever you get a voicemail if you configure your extensions in freePBX to support this capability. You can, of course, put in real host entries if you prefer. For 90% of the systems around the world, if you just want your server to reliably e-mail you your voicemail messages, make line 3 of /etc/hosts look like this with a tab after 127.0.0.1 and spaces between the domain names:

127.0.0.1     pbx.dyndns.org pbx.local pbx localhost.localdomain localhost

And then make line 6 of /etc/asterisk/vm_general.inc look like the following:

serveremail=voicemail@pbx.dyndns.org

Now issue the following two commands to make the changes take effect:

service network restart
amportal restart

The command "setup-mail" can be used from the Linux prompt to set the fully-qualified domain name (FQDN) of the mail that is sent out from your server. This may help mail to be delivered from the PBX. One of things mail servers do to reduce spam is to do a reverse lookup on where the mail has come from, checking that there is actually a mailserver at the other end. You can only do this if you have set up dynamic DNS or if you have pointed a hostname at your fixed IP address. Once you have done this, and assuming your ISP is cooperative, then you will receive your voicemails via email if you wish (this is set within FreePBX),and your PBX will email you when FreePBX needs an update. You set this feature in FreePBX General Settings.

If your hosting provider blocks downstream SMTP servers to reduce spam, here's a link on the PBX in a Flash forum to get you squared away.

Setting Passwords and Other Stuff. While logged into your server as root, you can configure many of the 'lesser' passwords on your system (i.e. those passwords with less than root privileges) as well as phones, ZAP hardware, and other goodies. The only command you have to remember is help-pbx. Be aware that there are four different usernames and passwords that are enforced in the web interface to your PBX:

maint... to go everywhere
wwwadmin... for users needing FOP and MeetMe access
meetme... for users needing only MeetMe access
FreePBX... default username:password for admin access is admin:admin

There also is an Administration password which can be set in the KennonSoft UI which appears when you point a browser at the IP address of your server. Do NOT use the same Admin password here that you use elsewhere because this one is not overly secure.

Configuring WebMin. WebMin is the Swiss Army Knife of Linux. It provides TOTAL access to your system through a web interface. Search Nerd Vittles for webmin if you want more information. Be very careful if you decide to enable it on the public Internet. You do this by opening port 9001 on your router and pointing it to the private IP address of your PBX in a Flash server. Before using WebMin, you need to set up a username and password for access. From the Linux prompt while logged in as root, type the following command where admin is the username you wish to set up and foo is the password you've chosen for the admininstrator account. HINT: Don't use admin and foo as your username and password for WebMin unless you want your server trashed!

/usr/libexec/webmin/changepass.pl /etc/webmin admin foo

To access WebMin on your private network, go to http://192.168.0.123:9001 where 192.168.0.123 is the private IP address of your PBX in a Flash server. Then type the username and password you assigned above to gain entry. To stop WebMin: /etc/webmin/stop. To start WebMin: /etc/webmin/start. For complete documentation, go here.

Updating and Configuring FreePBX. FreePBX is installed as part of the PBX in a Flash implementation. This incredible, web-based tool provides a complete menu-driven user interface to Asterisk. The entire FreePBX project is a model of how open source development projects ought to work. And having Philippe Lindheimer's as the Captain of the Ship is just icing on the cake. All it takes to get started with FreePBX is a few minutes of configuration, and you'll have a functioning Asterisk PBX complete with voicemail, music on hold, call forwarding, and a powerful interactive voice response (IVR) system. There is excellent documentation for FreePBX which you should read at your earliest convenience. It will answer 99% of your questions about how to use and configure FreePBX. For the one percent that is not covered in the Guide, visit the FreePBX Forums which are frequented regularly by the FreePBX developers. Kindly post FreePBX questions on their forum rather than the PBX-in-a-Flash Forum. This helps everybody. Now let's get started.

NOTE: PBX in a Flash comes with the IPtables firewall enabled on your system. If this causes problems with access to the FreePBX repository (for loading the FreePBX updates below), you can easily (and temporarily) turn off the firewall. Type help-pbx for assistance. Don't forget to restart the firewall especially if your system has any Internet exposure!

Now move to a PC or Mac and, using your favorite web browser, go to the IP address you deciphered above for your new server. Be aware that FreePBX has a difficult time displaying properly with IE6 and IE7 and regularly blows up with older versions of Safari. Be safe; use Firefox. From the PBX in a Flash Main Menu in your web browser, click on the Administration link and then click the FreePBX button. The username and password both default to admin. Click Apply Configuration Changes, Continue with Reload, and then Refresh your browser screen. Now click the Module Administration option in the left frame once FreePBX loads. Now click Check for Updates online in the upper right panel. Next, click Download All which will select every module for download and install. The important step here is to move down the list and Deselect Speed Dials and PHPAGI from the download and install options. You may also want to deselect Zork. Once these apps have been deselected, scroll to the bottom of the page and click Process, then Confirm, then Return once the apps are downloaded and installed, then Apply, then Continue with Reload. Now repeat the process once more and do not deselect the two applications, then Process, Confirm, Return, Apply Config Changes, and Continue with Reload. Finally, scroll down the Modules listing until you get to the Maintenance section. Click on each of the following and choose Install: ConfigEdit, Sys Info, and phpMyAdmin. Then click Process, then Confirm, then Return once the apps are downloaded and installed, then Apply, then Continue with Reload. All three of these tools now are installed in the Maintenance section of the Tools tab of FreePBX. You now have an up-to-date version of FreePBX. You'll need to repeat the drill every few weeks as new updates are released. This will assure that you have all of the latest and greatest software. To change your Admin password, click on the Setup tab in the left frame, then click Administrators, then Admin in the far right column, enter a new password, and click Submit Changes, Apply Configuration Changes, and Continue with reload. We're going to be repeating this process a number of times in the next section so... when instructed to Save Your Changes, that means "click Submit Changes, Apply Configuration Changes, and Continue with reload."

Choosing Internet Telephony Hosting Providers for Your System. Before you can place calls to users outside your system or to receive incoming calls, you'll need at least one provider (each) for your incoming phone number (DID) and incoming calls as well as a provider for your outbound calls (terminations). We have a list of some of our favorites here, and there are many, many others. Within a few weeks, we also will have some providers that will offer you some free minutes for trying their service with PBX in a Flash. You basically have two choices with most providers. You can either pay as you go or sign up for an all-you-can-eat plan. Most of the latter plans also have caps on minutes, and there are none of the latter plans for business service. In the U.S. market, the going rate for pay as you go service is about 1.5¢ per minute rounded to the tenth of a minute. The best deal on DIDs is from les.net. They charge $3.99 a month for a DID with unlimited, free incoming calls. We will have a free offer from les.net for PBX in a Flash users shortly. Another new provider with excellent service and per minute rates is Aretta Communications out of Atlanta. They also have agreed to co-host our ISO downloads for the U.S. East Coast. Thanks, Aretta! WARNING: Before you sign up for any all-you-can-eat plan, do some reading about the service providers. Some of them are real scam artists with backbilling and all sorts of unconscionable restrictions. You need to be careful. Our cardinal rule in the VoIP Wild West is never, ever entrust your entire PBX to a single hosting provider. As Forrest Gump would say, "Stuff happens!" And life's too short to have dead telephones, even if it's a rarity. NEWS FLASH: Here's a link to an AxVoice offer of free setup, a free DID in your choice of area codes, and a month's free minutes to get you started in the U.S. and Canada.

Setting Up FreePBX to Make Your First Call. There are four components in FreePBX that need to be configured before you can place a call or receive one from outside your PBX in a Flash system. So here's FreePBX for Dummies in less than 50 words. You need to configure Trunks, Extensions, Outbound Routes, and Inbound Routes. Trunks are hosting provider specifications that get calls delivered to and transported from your PBX to the rest of the world. Extensions are internal numbers on your PBX that connect your PBX to telephone hardware or softphones. Inbound Routes specify what should be done with calls coming in on a Trunk. Outbound Routes specify what should be done with calls going out to a Trunk. Everything else is basically fluff.

Trunks. When you sign up with most of the better ITHP's that support Asterisk, they will provide documentation on how to connect their service with your Asterisk system. If they have a trixbox tutorial, use that since it also used FreePBX as the web front end to Asterisk. Here's an example from les.net. And here's the Vitelity support page although you will need to set up an account before you can access it. We also have covered the setups for a number of providers in previous articles. Just search the Nerd Vittles site for the name of the provider you wish to use. You'll also find many Trunk setups in the trixbox Trunk Forum. Once you find the setup for your provider, add it in FreePBX by going to Setup, Trunks, Add SIP Trunk. Our AxVoice setup (which is all entered in the Outgoing section with a label of axvoice) looks like this with a Registration String of yourusername:yourpassword@sip.axvoice.com:

allow=ulaw
authname=yourusername
canreinvite=no
context=all-incoming
defaultip=sip.axvoice.com
disallow=all
dtmfmode=inband
fromdomain=sip.axvoice.com
fromuser=yourusername
host=sip.axvoice.com
insecure=very
nat=yes
secret=yourpassword
type=friend
user=phone
username=yourusername

And our Vitelity Outbound Trunk looks like the following (labeled vitel-outbound) with no registration string:

allow=ulaw&gsm
canreinvite=no
context=from-pstn
disallow=all
fromuser=yourusername
host=outbound1.vitelity.net
secret=yourpassword
sendrpid=yes
trustrpid=yes
type=friend
username=yourusername

Extensions. Now let's set up a couple of Extensions to get you started. A good rule of thumb for systems with less than 50 extensions is to reserve the IP addresses from 192.x.x.201 to 192.x.x.250 for your phones. Then you can create extension numbers in FreePBX to match those IP addresses. This makes it easy to identify which phone on your system goes with which IP address and makes it easy for end-users to access the phone's GUI to add bells and whistles. To create extension 201 (don't start with 200), click Setup, Extensions, Generic SIP Device, Submit. Then fill in the following blanks leaving the defaults in the other fields for the time being.

User Extension ... 201
Display Name ... Home
Outbound CID ... [your 10-digit phone number if you have one; otherwise, leave blank]
Emergency CID ... [your 10-digit phone number for 911 ID if you have one; otherwise, leave blank]
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

Now create several more extensions using the template above: 202, 203, 204, and 205 would be a good start. Keep the passwords simple. You'll need them whenever you configure your phone instruments.

Outbound Routes. The idea behind multiple outbound routes is to save money. Some providers are cheaper to some places than others. We're going to skip that tutorial today. You can search the site for lots of information on choosing providers. Assuming you have only one or two for starters, let's just set up a default outbound route for all your calls. Using your web browser, access FreePBX on your server and click Setup, Outbound Routes. Enter a route name of Everything. Enter the dial patterns for your outbound calls. In the U.S., you'd enter something like the following:

1NXXNXXXXXX
NXXNXXXXXX

Click on the Trunk Sequence pull-down and choose your providers in the order you'd like them to be used for outbound calls.Click Submit Changes and then save your changes. Note that a second choice in trunk sequence only gets used if the calls fails to go through using your first choice. You'll notice there's already a 9_outside route which we don't need. Click on it and then choose Delete Route 9_outside. Save your changes.

Inbound Routes. We're also going to abbreviate the inbound routes tutorial just to get you going quickly today. The idea here is that you can have multiple DIDs (phone numbers) that get routed to different extensions or ring groups or departments. For today, we recommend you first build a Ring Group with all of the extension numbers you have created. Once you've done that, choose Inbound Routes, leave all of the settings at their default values and move to the Set Destination section and choose your Ring Group as the destination. Now click Submit and save your changes. That will set up a default incoming route for your calls. As you add bells and whistles to your system, you can move the Default Route down the list of priorities so that it only catches calls that aren't processed with other inbound routing rules.

General Settings. Last, but not least, we need to enter an email address for you so that you are notified when new FreePBX updates are released. Scroll to the bottom of the General Settings screen after selecting it from the left panel. Plug in your email address, click Submit, and save your changes. Done!

A more detailed tutorial complete with screenshots is under development and will be available shortly, but we wanted to provide those just getting started with Asterisk sufficient information today to get a working system.

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 several choices: a POTS phone, a softphone, or a SIP phone. 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. Assuming your extensions were set up starting with 201, do the following. Enter House Phone as the Display Name. Enter 201 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 1234# to test it out.

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 another great SIP/IAX softphone for all platforms that's great, too, and it requires no installation: Zoiper 2.0 (formerly IDEfisk). All are free! Just install and then configure with the IP address of your PBX in a Flash server. For username and password, use one of the extension numbers and passwords which you set up 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 (but probably not the best sound quality) is the $79 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. Some other great choices are the Aastra 9133i and the Siemans Cordless Dect phone. Do some reading before you buy. The Voxilla forums are a good place to start.

A Word About Ports. For the techies out there that want "the rest of the story" to properly configure firewalls, here's a list of the ports available and used by PBX in a Flash:

TCP 80 - HTTP
TCP 9080 - Duplicate HTTP
TCP 22 - SSH
TCP 9022 - Duplicate SSH
TCP 9001 - WebMin
UDP 10000-20000 - RTP
UDP 5004-5082 - SIP
UDP 4569 - IAX2
UDP 2727 - Media Gateway

A2Billing Installation. Our first example of how we plan to build up PBX in a Flash systems is the installation script for A2Billing. If you want A2Billing installed on your system, then log in as root and type install-a2billing. If you don't want A2Billing, then you don't download or run the script. When you return to the main web page for your server after installing A2Billing, you will have two new links for A2Billing customers and A2Billing admin. You will have to install the callback funtionality manually from the docs supplied in the install. A2Billing was created by Areski, who some of you may know was responsible for Web MeetMe, ConfigEdit, and the CDR reports included with FreePBX. A2Billing is sufficiently comprehensive that it warrants an article on its own, so we will save that for another day. Some of the projects we will be looking into are how to pass calls from FreePBX to A2Billing for least-cost routing, departmental billing services, building a calling card server, and a VoIP termination platform. Then you can change your name to Ma Bell and start selling minutes to all the people for whom you have installed PBX-in-a-Flash. If you can't wait, visit asterisk2billing.org.

Nerd Vittles Coming Attractions. First, we will have a new script repository up and running in a few days at pbxinaflash.org. Tom King, the ultimate scripting guru will be managing that site. So check it often. And now that PBX in a Flash is out the door, we're chomping at the bit to get all of the Nerd Vittles Goodies ported over. If you want to try one yourself, start with Weather by Airport Code which installs in under 5 minutes. Put your dialplan code in extensions_custom.conf, and be sure to heed the Asterisk 1.4 mod which is explained in the article. Hold off on AsteriDex because we have an updated version of that one for you within the next few weeks. If you still have a DBT-120 Bluetooth adapter, you'll be happy to learn that it works out-of-the-box with both the Linux and Windows versions of PBX in a Flash. Just take a look at our recent iPhone article on Proximity Detection, and you can configure your system to transfer your phone calls to your cellphone when you leave the house carrying your Bluetooth cellphone in about 5 minutes. Now spend some time reading up on FreePBX and enjoy your new toy. Santa came early this year!

Bug Fixes. There's only been one reported bug (horrors!) in PBX-in-a-Flash, but we wanted to provide a way to report them and to address them. So there's a new PBX-in-a-Flash forum dedicated to bug reporting and fixes. Be sure to visit once in a while just to keep your system current.


Some Recent Nerd Vittles Articles of Interest...

Announcing PBX-in-a-Flash: A New Asterisk Platform for Everyman… and Woman!

We’ve been keeping a low profile for a few weeks, and now it’s time to let the cat out of the bag. As some of you know, we just haven’t been thrilled with the direction of the trixbox project lately. Without boring everyone with a lot of detail, suffice it to say that it’s just gotten a little too proprietary, too closed, and too commercial for our open source, puritanical tastes. So today, with a bunch of help from some really sharp folks, we embark upon a new open source project that we hope will become the best-of-breed Asterisk®-based development platform. Our design goals are simple: a very modular system that meets the needs of Asterisk experimenters as well as those looking for a reliable, scalable, IP-based business telephony solution with all the bells and whistles.

Our up front promise is to keep the project open, participatory, reliable, and fun. After all, that’s what the Asterisk revolution was and is all about. The plan is to provide a free ISO-based offering for home or office use that will run on a dedicated Linux machine. There also will be a VMware image that will run on a Windows desktop. And, for the Mac desktop, we’ll provide both a VMware and a Parallels image. Down the road, when you get sick of babysitting your own hardware and worrying about fault tolerance and backups, there will be a transparent option to migrate your entire system to a dedicated, hosted service with very reasonable pricing for one trunk or hundreds. The system can be scaled to meet almost every business need. And, if you ever want to reverse-migrate back to a system that you maintain, that option will be available as well. The hosted option is about 1 millisecond off the Internet backbone in Atlanta so we’re doubtful there will be a lot of reverse migrations.

The free ISO-based offering as well as the hosted alternative will include a bucket of minutes for some free calls in the U.S. to get you started. You can add your own providers at any time or provide a credit card and continue to use the preconfigured services. For the desktop, both the ISO-based and hosted offerings will include instructions for use of a preconfigured softphone. Or you can purchase an auto-configurable phone.

As for the ISO-image, it’ll have all your favorites: CentOS 5, Asterisk 1.4, FreePBX, Apache, MySQL, PHP, phpMyAdmin, SendMail, Perl, Flite, and, of course, all of the Nerd Vittles Goody Bag: weather forecasts by zip code, airport code, and international forecasts as well as the NewsClips news reader, the MailCall email reader, AsteriDex phone directory, TeleYapper, Telephone Reminder System, Podcast Studio, and more. Everything else is optional. There will be free scripts to install every Asterisk-compatible application on the planet. Can you add your own stuff? Absolutely. Can you help by adding stuff to the PBX-in-a-Flash repository? We hope you will. And, last but not least, there’s a new Nerd Vittles Forum where you can get lots of help at no cost when you get stumped. Sign up now, and you’ll be all set. We’re all ears for suggestions already!

Show Me the Beef. Yeah. We wish it were ready today, too. But we’re shooting for early November unless we eat too much candy on Halloween. Either way, it won’t be long. Can we tell you who all the players are today? Well, we could, but then we’d have to shoot you. So hang in there for a couple more weeks, and we’ll have the first beta for you to sink your teeth into.


Some Recent Nerd Vittles Articles of Interest…

Back to School Time: The Bleeding Edge of Asterisk, Part 1

blankNOTE: 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 been almost a year since we released our turnkey trixbox 1.2.3 system for Windows which relied upon CentOS 4 and Asterisk 1.2 and included all of the Nerd Vittles goodies. There have been dozens of security patches not to mention entirely new generations of Asterisk, trixbox, FreePBX, CentOS, MySQL, and PHP code. Just look at our pathetic graphic, and you'll know how much things have changed in the last year while we were building applications. As school begins this week, we decided to get a little education on our own, and we've begun the process of building a VMware image of trixbox 2.x with CentOS 5 and Asterisk 1.4 support. As frequent readers of our column already know, our #1 Pet Peeve is programmers that write new code that breaks other folks' existing code for no reason. We can quibble about what that means but basically Asterisk 1.4 needlessly breaks a lot of applications because of rip-and-replace syntax changes. It's certainly okay to add new command syntaxes, but why would you trash thousands of perfectly functional applications by refusing to add a few lines of code to translate the old syntax into the new one? Here's a good example. In previous versions of Asterisk, you set the timeout for responses from an IVR system with code that looked like this: exten => 611,4,ResponseTimeout(7). To do the same thing in Asterisk 1.4, the syntax looks like this: exten => 611,4,Set(TIMEOUT(response)=7). No big deal, you might be saying. Well, it's a VERY BIG DEAL! It breaks every IVR application on Planet Asterisk. <end of rant... well, almost>

Way back when we actually worked with programmers in years' past, we always started with the proposition that you shouldn't break something that already works when new versions of code are released. Unfortunately, this is a problem in the open source community and especially in our VoIP World. People get so excited to include new stuff in a new version that they forget/ignore/don't test features that were previously available. But we understand that betas do not have complete code sets, and we're using a trixbox 2.3 beta today to have some fun on the bleeding edge. So, be forewarned that everything may not be quite perfect. And, unfortunately, the new trixbox design makes it virtually impossible for mere mortals to add much code on their own to fix things. Lucky for all of us, there are some terrific scripts produced by Tom King. Tom has single-handedly taken over much of the drudgery of smoothing out some of the wrinkles in trixbox. And, thanks to Tom, we've pretty much gotten out of that business... until today.

One of the concerns expressed when Fonality acquired trixbox was that the trixbox code would languish. It certainly hasn't done that, but Bleeding Edge code can pose some problems of its own. We're going into this with our eyes wide open and our sleeves rolled up so... not to worry! We would hasten to add that Andrew and Kerry and the rest of their crew at Fonality have been tireless in their dedication to the trixbox platform. We're all grateful for all that they've done and continue to do. And Chris Lyman's support of the open source Asterisk community has been nothing short of fantastic as well! We just hope that some of what we cover today will find its way into the final trixbox 2.4 release... so we don't have to do this all over again in a month or two.

First, the Bad News. We don't have a finished VMware product for you yet because there was lots of Nerd Vittles code to rewrite. But we're darn close to a perfect Asterisk 1.4 platform with a huge helping hand from Tom. We thought it might be equally useful to walk through some of the challenges that await anyone who decides to try this alone (without Tom's script) on a dedicated Linux box. So here we go...

Let's begin with a summary of what we're starting with and what our objective will be. Digium® is pushing everyone to get off the 1.2 Asterisk® platform and move on to Asterisk 1.4. In fact, the end of life date for Asterisk 1.2 was August 1, 2007. We're going to avoid the temptation of explaining how unreasonable that date is in the telephony business (most phone systems are designed to last for a decade, not a year). Well, we did tell you. But let's move on. Then there's freePBX which is the terrific front-end to Asterisk. Remember, Asterisk 1.4 broke large chunks of their code. Here's their take on life with 1.4. The silver lining is that the freePBX development crew released the production version of 2.3 supporting Asterisk 1.4 this past Saturday. Now we get to trixbox which rolls together dozens of other products and has had to make generational leaps in the Linux distribution, MySQL,and PHP plus upgrades to the web server, FTP server, Perl, and on and on. When you recall that none of these products were designed by the same groups, you'll start to appreciate how daunting this task can become. Then there are the whiners like us that just write application software so that people can do cute tricks with their phone systems.

Once we get all the pieces talking to one another and functioning, there's the final issue of hardware. With CentOS 5 and Asterisk 1.4, the processor demands particularly to run this Asterisk-based PBX under VMware on your Windows desktop are substantial. For those accustomed to our speedy TrixBox 1.2.3 image, this one is not equivalent. We've always recommended using the free Process Explorer tool to bump up the Process Priority of vmware-vmx.exe and vmware.exe to 13 (High) on your Windows Desktop. Just highlight each application in the list of running apps and click Process, Set Priority, High. To get equivalent voice synthesis performance with CentOS 5 and Asterisk 1.4 on the identical machine now requires a setting of 24 (Realtime) for these apps which is all but unheard of on a Windows machine. If you happen to have a multi-processor machine or a new dual-core system with lots of RAM, you may be able to avoid this step. Just be forewarned that this new application probably isn't going to run satisfactorily on grandma's 3-year old Windows XP desktop.

Let the Downloads Begin. We begin this process by downloading the trixbox image. The one you'll want is 2.3.0.1 (not 2.3.0.2!). It has CentOS 5, Asterisk 1.4, and freePBX 2.3. Unfortunately, they're not the current and patched versions of any of these products because the world keeps changing every day. So you have a Hobson's Choice to make here. You can stick with the trixbox team and wait for them to release each little piece of the puzzle. Or you can convert your system into a more vanilla Linux distribution so that you can make changes yourself. Once you do this, however, you may break some of the cradle-to-grave trixbox support and the trixbox upgrade mechanism which also happens to require registration. Tom indicates that for most updates, this is not the case. Either way, we're doing this to enjoy the bleeding so, of course, we want the free and open model. This assures we can load what we need. YMMV! This conversion process used to be really painful, but now it's not. Why? Because Tom King has made it easy by providing a script that does all the conversion and upgrade work for you. Documentation for the script can be downloaded from Tom's site. We would hasten to add that we've been comparing notes with Tom so today's edition of Tom's script now includes almost all of the tweaks that follow.

After you install trixbox 2.3.0.1 (and we're doing this using VMware Workstation on a Windows desktop but it'll work similarly on a dedicated Linux installation), it's time to run Tom's script. Log into your trixbox server as root and issue the following commands. Note to NEWBIES: This column probably is not the best place for you to start your Asterisk exploration. Try one of the links at the top of this page. They just work... out of the box.

cd /root
wget http://nerdvittles.com/trixbox2/updatesrc14.sh.gz
gunzip updatesrc14.sh.gz
chmod +x updatesrc14.sh
dos2unix updatesrc14.sh
./updatesrc14.sh

The script takes a while to run and you're well advised to also open a separate SSH session to your new trixbox server with putty (also free) so that you can supply needed commands when prompted without having to stop and reboot your server to continue the upgrade process. The script may stop once in a while and, if it does, pressing <enter> will gets things moving again.

Upgrading freePBX. The most critical component of this new system is freePBX. Complete documentation for this incredible Asterisk web GUI can be accessed here. There's also an active set of forums plus the trixbox forums for more immediate assistance. Of particular note, there are only three known bugs with this version of freePBX, and those are minor. In fact, the final release of FreePBX 2.3 was released as we were putting the finishing touches on this article.

To get things going, restart your system after completion of the script above. Once Asterisk is running, use a web browser to access freePBX at the following address: http://serverIPaddress/admin/. The username is maint and the password is password. Click on the Setup tab and then Module Admin. Click Check for Updates on line. You'll need to download these in clumps. If you get errors loading some of them, skip those and move on. When you finish the rest, go back and try the ones that didn't install again. Then your system will be up to date. When you click the FreePBX System Status tab in the left column, the system will now tell you which new updates are available. Stay current! New goodies arrive regularly. You can safely ignore the warnings about the default MySQL and Asterisk Manager passwords being used. The default setup of trixbox protects these applications from the outside world so, unless you change the default settings to permit Internet access to MySQL or the Asterisk Manager, this isn't a problem.

Restoring Text-to-Speech Capabilities Using Flite. Most of the Nerd Vittles goody bag is dependent upon text-to-speech voice synthesis with Flite. It doesn't work with tribox 2.x as delivered. Here's how to restore it, but Tom's script will now do all of this for you. Otherwise, after a reboot, log into your trixbox server as root and issue the following commands (in order):

cd /root
wget http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/extras/5/i386/flite-1.3-8.fc5.i386.rpm
wget http://mirrors.tummy.com/pub/fedora.redhat.com/fedora/linux/extras/5/i386/flite-devel-1.3-8.fc5.i386.rpm
rpm -Uvh flite*
yum install subversion subversion-devel
svn co https://dialogpalette.svn.sourceforge.net/svnroot/dialogpalette dialogpalette
cd dialogpalette/trunk/asterisk-flite
make
make install
shutdown -r now

If, for some reason, one or more of the above sites isn't working, you can download and install the files directly from Nerd Vittles with these commands:

cd /root
wget http://nerdvittles.com/trixbox2/flite.zip
unzip flite.zip
cd flite
rpm -Uvh flite*
cd dialogpalette/trunk/asterisk-flite
make
make install
cd /root
rm -r flite
rm -f flite.zip
shutdown -r now

Bringing Music On Hold Back From the Dead. After the freePBX updates (and maybe before), Music on Hold didn't function for things as simple as placing an incoming call on hold. Here's how to get it back. Tom's script now includes the necessary code to fix this as well. Suffice it to say, there was a missing directory. And a license file was improperly named which caused Message on Hold to fail. For the time being, you need both a /var/lib/asterisk/moh and a /var/lib/asterisk/mohmp3 directory, and both need to contain all of your music on hold files. You also need to remove the LICENSE text file from both directories and copy one of the existing files to a new file named LICENSE.wav in both directories. Then music on hold will work.

Activating Email Delivery of Voicemail Messages. We've previously shown how to configure any trixbox system to reliably deliver email messages whenever a voicemail arrives unless your ISP happens to block downstream SMTP mail servers. Here's the link in case you need it. Just search for the following heading: Activating Email Delivery of VoiceMail Messages. As it happens, you really don't have to use a real fully-qualified domain name to get this working. So long as the entry (such as trixbox1.dyndns.org) is inserted in both the /etc/hosts file and /etc/extensions/vm_general.inc with a servermail entry of vm@trixbox1.dyndns.org (as explained in the link above), your system will reliably send emails to you whenever you get a voicemail if you configure your extensions in freePBX to support this capability. You can, of course, put in real host entries if you prefer.

Resurrecting phpMyAdmin. Many of the Nerd Vittles applications also rely heavily upon MySQL databases. The only way to make installation of these apps relatively painless to install is to have phpMyAdmin working on your trixbox system. Unfortunately, it's missing from the 2.3 beta and the trixbox repository. The easiest way to remedy this deficiency now is to run Tom's script. If you'd prefer to do it manually, here are the steps. Log into your server as root and issue these commands:

cd /var/www/html/maint
wget http://nerdvittles.com/trixbox2/phpmyadmin.zip
unzip phpmyadmin.zip
cd /var/lib/php
chmod -R o+rwx session

Once installed, you can access phpMyAdmin with your web browser by pointing to the IP address of your Asterisk server with a command like the following:

http://192.168.0.22/maint/phpmyadmin/

Reviving Asterisk Weather Station by Airport Code. We'll finish for today by getting one of the major Nerd Vittles weather apps working under Asterisk 1.4 just to demonstrate that text-to-speech functionality is back from the dead. In coming weeks, we'll fix the rest of our applications. The complete installation tutorial is available on our Best of Nerd Vittles site. Complete the Database Setup and Changing Preferred Airport Codes steps as explained in the tutorial. The Dialplan Setup is already included in the trixbox beta, but it uses some Asterisk 1.2 commands that no longer work. Here's how to fix it. While still logged into your Asterisk server as root, edit the extensions_trixbox.conf file:

nano -w /etc/asterisk/extensions_trixbox.conf

Scroll down the dialplan until you find the lines beginning with exten => 611. Replace lines 3 and 4 with the following new code:

exten => 611,3,Set(TIMEOUT(digit)=7)
exten => 611,4,Set(TIMEOUT(response)=10)

Save your changes: Ctrl-X, then Y, then <Enter>. Then complete the freePBX Setup, AGI Script Setup, and System Setup sections of the tutorial. Restart Asterisk and you're good to go: amportal restart. The whole process should take you less than 5 minutes to complete.

The Future is Now. Now that we've whetted your appetite, take a look at some of Tom's other scripts for trixbox. There's almost nothing you can't do with a few more minutes of work: X Windows/KDE, Daily Backups, G729 and G723 codecs, server SSL, and who knows what else by tomorrow. Enjoy your new sandbox!


blankblankNerd Vittles Demo Hot Line (courtesy of les.net). You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include (1) MailCall for Asterisk with password 1111 (retrieve your email by phone), (2) NewsClips for Asterisk (latest news headlines in dozens of categories), (3) Weather Forecasts by U.S. Airport Code, and (4) Weather Forecasts by U.S. ZIP Code. You're not prompted for #4 yet, but it does work! Just call our number (shown above) 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. 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.

Managing Your Cellphone Calls with Asterisk or MagicJack

blankWe recently showed how to use Bluetooth on your cellphone to manage your home or office phone so that calls would automatically be forwarded to your cell phone when you left your home or office carrying your Bluetooth-enabled cellphone. Justin Cramer sent us a note suggesting that it was just as important to be able to manage your cell phone calls unless you enjoy paying your cellphone provider 20¢ per minute to transfer all of your cell calls to the office number. Verizon, Sprint, and AT&T probably aren’t overly enthusiastic about your taking over their hubs to route your own cellphone calls… especially for free. But there is an inexpensive way to do it with Asterisk® or TrixBox, and today we’ll walk you through it. If you didn’t read our previous article on Bluetooth, start there to get up to speed on Bluetooth call routing in case you want to add that feature. But, frankly, you can automatically manage your cellphone from your Asterisk server without Bluetooth and without touching anything when you leave your home or office. Here’s how…

Ingredients. You’re going to need an Asterisk server to make all of this work. Well, not really, but we’ll save that for last. The easiest way to get started is to download one of our preconfigured TrixBox systems from the links at the top of this page. There’s a Linux flavor as well as Windows and Mac versions so pick your poison. They’re all free. The trick to making all of this work is that you’ll need a new phone number (DID) to give out for your cellphone calls. We’ll install this DID on your Asterisk server. Next, we’ll create an Asterisk extension to route calls to your real cellphone number. Finally, we’ll add some smarts to your server so that cellphone calls get routed to BOTH your home or office extension and your cellphone. That way you can pick up the incoming calls on a regular extension when you’re home and answer your cellphone when you’re away. Justin mentioned that he paid $42 to his cellphone provider one month just to transfer incoming cell calls to his office. The Asterisk approach we’re recommending today will cost you $3.99 a month for the incoming DID and almost nothing to route the calls to your cellphone if you’re using an all-you-can-eat VoIP provider or just over a penny a minute if you’re using a pay-as-you-go provider. See our recommended list of providers if you’re just getting started and need some suggestions.

Installing a DID. We’ve got to have a phone number on your Asterisk server that you can publish as your "cellphone number" for your customers. This is the number they will call to reach you on your cellphone. When a call comes in on this number, the Asterisk server will then ring both your real cellphone and one or more extensions on your Asterisk system. As an alternative, you can have incoming cell calls roll over to your office extensions after a certain number of seconds with no answer. But this will delay answering incoming calls at home which you may not want to do.

Our favorite DID provider is les.net. You can get a DID in numerous area codes with unlimited, free incoming calls with two simultaneous incoming trunks for $3.99 a month. Another option is a toll-free number from Vitelity. That will cost you 50¢ a month plus 1.9¢ a minute for each incoming call. Either approach works well for this application. Just keep in mind that each completed call to your actual cellphone requires two trunks, one for the inbound call through your published DID number and a second outbound call from your Asterisk server which patches the inbound call over to your cellphone.

Once you get signed up and choose your DID, you then have to configure an inbound trunk on your Asterisk system. Log into your account with your provider and use the recommended setup to add a SIP Trunk for les.net or Vitelity using freePBX on your Asterisk server.

Adding Cellphone Extensions. It’s really easy to add "extensions" which dial directly to your cellphones or phones in remote locations. Just create a new Ring Group, give it a Group Number specifying the extension number you want to dial to complete the call (e.g. 244), choose hunt for the Ring Strategy, enter your cellphone number in the extension field with a # on the end using a dial string that matches your existing outbound trunk requirements (e.g. 16781234567# if your provider requires a 1-areacode-number format), choose a ring time in seconds, and a destination extension if no answer. Make sure the time you enter is less than the time used by your cellphone provider to transfer unanswered calls to voicemail. A better approach we think is to enter your cellphone number AND several extension numbers on your Asterisk system to the call list. Now change hunt to ringall, and ALL of the numbers (including your cellphone) will be called simultaneously instead of sequentially. Save your Ring Group entry, click the Red bar to reload Asterisk, and then dial the Ring Group extension number from any phone on your Asterisk system to test it.

Creating an Inbound Route. Now that the cellphone ring group is working, all we need to do is tie this cellphone "extension" to the incoming trunk we set up previously. You do this in freePBX using an Inbound Route. Click Setup->Inbound Routes->Add Incoming Route. Enter the DID Number of your inbound trunk. Then skip down to the Fax Handling section and specify freePBX Default, Fax Detection Type: NVFax, and Pause After Answer: 3. This gives Asterisk time to set up an incoming call without losing any of the voice data. Finally, move down to the Set Destination section of the form and choose Ring Groups and pick the ring group number you set up previously for these calls. Click Submit and then the Red Bar to update Asterisk. Move your new Incoming Route up the list on the right so that it precedes the catch-all inbound route. Finally, test out the system by calling your DID from a phone that’s not on your Asterisk system. Both your cellphone and Asterisk extensions should start ringing. You may notice that the office extensions ring once or twice before the cellphone rings begin. This is a normal delay while your cellphone provider is setting up the inbound cellphone call. You now have a cellphone service in place that will ring your office phones whenever you’re in the office while still permitting you to answer the calls on your cellphone when you’re away. Enjoy!

The Low-Cost Alternatives. Last week, you may recall that we wrestled with a new product, MagicJack, which promises unlimited calling in the U.S. and Canada for under $20 a year. There’s also a $20 USB device you need to plug into a Windows XP or Vista machine to get everything working. After the developers read of our difficulties, they promptly contacted us and sent us a replacement unit. RHIP! That’s short for Reviewing Has Its Privileges! I’m happy to report that we installed the replacement unit without a hitch… in a Windows Vista machine with a patch from the vendor. Still no cigar with the XP machine, even with a powered USB hub which the vendor recommended. We’re still wrestling with it and will let you know when the problems are resolved. If you’re a pioneer and understand the risks, by all means get one. Once we got clean code on a functioning MagicJack, the product worked flawlessly and voice quality on the calls was excellent. Calls were crystal clear. Phones rang when a call arrived, and voicemail picked up when the calls went unanswered. That’s as good as it gets in our book, and you can’t beat the price: under $20 a year for unlimited calling in the U.S. and Canada.

One of the perks of the MagicJack is that you get a free phone number with the product. DIDs currently are limited to a handful of area codes; however, within the next few weeks, you’ll be able to modify your assigned number and choose a local number in any of the 31 largest American cities at no cost. Another scheduled addition to MagicJack is the ability to forward incoming calls to another number when you’re away. So now you see what all of this has to do with today’s article. You could also do much the same thing using Google’s GrandCentral, and it’s not vaporware. But you don’t get the outbound calling option. So, even without an Asterisk server, it’s entirely possible (or will be soon) to manage your cellphone calls solely through a MagicJack for under $20 a year or through GrandCentral for free. And you get unlimited, free outbound calls to anywhere in the U.S. and Canada as an added bonus with MagicJack. If you don’t have the time or the inclination to set up an Asterisk server to manage your cellphone calls, here are a couple of low-cost alternatives that may work for you.


blankblankNerd Vittles Demo Hot Line (courtesy of les.net). You now can take a number of Nerd Vittles projects for a test drive… by phone! The current demos include (1) MailCall for Asterisk with password 1111 (retrieve your email by phone), (2) NewsClips for Asterisk (latest news headlines in dozens of categories), (3) Weather Forecasts by U.S. Airport Code, and (4) Weather Forecasts by U.S. ZIP Code. You’re not prompted for #4 yet, but it does work! 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. 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.


Some Recent Nerd Vittles Articles of Interest…

magicJack: Could It Be the Asterisk Killer?

blank"Well, of course, not!" You’re probably like us. Anything with Magic in the name and Free in the advertising usually makes us start scurrying toward the nearest fire exit. Well, not so fast, Tonto. magicJack is a brilliant idea: a $20 USB dongle that plugs into any Windows XP PC. Then for $20 a year, you plug in any garden-variety telephone, and you get unlimited, free calls to any phone in the U.S. and Canada. That’s not quite free, but it’s close enough in our book. Released in April at the TED conference, the device design has just about everything right. And it’s all done with VoIP technology. You get a real telephone number in your favorite area code. You use a real telephone to make calls. And incoming calls can ring on both your regular phone (plugged into the magicJack) AND your cellphone… soon.

The only prerequisite is that you have to have at least your main phone connected through the magicJack to a working Windows XP machine. Vista support is now available but we didn’t test it. With cordless phone systems supporting a dozen extensions, the Windows machine requirement with an attached phone is not much of a drawback for most folks. Let’s just tick off who qualifies as the perfect audience for a device like this. Grandma and grandpa, traveling sales people, teenage girls, schools, nursing homes, summer camps, bars, resort hotels, restaurants, college dorms, rental apartments, those with a second (or third) home, people that travel or live outside the U.S. and Canada that need to make calls back to North America at no cost. Remember, this works anywhere with an XP machine, a phone, and a broadband Internet connection. You can even dispense with the phone and use the included softphone if you desire. And the PC doesn’t have to be a Dell behemoth. It could be a tiny PC about the size of a stack of four CDs. The magicJack itself functions much like a Sipura SPA-1001 analog VoIP adapter with similar call quality except for the attached PC requirement. So now you’ve got the theory down. Let’s unbox the device and put it through some basic tests.

Installation and Setup. The hardest part of installation is getting the magicJack out of its packaging. If you love all those shrink-wrapped toys that cut your hands open when you try to pry them loose from the package, then you’ll really love the magicJack. It’s got two layers of the stuff. But, once you finally free the magicJack from its packaging, you’ll be up and running in under 2 minutes. Plug the cord of a regular telephone into the magicJack. Then plug the magicJack into a USB port on your (functioning) XP machine. It’ll automatically install itself in under a minute. Now reboot your machine. Once your PC comes back to life, unplug the magicJack and then plug it back in again (Bug #1). When prompted, you’ll need to authorize the magicJack to access the Internet through your firewall obviously. Then you’ll be prompted to enter your email address and set up a password. Once completed, you’re good to go. Well, sorta… The PC software, which is always running, is a combination of a softphone, a user interface to the magicJack, and a billboard where magicJack someday plans to host advertising. Now you can appreciate the main reason for the PC requirement. A terminal adapter doesn’t have a screen to display advertising. Of course, you can minimize this one so it’s not much of a distraction unless that functionality should change in coming months.

One Minute of Patience For A Lifetime of Savings. Great motto, but… it’s going to take more than a minute of patience once you get the software installed. We work with all sorts of phones and PBXs for a living so let us sum up the current state of affairs with magicJack: B-U-G-G-Y. The theory and design of the product are right on the money, but the software is just not yet reliable or even stable. We experienced frequent software crashes and glitches both at their end and at ours. Crashes on the Windows desktop require you to remove and reinsert the device. There’s really no other way to restart the device since it runs all the time when your PC is on. One call always seemed to work great in either direction. And the call quality was excellent with no echo. But then it was downhill from there. A surefire way to kill incoming calls was to dial your new number from the phone connected to the magicJack. You’re instructed to do this to reset your voicemail password. But once we did it, no incoming calls arrived until the PC was rebooted. All the calls went directly to voicemail. And that was hit and miss as well. You’d get a typical unavailable message, but then the system would abruptly hang up. And a dozen attempts to call the voicemail system from the device to reset the password all failed with three beeps and then nothing. It took us a while to figure out that this is what was killing inbound calls. This is a little puzzling since it appears they’re using a standard Asterisk® server at least for voicemail. Here was the From address on the email delivery of the voicemail message: Magicjack <voicemail@asterisk>. Another quick way to kill the system was to leave the PC idle for an hour, even without a screensaver. After that, nothing worked. No dialtone. No incoming calls. No softphone functionality.

The interaction between the PC softphone display and the POTS phone also was quirky. Sometimes the softphone would lose track of whether a call had been answered, and this typically killed the ability to receive any further calls. So you’ll want to stay close to your PC because walking around with a cordless phone would give you no clue whether a call had been properly disconnected. And, whatever you do, don’t try the Advanced User option to restart the software. That crashed and trashed just about everything necessitating (yet another) system reboot. If you loved Windows 3.1, then you’ll feel right at home wrestling with this software.

Bottom Line. We actually got the device from a friend with about as many cellphone stores as AT&T. My advice to him went something like this. Let’s give the developers another three months to get the kinks out. Then we’ll test it again before Christmas and see if things have improved. Our bottom line with telephone service is quite simple. When someone calls, the phone had better ring. And, when no one answers, the voicemail had better work. For pioneers, this is a terrific product for experimentation, but we wouldn’t choose it yet if reliable phone service matters. So our current comparison of the magicJack to our Asterisk system would be a no-brainer. We reboot our Asterisk system about once every six months. We rebooted the magicJack about a dozen times in the first hour, and all we were doing was placing less than a handful of test calls. You can click on the screenshot above to visit their web site. Stay tuned!


Some Recent Nerd Vittles Articles of Interest…

Asterisk Weather Station Updates

blankWell, our Asterisk® Weather Stations providing U.S. weather reports by zip code and airport code using your phone have come unglued again thanks to some more "improvements" from the National Weather Service. One of the problems with depending upon the web data of other organizations (such as the National Weather Service) is that, when they shift gears, you have to make adjustments to your applications as well. So this week is cleanup time at Nerd Vittles. In its continuing quest for the perfect web site, the National Weather Service decided last week to drop support for their Forecast at a Glance. This caused some wrinkles in both the Asterisk Weather Station by Airport Code and Zip Code applications which didn't know how to interpret the new menu. Personally, we were always big supporters of more federal holidays because it meant the bureaucrats and politicians had less time to screw things up. As we've said before, this new "improvement" is another good example of what happens when federal workers have too much time on their hands.

All of the Nerd Vittles weather applications for Asterisk (except the new Worldwide Weather Forecasts) depend upon NOAA web site information at a web link that looks like the following. You can enter either a zip code or a city and state. When you go to the new links, you'll notice that Forecast at a Glance is no longer the first option on the menu.

http://www.srh.noaa.gov/port/port_zc.php?inputstring=Charleston,SC

Here are the step-by-step instructions to update each application. These instructions assume that you've already installed the Weather Applications previously. If not, just choose your desired installation from the Best of Nerd Vittles site.

Installing Weather by Airport Code Update. To install the Weather by Airport Code update, log into your Asterisk server as root and issue the following commands:

cd /var/lib/asterisk/agi-bin
rm -f nv-weather2-zip.*
wget http://nerdvittles.com/wp-content/nv-weather2.zip
mv nv-weather.php nv-weather.old3.php
unzip nv-weather2.zip
rm -f nv-weather2.zip
chmod 775 nv-weather.php
chown asterisk:asterisk nv-weather.php

Installing Weather by Zip Code Update. To install the Weather by Zip Code update, log into your Asterisk server as root and issue the following commands:

cd /var/lib/asterisk/agi-bin
rm -f nv-weather-zip.zip
wget http://nerdvittles.com/trixbox123/nv-weather-zip.zip
mv nv-weather-zip.php nv-weather-zip.old3.php
unzip nv-weather-zip.zip
rm -f nv-weather-zip.zip
chown asterisk:asterisk nv-weather-zip.php
chmod 775 nv-weather-zip.php

Test Driving the Latest Asterisk Weather Applications. To use the Asterisk Weather Station by Airport Code, pick up any phone connected to your Asterisk server and dial 611. When prompted, key in the three-character Airport Code for the weather report you wish to retrieve. Then sit back and listen to the latest weather report for your Airport Code from the National Weather Service.

To use the Asterisk Weather Station by Zip Code, pick up any phone connected to your Asterisk server and dial Z-I-P (947). When prompted, key in the five-digit Zip Code for the weather report you wish to retrieve. Then sit back and listen to the latest weather report for your Zip Code from the National Weather Service.


blankblankNerd Vittles Demo Hot Line (courtesy of les.net). You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include (1) MailCall for Asterisk with password 1111 (retrieve your email by phone), (2) NewsClips for Asterisk (latest news headlines in dozens of categories), (3) Weather Forecasts by U.S. Airport Code, and (4) Weather Forecasts by U.S. ZIP Code. You're not prompted for #4 yet, but it does work! 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.


Some Recent Nerd Vittles Articles of Interest...

Proximity Detection Perfection: Bluetooth + Asterisk + iPhone

blankIf impressing your friends happens to be your thing, then you'll enjoy watching them all wet their pants today after you show them this little trick. It's been almost two years since we first introduced Bluetooth Proximity Detection to the Asterisk® community. Because we can't seem to get enough programming torture lately, we decided to revisit Follow Me Phoning by taking it to a whole new level with an all-new set of devices. If you're new to all of this, what we're talking about is the ability to stroll out of your home or office and have your telephone calls follow you on your cellphone automatically... without touching anything. And, when you return, the home or office phones start ringing again just as if you never left. Won't your boss or spouse be thrilled? What makes all of this possible, of course, is Bluetooth which happens to be running on your TrixBox/Asterisk server and on your brand new iPhone.

Since our original article, TrixBox has replaced Asterisk@Home as the leading (free) turnkey Asterisk system. freePBX has replaced the Asterisk Management Portal as the best Asterisk shell on the planet. And, of course, the iPhone has blown the cellphone industry out of the water. For long-time readers of our column, you may recall that we whined that the Treo 650 used in the original article was lousy for proximity detection because you always had to turn the display on to activate Bluetooth. It also drained the battery quickly which is probably why Palm left it turned off most of the time. You won't have either of those problems with the iPhone. The iPhone Bluetooth Adapter is always broadcasting away assuming you have turned it on. And we left the iPhone near our Asterisk server for 8 hours with virtually no battery drain on the phone. So, yes, it's damn near perfect for this task... and so many others.

NOTE: This article has been updated. For the current article, click here.

Our plan today is simple enough. We want to design a phone system so that, when you walk into your home or office, the phones ring in the office when there's an incoming call. And, when you walk out of your home or office carrying your iPhone with Bluetooth, calls to your home or office extension ring on your iPhone. If you're using one of our turnkey TrixBox systems at the top of this page, this project should take you about 20 minutes to complete once you have a dLink DBT120 USB Bluetooth Adapter in hand.

System Requirements. As mentioned, you'll need a Linux-based Asterisk server (we're working on Windows and Mac support), and we recommend our turnkey system because it has most of the software you'll need for this project preinstalled. That includes loads of Linux utilities, the Linux Bluetooth software toolkit, freePBX, Asterisk 1.2.x, and WebMin. But any TrixBox server will work. Other than your Asterisk server, the only other hardware you'll need is a dLink DBT120 Bluetooth Adapter. They run $30-$40 from most electronics stores although many retailers put them on sale regularly. CentOS 4.2 and above (used in the TrixBox builds) comes with the Bluetooth software preinstalled. If you're using some other Linux flavor, consult our original article for installation instructions.


DBT120 Bluetooth Adapter Installation. Boot up your Asterisk server if it is not already running and log in as root. Plug the DBT120 into an available USB slot. Now issue the following command:

/etc/init.d/bluetooth restart

You'll probably be told that your system couldn't stop bluetooth (because it wasn't running) and then it'll restart. Now let's make sure everything is running that should be:

/etc/init.d/bluetooth status

You should see messages that look like this:

hcid (pid somenumber) is running ...
sdpd (pid somennumber) is running ...

If you're alerted that some other application isn't running, we don't care. Now let's be sure the system has found your bluetooth adapter:

hcitool dev

Assuming you get a response telling you the system found device hci0 with the MAC address of the adapter, you have successfully installed your DBT120. So it's time to move on.

Configuring Linux Bluetooth Software to Start Automatically. You don't want to have to manually start up your Linux Bluetooth software each time you reboot your server. The easiest way to automatically start it is to use WebMin which comes preinstalled with our TrixBox builds. While logged in as root, make sure WebMin is running:

/etc/webmin/start

Then point your web browser to port 10000 on your Asterisk server: http://192.168.0.108:10000/. When prompted for username and password, type root and the password you assigned the root user on your system. From the Main Screen of WebMin, click the System button and then the Bootup and Shutdown link. Find bluetooth in the list of applications and click on it. The Action Details screen should show that bluetooth is running. Now click the Yes button beside "Start at Boot Time?" and then click the Save button to reconfigure your server. That wasn't hard, was it? Go back to the command prompt on your Asterisk server and stop WebMin by issuing the following command: /etc/webmin/stop. No need to waste processing cycles for a tool we're not using.

Deciphering the MAC Address of Your iPhone Bluetooth Adapter. We're going to be communicating with your iPhone to determine when you're in and when you're out. In order to do that, we need the MAC address of the iPhone Bluetooth Adapter. Here's how to find it. Move your iPhone within 10 feet or so of your Asterisk server. Then put your iPhone in Bluetooth Discovery Mode by choosing Settings, General, Bluetooth from the Main Screen on your phone. Be sure Bluetooth is set to ON. Once you've done that, the iPhone will report that it is Now Discoverable. Put the iPhone down near your Asterisk server. Now jump back to your Asterisk server console and issue the following command. Try it several times until you get the MAC address of your iPhone's Bluetooth Adapter:

hcitool scan

The system will whir away for a few seconds and then will report back the Bluetooth MAC address and name assigned to the adapter. It's probably your name. Write both of them down. We'll need the MAC address in a minute.

[root@asterisk1 ~]# hcitool scan
Scanning ...
    00:1D:64:C9:58:BA      Ward Mundy

Proximity Detection Design. Now we've got all the hardware information we need to make proximity detection work. We'll download the Proximity Detection Software in a minute.But first, sit down with a pencil and write down the other information you'll need to configure the Proximity Detection Software. To make the software as flexibile as possible, we've reworked the code a bit since the original article. With the new code, it's possible to manage multiple extensions of multiple people with multiple iPhones. So what you'll need is the extension numbers of the people that want to use this and the iPhone numbers of those people. For example, you may want to forward extension 200 to 6782345678 and extension 202 to 6783456789. Just make sure that the forwarding numbers are in the correct format for the default outbound dialing rules on your Asterisk server. If your server expects numbers to always begin with a 9 or a 1, be sure to include it in the dial string, or the calls won't be completed when they are forwarded. Obviously, you'll also need the MAC address for each of your iPhone Bluetooth Adapters so just repeat the drill above with each iPhone until you have all of the addresses. Finally, you'll need to assign an 8-character (or less) name to each user. So make yourself a nice little chart:

WARD 00:1D:64:C9:58:BA 200 6782345678
MARY 00:2D:54:C9:59:AB 201 6783456789

Today's installment assumes you are using a single Asterisk server both for your phone system AND proximity detection. We're still working on a multi-server solution. The only drawback with the current design is that the iPhones need to be placed close to that server when you arrive at your home or office. You can experiment on the distance the iPhones can be away from the server. Different Bluetooth adapters and iPhones have slightly different ranges. The bottom line is you always want to leave the iPhones close enough to the server with the Bluetooth adapter so that the proximity detection works reliably all the time. And, yes, we know it would be nice to be able to do all of this using a VMware or Parallels build of TrixBox running on a Windows or Mac desktop. Then you could detect the iPhone at the actual desktop where you hang out most of the time. We're working on it, but we just couldn't get it done for today's article. Stay tuned!

Proximity Detection Software Installation. All that remains to be done is to download and configure the proximity detection script and then put it in motion on your Linux machine. Log into your Asterisk server as root and move to the /root directory to download and unzip the script:

cd /root
wget http://nerdvittles.com/trixbox123/proximity.zip
unzip proximity.zip
chmod +x proximity

If you're going to be setting up proximity detection for multiple people, just make copies of the proximity script, e.g. cp proximity proximity1. Then edit each of the scripts and fill in the data from the little chart you made: nano -w proximity

deviceuser=WARD
devicemac=00:4B:63:D5:62:AB
myextension=200
mycellphone=6783456789

Save your changes and exit the editor: Ctrl-X, Y, then Enter.

Setting Up the Crontab Jobs. The last step is to set up a crontab entry for each script so that it gets run once a minute during whatever hours each day you want to monitor your iPhone. While still logged in as root, edit /etc/crontab: nano -w /etc/crontab. Insert a line like the following at the bottom of the existing file. This code would monitor your iPhone from 6 a.m. to 9 p.m. each day. To monitor your phone 24 hours a day, replace 6-21 with an additional asterisk.

* 6-21 * * * root /root/proximity > /dev/null

Save your changes and exit the editor: Ctrl-X, Y, then Enter. Repeat the drill for the other phones you want to monitor substituting the correct script names, and you're done.

Incidentally, if you ever want to disable the Proximity Detection System, just edit the crontab file and comment out the lines you want to disable by inserting # at the beginning of the line(s). If it happens that your calls are still being forwarded to your iPhone, you can cancel the forwarding from any Asterisk extension by dialing *74. Enjoy!


blankblankNerd Vittles Demo Hot Line (courtesy of les.net). You now can take a number of Nerd Vittles projects for a test drive... by phone! The current demos include (1) MailCall for Asterisk with password 1111 (retrieve your email by phone), (2) NewsClips for Asterisk (latest news headlines in dozens of categories), (3) Weather Forecasts by U.S. Airport Code, and (4) Weather Forecasts by U.S. ZIP Code. You're not prompted for #4 yet, but it does work! 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. 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.


Some Recent Nerd Vittles Articles of Interest...