Home » Search results for 'streaming audio server'

Search Results for: streaming audio server

The Most Versatile VoIP Provider: FREE PORTING

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.

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

Most of our Mac mini projects, which also work fine on any other Mac running Mac OS X v10.3, have focused on open source solutions at no cost. The reason was not so much because the technology was free (although that’s obviously a big plus for many of us) but because the open source software was the best in its class. The landscape is a little different in the streaming audio world. You can build a streaming audio server on a Mac with free tools, but they are not open source. While the quality is certainly still there, the system’s usability leaves a lot to be desired. Here’s why. There are usually three components in a streaming audio system: a player, a broadcaster, and a streaming server. The broadcaster sends MP3 files to the streaming server which handles compression for streaming and distribution of the stream to the players. Players and a streaming server are readily available on the Mac platform; however, the broadcaster component (which is open source) is limited in its functionality so we’ll propose another approach for the Mac platform.

We’re going to break down the process into its parts to simplify things for those just getting started. Today we’ll be addressing streaming audio players. Then, in Part II of our series, we’ll talk about a broadcaster and streaming audio server for your Mac mini. We’re also going to focus primarily on products which are Shoutcast-compatible since it is the free standard for streaming audio. For your own requirements, other solutions may work as well or better, and we’ll mention a couple. The bottom line is you can’t go wrong with a Shoutcast-compatible streaming audio solution, and you won’t have to worry about someone pulling the rug out from under your music project down the road (we hope).

Shoutcast is the invention of the good folks at Nullsoft that brought the world WinAmp. Nullsoft is now a subsidiary of AOL which now is part of the Time Warner empire. After joining AOL, the Nullsoft team created gnutella. AOL management shut down the gnutella project, and virtually all of the Nullsoft developers resigned. That history lesson is intended to explain the "we hope" reference in the previous paragraph. Thus far, Nullsoft’s Shoutcast streaming server remains free for the taking, and there are many open source broadcaster products which have evolved that all rely upon the Shoutcast server for streaming content distribution. Just keep in mind that both AOL and Time Warner are content aggregators, and you can rest assured that Big Brother will never let Little Brother interfere with their primary goal: making money. For another perspective on the incestuous relationship between Nullsoft and AOL, read this. Before you shed too many tears for the Nullsoft developers, keep in mind that they walked away from the table with a cool $100 million for a company whose major income producer is the WinAmp music player, the deluxe version of which sells for $14.95. And then there’s the WinAmp competition: Microsoft’s free (bundled) Windows Media Player and MusicMatch (almost free and bundled with virtually every new PC on the planet). And folks wonder why the Internet bubble burst. Do the math! So much for the politics, let’s get back to the technology.

Streaming Audio Defined. As the name implies, streaming audio means you can play a digital audio stream almost instantaneously on some type of player without waiting for an entire song to first download into the player. If you want to learn more about streaming technology, here’s a link that will tell you everything you ever wanted to know. So the first two prerequisites to make all of this work are some type of player that can handle streaming audio and a local network or Internet connection with acceptable bandwidth to the streaming audio source. In terms of quality and versatility for home use, there is no finer hardware-based player than Turtle Beach’s AudioTron. The AudioTron’s distinguishing characteristic from most other players is that it can play a collection of songs directly from a network hard disk without reliance upon any streaming audio server. It can also play Shoutcast streaming audio. And, as luck would have it, Turtle Beach has inexplicably killed the product just when streaming audio has finally hit its stride. The good news is that Turtle Beach and a throng of dedicated users still support the product with a broad range of add-on’s. And there are usually some units available on eBay if you want one.

Streaming Audio Players. There are many of other streaming audio players that can double as a server as well. Not the least of these is your trusty Mac running iTunes or a PC running WinAmp or Windows Media Player. One advantage of WinAmp is that it can also serve as a broadcaster in addition to being a great streaming audio player. In fact, if you are fortunate enough to have both a Mac and a Windows XP machine and you also have an XM Radio or a Sirius Radio with a line out jack, you can actually use WinAmp to broadcast your satellite radio content to your Shoutcast server by adding the free Shoutcast broadcasting plug-in to WinAmp. And, until last week, you could add the Output Stacker plug-in to capture Napster To Go streams to disk. Big Brother deleted out_disk.dll from the Shoutcast site but, with a bit of Googling on the file name, you can probably still find it if you are so inclined. See what we mean about the content aggregator mentality. This is basically the same technology and quality as a tape recorder from forty years ago, and now the content providers want to outlaw it. So much for fair use. Another worthy contender in the all-in-one category is the Blackbird Digital Music Player. Also in the home audio component player category are the Squeezebox which uses its own server software for your Mac and Netgear’s MP101.

