31 July 2011

How to Be Alerted When Your VoIP Goes Down

We've found our VoIP setups to be exceptionally reliable, on a par with our former landlines.  But friends have expressed hesitation about tying their communications to the Internet.  What if there's an outage?
You'll practically never ever see this.

First, I hope it's clear that landlines are not immune from outages, either.  And unlike an answering machine hooked up to your landline, your VoIP voicemail is handled at the server level, so callers can still leave messages even if your local Internet is down.  Which, again, rarely happens around here...

But there's comfort in knowing the status of your complete VoIP system.  Fortunately, my provider, voip.ms, provides an applications programming interface (API) that makes it simple (but geeky!) to have your Mac continuously monitor your VoIP-line status and alert you if there's an outage or even if your equipment is having problems.  (My example code below is platform-independent, too, and can be adapted to whatever live-desktop and alert mechanism works for your computer.)

The trick is to leverage a wonderful utility called GeekTool to periodically check your account registration status on voip.ms' servers.  GeekTool can run scripts, and it's pretty easy to make a script which will use voip.ms' API, display the status and even trigger an alert via another popular utility called Growl.

Here's how

First, download and install GeekTool.  (An application version in the Mac App Store is coming soon-- at the time of this writing, it's a Preference panel instead.  OS X Lion users should prowl the site for the latest, Lion-compatible version.  UPDATE: The App Store version is here!  Mac App Store Link)  If you want alerts to pop up to notify you when an outage occurs, also download Growl and be sure to install Growlnotify from the Extras folder on its disk.  (You may already have Growl installed--it's part of Dropbox and other popular utilities and applications--but I doubt you have Growlnotify.)  Now:
  • Log on to your voip.ms account.  In the tab marked "Main Menu", select the "SOAP and JSON/REST API". 
  • Scroll down to the bottom.  Enable the API, assign a password (which can be different from your login password), and enter your IP address.  Click the update buttons after each entry.
  • Scroll up a bit, and look for the link that says "Click here to download Example Codes and API Documentation"  Download this, unzip, and look for the folder entitled "Examples SOAP for PHP5."  In this folder, look for the document "class.voipms.php".
  • Open class.voipms.php using TextEdit.  Put your account number and API password in it up top, then save it somewhere handy-- for example, I have a folder called "geekvoip" in my Documents folder.
Your account is now set up for automated access and monitoring.  Here's a simple script which we'll call from GeekTool:



GeekTool.

Copy that and paste into TextEdit.  (Note my example is made to check two subaccounts-- the code is easily modified to handle any number.)  Put your subaccount number(s) in it, and save it with a .php extension in the same folder you just saved class.voipms.php in. In my case, the file is named voip.php.

Now, open GeekTool.  Drag a Shell object onto your desktop.  In the Command field of the object, type a php command to execute the file you just saved.  In my case, the command looks like:

php ~/Documents/geekvoip/voip.php

Good settings for the GeekTool object are a Refresh of perhaps 600 seconds and a timeout of maybe 20 seconds.
My collection of GeekTools
includes status monitors for
my family's two VoIP lines.

You're done!  Position and size the GeekTool object as desired, and it will always be on your desktop.  If you've installed Growlnotify, you'll see a pop-up notification on the exceedingly rare occasion that your VoIP line can't be reached.

15 July 2011

VoIP as an Alternative to Cell Phones

A Roll-Your-Own-VoIP (Voice over Internet) setup for your smartphone is not only easy to arrange but can be a real money-saver, as I found when I needed to make some calls to the U.S. from London.  My choices: roam with my cell phone at $1.39 a minute, use my hotel's phone at even more exorbitant cost, or find a good WiFi location and make my calls for pennies using my preferred VoIP iPhone app, 3CXphone.  Turned out my hotel had unusually good WiFi, so the choice was simple, and my calls were crystal-clear... at a penny a minute! 

Which raises the issue of forgoing cell service altogether and using only a VoIP app.  You could then use an iPod Touch, an entry-level iPad, a deactivated or SIMless iPhone, Android phone or Blackberry... there are many such options.  The setup procedure would generally follow my instructions for setting up 3CXphone on an iPhone.

A Few Issues to Consider 

