Home » Technology » Streaming Devices (Page 7)

Category Archives: Streaming Devices

The Most Versatile VoIP Provider: FREE PORTING

Free At Last: The Emancipation of the Apple TV

We’ve never quite forgiven Apple1 for bricking some of the original iPhones because some owners chose to jailbreak their private property to learn how it worked or to add additional functionality. It may turn out to be Steve Jobs’ billion dollar blunder! The stunt was especially egregious when one considers that both the iPhone and much of Mac OS X are based upon open source software for which Apple didn’t pay a nickel. Apple certainly added a pretty wrapper, but the internals of both the iPhone and Mac OS X contain loads of pure open source code including dozens of Mach 3.0 and FreeBSD 5 applications. Destroying people’s cellular phones for accessing soft- ware that was licensed to Apple as open source code just doesn’t pass the smell test.

Courtesy of Apple, Inc.

Thus it was with mixed emotions that we unwrapped our Apple TV during Christmas 2007. Like the iPhone, it was locked up tighter than a drum even though the internals of the product read like a Who’s Who of the Open Source Movement: awk, bzip, cut, grep, find, ftp, finger, gzip, more, nano, openssl, perl, sed, tail, tar, touch, uname, whois, zip, and on and on. In fact, Mac OS X arguably is a better Linux than Linux. Suffice it to say, we read numerous articles outlining the lengths to which some talented users were going to unlock their Apple TVs. The process required disassembly of the unit, removal of the hard disk, and then a tedious unlocking scenario that was akin to breaking into Fort Knox. We chose to leave our Apple TV in its shrink wrap.

So what’s wrong with the Apple TV? Well, nothing… if you don’t mind paying Apple over and over again to reacquire media content which you already have licensed and if you don’t mind jumping through the iTunes hoops to transfer that content to a device which is perfectly capable of being self-sufficient. Let’s see. $1.99 to watch a TV show or play a music video that’s already sitting on your TIVO machine or that’s already freely (and legally) available from numerous sources on the Internet. Apple has added YouTube access, but the design really limits you to the most popular content. That makes it unsuitable (or worse) for anyone under the age of 13… or over the age of about 25. 🙄

Fast forward to 2009, and we decided it was time to take another look at the Apple TV landscape. WOW! What a difference a year makes. You now can create a bootable USB flash drive in a couple minutes, plug it into your Apple TV, and have a perfectly functioning, (true) open source appliance with DIVX and AVI support in less than 15 minutes. The FrontRow-enhanced Apple TV provides access to virtually all media content in every format imaginable with incredibly slick user interfaces thanks to the XBMC Media Center, Boxee Social Media Center, Nito TV, and Hulu. Most were originally designed for Microsoft’s Xbox. Uploads and downloads of media content can be performed using either your Apple TV controller and a television, or a web browser, or SAMBA networking, or SSH. So thanks to a resourceful bunch of talented, open source developers, we finally have an Apple TV worth owning that also happens to be fun to use. Incidentally, this whole metamorphosis can be accomplished without damaging the Apple TV’s existing user interface or its out-of-the-box functionality… at least until the next update from Apple. 🙂
So proceed at your own risk!

Freeing Your Apple TV. Since October, 2008, the emancipation of the Apple TV has become a simple, 5-minute exercise. What you’ll need to get started is an Apple TV2 with version 2 software, a 1GB USB Flash Drive, and ATVUSB-creator which is free. The drill here is to create a bootable flash drive that can be used to reboot the Apple TV and transform its closed and proprietary shell into an open source platform. The preferred machine for creating your bootable flash drive is a Mac running Tiger or Leopard although a Windows XP/Vista solution is also available now. The only precaution we would add is to unplug all of the USB drives connected to your PC before creating the bootable flash drive. Then you won’t accidentally reformat the wrong USB drive. The one-minute CNET tutorial is here. A better one is here.

Once you have your bootable USB flash drive in hand, unplug your Apple TV and plug the USB drive into the unit. Now connect your Apple TV to a television. Power up your Apple TV and marvel at the installation process which takes under a minute. Whatever you do, don’t boot your Apple TV with the flash drive more than once! When the install completes, you should see a message indicating that your Apple TV can be accessed with SSH within a few minutes at frontrow@appletv.local. The password is frontrow. The IP address for your Apple TV also can be used for SSH access as well. Remove the flash drive and reboot. You’ll see a new menu option for XBMC/Boxee. Just follow the menu items to install both applications. After another reboot, you’ll be all set. Click on the CNET video above to watch a demo.

After installing the apps, launch and then configure XBMC. If you get an error that reads "Cannot launch XBMC/Boxee from path," it means you forgot to install the software through your TV menu. If you enable the web interface, you’ll be able to go to any browser on your LAN and manage XBMC through the following link using the IP address of your Apple TV: http://192.168.0.180:8080. For complete documentation, check out the XBMC Wiki.


Before you can use Boxee, you’ll need to visit their web site and sign up for an account. A tutorial on the application is available at UberGizmo. As luck would have it, this application only became publicly available in Alpha last week so we’re just in time. Don’t sweat the Alpha status too much, it previously ran on the XBox platform as well as Windows, Macs, and Linux. There’s social networking support via Twitter, FriendFeed, Tumblr, and NetFlix. While it’s running on your Apple TV, you can access the interface remotely with a browser from anywhere on your LAN at http://ipaddress:8800 assuming you have enabled the web server interface.

Hulu is another terrific resource for movies, TV shows and music videos. It is available through Boxee. There are a few ads but not many. For a lot of the movies, you’ll also need to set yourself up an account there and configure your uncrippled Apple TV accordingly.

But What About Asterisk®? We knew someone would ask. Sure. An Asterisk for Mac solution should work on the Apple TV if you don’t plan to use it as a media center. For best results, compile everything on a separate Tiger Mac, and then move it over. Keep in mind that the device is limited to 256MB of RAM so simultaneously using the Apple TV as both an Asterisk PBX and a media center more than likely will cause unacceptable performance degradation in both your phone calls and your music and video streams. Someday perhaps we’ll give it a try. In the meantime, enjoy your new open source media center!


Want a Bootable PBX in a Flash Drive? Next week to celebrate the beginning of Nerd Vittles’ Fifth Year, we’ll be introducing our bootable USB flash installer for PBX in a Flash with all of the goodies in the VPN in a Flash system featured a few weeks ago on Nerd Vittles. You can build a complete turnkey system using almost any current generation PC with a SATA drive and our flash installer in less than 15 minutes!

If you’d like to put your name in the hat for a chance to win a free one delivered to your door, just post a comment at this link with your best PBX in a Flash story.3

Be sure to include your real email address which will not be posted. The winner will be chosen by drawing an email address out of a hat (the old fashioned way!) from all of the comments posted over the next couple weeks. Good luck to everyone!


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 


Some Recent Nerd Vittles Articles of Interest…

  1. Disgruntled customers reportedly have filed over a billion dollars’ worth of lawsuits over their bricked iPhones claiming Apple did it intentionally. Great PR move there, Steve! []
  2. The Apple TV actually runs a modified version of Tiger (aka Mac OS X 10.4). []
  3. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []

The Whole House iPod (Revisited)

About a year ago, we wrote about an incredible new whole-house audio system that is priced (literally) tens of thousands of dollars below the cost of a comparable "turnkey" system that you typically would purchase from a home audio consultant. You can read the rest of the (initial) story toward the end of today’s article. We decided to revisit the World of Sonos because there have been some incredible developments in the last 14 months, and today the company announced a new partnership with Sirius satellite radio. So here’s an update.