Streaming Audio to Cellphones. One of the really cool uses of streaming audio is to play tunes on your cellphone from your home music collection. The Treo 650 running PocketTunes with an Internet connection such as Sprint’s PCS Vision is the perfect fit. For this to work, you obviously will have to open port 8000 on your home firewall and map the port to the IP address of your Mac. You’ll also have to enable port 8000 in your Mac’s firewall. We’ve covered all of this before if you need a refresher course. Just substitute 8000 for 80 in the discussion and follow the steps.

But, is it legal? Well, as a lawyer, I’m obliged to first tell you that this article is not a legal opinion, but a technology discussion. You’ll need to consult with your favorite lawyer to get a legal opinion. As a layman, I’d predict that your guess is about as good as mine. Building a shoutcast server certainly appears to be legal since there is a process in place to pay astronomical license fees. But. if you are shoutcasting only to listen to your own music collection yourself, it’s difficult to fathom how this differs from playing your purchased music directly on your CD player or iPod or Mac or PC. If you can legally carry your CD music collection from your home to your car to play it, then it seems reasonable to assume you could beam an album you’ve paid for from your home to your car or your cellphone. That is essentially what Apple does with its Airport Express. Of course, once you start sharing your music collection, all bets are off. A law professor would probably ask what happens when someone walks in your house and listens to your music. Are you now a music pirate? And what if they bring a tape recorder? Isn’t law school fun? Here’s an article and another one that cover a lot of the issues if you’re interested.

Having grown up in an era when kids were afraid to touch someone else’s mailbox out of fear of committing a felony, it’s more than a little disconcerting to look at today’s music landscape in the United States where the RIAA in collusion with the United States Congress has managed to turn almost half the country into felons for their music collections. My own view is that the Digital Millenium Copyright Act was enacted out of spite to prove Mark Twain was wrong when he said, "There’s no distinctively native American criminal class, except [perhaps for] Congress." And then there’s Microsoft’s illustrious CEO, Steve Ballmer, who put it so eloquently: "The most common format of music on an iPod is stolen." For a company that made its fortune on a product with more than a few "similarities" to the Mac (to which Microsoft had something akin to a source code license at the time), one might reasonably conclude that Mr. Ballmer certainly knows his subject matter. Finally, it’s worth recalling that no music was subject to federal copyright until 1971, long after the Beatles and Rolling Stones and Elton John had made their millions. Ask yourself this question: "Was there more music piracy in 1970 or today?" So we’re not quite sure all the legislating has really accomplished a lot … other than criminalizing the American public and lining the pockets of congressmen and recording industry moguls. Wink, Wink: They call them campaign contributions.

If Congress and the RIAA are serious about ending piracy, then a fresh, common sense approach seems long overdue. The new Napster To Go leasing model suggests that the RIAA is perfectly comfortable with a fee of $15 a month for an unlimited music collection. If we can all agree (1) that iPods and other music players only last for three or four years, (2) that you have to have a music player to play music, and (3) that less than one in a thousand listeners actually uses today’s Napster system, then it shouldn’t take a mathematics genius to figure out that some "Artists’ Fee" in the neighborhood of $100 could be added to the cost of every music player and, once such a player was purchased, the end user would be licensed to play any music the end user could get his or her hands on at no additional cost for as long as the music player would play. Why $100 and not $700 (the four-year cost of a Napster subscription)? If $700 is profitable for the RIAA and Napster with virtually no market share, then the basic laws of supply and demand suggest that increasing market share 1,000-fold should result in a cost reduction of at least 80% particularly where there are zero production and distribution costs in the pricing and sales model. And finally, limit payments from the Artists’ Fee fund to only those artists who distribute their music in unencrypted formats. Just my 2¢ worth.

That’s it for today. If you want to try out the product we’re going to be raving about in Part II, then download Rogue Amoeba’s Nicecast and have a blast until next week.

The Music Frontier: Taming Streaming Music on Hold with Asterisk 11

It’s been over 7 years since we first wrote about streaming music on hold with Asterisk®. While we’re energized with Back to School Fever, we decided it was about time for a refresher. And, in honor of TWOfer Tuesday, we also have a terrific new SIP discovery to share. It won’t cost you a dime.

For long time readers of Nerd Vittles, you will note that all of the MOH syntax has changed since the early Asterisk days. So today we wanted to document how to integrate streaming music on hold into Asterisk 11 with or without FreePBX®.

Prerequisites: With the PIAF-Green platform, all of the Linux tools you’ll need are already in place. On other Asterisk platforms, you may need to install MPG123 before any of this will work. 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 Asterisk. And, finally, Asterisk has to be properly configured to support streaming audio as the source for your music on hold.