Obviously, a good Internet connection is fundamental.  3G can work but generally WiFi is needed, especially when roaming.  Unfortunately, good WiFi connections are in increasingly short supply in hotels and coffee-shop hotspots, whose WiFi networks are besieged by guests streaming video.  (Netflix has gone from nowhere to 30% of overall bandwidth consumption... and rising, and it's worse where lonely/bored travelers congregate.)  But if your peregrinations take you to coffee shops and hotspots with good WiFi service, this can be a real alternative.

Testing the local WiFi capability prior to making an important call can help prevent frustration.  You could make a test call, or Visualware offers a detailed free app for measuring bandwidth characteristics from your iDevice, iNetQCheck.  There are others, such as Speedtest.  Unfortunately, none of the available free testing apps currently test for VoIP-specific network performance.  This can be better than the generic/overall performance (if the router has good Quality-of-Service (QoS) technology which prioritizes the real-time data streams VoIP relies on) or worse (if the network has VoIP port 5060 blocked!).  My own home WiFi network performs much better for VoIP than a generic test would suggest, presumably due to the good QoS engine in my D-Link DIR-655 router, which prioritizes port-5060 traffic.

In the case of port blockage, your VoIP provider might provide alternative ports to try.  Voip.ms' alternative ports, per their online documentation, are 5080 and 42872.  But, these ports will probably not be prioritized by routers' QoS engines, so it's best to use them only if 5060 is blocked.  (I'm advised that a VoIP-specific testing app is coming to the App Store-- great news.  I'll mention it in an update here when it arrives.)

For me, with my travels, a conventional cell phone account is necessary, and using a VoIP app on my iPhone is a wonderful supplementary capability but not a wholly sufficient alternative.  But if my situation were more urban and involved less travel, going cell-less as well as landline-less could work.  As to the economics of it all, axing a cell line is even more compelling than unplugging your landline.  Consider the following, from the Wall St. Journal:
Consumers currently pay about $92 a year on average, or 16.3% of their total bill, in taxes as part of their cellphone plan -- the highest amount ever, according to the Heartland Institute, a public policy research organization. That's up from a 14.1% tax rate in 2006. ...taxes account for 16.3% of cellphone bills on average, compared to 7.4% for other goods and services... This year, for example, some municipalities raised taxes by 3% to a whopping 75%. The wireless industry says its consumers are unfairly targeted. "Many of these state and local taxes and fees are levied against our consumers because they're good bill payers," says a CTIA spokeswoman.... residents in at least five states, including Florida, Illinois and Washington, get hit with rates that account for more than 20% of their wireless bill, says [economist] Scott Mackey... In Baltimore, for example, taxes and fees account for 27% of the average customer's wireless bill, while in New York they account for about 20%.  [Wall St. Journal]
 ...And that just regards the taxes.  Cell plans themselves aren't cheap, especially if you travel.  (And is anyone else enraged by that bit about cell users being ripe for targeting because they pay their bills?  That's neither progressive nor regressive taxation nor a valid user fee; it's fleecing the easy mark, and it's wrong.) 

There are other VoIP apps that include their own VoIP service that can make and receive calls from any phone, such as TruPhone, Whistle, Fring, FooCall, iCall, OBion...  And of course there's Skype.  An attraction of the app+service approach is that you're spared the complication of separately setting up the app and an account at a VoIP wholesaler like voip.ms or CallCentric.  Many such apps are free to try, so you can see if they meet your needs.  Keep in mind that such services might operate on IP ports other than 5060, so they wouldn't enjoy QoS acceleration if present, meaning more variability in quality from call to call and location to location.  (Skype, for example, uses a randomly-assigned port to prevent blocking by ISPs.)  And some operate their servers in places that might be physically remote from you, reducing quality.

In my case, my prerogative was to replace my home's landline, so the ability to roam around the world for cheap with an app on my iPhone was a delightful bonus.  The Roll-Your-Own-VoIP approach was the best for my situation, but your needs might differ.  Fortunately this is the dawning of the golden age of phone-service alternatives-- jump right in!

VoIP over 3G

If you have the bars, using 3G rather than WiFi can be attractive in some circumstances:
  • For iPads and other non-voice devices with a 3G data subscription, and
  • For international calling.  For example, I've used my VoIP app on my iPhone to call from the U.S. to Europe.  Thus I use data bytes rather than expensive international-call minutes.  Of course, data bytes are in finite supply; your economic mileage will vary depending on your plan and usage.
Note: the VoIP port is sometimes blocked over 3G by cell carriers in some areas.  Try before you rely.


==========