For those that are new to Sonos, you basically buy a little $500 Wi-Fi box for each room in your home or office where you want to play music. You plug in a pair of speakers and connect to your NAS-savvy music library. We recommend dLink’s DNS-323 which provides RAID1 mirrored SATA drives in any size you desire (about $180 delivered from NewEgg plus SATA drives). Be sure the drives you pick are on dLink’s compatibility list! If you happen to use Comcast for your broadband service, you also receive a free Rhapsody subscription which can be played (through a Windows PC) on every Sonos system in your house for free. For the rest of you, the Sonos system also supports streaming audio from more than 300 Internet radio stations, also free. And last but not least, beginning today, you can add all of the Sirius radio stations on the planet (80+ channels) to every room in your house for just $2.99 a month assuming you already have Sirius playing away in your car. If not, it’s still only $12.99 a month.

There are few companies in the world (much less the United States) that provide flawless hardware and software, free software updates (that always work), and regular updates that consistently add value to your initial purchase. Sonos is at the top of that very, very short list. Run, don’t walk, to add this system to your home or office. You’ll thank us for years to come. Enjoy!

And, our original article last year went something like this…

We thought we’d digress today and tell you about an incredible whole house audio system. Yes, there’s the iPod for private listening and there are some streaming audio solutions for those that want music in one or two rooms of a home or office. But what if you want music (different music) available in every room of your home. Well, until now, you could look at spending $20,000 to $50,000 for a very proprietary solution such as Elan’s Home Systems. It’s no accident that you won’t find any pricing on their web site.

As luck would have it, we just moved into a new home that was prewired for audio and video in eight rooms including recessed ceiling speakers in all the rooms. While this is an expensive proposition when retrofitting an older home, it’s fairly reasonable during new construction, and many builders now include it as part of the cost of a new house. The gotcha, however, is adding the multi-room amplifier, the audio devices to produce the music, and the touchpanel control units in each room. Can you spell outrageously expensive! In round numbers, you’re looking at $5,000 for installation of a suitable amplifier, $1,500 to $2,500 for each ultra-proprietary touchpanel display, and another $10,000 or more for the audio sources. These include CD jukeboxes, iPods with infrared remote access, a multi-channel XM radio receiver to the tune of $1,500 plus XM radio fees of nearly $30 a month (for three channels) forever, and loads of consulting fees at $100+ an hour. Each of the touchpanels or keypads is manually configured to match the audio components you purchase so that you can switch audio sources, adjust volume, and skip songs in each room. The double-gotcha is that despite having spent tens of thousands of dollars on this system, you have no ability to adjust anything down the road without another $100 an hour service call from the installer. So just pray they’re still around, or you’re basically stuck with your initial setup forever. A $500 magic box is used to configure the touchpanels and keypads, and, NO, you can’t buy one. It’s not sold to consumers, just dealers. Ouch!

You should be getting the picture of why we went shopping for an alternative with a bit more flexibility. That’s when we stumbled upon an incredible product called the Sonos Digital Music System. In a nutshell, you have a self-contained system unit in each room where you want music. It includes an optional amp for connection to a pair of speakers, wired and wireless networking, and a user and streaming audio interface that is as good or better than the iPod. Then you add as many touchpanel control units to select music and music sources as your budget can afford. There are also PC and Mac versions of the touchpanel which won’t cost you a dime. Each touchpanel can control every zone (aka room) in your home. What you don’t need with this system is a house prewired for audio because each unit lets you connect directly to a set of speakers or an external amplifier if desired. You also don’t need a wired network throughout your home. Only one of the Sonos units needs to be connected to a wired network. The rest of the devices automatically configure themselves to communicate wirelessly with the other system units and controllers scattered throughout your home. If you buy the starter pack with two system units including amps and one controller unit, you’re looking at $1,200 which works out to roughly $500 per system unit and about $200 for the controller. That’s roughly one tenth the cost of a functionally similar controller unit from Elan except you can configure the Sonos controller while a dealer has to configure the Elan unit … at $100 an hour.

I feel a little like the guy selling the Ginsu knives on television: "but there’s more." Boy, is there! Not only is the sound of the systems downright incredible (depending upon your speakers, of course), but the variety of available music sources is going to make you want some of these in the morning. Each system unit can stream audio from almost any music source imaginable. This includes MP3’s stored on your PC, Mac, or our latest discovery, a $150 network-attached storage (NAS) device. You also can play Shoutcast streams, either your own or those available for free over the Internet. Another option is to map a file share from a Sonos unit to a Mac or PC. It takes about 10 seconds. Sonos units also can play music from Rhapsody. And, if you’re lucky enough to be a Comcast broadband subscriber like us, a Rhapsody streaming audio subscription with about 50 music channels is yours for free! Just login to your Comcast account and download the Comcast Rhapsody software to any Windows PC. Rhapsody Stations are every bit as good as XM or Sirius channels with one important difference. There’s no additional monthly charge to Comcast customers for as many simultaneous streams as you care to play. That’s quite a contrast from Elan’s three XM streams solution which means three rooms with XM radio and no more … for $30 a month … once you buy your $1,500 Elan XM receiver. With Rhapsody, you won’t need a receiver at all, just an old clunker PC sitting in the corner with the Rhapsody application running. It can be used for other tasks as well. At the moment, we have my daughter’s game PC running Rhapsody with four simultaneous streams playing in seven zones of the house. You can double up zones with the click of a button using any Sonos controller. In addition to all these music sources, you also can connect an old-fashioned analog audio device (like a CD jukebox or an iPod) to each system unit. Music from these sources can be streamed to any combination of rooms you choose, just like traditional Shoutcast streams or Rhapsody stations. The only thing missing with analog device streams is the album art, but it still sounds great.


There are some other reviews of the Sonos system which are worth a look. Check out David Pogue’s article in the New York Times, the Home Theater View, Audioholics, Playlist Magazine, and PC Magazine. Then you’ll want to run, don’t walk, to buy at least one for yourself! You can purchase units from Sonos and most of their dealers with a 30-day money-back guarantee. We installed eight systems with four remotes in just over two hours. We haven’t quit listening since. Now you know why we’re running a little behind on the Asterisk® and TrixBox articles. Enjoy!


Some Recent Nerd Vittles Articles of Interest…

Hacker’s Dream Machine: Introducing the Best Gadget of the Year And It’s Not From Apple

Attention Toy Junkies and Hackers: Imagine a 14 ounce device the size of a five pound bag of sugar with a self-contained Wi-Fi server, web server, streaming audio player, MP3 player, RSS Feed fetcher, email reader, voice recognition, built-in RFID proximity detection, text-to-speech and speech-to-text capabilities and... wiggly ears, a VoIP belly button, a speaker, and blinking lights all over the place. It's a bird, it's a plane. No, it's a Nabaztag/tag. With a name like that, you know it has to be good. Nabaztag actually is the Armenian word for rabbit. And the Nabaztag/tag is the second generation of Violet's infamous WiFi Bunny... from France no less.

For those of you thinking about one of these fine critters as a Valentine's gift, let me just offer up a quote from someone near and dear to me: "If you'd gotten me one of those stupid bunnies for Valentine's, you'd be sleeping in your car." Yes, much to the chagrin of the Little Mrs., we've spent an entire week playing with Pat the Nerd. And, with the help of a number of similarly misguided souls from around the world, we've managed to turn this rabbit, uh, on its ear. Or is it the other way around? You see Pat costs $179 at ThinkGeek. But there's more to it. Violet, the bunny's proud inventor, is also proud of their connection service. Beginning Valentine's Day, Violet has a special surprise for bunny lovers. They'd like every bunny owner to pony up $6.95 a month (forever) to keep your bunny hopping. No more animal jokes, we promise! There still will be some free services such as time and weather information. And Violet will still let your bunny receive a whopping 14 15 messages a month. That's almost a whole 30-second message every couple of days! But, after that, it's Pay Per View time. Believe it or not, there already are hundreds of thousands of Nabaztags in the homes of our European friends. But the bunny lovers of the world are in for a little surprise in a couple weeks. Happy Valentines! Heh, heh.