Legal Disclaimer. There are all sorts of licensing restrictions on streaming of commercial music. With commercial radio broadcasts, the short answer is you can’t do it without paying a fee. However, things get murky where your music on hold stream originates with an Internet provider who already has paid a fee for your use of the streaming content. Nevertheless, you should consult with an attorney before beginning your broadcasting career. It would be an understatement to suggest that the RIAA, ASCAP, and their friends in Congress and the White House, have made "music mooching" an expensive hobby. In addition, there is a move afoot by the White House to make streaming of copyrighted music a felony. Not surprisingly, the White House Copyright Czar just jumped ship to take a cushy job heading up the industry’s anti-piracy lobbying group. For those that are criminally inclined, it probably would be less expensive to return to the glory days of shoplifting music and playing it in the comfort of your home or dorm room… not that we would ever encourage criminal behavior, of course.

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 50,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. This is one area where the Mac platform really shines. 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 your 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. Also 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 Asterisk for MOH Streaming Audio. Here are the three steps to get things working today. First, you’ll need the web link to your music source. Second, you’ll need to configure a MUSICCLASS Channel to support that stream using Asterisk. And third, you’ll need to set up a test extension to try out your music stream.

In the case of SHOUTcast.com, the procedure to obtain the necessary link for your streaming audio source is straight-forward. Find the station desired and Ctrl-Click or Right-Click on the station and copy the link to your clipboard. This is NOT the link you’ll need for Asterisk! Instead, open the link in a new browser window. It will download a .pls file to your desktop. Open this file using a text editor, and copy out one of the File* entries (if there are several). Choose the one that looks something like this: http://160.79.128.61:5016. If you’re using Nicecast on a Mac, start up the app, choose your music source, and then click the Share button. Nicecast will display two entries as shown below:

Using our example, the required Nicecast link for Asterisk running on the same LAN is http://192.168.0.105:8002.

Now set up a music on hold channel for your streaming audio: nano -w /etc/asterisk/musiconhold_custom.conf. If you’re using your own streaming audio server, then use the Nicecast entry from the procedure above. Otherwise, use the SHOUTcast entry following the procedure we outlined. Here are some examples:

[Reggae]
mode=custom
application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s http://160.79.128.61:5016

[Top40]
mode=custom
application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s http://95.141.24.98:80

[NewAge]
mode=custom
application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s http://sfstream1.somafm.com:8032

;[nicecast]
;mode=custom
;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s http://192.168.0.105:8002/

There’s a reason we’ve commented out the [nicecast] entry. If Asterisk doesn’t find it running, you’ll get an endless stream of "Interrupted system call" errors, not exactly the sort of stream we had in mind. And a cautionary note about bandwidth: a streaming audio source, once configured, continues streaming until you disable it in musiconhold_custom.conf and restart Asterisk. So choose your sources, the number of sources, and the amount of bandwidth each consumes carefully. Finally, here’s a tip about the volume of your audio stream. With MPG123, the -f setting is the closest thing there is to a volume setting. The values range from 1 to 32768. If some of your callers will be using cellphones, it has been reported that the 8192 setting is too high. Give 1192 a try and adjust as necessary to meet your own requirements.

Once you’ve specified your audio stream(s), save the updated musiconhold custom file: Ctrl-X, Y, then 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 in /etc/asterisk and insert the following snippet in the [from-internal-custom] context:

exten => 466,1,Answer
exten => 466,2,Playback(pls-hold-while-try)
exten => 466,3,Set(CHANNEL(MUSICCLASS)=nicecast)
exten => 466,4,MusicOnHold()
exten => 466,5,Hangup

exten => 467,1,Answer
exten => 467,2,Playback(pls-hold-while-try)
exten => 467,3,Set(CHANNEL(MUSICCLASS)=Reggae)
;exten => 467,3,Set(CHANNEL(MUSICCLASS)=Top40)
;exten => 467,3,Set(CHANNEL(MUSICCLASS)=NewAge)
exten => 467,4,MusicOnHold()
exten => 467,5,Hangup

Once you’ve added this extension code, save the updated file: Ctrl-X, Y, then Enter. Then restart Asterisk: amportal restart. Pick up a phone on your Asterisk system and dial 467. After you’re connected, it may take up to 2 minutes for the streaming audio to begin, but this delay only occurs after Asterisk is restarted. Once you’ve heard your audio stream playing, hang up and call back just to make sure. Remember, each stream you activate continues streaming! It’s your bandwidth.

Configuring FreePBX 2.11 for MOH Streaming Audio. Once you have everything working, let’s switch to FreePBX 2.11 and show you the quick-and-dirty way to accomplish the same thing with a single line of code. Just use the same Application string that was used in the musiconhold_custom.conf setup above. The only caution here is be sure to use different labels than the ones used above. For example, to use the same source as NewAge, just change the label to NewAge2 in FreePBX.

Now open FreePBX and click Settings -> Music on Hold -> Add Streaming Category. Then fill in the blanks like this:

Once you have one or more streaming categories defined, you can select your favorite when you create a new Inbound Route, Ring Group, or Conference.


Introducing Anveo

SIP Nirvana. We have another terrific SIP discovery for you this week. Previously, we’ve raved about Sip2Sip’s free SIP URIs and AnveoDirect’s terrific SIP bargains for those that like wholesale prices. And last week we introduced SIP.US which finally hits the $20/trunk price point for unlimited inbound and outbound calling in US48. It also works hand-in-glove with FreePBX 2.11. Today we want to introduce Anveo’s commercial offering which includes residential, business, and free SIP services. Anveo is the hands-down winner of our "Best Free VoIP Resource on the Net" award. We’ll get to why, but there’s so much more…

Let’s begin with a quick summary of their DID offerings:

Anveo has one of the most robust VoIP offerings you’ll find in terms of feature set. Here’s a quick overview:

  • SMS Messaging (1¢ per message)
  • Fax and Fax-to-Email Integration
  • Voicemail to Text
  • Salesforce.com CRM
  • ZOHO CRM
  • G.729 and G.722 (HD Voice)
  • Destination-based Outbound CallerID
  • Text-to-Speech (41 voices in 17 languages)
  • Google Contacts
  • Google Analytics
  • Web Calling
  • Call Recording with Amazon S3 Integration
  • Outbound Call Campaigns
  • Conference Calls with Recording
  • Worldwide DIDs and Number Porting
  • Disposable Phone Numbers
  • IVR Call Flow Builder
  • Anveo Phone API
  • Reseller Toolkit

For today, let’s focus on FREE. What a free Anveo account gets you is AMAZING. In addition to another SIP URI with fax support for your server, you also get access to Anveo’s Call Flow Builder to create templates with up to 10 items. None of it costs you a dime! Just sign up for a new account at anveo.com using the Nerd Vittles referral code: 9625450. That gets us a few shekels to keep the lights burning if you ever start spending real money with Anveo.

The shining star of Anveo is its drag-and-drop Call Flow Builder. The icing on the cake is Anveo’s Phone API which we will leave for exploration on another occasion. For Asterisk aficionados, think of Call Flow Builder as a drag-and-drop interface that actually creates Asterisk dialplan code on the fly. While you can create your own, there also is an impressive collection of sample templates from which to choose. Each takes less than 30 seconds to set up, and every template that you create gets its own dedicated SIP URI. For example, one click gets you a Fax-to-Email delivery service using any DID or SIP URI in your account. Another click gets you a Stealth AutoAttendant including automatic fax detection with email fax delivery plus SIP URI call forwarding, all for free. Very impressive! Here’s what it looks like when configured to send fax calls to email and non-fax inbound calls to Lenny. As we noted, this took less than 30 seconds to set up using a default template with any free Anveo account. All that we added was a SIP URI in the SIP Call Control by clicking on the Pencil icon to edit. Then we clicked SAVE in the blue title bar and, presto, Lenny worked!

First things first. Once you’ve signed up for a new account at anveo.com using the Nerd Vittles referral code: 9625450, Anveo will email your credentials. Sign in and activate a new SIP account. In order to register the Anveo SIP trunk with your Asterisk server, you’ll need two pieces of information which you will find under PBX -> Users/sub-accounts -> action.Preferences -> SIP Device Registration: Username and Password.

Once you have your username and password, open up FreePBX and add a new SIP Trunk with your credentials. You can create a custom DID for your trunk by tacking something like /12345 onto the end of the Registration String below.

Next, add an Inbound Route using the Custom DID you created above. Point it to an extension or other resource on your system. Then check to make sure your SIP registration was successful: Reports -> Asterisk Info -> SIP Info.

No exposure of your server to the Internet through your hardware-based firewall is required. However, for those using IPtables WhiteLists or Travelin’ Man for enhanced security, you will need to manually add a SIP entry for sip.anveo.com to /etc/sysconfig/iptables and restart IPtables. The appropriate entry should look like this:

-A INPUT -p udp -m udp -s sip.anveo.com --dport 5010 -j ACCEPT

Here’s what free gets you in addition to 15 megs of online storage for voicemails and faxes:

And Finally… The Magic. You now can receive free inbound SIP URI calls at zero cost from anywhere in the world using SIP/1555ACCOUNTNUMBER@sip.anveo.com:5010. And, if you prefer a more user-friendly SIP URI, take a look at last week’s Nerd Vittles cloaking service offering which is also free. Enjoy!

SIP URI Pricing Clarification. Inbound calls to your account’s SIP URI are always free. That means you can register an Asterisk trunk to your Anveo account, and all incoming SIP calls from your Anveo SIP URI will be free. If you sign up for a free IPKall DID as explained in our previous article, you’ll have a near perfect (and free) VoIP platform for your home or office. Give Lenny a try using our Anveo/IPKall/RentPBX combo:

On the Anveo Value Plans (see the DID screenshot above), be aware that calls using Call Flow templates that rely upon an additional Anveo SIP URI count against your daily bucket of "platform minutes." Free accounts get 40 free minutes a day. Business accounts get 150 minutes a day. Additional calls are billed at 1.5¢ per minute.1

A Word of Caution. For those considering commercial or home use of Anveo for "real calling," be advised that Anveo recently changed their pricing model on calls terminated in the United States. Some of these calls now are $.005 per minute while others reportedly were as high as $.25 per minute! Pricing has changed every day this week. We would encourage you to find a different termination provider if costs are a consideration. After four attempts to implement a tiered pricing model for U.S. terminations, Anveo rolled back to flat rate pricing on Thursday evening. See the DSL Reports message thread for details.


Deals of the Week. There’s still an amazing deal on the street, but you’d better hurry. A new company called Copy.com is offering 20GB of free cloud storage with no restrictions on file size uploads (which are all too common with other free offers). Copy.com has free sync apps for Windows, Macs, and Linux systems. To take advantage of the offer, just click on our referral link here. We get 5GB of extra storage which will help avoid another PIAF Forum disaster.

Originally published: Tuesday, September 3, 2013 Last updated: Thursday, September 5, 2013



Need help with Asterisk? Visit the PBX in a Flash Forum.


 


We are pleased to once again be able to offer Nerd Vittles’ readers a 20% discount on registration to attend this year’s 10th Anniversary AstriCon in Atlanta. Here’s the Nerd Vittles Discount Code: AC13NERD.


 

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. We inquired about the SIP URI pricing with Anveo tech support. Their response is included in this section. The remainder of the article already had been written before contacting Anveo. In responding to the support request (in less than 10 minutes), Anveo generously offered us the use of additional platform minutes and a $5 "slush fund" for future testing and purchases of Call Flow PRO items (4¢ each). While we all may have our price for slanting reviews, we want to assure everyone that Anveo’s generosity in no way affected the contents or views expressed in this article. The FTC and NSA now can resume their naps. []

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!

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!

HOW-TO Bonanza: 50 Great Summertime Projects for You & Your Mac mini