One more thing: A correspondent asks about MagicJack.  I tried it.  It's not terrible, but I don't recommend it.  It does have the advantage that you can keep using your old-timey plug-in-the-wall-type analog phone.  E911 is included, which is nice for landline-replacement applications.  But to use it as officially supported, you need a computer, and your phone only works when that is up and running.  [A computerless version of MagicJack is now offered.]  There are google-able ways to make a MagicJack account work using something like 3CXphone, but there is no support for such things and no official MagicJack app.  The Roll-Your-Own-VoIP approach is considerably more flexible, higher quality in my experience, and about the same order-of-magnitude cost.  There were also issues with MagicJack the company and its support services.  The contrast could not be starker compared to the superb service and patient, responsive support I've gotten from voip.ms as I've climbed the learning-curve from rank newbie.

And how about Ooma.  This was another possibility for my landline-replacement project, but Roll-Your-Own-VoIP was considerably cheaper to implement, and it required no locked-to-the-provider proprietary adapter.  I'm happy, and delighted with the flexibility.

13 July 2011

Senate Probe: 'Mystery' Fees on Phone Bills Charge Billions to Consumers

Y'know, I didn't quite start this blog to be a wide-eyed evangelist for Roll-Your-Own-VoIP, but you could be forgiven for thinking so. And articles like this fuel the fire:
Third-party billing firms are charging Americans up to $2 billion a year in "unauthorized fees" on their landline telephone bills, generating massive profits for the nation's largest telephone companies that don't do nearly enough to crack down on the practice, a Senate Commerce Committee investigation has found.

Most consumers don't even detect the charges for months or years, if at all, because they typically range from $2 to $20 on their monthly bills. But when consumers and businesses do complain to telephone companies, they often get the runaround. [Fox News] [Hat tip: Alex]
Call away, it's cheap.  Just don't tax my VoIP!
This actually happened to me on my cell line: mysterious charges, three bucks here and ten bucks there, buried in the monthly bill.  Once I thought to print out my full cell bill to get to the bottom of it, and gave up after 20 pages of printing with more than ninety to go!  (Kudos to AT&T for quickly figuring out what was going on, stopping it, and refunding my  money.)

My VoIP bill, by comparison, is immune to such shenanigans.  My VoIP provider, voip.ms, provides up-to-the-minute online listings of all charges and usage.  The listings are searchable by date and by subaccount (e.g., by extension) and are readily understood, in part because there's so little tax-and-fee argle-bargle that I'm sure most consumers find as baffling as I do on our landline and cell bills.  The "third-party billing firms" mentioned in the article hide in the tall grass of all those fees and imposts.

Plus, voip.ms' way of doing things currently involves paying up a balance and then whittling it down with usage.  You get an email when it's time to replenish.  One benefit of this approach is that you're never on the hook for anything more than your balance.  If someone were to somehow hack into my account and run up a bill to Timbuktu, my maximum risk is the $17.86 currently on balance in my account.  And the call would take a while given the low costs of VoIP (23c/min to Timbuktu from the US).

10 July 2011

Summary Comparison: Landline vs. Alternatives



Landline
“Digital phone service” (Vonage, Comcast, PacBell, Ooma…)
Monthly cost (California suburban)
Typ. ~$35 + usage
Typ. ~$35 + options
Typ. $1-1.50 + usage
Ease of setup
Trivial
Easy
Somewhat geeky
Requires good broadband?
No
Yes
Yes
Requires proprietary or locked adapter?
No
Yes
No
Voice quality
Excellent
Very good to Excellent
Very good to Excellent
E911 emergency localization service
Yes
Yes
Yes (typ. $1.50/month)
Taxes etc.
Yes
Yes
No

Is the Landline Doomed?

FCC study: Landlines are going away.
Here's an interesting article noting that an advisory council to the FCC has determined the public switched telephone network (PSTN, better known as your old-timey landline) is fading away.  An obsolescence horizon is recommended to be established by government at about six years from now.

Previously I posted a how-to for replacing your landline with a simple and vastly cheaper home Voice-over-Internet (VoIP) service: How to Roll-Your-Own with VoIP for Massive Phone Savings.

Good timing.