Well, that was last week. Several projects have been underway for months on SourceForge to unearth the bunny's innermost secrets. They quickly discovered that the first generation bunnies had a severe limitation because of an extremely proprietary sound chip. The second gen Nabaztag/tag resolves that by supporting playback of industry-standard sound files. The other problem with the SourceForge projects was the Hobson's Choice of an either-or bunny. You could either connect to Violet's servers and enjoy their offerings, or you could venture out on your own by creating your own applications using your own server. Thanks to Olivier Azeau, you now can have your cake and eat it, too. In addition to being an adept PHP programmer, Olivier also happens to like bunnies. So he began the OpenNab project on SourceForge to build a PHP-driven Nabaztag/tag proxy. Just as the name implies, it transforms the WiFi Rabbit into an open source platform while maintaining your existing connection to the Mother Ship. Stated another way, by using the OpenNab proxy, you don't throw the baby out with the bath water. Instead, you get the best of both worlds: all of the free Nabaztag services from Violet plus all of the free open source apps that the rest of us can dream up. And, if you want to subscribe to Violet's monthly service plan, you can do that as well. It also opens the door for competitive server platforms to support the Nabaztag/tag for those that have no interest in building and supporting a server just to trick out your dumb bunny.

That, of course, is where a TrixBox Asterisk® server comes into play. In addition to getting a first-rate (free) PBX that will run on Linux, a Mac, or Windows (download links at top of the page), you now have the perfect platform for the OpenNab proxy. For our non-Asterisk readers, you don't have to use a TrixBox server to make all of this work... if you don't mind wrestling with Linux. Or, for the Windows platform, you might want to try WAMP5. The beauty of installing one of our TrixBox servers for the Mac or Windows platform is that you don't have to have a dedicated Linux server. You can run the TrixBox server in a window on your desktop, and you never need to touch the PBX if you don't want to. In short, a TrixBox server is an ideal development platform for projects such as this because all of the tools you'll need are already integrated into a turnkey appliance. In addition to a fairly complete Linux toolkit, it also includes an Apache web server with PHP and a voice synthesizer called Flite right out of the box so there's nothing to install... except OpenNab. We'll walk you through that installation, and we'll provide a couple of our reworked open source applications for your OpenNab-energized Bunny to get you started: weather reports for every U.S. city and a Yahoo Headline News Feed Reader. Then you can rip into our code and contribute some applications of your own to the cause. A few have already been contributed, and we'll post those on our new Wabbit Vittles web site in the next few days.

OpenNab Prerequisites. As mentioned, you'll need a server platform that includes a web server with PHP 4.4.3 or later and CURL, a text-to-speech voice synthesizer such as Flite (free) or Cepstral ($30), and an encoding utility in order to get much use out of the OpenNab proxy. The free TrixBox appliances include everything you'll need to get started.

Downloading OpenNab. Once you have your web server with PHP and CURL running, you're ready to install OpenNab. Start by downloading the OpenNab Proxy application from SourceForge. Unzip the file, and you'll have a folder named opennab with a version number. We're assuming it's 0.04, or some of the fixes below may not be necessary. There are several tricks to getting OpenNab installed and working reliably. We're going to walk through the TrixBox installation scenario. It's also possible to run this on a dedicated Linux machine or through a Linux hosting provider site, but it's considerably more complex to get all the pieces working as you'll quickly discover if you decide to try it. We've put up a demo system through our hosting provider, BlueHost, just to show it's possible. BlueHost incidentally happens to be the best AND the cheapest hosting provider on the planet if you ever have a need. Regardless of which route you take or even if you roll your own server, be aware that the two folders (vl and broad) both have to be copied into the root directory of your web server.

OpenNab Installation and Setup. In the case of a TrixBox installation, copy the vl and broad folders into var/www/html which is the web server's home directory. If you're using a hosting provider, copy the two directories into your root web folder, usually www or public_html with cPanel systems. Instead of Apache redirect commands, OpenNab uses ErrorDocument redirection to reroute traffic from Violet's servers to your OpenNab Proxy. So, if they don't already exist, create a .htaccess file in both the vl and broad folders: nano -w .htaccess after logging into your server as root (for TrixBox) or your accountname (for hosted servers) and changing to the proper directory.

In the vl folder, make sure you have the following line in a .htaccess file. This was missing in version 0.02 :

ErrorDocument 404 /vl/bc.php

In the broad folder, the following line should appear in .htaccess:

ErrorDocument 404 /vl/media.php

Next we need to modify the Apache config file on your TrixBox server so that it allows .htaccess commands to override Apache defaults at the directory level. This isn't required on most hosted systems since they already allow directory-level overrides. While still logged in as root on your TrixBox server, edit the Apache config file: nano -w /etc/httpd/conf/httpd.conf. Press Ctrl-W and search for AllowOverride None. Press Enter to execute the search. Leave this entry alone. Now press Ctrl-W and Enter again. Change this entry to AllowOverride All. What this does is allow .htaccess overrides on the /var/www/html directory and its subdirectories which is what we want since that's the root directory for the web server. Save your changes: Ctrl-X, Y, then Enter. Then restart Apache: apachectl restart.

Regardless of your server type, we need to create a few new folders to make sure OpenNab can successfully pass its startup tests. Just issue the following commands while logged in as root:

cd /var/www/html/vl/plugins/files_simpleplay (NOTE: Version 0.03 and 0.02 stored these files in /var/www/html/broad)
mkdir 0
cd 0
mkdir 1
cd 1
mkdir 2
cd 2
mkdir 3
cd 3
touch 4.mp3

If you're using a hosting provider, you can ignore this step. On TrixBox servers, the web service runs as user asterisk unlike other Linux systems. We need to adjust the permissions on the folders we installed to be sure this user can read, write, and execute in these directory trees. So issue the following commands while logged in as root:

cd /var/www/html
chown -R asterisk:root vl
chown -R asterisk:root broad

Finally, regardless of your server type, there was a little bug in version 0.02 that occurred if you happened to enter the MAC address of your bunny in upper case letters. This is fixed in version 0.03 and 0.04, but if you have the 0.02 version here's the patch:

cd /var/www/html/vl/includes
nano -w burrow.php

Once the editor opens, cursor down to line 45 and add the strtolower function to the existing line so that the new line looks like this:

$this->fileName = 'burrows/'.strtolower($serialNumber);

Save your change: Ctrl-X, Y, then Enter.

Securing OpenNab. We highly recommend using a TrixBox server or some other Linux server behind a firewall for this project. Running OpenNab on the public Internet with or without a hosting provider adds all sorts of security implications. At a minimum, there are some changes we recommend you make to lessen the opportunity for abuse from outsiders. Insert index.php documents in the folders that don't already have such a document. Here's what each index.php document should look like:

<?php
echo " ";
?>

The second tip is don't activate the logging feature in vl/config.php because it will compromise the MAC addresses of every rabbit that connects through your server... unless you password protect the vl/logs directory. Finally, remove the phpinfo.php file from vl/tests once you complete your testing as this reveals all sorts of information to someone that may be attempting to break into your server.

Testing Your Nabaztag/tag. There are two tests you need to perform to make sure your Apache server, PHP, and CURL are operating properly. Using a web browser, go to the following links using the IP address or fully qualified domain name of your OpenNab Proxy:

http://my.domain.com/vl/foobar should return: ERROR 404 from OpenNab
http://my.domain.com/vl/tests/ should return: 48 passes, 0 fails and 0 exceptions with a Green Bar

Configuring Your Nabaztag/tag to Use OpenNab. Once you've passed the testing with flying colors, it's time to activate the OpenNab Proxy. Step 1: Get your tag/tag functioning reliably with Violet's server first. If you need help, here's a link. Before connecting through OpenNab, you'll also need to write down either the IP address of your TrixBox server on your internal LAN or a fully-qualified domain name that points to your web site on the Internet if you're using a hosting provider. So the syntax for the entry you're about to make should look like one of the following using your correct IP address or domain name:

192.168.0.129/vl
wabbitvittles.com/vl (This one actually works if you'd just like to try things out without installing any software.)

Once you have your entry in hand, unplug your rabbit. Press and hold down the top button and reconnect power to your rabbit. As soon as all four front lights turn blue, release the button. This usually occurs in less than one second if you have an Internet connection. If you hold the button down too long after the lights turn blue, you'll need to start over. Now count slowly to twenty. From a wireless PC or Mac on the same subnet as your rabbit, open the Wireless Networking window and select Nabaztagnn as your WiFi host. The nn will match the last two numbers of the MAC address on the bottom of your rabbit. Count to twenty again and then open the following page with a web browser: http://192.168.0.1/. Click on Click Here to Start link. When the next page displays, click Advanced Configuration. You shouldn't have to change anything except the very bottom entry on the form which reads r.nabaztag.com/vl. Replace that entry with the entry you wrote down above and Save your change. This will reboot your bunny, disconnect you from the wireless connection, and restart your bunny using the OpenNab Proxy. Now is a good time to reconnect your PC or Mac to a functioning wireless network! The lights on your bunny will start out orange and then should turn green and go away after the bunny wiggles his ears. When properly connected, you'll have the glowing purple light on the bottom of the bunny and no other lights lit... just as you had when connected directly to Violet's server. Congratulations! You now have an operational OpenNab Proxy.

But What Can It Do? If you'd like to try all of this through our OpenNab Proxy first, then go through the configuration step above using wabbitvittles.com/vl as your proxy address. Once your bunny springs to life, here's a simple test to make sure everything's working. Write down the MAC address of your bunny. Then open a web browser and go to the following link substituting the MAC address of your bunny for the string of zeros, of course. You can also pick any other city and state in the United States... as long as they really exist. This demo system uses Cepstral's Diane 8kHz English voice. There are many others available. You can try them out here.

http://wabbitvittles.com/vl/api_demo/opennab-weather.php?sn=000000000000&code=422&city=Washington,DC

The Cepstral voices on our demo site are nice, but we don't find them to be appreciably better than the default voice installed with Flite. Flite also happens to be free and is bundled in the TrixBox servers we recommend. There's also the hassle of finding a conversion utility to get the text into a format that your bunny can decipher. All of these tools come preconfigured on the TrixBox systems. Hint!

OpenNab Applications. We're going to contribute several OpenNab applications to get you started today. Before you can use them, you'll need a TrixBox server or a garden-variety Linux server if you know what you're doing. If you roll your own, install Flite or Cepstral to handle text-to-speech conversion and a conversion tool to get the files into a format your bunny can decipher. You can look through the last couple dozen lines of code in the applications to figure out what you need.

Cepstral Installation. The only trick to installing Cepstral is choosing a good voice. We've had better luck with the "telephone voices" which are 8kHz, but you can try out all of them here. We'd recommend you begin by downloading the Diane-8kHz voice for Linux and get it working first. You don't have to buy it unless you like it! Once you download it, log into your TrixBox/Linux system as root, and issue the following commands using the voice name associated with your download:

mkdir /nerdvitt
mkdir /cepstral
cd /cepstral
[copy your download into the /cepstral folder now]
gunzip Cepstral_Diane-8kHz_i386-linux_4.1.4.tar.gz
tar xvsf Cep*
cd Cepstral_Diane-8kHz_i386-linux_4.1.4
./install.sh

When prompted for the installation path, use /nerdvitt. Just to make sure you have a link to the application in your path, execute the following command:

ln -s "/nerdvitt/bin/swift" /usr/local/bin/swift

When you decide to buy a license ($30), you'll get an activation key. You activate it by issuing the following command (while logged in as root!) and filling in the blanks using the same name you used when you purchased the license:

swift --reg-voice -n Diane-8kHz

Installing OpenNab Applications. First, you'll need to download the desired applications. Assuming you want all of them, just execute the following commands after logging into your TrixBox server as root:

cd /var/www/html/vl/api_demo
wget http://wabbitvittles.com/applications/weather-opennab.zip
wget http://wabbitvittles.com/applications/news-opennab.zip
unzip weather-opennab.zip
unzip news-opennab.zip

Once you've unzipped the files, you'll need to edit each .php file to configure it. For the weather, edit the following file: nano -w opennab-weather.php. The configuration changes begin at line 37:

if (strlen($city)==0) :
$city="Charleston, South Carolina";
endif ;
if (strlen($SN)==0) :
$SN = "000000000000";
endif ;
$WebRoot="/var/www/html";
$BinRoot="/nerdvitt/bin";
$ProxyAddress="0.0.0.0";
$UseCepstral=false ;
$voice="Diane-8kHz" ;

Choose a default city to replace Charleston, South Carolina, e.g. Atlanta,GA is fine for the syntax. Enter the serial number ($SN) of your rabbit to replace 000000000000. If you're using a TrixBox server, the $WebRoot and $BinRoot entries are fine. These are the root directory of your web server and the location of the Cepstral executable. Replace the $ProxyAddress entry of 0.0.0.0 with the IP address fully-qualified domain name of your TrixBox/Linux server. If you plan to use Flite for speech synthesis, nothing else needs to be changed. If you're using Cepstral, change $UseCepstral=false to $UseCepstral=true. Don't delete the semicolon at the end of the line! If you're not using the Diane-8kHz voice with Cepstral, enter the file name of your voice surrounded by quotation marks. Save your changes: Ctrl-X, Y, then Enter.

Now edit the opennab-news.php file: nano -w opennab-news.php. Beginning at line 18, you'll find the configuration settings:

if (strlen($category)==0) :
$category="topstories";
endif ;
if (strlen($SN)==0) :
$SN = "000000000000";
endif ;
$WebRoot="/var/www/html";
$BinRoot="/nerdvitt/bin";
$ProxyAddress="0.0.0.0";
$UseCepstral=false ;
$voice="Diane-8kHz" ;

Choose a default news category to replace topstories. Available choices include: topstories, us, world, iraq, world, mideast, politics, business, health, science, technology, showbiz, mostviewed, mostemailed, mostblogged, highestrated, adventures, obits, hotzone, nasashuttle, sept11, oped, oddlyenough, and many others. Here's the complete list of Yahoo RSS Feeds. Enter the serial number ($SN) of your rabbit to replace 000000000000. If you're using a TrixBox server, the $WebRoot and $BinRoot entries are fine. These are the root directory of your web server and the location of the Cepstral executable. Replace the $ProxyAddress entry of 0.0.0.0 with the IP address fully-qualified domain name of your TrixBox/Linux server. If you plan to use Flite for speech synthesis, nothing else needs to be changed. If you're using Cepstral, change $UseCepstral=false to $UseCepstral=true. Don't delete the semicolon at the end of the line! If you're not using the Diane-8kHz voice with Cepstral, enter the file name of your voice surrounded by quotation marks. Save your changes: Ctrl-X, Y, then Enter.

Running the Weather Application. There are several ways to run each of these new applications. The weather application can be activated using a web browser using the IP address of your TrixBox/Linux server:

http://192.168.0.129/vl/api_demo/opennab-weather.php?city=Charleston,SC

The application also can be run from the Linux command line after logging into your server as root:

php /var/www/html/vl/api_demo/opennab-weather.php city=Charleston,SC

Using the command line syntax, you also can schedule the application to run automatically at various times of the day using a crontab entry. For example, the following entry could be added to /etc/crontab to kick off a weather bunny report at 29 minutes after the hour beginning at 6:29 a.m. until 8:29 p.m. every day:

29 6-20 * * * root /etc/weather.sh

For the /etc/weather.sh script, simply copy the above line to the script and make it executable:

echo php /var/www/html/vl/api_demo/opennab-weather.php city=Charleston,SC > /etc/weather.sh
chmod +x /etc/weather.sh

Running the News Application. The Yahoo News application can be run in much the same way. It could be activated using a web browser using the IP address of your TrixBox/Linux server:

http://192.168.0.129/vl/api_demo/opennab-news.php?category=topstories

The application also could be run from the Linux command line after logging into your server as root:

php /var/www/html/vl/api_demo/opennab-news.php category=topstories

Using the command line syntax, you also could schedule the application to run automatically at various times of the day using a crontab entry. For example, the following entry could be added to /etc/crontab to kick off a news bunny report at 1 minute after the hour beginning at 6:01 a.m. until 8:01 p.m. every day:

01 6-20 * * * root /etc/news.sh

For the /etc/news.sh script, simply copy the above line to the script and make it executable:

echo php /var/www/html/vl/api_demo/opennab-news.php category=topstories > /etc/news.sh
chmod +x /etc/news.sh

Finding the Latest Nabaztag Applications. Well, that should get you started with OpenNab. And we'll be adding more and more applications in the weeks ahead as others begin to contribute as well. It seemed a fitting time to dedicate a new web site to our non-furry friend so... Welcome to Wabbit Vittles. If you have a contribution to add, just send us a message, and we'll be glad to host it for you. You'll also want to check out the terrific new Nabaztalk Forums for late-breaking tips and tricks. Enjoy!

Adding an iTunes Telephone Controller to Your Asterisk PBX

If you're as lazy as the rest of us, then getting up to change what's playing on iTunes or to adjust the volume is just too much like work especially if you've installed one of our PBX-in-a-Flash™ Asterisk® systems on either a dedicated Linux machine or your Windows Desktop. For long-time readers of Nerd Vittles, you may recall that we covered how to build a streaming audio server using iTunes last year. So today we add the missing piece which will let you change songs, adjust the volume, and pause and restart iTunes using any touchtone phone connected to your Asterisk or TrixBox system. Special thanks to jpe for figuring all of this out and to Acme Technologies and to David Schlosnagle for their work on the iTunes Command Line Interface.

Overview. To get things working, there are just a few, easy steps. First, you'll need a Mac running the Panther or Tiger versions of Mac OS X. Next, you'll need to download and install the iTunes Command Line Interface. Then you'll need a rock-solid Asterisk system. We recommend TrixBox 1.2.3 which you can install using our tutorial and installation scripts above. Finally, we'll add a voice prompt and tweak the dialplan a bit using freePBX to handle the telephony interface to iTunes. And, presto, you're done.

Installing the iTunes CLI. We're assuming you've already got a Mac up and running with the required version of Mac OS X. If not, start there. Then download the iTunes Command Line Interface onto your Mac Desktop. Unless you've secured Safari, it will decompress the downloaded file automatically leaving you an iTunes Remote Control folder on your Desktop. If it doesn't automatically decompress the .sit file, then just double-click on it. Now open a Terminal window and switch to root access using your Mac password: sudo su. Then execute the following commands:

cd Desktop
cd "iTunes Remote Control"
cp itunes /bin/itunes
chmod +x /bin/itunes
ifconfig
itunes play
itunes play

The ifconfig command lets you decipher the private IP address of your Mac. Write down the inet address for the network interface you're using to connect your Mac to your private network (usually found in the listing for en0 or en1). To complete the installation on the Asterisk box, you'll also need to know a username and password for your Mac. If you don't know, you can find all your Mac usernames by changing to the /Users folder and typing ls. The last two commands should crank up iTunes on your Mac Desktop and begin playing whatever the last song or podcast you listened to. If everything's working, you can close the Terminal window on your Mac. We're done with the Mac part of the drill.

Password-Free SSH Access. As with our Proximity Detection System and Backup tutorials, we want to use SSH to communicate between the Asterisk system and iTunes on your Mac. As you know, SSH typically prompts for a password when you connect to a remote resource. So here's the trick if you haven't read our previous articles. Log into your Asterisk system as root. Because the Asterisk system will actually be the actual user connecting with SSH, we need to switch from the root user to the asterisk user account to get things set up correctly: su asterisk. Then, from the command prompt, issue the following command: ssh-keygen -t rsa. Press the enter key three times. You should see something similar to the following. The file name and location in bold below is the information we need:

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

Now we want to copy the public key file (in bold above) to your Mac from your Asterisk system using SCP. The command should look like the following (except use the private IP address of your Mac instead of 192.168.0.104 and use your Mac username instead of the two instances of username below). Provide the Mac password for the username you've chosen when prompted to do so.

scp /var/lib/asterisk/.ssh/id_rsa.pub username@192.168.0.104:/Users/username/.ssh/authorized_keys

Once the file has been copied, you now should be able to log into your Mac from your Asterisk system using SSH without being prompted for a password. Let's try it. Here's the command. Just substitute your username and the IP address of your Mac below:

ssh username@192.168.0.104

You should be admitted without entering a password. Type exit twice to log out of your Asterisk system and to log out as user asterisk. If it didn't work, repeat the drill or read the complete article and find where you made a mistake.

Modifying Your Dialplan to Support the iTunes CLI. Now we're ready to cut and paste some code. Connect to your Asterisk system using your web browser by pointing to the internal IP address of your server: http://192.168.0.104. Choose System Administration and log in with username maint and your password. Now choose Config Edit and click on extensions-trixbox.conf in the list of config files. When the editor opens, add the following lines in the [from-internal-trixbox] context of the file:

exten => 673,1,Answer ; Dial MP3 to manage iTunes
exten => 673,2,Wait(1)
exten => 673,3,DigitTimeout(5)
exten => 673,4,ResponseTimeout(7)
exten => 673,5,Goto(itunes,s,1)

This will let you dial MP3 or 6-7-3 from any extension on your Asterisk system to manage iTunes on your Mac. While you're still editing extensions-trixbox.conf, scroll to the bottom of the file and add the following chunk of code:

[itunes]
exten => s,1,setvar(user=username)
exten => s,2,setvar(ituneshost=192.168.0.104)
exten => s,3,background(custom/itunes)
exten => s,4,background(beep)
exten => 1,1,system(ssh ${user}@${ituneshost} /bin/itunes mute)
exten => 1,2,goto(99,1)
exten => 2,1,system(ssh ${user}@${ituneshost} /bin/itunes pause)
exten => 2,2,goto(99,1)
exten => 3,1,system(ssh ${user}@${ituneshost} /bin/itunes unmute)
exten => 3,2,goto(99,1)
exten => 4,1,system(ssh ${user}@${ituneshost} /bin/itunes prev)
exten => 4,2,goto(99,1)
exten => 5,1,system(ssh ${user}@${ituneshost} /bin/itunes play)
exten => 5,2,goto(99,1)
exten => 6,1,system(ssh ${user}@${ituneshost} /bin/itunes next)
exten => 6,2,goto(99,1)
exten => 7,1,system(ssh ${user}@${ituneshost} /bin/itunes vol 25)
exten => 7,2,goto(99,1)
exten => 8,1,system(ssh ${user}@${ituneshost} /bin/itunes vol 50)
exten => 8,2,goto(99,1)
exten => 9,1,system(ssh ${user}@${ituneshost} /bin/itunes vol 100)
exten => 9,2,goto(99,1)
exten => 0,1,system(ssh ${user}@${ituneshost} /bin/itunes mute)
exten => 0,2,goto(99,1)
exten => *,1,system(ssh ${user}@${ituneshost} /bin/itunes vol down)
exten => *,2,goto(99,1)
exten => #,1,system(ssh ${user}@${ituneshost} /bin/itunes vol up)
exten => #,2,goto(99,1)
exten => 99,1,NoOp(${SYSTEMSTATUS})
exten => 99,2,GotoIf($["${SYSTEMSTATUS}" = "APPERROR"]?99,6)
exten => 99,3,background(num-was-successfully)
exten => 99,4,background(activated)
exten => 99,5,goto(s,4)
exten => 99,6,background(im-sorry)
exten => 99,7,background(an-error-has-occured)
exten => 99,8,wait(1)
exten => 99,9,background(goodbye)
exten => 99,10,Hangup
exten => t,1,goto(s,1)
exten => h,1,Hangup

Now move up to the first line of code (s,1) and change username to reflect the account name on your Mac that will be used to manage iTunes. It's got to be the same one that was used in the SSH keygen step above! Now move to the second line of code (s,2) and plug in the IP address of the Mac running iTunes. Save your changes by clicking the Update button. Close your browser, and don't worry about restarting Asterisk just yet because we have one final step to go.

Installing the iTunes CLI Voice Prompt. Just to give our new system a professional touch, let's add a custom voice prompt from Allison Smith to greet callers dialing MP3 on your system. Log into your Asterisk server as root and issue the following commands. The final one will restart Asterisk to load our dialplan updates from above.

cd /var/lib/asterisk/sounds/custom
wget http://nerdvittles.com/trixbox123/itunes.gsm
chown asterisk:asterisk itunes.gsm
amportal restart

Taking the iTunes Controller for a Spin. Now that the installation is complete, let's try it out. Make sure your Mac is turned on. Then pick up a telephone on your system and dial MP3. You'll be welcomed by Allison and prompted to enter a command. Using the commands shown on the adjacent keypad diagram, you can control virtually all aspects of iTunes. When you've finished entering commands, just hang up. It's that simple. If you happen to be streaming iTunes music to other desktops or your cellphone, then you'll really appreciate this addition to your Asterisk application software collection. Enjoy!


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

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

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

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

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

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

The Whole House iPod

While the dust settles a bit in the TrixBox world, we thought we’d digress today and tell you about an incredible whole house audio system. Yes, there’s the iPod for private listening and there are some streaming audio solutions for those that want music in one or two rooms of a home or office. But what if you want music (different music) available in every room of your home. Well, until now, you could look at spending $20,000 to $50,000 for a very proprietary solution such as Elan’s Home Systems. It’s no accident that you won’t find any pricing on their web site.

As luck would have it, we just moved into a new home that was prewired for audio and video in eight rooms including recessed ceiling speakers in all the rooms. While this is an expensive proposition when retrofitting an older home, it’s fairly reasonable during new construction, and many builders now include it as part of the cost of a new house. The gotcha, however, is adding the multi-room amplifier, the audio devices to produce the music, and the touchpanel control units in each room. Can you spell outrageously expensive! In round numbers, you’re looking at $5,000 for installation of a suitable amplifier, $1,500 to $2,500 for each ultra-proprietary touchpanel display, and another $10,000 or more for the audio sources. These include CD jukeboxes, iPods with infrared remote access, a multi-channel XM radio receiver to the tune of $1,500 plus XM radio fees of nearly $30 a month (for three channels) forever, and loads of consulting fees at $100+ an hour. Each of the touchpanels or keypads is manually configured to match the audio components you purchase so that you can switch audio sources, adjust volume, and skip songs in each room. The double-gotcha is that despite having spent tens of thousands of dollars on this system, you have no ability to adjust anything down the road without another $100 an hour service call from the installer. So just pray they’re still around, or you’re basically stuck with your initial setup forever. A $500 magic box is used to configure the touchpanels and keypads, and, NO, you can’t buy one. It’s not sold to consumers, just dealers. Ouch!

You should be getting the picture of why we went shopping for an alternative with a bit more flexibility. That’s when we stumbled upon an incredible product called the Sonos Digital Music System. In a nutshell, you have a self-contained system unit in each room where you want music. It includes an optional amp for connection to a pair of speakers, wired and wireless networking, and a user and streaming audio interface that is as good or better than the iPod. Then you add as many touchpanel control units to select music and music sources as your budget can afford. There are also PC and Mac versions of the touchpanel which won’t cost you a dime. Each touchpanel can control every zone (aka room) in your home. What you don’t need with this system is a house prewired for audio because each unit lets you connect directly to a set of speakers or an external amplifier if desired. You also don’t need a wired network throughout your home. Only one of the Sonos units needs to be connected to a wired network. The rest of the devices automatically configure themselves to communicate wirelessly with the other system units and controllers scattered throughout your home. If you buy the starter pack with two system units including amps and one controller unit, you’re looking at $1,200 which works out to roughly $500 per system unit and about $200 for the controller. That’s roughly one tenth the cost of a functionally similar controller unit from Elan except you can configure the Sonos controller while a dealer has to configure the Elan unit … at $100 an hour.

I feel a little like the guy selling the Ginsu knives on television: "but there’s more." Boy, is there! Not only is the sound of the systems downright incredible (depending upon your speakers, of course), but the variety of available music sources is going to make you want some of these in the morning. Each system unit can stream audio from almost any music source imaginable. This includes MP3’s stored on your PC, Mac, or our latest discovery, a $150 network-attached storage (NAS) device. You also can play Shoutcast streams, either your own or those available for free over the Internet. Another option is to map a file share from a Sonos unit to a Mac or PC. It takes about 10 seconds. Sonos units also can play music from Rhapsody. And, if you’re lucky enough to be a Comcast broadband subscriber like us, a Rhapsody streaming audio subscription with about 50 music channels is yours for free! Just login to your Comcast account and download the Comcast Rhapsody software to any Windows PC. Rhapsody Stations are every bit as good as XM or Sirius channels with one important difference. There’s no additional monthly charge to Comcast customers for as many simultaneous streams as you care to play. That’s quite a contrast from Elan’s three XM streams solution which means three rooms with XM radio and no more … for $30 a month … once you buy your $1,500 Elan XM receiver. With Rhapsody, you won’t need a receiver at all, just an old clunker PC sitting in the corner with the Rhapsody application running. It can be used for other tasks as well. At the moment, we have my daughter’s game PC running Rhapsody with four simultaneous streams playing in seven zones of the house. You can double up zones with the click of a button using any Sonos controller. In addition to all these music sources, you also can connect an old-fashioned analog audio device (like a CD jukebox or an iPod) to each system unit. Music from these sources can be streamed to any combination of rooms you choose, just like traditional Shoutcast streams or Rhapsody stations. The only thing missing with analog device streams is the album art, but it still sounds great.


There are some other reviews of the Sonos system which are worth a look. Check out David Pogue’s article in the New York Times, the Home Theater View, Audioholics, Playlist Magazine, and PC Magazine. Then you’ll want to run, don’t walk, to buy at least one for yourself! You can purchase units from Sonos and most of their dealers with a 30-day money-back guarantee. We installed eight systems with four remotes in just over two hours. We haven’t quit listening since. Now you know why we’re running a little behind on the Asterisk® and TrixBox articles. Enjoy!


Hosting Provider Special. Just an FYI that the Nerd Vittles hosting provider, BlueHost, has continued their limited time special on hosting services. For $6.95 a month, you can host up to 6 domains with 15GB of disk storage and 400GB of monthly bandwidth. Free domain registration is included for as long as you have an account. It doesn’t get any better than that, and their hosting services are flawless! We oughta know. We’ve tried the best of them. If you’ve never tried a web hosting provider, there’s never been a better time. Just use this link, and we’ll all be happy.


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.

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

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

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


Some Recent Nerd Vittles Articles of Interest…

The Best of Santa: Introducing the Nokia 770 Internet Tablet.everything

Ever wished someone would come up with a portable Wi-Fi and Bluetooth-enabled device with a web browser, email client, news reader, PDF viewer, streaming audio and video players, and a SIP phone all rolled into a Linux-based, Internet Tablet? Well, it’s here with the exception of the SIP phone which is scheduled for early 2006. It’s about the size of your hand. And, if games are your thing, there’s Chess, Mahjong, Marbles, and virtually any other game that has been ported to the ARM version of Slackware including clones of Tetris, IceBreaker, Minesweeper, Doom, and on and on.

The good folks at Nokia (yep, the cellphone people) finally have shipped the Nokia 770. And what a toy it is: the perfect addition to every commuter train ride or Starbucks visit. You may never travel with a notebook PC again. By loading an X terminal emulator, you have a Linux command prompt that will let you load and install virtually any Debian application on the planet: ssh, rsync, Office-compatible apps, VNC, NFS, GAIM IM, SQLite, and yes, someone has even ported the Asterisk® PBX to the 770. For those with a compatible Bluetooth cellphone, you can use your phone as your 770’s Internet link when there’s no Wi-Fi access point in your vicinity. It’s a bit quirky, but it does work with both CDMA and GSM Treo 650’s. And the best news of all: the Nokia 770 sports a high-res color screen that will have you believing you’re still sitting at your desktop PC. Best price: $349 at CompUSA this week.

If you want to learn more, start at Nokia’s site for Flash-based demonstrations (which play equally well on the Nokia 770 incidentally). Then visit the Nokia-supported development site, maemo.org, and have a look at the long list of apps which already are available and are free to download. And then head over to Vidar Madsen’s and Russell Beattie’s sites to see what’s new in the Nokia 770 universe. And by all means pay a visit to Ari Jaaksi, whose Open Source team at Nokia made it all possible. For a more detailed review, visit this ArsTechnica link. Still have questions? Check out the Internet Tablet Talk Forums.

The Music Frontier: Taming Streaming Audio for Music on Hold with Asterisk

Using streaming audio with the Asterisk® music on hold facility is another one of those little gotcha's that gives a lot of folks problems so we decided to wrap up 2005 by outlining a working setup of streaming audio for both Asterisk@Home 1.5 and Asterisk@Home 2.2. And, yes, it'll work with either recent version of pure Asterisk with a little extra elbow grease.

UPDATE: For releases of Asterisk after 1.4, this tutorial will not work. See our updated article for Asterisk 11.

Prerequisites: Before streaming audio can be used for Music on Hold (MOH) with Asterisk, there are three essential pieces. First, you must have a source of streaming audio that works. Second, you need a streaming audio player on your Asterisk/Linux server that can "talk" to your Asterisk system. And, finally, Asterisk has to be properly configured to support streaming audio as the source for your music on hold.

Choosing a Streaming Audio Source. An almost infinite variety of streaming audio exists on the net. If you're just getting into streaming audio, head over to Shoutcast.com for over 12,000 FREE sources to get you started. If you'd prefer to set up your own Shoutcast server, Nerd Vittles has previously covered solutions for both the Windows (WinAMP) and Mac (NiceCast) platforms. Unless computer viruses and Trojans (not that kind!) are your thing, buy a $500 Mac mini and call it a day. NiceCast works flawlessly. Insofar as Asterisk is concerned, here's the bottom line. If the streaming audio source you've chosen sounds like crap when you play it on your PC or Mac, it will sound the same way (or worse) as your MOH source. So start this project by picking a source that sounds good and be sure it plays reliably on your desktop PC or Mac before proceeding further. Keep in mind that anything above a 24K mono stream is wasted on a telephone call so there's no need to choose a 128K stereo audio stream unless you just want to eat up your bandwidth. And, finally, keep in mind that, unless you're using your own stream on your private LAN, the streaming audio will be using the same bandwidth that you need to support incoming and outgoing phone calls over your broadband connection. So less is more!

Configuring an Asterisk MP3 Player. For those using Asterisk@Home 1.5 or a more recent version of Asterisk@Home 2.x, then you have a version of mpg123 that is suitable for playing streaming audio as your MOH source. If you're not sure, log in to your server and type mpg123 -v to see what version of mpg123 is installed on your system. You'll need at least 0.59r to "talk" to Asterisk properly. If you need an update, here's a tutorial that will get you up to speed.


Building a Stream Directory. Next we need a directory to actually hold the contents of the stream while it's playing on your Music on Hold system. Log into your Asterisk server as root. Then switch users to asterisk: su asterisk. Now move to the default MOH directory: cd /var/lib/asterisk/mohmp3. Create a new directory to hold the streaming audio: mkdir stream. Switch to the new directory: cd stream. Now make an empty file to be used for the stream contents: touch stream.mp3. Close your asterisk user session by typing exit. That will leave you logged in as root.


Configuring Asterisk for MOH Streaming Audio. Now we need to set up a music on hold channel for your streaming audio: nano -w /etc/asterisk/musiconhold.conf. If you're using your own streaming audio server, then the line you want to add at the bottom of the file will look something like this except with the actual internal IP address of your Shoutcast server and the correct port number of your audio stream. Hint: NiceCast tells you everything you need to know by clicking the Share button.

stream => quietmp3:/var/lib/asterisk/mohmp3/stream,http://192.168.0.107:8000/

If you're using an external source, then the line will look something like the following. Just right click on the streaming audio link you've found and save the address to your clipboard for pasting:

stream => quietmp3:/var/lib/asterisk/mohmp3/stream,http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=3281&file=filename.pls

Once you've specified your audio stream, save the updated musiconhold config file: Ctrl-X,Y,then press enter.


Testing Your MOH Stream with Asterisk. With everything now properly configured, let's set up an extension just to be sure it's working correctly. Edit your extensions_custom.conf file:

nano -w /etc/asterisk/extensions_custom.conf

Then add the following somewhere within the [from-internal-custom] context:

exten => 466,1,Answer
exten => 466,2,Playback(pls-hold-while-try)
exten => 466,3,SetMusicOnHold,stream
exten => 466,4,WaitMusicOnHold,300
exten => 466,5,Hangup

Once you've added this extension code, save the updated file: Ctrl-X,Y,then press enter. Now restart Asterisk: amportal stop then amportal start. Pick up one of the phones on your Asterisk system and dial 466. After you're connected, it may take up to 15 seconds for the streaming audio to begin, but this delay only occurs on the first connection. Once you've heard your audio stream playing, hang up and call back just to make sure.


Configuring Streaming Audio as Default Music on Hold. Now that we have everything working, you may decide you'd prefer to replace your default MOH tunes with your new streaming audio source. It's easy. Edit the musiconhold config file again. Comment out the line beginning with "default" by inserting a semicolon at the beginning of the line. Then change the line we added which begins with the word "stream" so that it looks like this:

default => quietmp3:/var/lib/asterisk/mohmp3/stream,http://192.168.0.107:8000/

Save the updated file, and then restart Asterisk: amportal stop then amportal start.


1-800-411-METROFree Directory Assistance Service Launched. For those not using BroadVoice (which now has the same 411 service), write this number down or add it to your Asterisk dialplan for free directory assistance calls in the United States: 1-800-411-6387. It's also a free VoIP call with the providers listed below once you set up an account with one of them. You can read our reviews of these providers here. Assuming you have an account, just add ONE of the following sets (that match the provider with whom you have set up an account) to the [from-internal-custom] context in extensions_custom.conf:


exten => 411,1,Dial(IAX2/goiax/18004116387)   ; GoIAX Free Call
exten => _1NXX5551212,1,Dial(IAX2/goiax/18004116387)
exten => _NXX5551212,1,Dial(IAX2/goiax/18004116387)

exten => 411,1,Dial(IAX2/fwd/*18004116387)    ; FWD Free Call
exten => _1NXX5551212,1,Dial(IAX2/fwd/*18004116387)
exten => _NXX5551212,1,Dial(IAX2/fwd/*18004116387)

exten => 411,1,Dial(IAX2/teliax/18004116387)  ; Teliax Free Call
exten => _1NXX5551212,1,Dial(IAX2/teliax/18004116387)
exten => _NXX5551212,1,Dial(IAX2/teliax/18004116387)


Farewell to WordPress Cut-And-Paste Nightmare. For long-time readers of this column, you know what a royal pain cutting-and-pasting has been at Nerd Vittles thanks to the WordPress blog's proclivity for changing quotation marks (used in many Asterisk commands) to 'smart quotes' and replacing double-hyphens (used in many Linux commands) to 'long hyphens.' The end result has been that, while the code worked great on our development systems, it blew up when you used cut-and-paste to move it to your Asterisk server. This all came to a head this past week when our article on faxing blew up on every reader's system because of the double-hyphens ... which we actually didn't know was a problem until several days after the article hit the street. Merry Christmas to us!

Just like everything else that's great about the Open Source community, there is always someone smart enough not only to recognize a problem but also to fix it. So our hat is forever tipped to Alex King, one of WordPress's most ardent supporters. He wrote about the problem and then he single-handedly fixed it with his WP Unformatted Plugin. It just took us a while to discover it. There's nothing like a double helping of egg on your face to make you scratch a little harder for a solution. Now that we have the plugin, we'll be using it regularly and, as quickly as we can, we'll go back and rework all of our previous articles as well. So, hopefully the problem will go away for you and for us permanently. Should you see any code that still looks like it has quotation marks pointing in two different directions, please let us know. And ... thanks for your patience.

Free Calls from Nerd Vittles. Celebrate the New Year with a free call on us and our friends at TelaSIP. You can read all about it here.

Want More Projects? For a complete catalog of all of our Asterisk projects during 2005, click here. Have a Happy New Year, and we look forward to serving up loads of new Tips and Tricks for Asterisk in 2006!

ISP-In-A-Box: The $500 Mac mini (Building a Streaming Audio Server, Part II)

Todd Daniele's Apple VictrolaToday, we want to finish building our streaming audio server by picking up where we left off in Part I. We’ll assume that you already have chosen your favorite player or smartphone and that you’ve opted out of buying Apple’s just-announced Victrola (click inset) or Sony’s latest marvel, the NetJuke. Did we forget to say it … April Fool’s. So we’ll be putting in place your own server using a Mac mini to send your tunes to your streaming audio player, whatever it may be. As we mentioned last week, streaming music is a processor and bandwidth intensive operation because your Mac not only has to decode a compressed music file stored on your local disk and broadcast it to the streaming server, but the streaming server also has to recompress it and manage the audio streams for each player that connects to your streaming server. Put another way, you probably don’t want to be transmitting a 192K audio stream in stereo if you only have a broadband Internet connection with limited upload bandwidth.

So the best place to begin the design of your streaming audio server is with a pencil and some math fundamentals. The bottom line is that a streaming audio server can only stream as much data as your Internet upload connection will support. How do you figure this out? Well, first you need to know how much upload bandwidth your Internet connection supports. Don’t take your ISP’s word for it. Instead, visit a site such as DSL Reports and run a Speed Test. The MegaPath Networks site usually works well. We don’t care so much about download performance for this project. What we’re interested in is the upload number. Let’s assume your upload number is 256 kbps. To determine the maximum bitrate that your server can support, divide the number of simultaneous streams you wish to support by the upload bandwidth of your connection. For example, the maximum bitrate your 256 kbps connection could support with two streams is 128 kbps. For 8 simultaneous streams, the supported bitrate would be 32 kbps. What happens if you do the math wrong or cheat? Your server crashes and burns. It’s that simple. Actually, the burning part is hyperbole, but you can almost count on a crash.

Another factor to consider in planning the bitrate for your streaming server is the player hardware and download bandwidth of your target audience. We’re going to assume that you are the target audience for your stream to keep things on the up and up. You did read our first installment, didn’t you? So, if you only will be supporting one stream (to you) and you plan to listen to your music on your cellphone, then a bit rate of 24 kbps in mono is probably about right unless you want the audio stream at the receiving end to die and restart regularly. If, on the other hand, you plan to play the stream from your home server at your beach house 500 miles away using an AudioTron with a three megabit cable modem connection to the Internet, then a 128 kbps stream in stereo may be more appropriate to improve the quality of the music at the receiving end. Just keep in mind that the higher the stream rate, the more processing power is required to pump out the stream. And, to broadcast in stereo, means multiplying everything by two.

Choosing A Streaming Server. Assuming you’ve solved the bandwidth requirements, step two is actually choosing a Streaming Audio Server. As we mentioned in the first part of this article, this is complicated a bit by the fact that you also need a Broadcast Server in the Shoutcast environment. If you only want a system which can send a single song on demand or a system which will play a predefined playlist, then Nullsoft’s Shoutcast DNAS server for the Mac is a perfect fit, and you can download it here. Be sure to carefully read the installation and configuration instructions which are included on Nullsoft’s web site. For the broadcaster component on Mac OS X, you can download the Shoutcast DSP Plugin for Mac OS X here. Be sure to review the configuration settings before you install the software and keep in mind that the Mac broadcast module cannot stream input from a sound card, only a playlist.




Other Broadcast Options. Let’s assume that your only reason for doing any of this is to impress your friends by playing some unique content on your cellphone "live." Nothing quite beats the iMan’s talk-radio broadcast if this is your goal. And there are a couple of approaches on the Mac platform. The first is to install the Shoutcast DNAS server on your Mac as outlined above and use the Windows platform for the broadcasting module. In this scenario, you download WinAmp 2 for Windows XP from here and then download the Shoutcast DSP Plugin for WinAmp 2.0 from here. You obviously have to have a Mac and a spare Windows XP machine and a radio with a line out jack to make this work. The only trick to successfully connecting all the pieces is making sure the passwords for the streaming server on the Mac and the WinAmp broadcaster module match. And, of course, make sure that the Shoutcast port isn’t blocked by a firewall on either your Mac or the Windows XP machine. If this sounds like a configuration nightmare, trust me. It is!

NicecastThe Smarter Alternative. Unless you just spent your last nickel for lunch today, there is a far simpler way to bring up a streaming audio server on the Mac platform, but it’ll cost you $40. The product is Rogue Amoeba’s Nicecast. You can try it for free, and it’s fully functional for the first 20 minutes of every broadcast. Then the quality of the audio stream starts to deteriorate. If we’re still talking about listening to the iMan, 20 minutes is probably more than enough in one sitting anyway. In short, you can make absolutely certain that Nicecast meets your needs before you spend a dime. Complete installation and setup takes about two minutes, and Nicecast provides both the streaming server component which is Shoutcast-compatible and the broadcaster component. And any content you can play or hear on your Mac can be streamed with Nicecast. This includes iTunes as well as input from a microphone, a mixer, any radio with a line out jack, or even EyeTV. On the Mac mini, you’ll need a USB input device for most of these options. Griffin’s iMic is the best value. Finally Nicecast includes 40 professional plug-in’s including a terrific equalizer to improve the quality of your stream.

To get started, download and install the software. Run the application by double-clicking the Nicecast icon in your Applications folder. Click on the Source button and pick your input source. Click on the Input button and name your streaming station. You can include a genre and web site address if desired. Click on the Quality button and choose the quality of your audio stream. Nicecast will make an educated guess based upon the speed of your Internet connection, but you can change it in one click by selecting one of the predefined stream types. Click the Share button, and Nicecast will provide you the web link to use in your player. Make certain that Port 8000 is open on your Mac firewall and that Port 8000 on your hardware-based firewall is mapped to the internal IP address of your Mac streaming server. Now click the Start Broadcast button, and you’re in business. It really doesn’t get much easier than that which explains why Nicecast has won just about every software award worth winning including MacWorld’s Editor’s Choice in December, 2004. And, if you do ever need help, Nicecast’s first-rate documentation is as close as the Help button in the application. Finally, if you’re thinking this whole project sounds pretty silly, then take a few minutes and read this article which explains better than I why, a year from now, this project and the Mac mini may not look so silly after all. See you next week for FTP servers.