Well, it’s that time of the year again. The Nerd Vittles staff will be taking a breather for a bit to recharge our batteries. But, in the finest college tradition, we’re leaving you lots of homework. Here’s a listing of what we’ve built thus far in our Mac mini ISP-In-A-Box project. So, while we’re taking it easy, pick out a few projects you haven’t tried and knock yourself out. Any Mac running at least Mac OS X v10.3 aka Panther is a suitable candidate for these projects. Many also have been tested with Tiger. Visit Tiger Vittles for the Tiger update notes to many of these tutorials. Also be sure to check out our WHERE-TO Bonanza: 50 Great Summertime Web Sites for You & Your Mac mini.
Mac mini

  • Apache Web Server
  • Email Servers: SMTP, POP3, and IMAP
  • MySQL Database Server
  • PHP and PhpMyAdmin
  • WebMin
  • The Webalizer
  • Web Calendars
  • Email Reminders
  • Crontab and CronniX
  • WordPress 1.5 Blog
  • TrixBox/Asterisk® VoIP PBX
  • A special welcome to Popular Science visitors
    And here are some of our other tutorials to keep you and your Mac mini busy:

  • Web Sites 101
  • Remote Access
  • P2P from A to Z
  • Network Security
  • Domain Names and ISPs
  • Skype = Free Phone Service and Mastering Internet Telephony: One SIP At A Time
  • And finally we and our friends at MacSurfer and Engadget and Gizmodo and MacOSXhints and MacDevCenter and Entropy. Give ’em a whirl!

  • WebDAV Server HOW-TO
  • WebDAV Clients HOW-TO
  • Managing Web Sites with WebDAV
  • Remote Mac Access with AFP and SSH
  • RSS Made Really, Really Simple
  • Backing Up Your Mac … for Free
  • Mac OS X Tiger Backups: The Good, The Bad, and The Ugly
  • Building a Data-Driven Web Site
  • Building a Streaming Audio Server
  • Web Hosting (Is Not) For Dummies
  • Hosting Multiple Web Sites and Domains
  • Creating a Secure (HTTPS) Mac OS X Web Server
  • Building A PureFTP Server … If You Must
  • Building a Home Automation Server
  • Building a Computer Telephony Server
  • Installing a Free Asterisk@Home PBX: Part I, II, III, IV, V
  • Mastering Internet Telephony: One SIP at a Time
  • Turning Your Mac mini Into a DVD Player Kiosk
  • HOW-TO: Turn your Mac mini into a media center
  • HOW-TO: Create Your Own Planet (aka Web Site of Your Favorite RSS Feeds)
  • CenterStage – The Mac Media Center Open Source Project
  • UStec Mac mini Home Media Server
  • Wiki Knowledge Base: Using a Mac mini as a Home Media Center
  • MacVroom – The Definitive Mac mini Car Integration Site
  • iDash: Mac mini for Your Car or Land Rover or Lexus or VW GTi or BMW or 3000GT or Prius
  • HOW-TO: Turn your Mac mini into a low-cost recording studio
  • Installing and Tuning Open Office on Mac OS X
  • Exploring the Mac OS X Firewall
  • 50 Ways To Get More From Your Mac mini
  • Last but not least, for PC users thinking about making the Switch to a Mac, read our article and this one. Then buy David Pogue’s book, and you’ll have everything you need. It really is a No Brainer!


    We’ve gotten lots of terrific feedback and some great tips from many of you since we first began putting this list together in early spring, but we’d love to hear from the shy types as well. What did you like? What can we improve? What can we cover which would be of interest to you in the coming months? If you have a favorite open source application or a must-have tool that we’ve overlooked thus far, don’t be timid. Drop us a note or just leave a comment below. We do this for fun, not as a business fortunately, but we strongly believe that Apple should be doing something similar as part of their business plan. We, their loyal customers, deserve nothing less. Thanks for visiting NerdVittles.com. And do tell your friends about us. Finally, take a look at our Tiger Vittles site for the latest happenings with Mac OS X Tiger.

    Who Is This Guy? Ward Mundy, the author of the ISP-In-A-Box series, is a retired attorney who spent more than 30 years providing legal and technology assistance to the federal courts in the United States.

    The Best of Both Worlds: Taking Incredible PBX from the Cloud to the Ocean

    We’ve spent a good bit of time documenting a dirt cheap way to learn about VoIP in the Cloud with our Incredible PBX offering using a $10.50 virtual machine at CloudAtCost. Is it production ready? Probably not. But we’re reminded of the old saying that pizza is a lot like sex: "When it’s good, it’s really good. And, when it’s bad, it’s still pretty good." That pretty much sums up CloudAtCost. And it’s not like a one-time investment for the cost of a pizza lunch is going to break the bank.

    Today we turn our attention to a more reliable, long term Cloud solution with a fresh look at Incredible PBX with Digital Ocean. This setup runs about $5 a month after a free $10 trial using our referral link. If you continue to use the service, it also generates a little revenue for Nerd Vittles to keep the lights on.

    It’s been about two years since we first introduced the Digital Ocean platform. Back then, it was the experimental platform. But a lot has changed, and it’s all for the better. First, you get a Cloud Server on which you can create virtually any Linux platform you like including CentOS, Fedora, Debian, Ubuntu, and more. Second, you get your choice of seven datacenters all around the world: New York, San Francisco, Toronto, London, Frankfurt, Amsterdam, and Singapore. Third, you get enormous scalability. You can start with the $5/month flavor with 512MB of RAM and a single CPU, 20GB of SSD storage, and 1TB of bandwidth. As your requirements grow and with a couple clicks, you can scale up through 8 multiples of capacity to a whopping 64GB of RAM with 20 CPUs, 640GB of storage, and 9TB of bandwidth for less than a dollar an hour. Just make a Snapshot of any off-line Droplet, and then use that Snapshot as the image for your new server in lieu of a Linux Distribution.

    For our purposes today and for home and SOHO business users, the $5/month Digital Ocean platform is a perfect fit for both the CentOS 6.7 and Ubuntu 14.04 flavors of Incredible PBX. Once you’ve created your Digital Ocean Droplet with your choice of operating system, the Incredible PBX install procedure takes about 25 minutes. This includes the time necessary to compile and install the latest release of Asterisk® 13 from source code. When you’re finished, you’ll have a rock-solid PBX that is fully secured using the Linux firewall. For out-of-the-gate security, no other PBX comes close… at any price. Incredible PBX is and always will be pure open source GPL code and, of course, it’s FREE!

    Creating Your First Digital Ocean Droplet

    CentOS 6.7 remains our Gold Standard of Linux operating systems. We’ll start there and walk you through the Incredible PBX install procedure. Begin by signing up for a Digital Ocean account and creating a 512MB $5 droplet in your choice of data centers. Choose the CentOS 6.7 x32 platform just to keep things simple, and pick a hostname such as centos.incrediblepbx.com. It doesn’t matter if it is not resolvable, but it does need to be in FQDN format.

    By the way, you only pay for the time your droplet actually exists so build several and play for a couple hours. Your total cost will be about 5¢. And, as we noted, your first $10 of server charges are actually free. So you have nothing to lose by experimenting. If you make a mistake, delete your droplet and start over. No big deal. Once your droplet has been created, Digital Ocean will send you an email with your root user credentials and the IP address of your new server. Login with SSH or Putty, and you’ll be prompted to immediately change your root password. Make it secure… as if your bank account depended upon it. 😉

    Installing Incredible PBX 13 for CentOS 6.7

    Now we’re ready to begin the Incredible PBX install. It’s a two-step procedure. First, we’ll get CentOS up to date and reboot. Then we’ll kick off the actual install. Just cut-and-paste the following commands while logged into your droplet as root:

    setenforce 0
    yum -y upgrade --skip-broken
    yum -y install net-tools nano wget tar
    reboot
    

    Once your server reboots, login again as root and cut-and-paste the following commands. Take a 30-minute break while the installer does its thing. If you’re one that likes to watch, don’t worry if you see some error messages. They all get sorted out before the installation finishes.

    cd /root
    wget http://incrediblepbx.com/incrediblepbx13-12.2-centos.tar.gz
    tar zxvf incrediblepbx*
    ./create-swapfile-DO
    ./IncrediblePBX*
    reboot
    

    Let’s login to your server one more time to get the latest Incredible PBX updates and set up your passwords and time zone. Then you’ll be ready to handle future server admin using your browser:

    Make your root password very secure: passwd
    Create admin password for GUI access: /root/admin-pw-change
    Create admin password for web apps: htpasswd /etc/pbx/wwwpasswd admin
    Set your correct time zone: /root/timezone-setup
    Make a copy of your Knock codes: cat /root/knock.FAQ
    Review current info about your server: status OR pbxstatus (depends on release)
    

    If you want to add fax support to your PBX, we’ve got one more installer to run, and you’ll be all set. Just run the following command and press the ENTER key each time you are prompted for input (about 21 times):

    cd /root
    ./incrediblefax11.sh
    

    Success!

    It’s a GUI, GUI World Out There

    Most management of Incredible PBX will be handled using your favorite browser and one of two GUIs: the Kennonsoft menu which appears when you access the IP address of your server using a browser AND the Incredible GUI which is available on the Admin page of the Kennonsoft menu.

    Choose Incredible GUI Administration from the Admin menu of the Kennonsoft GUI (shown above) by clicking on User to switch. The default username is admin and the password is what you set in the preceding step. Now edit extension 701 so you can decipher or change the randomized passwords that was assigned to the 701 extension and its voicemail account: Applications -> Extensions -> 701.

    Setting Up a Soft Phone to Use with Incredible PBX

    Now you’re ready to set up a telephone so that you can play with Incredible PBX. We recommend YateClient which is free. Download it from here. Run YateClient once you’ve installed it and enter the credentials for the 701 extension on Incredible PBX. You’ll need the IP address of your server plus your extension
    701 password. Choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of your server, 701 for your account name, and whatever password you created for the extension. Click OK.

    Once you are registered to extension 701, close the Account window. Then click on YATE’s Telephony Tab and place some test calls to the numerous apps that are preconfigured on Incredible PBX. Dial a few of these to get started:


    DEMO - Allison's IVR Demo
    947 - Weather by ZIP Code
    951 - Yahoo News
    *61 - Time of Day
    *68 - Wakeup Call
    TODAY - Today in History

    Now you’re ready to connect to the telephones in the rest of the world. If you live in the U.S., the easiest way (at least for now) is to set up a free Google Voice account. Google has threatened to shut this down but as this is written, it still works. An update supporting Google Voice OAUTH 2 authentication is available here with a complete tutorial. Just start at step #1b. A better long-term solution is to choose several SIP providers and set up redundant trunks for your incoming and outbound calls. The PIAF Forum includes dozens of recommendations to get you started. You’ll also find an incredible deal from our platinum sponsor, Vitelity, at the end of this article.

    Configuring Google Voice

    If you want to use Google Voice, you’ll need a dedicated Google Voice account to support Incredible PBX. If you want to use the inbound fax capabilities of Incredible Fax, then you’ll need an additional Google Voice line that can be routed to the FAX custom destination using the GUI. The more obscure the username (with some embedded numbers), the better off you will be. This will keep folks from bombarding you with unsolicited Gtalk chat messages, and who knows what nefarious scheme will be discovered using Google messaging six months from now. So keep this account a secret!

    We’ve tested this extensively using an existing Gmail account, and inbound calling is just not reliable. The reason seems to be that Google always chooses Gmail chat as the inbound call destination if there are multiple registrations from the same IP address. So, be reasonable. Do it our way! Set up a dedicated Gmail and Google Voice account, and use it exclusively with Incredible PBX. It’s free at least through 2013. Google Voice no longer is by invitation only so, if you’re in the U.S. or have a friend that is, head over to the Google Voice site and register.

    You must choose a telephone number (aka DID) for your new account, or Google Voice calling will not work… in either direction. Google used to permit outbound Gtalk calls using a fake CallerID, but that obviously led to abuse so it’s over! You also have to tie your Google Voice account to at least one working phone number as part of the initial setup process. Your cellphone number will work just fine. Don’t skip this step either. Just enter the provided 2-digit confirmation code when you tell Google to place the test call to the phone number you entered. Once the number is registered, you can disable it if you’d like in Settings, Voice Setting, Phones. But…

    IMPORTANT: Be sure to enable the Google Chat option as one of your phone destinations in Settings, Voice Setting, Phones. That’s the destination we need for The Incredible PBX to work its magic! Otherwise, all inbound and outbound calls will fail. If you don’t see this option, you may need to call up Gmail and enable Google Chat there first. Then go back to the Google Voice Settings.

    While you’re still in Google Voice Settings, click on the Calls tab. Make sure your settings match these:

    • Call ScreeningOFF
    • Call PresentationOFF
    • Caller ID (In)Display Caller’s Number
    • Caller ID (Out)Don’t Change Anything
    • Do Not DisturbOFF
    • Call Options (Enable Recording)OFF
    • Global Spam FilteringON

    Click Save Changes once you adjust your settings. Under the Voicemail tab, plug in your email address so you get notified of new voicemails. Down the road, receipt of a Google Voice voicemail will be a big hint that something has come unglued on your PBX.

    One final word of caution is in order regardless of your choice of providers: Do NOT use special characters in any provider passwords, or nothing will work!

    Now you’re ready to set up your Google Voice trunk in the GUI. After logging in with your browser, click the Connectivity tab and choose Google Voice/Motif. To Add a new Google Voice account, just fill out the form. Do NOT check the third box or incoming calls will never ring!

    IMPORTANT LAST STEP: Google Voice will not work unless you restart Asterisk from the Linux command line at this juncture. Using SSH, log into your server as root and issue the following command: amportal restart.

    If you have trouble getting Google Voice to work (especially if you have previously used your Google Voice account from a different IP address), try this Google Voice Reset Procedure. It usually fixes connectivity problems. If it still doesn’t work, enable Less Secure Apps using this Google tool.

    Troubleshooting Audio and DTMF Problems

    You can avoid one-way audio on calls and touchtones that don’t work with these simple settings in the GUI: Settings -> Asterisk SIP Settings. Just plug in your public IP address and your private IP subnet. Then set ULAW as the only Audio Codec.

    A Few Words about the Incredible PBX Security Model for CentOS

    Incredible PBX for CentOS joins our previous Ubuntu build as our most secure turnkey PBX implementation. As configured, it is protected by both Fail2Ban and a hardened configuration of the IPtables Linux firewall. The latest release also includes Port Knocker for simple, secure access from any remote computer or smartphone. You can get up to speed on how the technology works by reading the Nerd Vittles tutorial. Your Port Knocker credentials are stored in /root/knock.FAQ together with activation instructions for your server and mobile devices. The NeoRouter VPN client also is included for rock-solid, secure connectivity to remote users. Read our previous tutorial for setup instructions. As configured, nobody can access your PBX without your credentials AND an IP address that is either on your private network or that matches the IP address of your server or the PC from which you installed Incredible PBX. You can whitelist additional IP addresses by running the command-line utility /root/add-ip. You can remove whitelisted IP addresses by running /root/del-acct. Incredible PBX is preconfigured to let you connect to many of the leading SIP hosting providers without additional firewall tweaking. We always recommend you also add an extra layer of protection by running your server behind a hardware-based firewall with no Internet port exposure, but that’s your call. And it’s your phone bill. 😉

    The IPtables firewall is a complex piece of software. If you need assistance with configuring it, visit the PIAF Forum for some friendly assistance.

    Incredible Backup and Restore

    We’re also pleased to offer our latest backup and restore utilities for Incredible PBX. Running /root/incrediblebackup will create a backup image of your server in /tmp. This backup image then can be copied to any other medium desired for storage. To restore it to another Incredible PBX server, simply copy the image to a server running Asterisk 13 and the same version of the Incredible PBX GUI. Then run /root/incrediblerestore. Doesn’t get much simpler than that.

    Incredible PBX Automatic Update Utility

    Every time you log into your server as root, Incredible PBX will ping the IncrediblePBX.com web site to determine whether one or more updates are available to bring your server up to current specs. We recommend you log in at least once a week just in case some new security vulnerability should come along.

    In the meantime, we encourage you to sign up for an account on the PIAF Forum and join the discussion. In addition to providing first-class, free support, we think you’ll enjoy the camaraderie.

    Originally published: Thursday, March 17, 2016


    Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It’s the best Asterisk tech support site in the business, and it’s all free! Please have a look and post your support questions there. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of users just like you. You won’t have to wait long for an answer to your question.






    Need help with Asterisk? Visit the PBX in a Flash Forum.


     

    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…