But why wait for the inevitable?  If (per my own family's example) you can save about $30 a month by taking advantage of today's marvelous VoIP wholesalers, you can save more than $2,000 between now and the deadline recommended to the FCC... if you take the plunge soon.

Check out my how-to:

  • If you have decent broadband service and are just a little geeky, you can try VoIP out today using a smartphone and your existing WiFi (or your PC even if it's wired to the wall) for a pittance.  
  • To go all the way, as we did, and replace your costly monthly landline service with a VoIP adapter (so you can use your regular phones) requires a capital investment of all of $50 or so, plus another $20 if you want to keep your current phone number.  
  • You can go even further and replace your current phones with digital ones instead of using an analog-phone adapter.  (We'll consider doing that when our perfectly serviceable wireless handsets crap out in another year or two, as they do.  By then the cost for WiFi SIP handsets should be more reasonable.  For now, the cost of the Cisco PAP2T + a good multi-handset wireless analog phone is unbeatable.)

There's a host of options and many benefits.

Do it.  Before the government forces you to.

09 July 2011

How to Do Cool Formatting on Your Blog

I'm encountering some great tips on formatting tweaks for this blog, and since the spirit of the blog is to share cool tricks and techniques, I'll be keeping a list here on this post.

How to automatically highlight author comments
This one is for Blogger users.  Blogger Sentral has a great template tweak that will automatically highlight your entries in the Comments section of your posts.  This is really handy when you have a conversation going with visitors.  I've implemented it in the comments on this blog.  Painless.  Just be sure:
  • Heed the advice to back up your template first.  
  • Don't miss the step that says to "Expand Widget Templates checkbox on top right of the HTML window."


How to automatically format code snippets on your blog
Here's a tip for any blog.  Sometimes there's occasion to post one or more lines of some sort of code.  If it's HTML, you want to be sure your visitors' browsers don't try to execute it, and you want to avoid spurious line breaks or other formatting.

There are a few approaches, but the easiest I've found is to just paste your code into https://gist.github.com/:

  • Paste your code into the window.
  • Click the button that says "Create Public Gist".
  • Your new gist will appear.  Click "Show Embed" and copy the result to your clipboard.
  • For Blogger users (other composition tools will be different but similar): As you write your blog post, click the Edit HTML tab and paste the embed code where you want it.  (It won't show up at all in the Compose tab.)
Voila:

...Invaluable.

How to Quickly Vet your Applications for Lion Compatibility (and Why You Should)

OS X Lion is coming, probably this week, and it looks to be a compelling upgrade (and affordable at a reported $29 in the U.S., or $49 for a five-license family pack).  No trip to the store is needed-- it will be available exclusively over the Internet via the App Store, which you'll find under the Apple logo up at the upper left corner of your screen on your fully-updated Snow Leopard machine.

Photo courtesy of Apple.  Read all about OS X Lion on Apple's site
With Lion, Apple is finally cutting the cord of the long-obsolete PowerPC architecture. Until now, programs written specifically for the ancient PowerPC chips would still run on Macs based on Intel chips via an automatic emulator that OS X would use. This emulator was called Rosetta... and it's finally been put out to pasture in the era of Lion.

There are many reasons why this is good--faster operation, fewer bugs, conservation of disk-space, better and more consistent user-interface features, smoother integration--but the one obvious negative is that you might currently have applications on your Mac that rely on Rosetta. That software will have to be upgraded or removed.

Now, you could go through your Applications folder and look at each application's type by command-clicking Get Info. But there's a much better way to do it all-at-once (Hat tip: Cult of Mac).

Here's How:
  • Open the Terminal. (If you don't know how to do this, just type "Terminal" in Spotlight and it will show up as an application.)
  • Cut the following line from here:

    system_profiler SPApplicationsDataType >~/Desktop/MyFileTypes.txt

    ...and paste it into the Terminal, then hit the Return button on your keyboard.

    What will happen now is that a text file entitled MyFileTypes will appear on your desktop. It might take a couple minutes.  Go have a cup of tea while your Mac does your work for you.
  • When the process is complete, quit the Terminal and double-click the MyFileTypes file on your desktop.
Now you can search MyFileTypes for the word "PowerPC" --this will indicate which applications on your machine need to be upgraded, removed or replaced with something more modern.

The most common obsolete applications are Microsoft Office 2004 and Quicken. To my chagrin, LabVIEW 8.6 is there, too.  (That's a real surprise-- it's so fast, I had no clue it was being run in the emulator.)  (UPDATE: It appears the Rosetta issue for LabVIEW 8.6 is limited to drivers, though there is an additional 32-bit issue with kexts.)

Deal with obsolete apps before upgrading to Lion
For one thing, the removal utilities that come with some of them (such as Microsoft Office) are themselves PowerPC-based. Or, you may need the old version to export your files to some new, Rosetta-free application-- and I'm talkin' to you, Quicken-- for which there is no Intel- or Universal-based update.  Fortunately, in the case of Quicken there are many alternatives.  See this superb list compiled by TUAW after Intuit, Quicken's publisher, sent an infuriating email to its users with lame suggestions on how to work in the post-Lion world.  Really, now, Intuit: on pg. 102 of Scott's Big Book of Pithy Pronouncements is: "Competitors are made, not born."  Q.E.D.