Home » Technology » Audio (Page 3)

Category Archives: Audio

The Most Versatile VoIP Provider: FREE PORTING

VoIP Over VPN: Securely Interconnecting Asterisk Servers

We’ve just returned from a week in the Pacific Northwest teaching an Asterisk® course for an organization that wants to interconnect satellite offices using Asterisk servers. This coincided with a support request from one of America’s premier airlines which wants to do much the same thing for all of its reservation counters in airports situated in feeder cities around the country. Suffice it to say, PBX in a Flash in conjunction with Asterisk and Hamachi VPNs is perfectly suited to let anyone build these interconnected systems in minutes rather than months. In fact, with less than a day’s worth of introduction to Asterisk and PBX in a Flash, a group of 16 network administrators with no previous Asterisk experience did just that in a one-hour lab session during our training seminar last week. At the risk of (further) destroying our ability to earn a living, here’s how we did it.

Proxmox as a Training Tool. Before we get into the nitty gritty of actually interconnecting Asterisk servers with Hamachi VPNs, let us provide the free tip of the week for those of you that want to experiment with interconnecting Asterisk servers or for those that like to test various Asterisk scenarios without rebuilding servers all day long. There is no finer tool for this than the Proxmox Virtual Environment, a free and easy to use Open Source virtualization platform for running Virtual Appliances and Virtual Machines. With a sale-priced Dell T105 with a Quad Core AMD Opteron processor and 8 gigs of RAM, you’ll have a perfect platform to run about 16 simultaneous PBX in a Flash servers. The trick is finding the machines on sale for half price which is about every other week. Our lab system which matches this configuration was less than $600 with RAM purchased from a third party. You can save most of the shipping cost by using our coupon link in the right column to shop at Dell’s small business site.

Proxmox lets you build virtual machines in two ways: OpenVZ templates or Qemu/KVM Templates and ISO images. While we intend to offer an OpenVZ template for PBX in a Flash soon, currently it’s easy to create your own ISO template using the standard PBX in a Flash ISO image. Once you’ve uploaded your ISO image into Proxmox, simply create a new virtual machine by giving it a name, specifying 512MB of RAM and a 30GB partition. In 10 seconds or less, your new VM will be ready to boot. Start your VM and then open the VNC console window within the Proxmox web interface and install PBX in a Flash just as if you were building a stand-alone machine. When the 15-minute install completes, run through the Orgasmatron Installer setup, and you’ll have your turnkey PBX in a Flash system ready for production in less than 30 minutes.

You don’t have to repeat this drill for every virtual machine. Instead, use the built-in Proxmox backup utility to make a backup image of what you built. Shut down the VM, create a /backup directory, and then schedule the compressed backup in the web browser. When the backup completes, you’ll have a backup image in /backup with a file name like this: vzdump-101.tgz.

To create a new virtual machine, you issue the following command while positioned in the /backup directory specifying the number for the new virtual machine:

vzdump --restore vzdump-101.tgz 102

In about 3 minutes, you’ll have a second virtual machine that’s a clone of the first one. Because it’s a true clone, it would obviously have the same MAC address for the virtual NIC. You don’t want that or all of your VMs would boot up using the same IP address. Using the Proxmox web interface, just edit the new VM 102 by switching from the Status tab to the Hardware tab, delete the existing Ethernet device, and then create a new Ethernet device under the hardware address list pulldown. This will create a new virtual NIC with a new MAC address. So, when you boot VM 102, it will be assigned a new IP address by your DHCP server. You can decipher the new IP address by opening the VNC console window for VM 102 after you boot it up. Now you’re an expert. You can create the additional Baker’s Dozen turnkey PBX in a Flash servers in about an hour. Start all of them up, and you’ve got an instant training facility and PBX in a Flash playground.

April, 2012 Update. See our new article for a current state-of-the-art VoIP VPN.

Creating Hamachi VPN. You obviously don’t need a virtual private network in order to interconnect Asterisk servers. But, as easy as the Hamachi VPN is to set up, especially with PBX in a Flash servers, why wouldn’t you want all of your inter-Asterisk communications secured and encrypted? In addition to the capacity limitation of the Proxmox server, there’s another reason we chose to build 16 PBX in a Flash VMs. That happens to be the number of servers you can interconnect with the Hamachi Virtual Private Network without incurring a charge.1 Why use the Hamachi VPN when OpenVPN is free with unlimited network connections and no strings? The short answer is it’s incredibly simple to set up without public and private key hassles, and it supports dynamic IP server addressing with zero configuration. We plan to cover OpenVPN in a subsequent article but, for many implementations, Hamachi VPNs offer a robust, flexible alternative that can be deployed in minutes.

If you’re not using PBX in a Flash, there are a million good Hamachi VPN tutorials available through a quick Google search. If you are using PBX in a Flash, we’ve done the work for you. With the Orgasmatron Installer build, you’ll find the Hamachi VPN installation script in /root/nv. For other PBX in a Flash systems, just download the install-hamachi.x script from here or, after logging into your server as root, issue the following commands:

wget http://pbxinaflash.net/source/hamachi/install-hamachi.x
chmod +x install-hamachi.x
./install-hamachi.x

Before beginning the Hamachi VPN install, it’s a good idea to make yourself a cheat sheet for the servers you plan to interconnect. We’re going to interconnect 3 servers today, but doing 16 is just more of the same. You’ll need a unique name for your virtual private network. Pick a name that distinguishes this VPN from others you may build down the road. For our example, we’re going to use piaf-vpn. Next, you need a very secure password for your VPN. We’re going to use password for demonstration purposes only. Finally, you need a unique nickname for each of your servers, e.g. piaf-server1, piaf-server2, and piaf-server3 for our example setup today.

For the first Hamachi install, we’ll need to create the new network. For the remaining installs, we’ll simply join the existing network. Keep in mind that you can only remove machines from the network using the same server that was used to create the other VPN accounts initially so build out your virtual private network by starting with your main server, piaf-server1 in our example.

To begin the Hamachi VPN install, run the script using the commands shown above. Type Y to agree to the installer license and then press the Enter key to kick off the install. For the piaf-server1 install, type N to create a new Hamachi network. For the remaining installs, you’d type J to join an existing Hamachi network. Enter the network name you chose above. For our sample, we used piaf-vpn. Type it twice when prompted. Now type your network password and then your nickname for this server when prompted to do so. Then standby while the Hamachi software is installed. It takes a few minutes depending upon the speed of your network connection. And remember, do NOT use our sample network name. Make up your own and don’t forget it. When the install completes, you can review the log if you’d like. Unless something has come unglued, Hamachi should now be running on your first server. Repeat the drill on your other servers.

The next step is to grab some of our scripts to make it easier to manage Hamachi on your servers.

cd /usr/local/bin
wget http://pbxinaflash.net/source/hamachi/hampiaf
wget http://pbxinaflash.net/source/hamachi/hamachi-servers
chmod +x ham*
cd /root
wget http://pbxinaflash.net/source/hamachi/hamachi.faq

The hamachi.faq document provides all of the commands you’ll need to manage Hamachi including the steps to start over with a totally new virtual private network. For now, let’s be sure your network is running. Type: hamachi-servers piaf-vpn using the network name you assigned to your own VPN. Then type it again, and it should display all of the servers on your VPN with their private VPN IP addresses:

root@pbx:~ $ hamachi-servers piaf-vpn
This server:
Identity 5.151.123.1
Nickname piaf-server1
AutoLogin yes
OnlineNet piaf-vpn

Going online in piaf-vpn .. failed, already online
Retrieving peers’ nicknames ..
* [piaf-vpn]
5.151.123.2 piaf-server2
5.151.123.3 piaf-server3

Finally, a word of caution about security. One of the drawbacks of the ease with which you can create Hamachi VPNs is the ease with which you can create Hamachi VPNs. Anyone that knows your network name and password can join your network with one simple command. You can kick them off from the main server where the VPN was created (hampiaf evict piaf-vpn 5.249.146.66), but you can’t keep them from joining. So, protect your network by making the password extremely secure. There currently is no way to change your network password. All you can do is create a new network with a new network name and a more secure password.

Interconnecting Asterisk Servers. Once your VPN is established and all of your servers are on line, then we’re ready to interconnect them with Asterisk and FreePBX. There are a number of ways to do this. For smaller networks, we’re going to show you the easy and secure way using IAX and the VPN you just created. As with the VPN setup, a cheat sheet comes in handy to avoid erroneous entries that would cause your calls between servers to fail. What we recommend is assigning and creating a block of extensions on each of your servers with different ranges of numbers. For example, we’re going to use four-digit extensions in the 1xxx range for piaf-server1, 2xxx for piaf-server2, and 3xxx for piaf-server3. The idea here is that the extensions are unique between your servers. This makes it easy to dial between offices without having to resort to dialing prefixes. So the first step in interconnecting your servers is to build the necessary extensions on each of your servers.

Now for the cheat sheet. Using the hamachi-servers tool above, decipher the VPN IP address of each of your servers and make a chart with the server names, the range of extension numbers, and the VPN IP address of each server. You’ll also need to think up a very secure password. We’re going to use the same one for all of the servers although you certainly don’t need to. So long as the password you choose is secure, there’s really no reason not to use the same one.

piaf-server1 1xxx 5.151.123.1 password
piaf-server2 2xxx 5.151.123.2 password
piaf-server3 3xxx 5.151.123.3 password

Creating Trunks. The next step is to create an IAX trunk on each server for each remaining server in your network. In our example, on piaf-server1, we’d want to create trunks for piaf-server2 and piaf-server3. On piaf-server2, we’d want to create trunks for piaf-server1 and piaf-server3. And so on.

NOTE: Because of a change in IAX design to fix a security issue that arose after this article was originally published, be sure to add the following line in the User Details of each trunk below:

requirecalltoken=no


On your first server (piaf-server1 in our example), using a web browser, open FreePBX and choose Admin, Setup, Trunks and then click Add IAX2 Trunk. Create the trunk to piaf-server2 with the following entries. Leave everything blank except the entries shown below:

While still on piaf-server1, repeat the process to create a trunk for piaf-server3:

On your second server (piaf-server2 in our example), using a web browser, open FreePBX and choose Admin, Setup, Trunks and then click Add IAX2 Trunk. Create the trunk to piaf-server1 with the following entries. Leave everything blank except the entries shown below:

While still on piaf-server2, repeat the process to create a trunk for piaf-server3:

On your third server (piaf-server3 in our example), using a web browser, open FreePBX and choose Admin, Setup, Trunks and then click Add IAX2 Trunk. Create the trunk to piaf-server1 with the following entries. Leave everything blank except the entries shown below:

While still on piaf-server3, repeat the process to create a trunk for piaf-server2:

Creating Outbound Routes. Now we need to tell Asterisk how to route the calls between the servers. In a nutshell, we want calls to extensions in the 1xxx range routed to extensions on piaf-server1, calls to 2xxx extensions routed to piaf-server2, and calls to 3xxx extensions routed to piaf-server3. On each server, create an outbound route for each of the remaining servers. Name the routes server1, server2, and server3 as appropriate. The critical pieces of information in each outbound route are the dial string (which should match the extensions on the server we’re connecting to) and the Trunk Sequence (which should be the appropriate IAX trunk for the server we’re connecting to).

On piaf-server1, we’d have a server2 outbound route with a Dial String of 2xxx and a Trunk Sequence of IAX2/piaf-server2. Then we’d have another server3 route with a Dial String of 3xxx and a Trunk Sequence of IAX2/piaf-server3. If you have a catch-all outbound route, be sure to move these routes above the catch-all in the right column. Then reload your dialplan.

On piaf-server2, we’d have a server1 outbound route with a Dial String of 1xxx and a Trunk Sequence of IAX2/piaf-server1. Then we’d have another server3 route with a Dial String of 3xxx and a Trunk Sequence of IAX2/piaf-server3. If you have a catch-all outbound route, be sure to move these routes above the catch-all in the right column. Then reload your dialplan.

On piaf-server3, we’d have a server1 outbound route with a Dial String of 1xxx and a Trunk Sequence of IAX2/piaf-server1. Then we’d have another server2 route with a Dial String of 2xxx and a Trunk Sequence of IAX2/piaf-server2. If you have a catch-all outbound route, be sure to move these routes above the catch-all in the right column. Then reload your dialplan.

If you’re setting this up with PRI or T1 connections between your servers, you might also want to specify at least secondary trunk sequences for each of the outbound routes to provide some redundancy. For example, on piaf-server1, you might want a secondary Trunk Sequence for server2 that specified IAX2/piaf-server3. Then, if the primary connection between server1 and server2 was down, Asterisk would attempt to complete calls to 2xxx extensions by routing them to server3 and then on to server2 from there. To the caller and call recipient, they’d never know that the direct link between server1 and server2 had failed.

Alternate routing might also be appropriate where you have more capacity between certain servers. For example, if you had a single T1 line between server1 and server3 but you had PRI connections between server1 and server2 and between server2 and server3, then it might make more sense to indirectly route 3xxx calls from server1 through server2 and then on to server3 rather than the direct route from server1 to server3. Enjoy!


Free DIDs While They Last. Sipgate is giving away a free U.S. DID with free incoming calls plus 200 free minutes for outbound calls. Better hurry. Here’s the trunk setup for FreePBX-based systems:

Trunk name: sipgate

type=peer
username=ACCTNO
fromuser=ACCTNO
secret=ACCTPW
context=from-trunk
host=sipgate.com
fromdomain=sipgate.com
insecure=very
caninvite=no
canreinvite=no
nat=no
disallow=all
allow=ulaw&alaw

Registration Strong: ACCTNO:ACCTPW@sipgate.com/YOUR-DID-NUMBER

ACCTNO is the account number assigned to your sipgate account. ACCTPW is the password for your account. YOUR-DID-NUMBER is your 10-digit DID.

Finally create an inbound route using your actual 10-digit DID and assign a destination for the inbound calls.



Need help with Asterisk? Visit the PBX in a Flash Forum.
Or Try the New, Free PBX in a Flash Conference Bridge.


Twitter Magic. If you haven’t noticed the right margin of Nerd Vittles lately, we’ve added a new link to our Twitter feed. If you explore a little, you’ll discover that the user interface now brings you instant access to every Twitter feed from the convenience of the Nerd Vittles desktop. Enjoy!


whos.amung.us If you’re wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what’s happening. It’s a terrific resource both for us and for you.


 

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. See comment #1 below. []

Whole House iPod + $5/mo. Gets You Every Song on the Planet

We’ve previously written about the incredible Sonos whole-house audio system that is priced (literally) tens of thousands of dollars below the cost of a comparable "turnkey" system that you typically would purchase from a home audio consultant. Another revolutionary development occurred yesterday so it was a good time for an update.

Yesterday’s development was an announcement from Napster, which was recently acquired by Best Buy, that lets you download 5 DRM-free songs per month from Napster’s entire catalog for $5 a month. Nothing very exciting there. The kicker is that, for no additional fee, you now get unlimited (but DRM’d) streaming of all 7 million songs in Napster’s vast music collection to any PC you happen to own. And $60 buys you a full year plus 70 DRM-free songs!

We hear you mumbling. Why would anyone want to only listen to music on their PC? Well, this is where your Sonos music system comes into play. Instead of buying a cheap PC (such as this $199 Acer netbook from CompUSA) and subscribing to Napster to play the music on your PC, U.S. customers now have instant access on your Sonos system to over 7 million music tracks in the Napster library any time you like. And this isn’t canned playlists although Napster has plenty of those. With today’s new offer, you can stream songs of your choice in your own playlists to one or many rooms in your house depending upon how many Sonos ZonePlayers you’ve configured. Or use your Sonos controller to search the entire Napster catalog by artist, album, or song title. And the total cost: just $5 a month.



Sonos Background. For those that are new to Sonos, you basically buy a little $500 Wi-Fi box for each room in your home or office where you want to play music. There are special system bundles at this link if you hurry. You plug in a pair of speakers and connect to your NAS-savvy music library. We recommend dLink’s DNS-323 which provides RAID1 mirrored SATA drives in any size you desire (about $180 delivered from NewEgg plus SATA drives). Be sure the drives you pick are on dLink’s compatibility list! If you happen to use Comcast for your broadband service, you also receive a free Rhapsody subscription which can be played on every Sonos system in your house for free, but you’ll have to connect a Windows PC to your Sonos system through the line in jack to take advantage of this. With the new Napster offering, you can skip the hassle for $5 a month. The Sonos system also supports streaming audio from more than 300 Internet radio stations, also free.

Some other reviews of the Sonos system are worth a look. Check out the Home Theater View, Audioholics, Playlist Magazine, and PC Magazine. You’ll find dozens more here.

There are few companies in the world (much less the United States) that provide flawless hardware and software, free software updates (that always work), and regular updates that consistently add value to your initial purchase. Sonos is at the top of that very, very short list. Run, don’t walk, to add this system to your home or office. You’ll thank us for years to come. We installed eight systems with four remotes in just over two hours. We haven’t quit listening since. Today’s Napster announcement is simply icing on the cake. Enjoy!

Update. We don’t often revise our articles but a Tweet from @Sonos last night sent us back to the drawing board. While we knew that Napster already was available in Sonos music players, the price point was substantially higher. Since Napster’s announcement had clearly stated that the $5 a month special only applied to use of the library on a PC, we had assumed that it wouldn’t work directly in the Sonos system. Wrong! It works perfectly on the Sonos players with the functional simplicity that is the hallmark of Sonos software. Napster should take a lesson! Lo and behold, it appears that Napster views the Sonos system as just another Linux PC so the entire Napster music library is available in any Sonos music system without resorting to any external PC. Seven million songs for $5 a month strikes us as a deal you’d be crazy to pass up. Better hurry while it lasts.


Some Recent Nerd Vittles Articles of Interest…

Asterize Your Data: Taming ODBC with Asterisk

One of the perks of participating in the Atlanta Asterisk Users Group InstallFest a couple weeks ago was getting to hear some terrific speakers. At the top of that list was Jared Smith, who heads up the Training Division at Digium®. We always had considered ODBC to be a bit overwhelming for those new to Asterisk®, but Jared disproved that theory in less than 30 minutes. For those of you that don't have an opportunity to hear it from the master, today we present our Mom-and-Pop version of how to get Asterisk interacting with all of your favorite databases whether they be parts and inventory data, CRM, or just about anything else. And our special thanks to Jared for providing the inspiration to tackle this.

If you're new to the ODBC World, here's a quick primer. The idea behind Open Data Base Connectivity is to simplify the task of connecting up any flavor database management system so that it can talk to applications and foreign databases without having to write custom code to support every different DBMS. ODBC serves in much the same way as a translator who sits between you and foreign visitors. With the benefit of a translator, whatever is spoken is understood on both ends of the conversation.

The real beauty of ODBC is that it is conversant with almost every DBMS offering on the planet including Oracle, Informix, SAS, MS Access, DB2, SQL Server, MySQL, PostgreSQL, Sybase, and even dBase, FoxPro, and XDB. All you really need is the ODBC connector for your operating system plus one or more database drivers for the DBMS data sources you wish to use. Visit EasySoft if you want more background. They sum up the role of ODBC this way:

The goal of ODBC is to make it possible to access any data from any application, regardless of which database management system (DBMS) is handling the data. ODBC achieves this by inserting a middle layer called a database driver between an application and the DBMS. This layer translates the application's data queries into commands that the DBMS understands.

Our goal for today is to get ODBC working on your Asterisk system and to build a simple MySQL application that demonstrates how all the pieces should fit together. We've chosen MySQL because it is integrated into all of the major Asterisk aggregations and requires no additional installation. Even though our focus today is MySQL databases, the same process can be used to interconnect with virtually any foreign database regardless of where it happens to reside. And, in coming weeks, we will start cranking out some ODBC applications that actually are useful 🙂 ... much like what we've done in the Asterisk text-to-speech arena. Hopefully, this tutorial will encourage others to contribute ODBC applications for the benefit of everyone in the Asterisk community.

Getting ODBC working today also reinforces one of the key design strengths of PBX in a Flash. We strongly recommend you start with the latest build of PBX in a Flash. Then run our Orgasmatron Installer. It will provide you a feature rich and extremely stable base platform that just works! Unlike the RPM-based Asterisk aggregations such as trixbox and Elastix, it's incredibly easy with PBX in a Flash to recompile Asterisk to add ODBC functionality because Asterisk is actually built from Asterisk source code when PBX in a Flash is initially installed. That's not to suggest that any of this is impossible using the other aggregations. Just be aware that you may break the ability to later update your system once you manually bolt on additions such as ODBC by recompiling Asterisk. And, of course, you can add ODBC functionality to pure Asterisk systems as well. For an excellent tutorial, see Asterisk: The Future of Telephony (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.

Overview. Let's quickly review the installation steps to bring ODBC connectivity on line. First, we'll install several Linux RPMs to fill in the missing pieces to activate ODBC on your PBX in a Flash server. Second, we'll activate the Linux ODBC driver for MySQL. Third, we'll install a sample timeclock database in MySQL so we have something to play with. Fourth, we'll run a little Nerd Vittles script to tell Linux and Asterisk about all of your MySQL databases. Fifth, we'll recompile Asterisk so that it knows how to talk ODBC. Any time you create a new MySQL database, you'll want to run the script in Step #4 again to repopulate the ODBC information that tells Linux and Asterisk about your MySQL databases. The script only takes a few seconds. Once these steps are completed, you're ready to start creating your ODBC applications.

There are two parts to building any ODBC application with Asterisk. First, we'll define the SQL code to read and write to a particular table in one of your MySQL databases. Second, we'll insert some dialplan code in the new odbc.conf file in the /etc/asterisk directory. This dialplan code tells Asterisk how to behave when a database query is received from a telephone on your system. For each additional ODBC application, you just perform these two steps again. And we'll do that once more using our AsteriDex database just to show you how easy this really is. So let's get started.

1. Installing Linux RPMs. Log into your server as root and issue the following commands to install the necessary RPMs on your PBX in a Flash server. (NOTE: Skip this step if you're using PIAF-Green!)

yum -y install unixODBC-devel
yum -y install libdbi-dbd-mysql
yum -y install mysql-connector-odbc

2. Activating the MySQL ODBC Driver. While still logged into your server as root, issue the following commands to activate the MySQL ODBC driver on your system:

cd /root
wget http://pbxinaflash.net/source/odbc/mysql-odbc
chmod +x mysql-odbc
./mysql-odbc

3. Installing Sample MySQL Database. While still logged into your server as root, issue the following commands to install the sample MySQL database on your system:

cd /root
wget http://pbxinaflash.net/source/odbc/mysql-sample
chmod +x mysql-sample
mv /etc/asterisk/func_odbc.conf /etc/asterisk/func_odbc.conf.old
./mysql-sample

4. Defining MySQL Databases for Linux and Asterisk. The biggest pain in setting up ODBC used to be the creation of the text files telling Linux and Asterisk about your MySQL databases. We decided to write a script to automate the process. What this script does is query MySQL for the names of all your MySQL databases. It then generates the necessary settings in /etc/odbc.ini and /etc/asterisk/res_odbc.conf to support all of your MySQL databases. Don't forget to rerun it if you create new MySQL databases, or they won't be accessible through ODBC. Execute the following commands to run the script:

cd /root
wget http://pbxinaflash.net/source/odbc/odbc-gen.sh
chmod +x odbc-gen.sh
./odbc-gen.sh

Just a word of caution that this script overwrites both odbc.ini and res_odbc.conf after making backups of both existing files (odbc.old and res_odbc.conf.old). If you happen to be a whiz kid, and you've already made entries in odbc.ini and res_odbc.conf to connect to other databases, you'll need to put your entries back in place (from the backups) after running the script the first time. If you accidentally run the script twice, your connection data will be lost since the script only makes copies of the most recent versions of the two files.

5. Recompiling Asterisk. The final step in activating ODBC on your system is to recompile Asterisk so that it becomes ODBC conversant. You obviously want to do this when your PBX is not in service. While still logged in as root, issue these commands. (NOTE: Skip this step if you're using PIAF-Green!)

cd /usr/src/asterisk
make clean
./configure
make
make install
amportal restart

Building ODBC Applications With Asterisk. We cheated. We said there were two steps in building Asterisk ODBC apps. But we actually installed the code for our two samples when we installed the sample database. So let's review the two steps so you'll know how to roll your own down the road. The two files that manage ODBC queries with Asterisk are stored in /etc/asterisk. The queries are stored in func_odbc.conf. And the dialplan code is placed in odbc.conf. It could just as easily have been inserted in extensions_custom.conf, but we thought it was more straightforward to create a separate config file solely to manage ODBC dialplan code. If for no other reason, this way you'll know where to look when something goes wrong. 🙂

Step 1 is to create the SQL query statements that will be used by Asterisk to read and write to a table in one of your databases. We built a sample time card system which could be used to let employees clock in and clock out using a telephone on your Asterisk system. The SQL code to look up employee's names based upon their employee number is called a read in Asterisk 1.4 and readsql in Asterisk 1.6. It looks like the third line below. The SQL code to update information in the file is called write or writesql, and it's on the fourth line. Ignore the wordwrap. All of the read or write code must fit on a single line in func_odbc.conf in the /etc/asterisk directory. Once you add to or make changes in this file, you'll need to reload your Asterisk modules: asterisk -rx "module reload". You can check which ODBC custom functions are available on your system with this command: asterisk -rx "core show functions like ODBC". You'll note that, for every defined function, Asterisk tacks on an ODBC_ prefix. So TIMECLOCK becomes ODBC_TIMECLOCK. You use these functions to retrieve or populate data from within your dialplan as you'll see in a minute. You also can review the SQL commands for any functions you create with a command like this: core show function ODBC_TIMECLOCK. Here's what the demo TIMECLOCK function code in func_odbc.conf actually looks like:

[TIMECLOCK]
dsn=MySQL-timeclock
read=SELECT `comments` FROM `users` WHERE `empnum`='${SQL_ESC(${ARG1})}'
write=UPDATE `users` SET `empnum`='${SQL_ESC(${VAL1})}' WHERE `empnum`='${SQL_ESC(${ARG1})}'

Step 2 in building an ODBC Asterisk app is to write the dialplan code to assign an extension which will be used to answer a call for a database query, to prompt the caller for information, to issue a SQL query to the database (using one of the functions defined in Step 1), and to return the query results to the caller. All of this dialplan code goes in /etc/asterisk/odbc.conf. Let's take a brief look at the dialplan code we've written to look up an employee's name based upon a 5-digit employee number. It looks like this:


exten => 222,1,Answer
exten => 222,n,Wait(2)
exten => 222,n,Flite("Please enter the 5 digit employee number.")
exten => 222,n,Read(EMPNUM,beep,5)
exten => 222,n,NoOp(EMPNUM: ${EMPNUM})
exten => 222,n,Set(EMPNAME=${ODBC_TIMECLOCK(${EMPNUM})})
exten => 222,n,GotoIf($["${EMPNAME}foo" = "foo"]?notfound)
exten => 222,n,Flite("The employee name is ${EMPNAME}. Good bye.")
exten => 222,n,NoOp(Employee: ${EMPNAME})
exten => 222,n,Hangup
exten => 222,n(notfound),Flite("No such employee on file. Good bye.")
exten => 222,n,Hangup

This code does the following. It answers a call to extension 222, prompts the user for a 5-digit employee number (12345 and 23456 are in the sample file), stores the number to EMPNUM, outputs the number to the Asterisk CLI, and performs an ODBC query to ODBC_TIMECLOCK (note the addition of the ODBC_ prefix to the name we assigned above). If there is no matching employee name for the EMPNUM, the dialplan jumps to the notfound label and reports "no such employee." Otherwise, it speaks the employee name which the query stored in the EMPNAME variable.

We've also created an ODBC interface to AsteriDex. You obviously have to have AsteriDex 4 installed for this application to work. With this sample, you dial extension 223 and enter the 3-character DIALCODE which is the first three letters of a name in your AsteriDex database. Then the dialplan code retrieves the first matching entry providing both the matching name and phone number. It also gives the caller the option of calling the person whose number was retrieved. Before this sample will work, you'll need to populate the DIALCODEs. To do this, use a web browser and point it to the IP address of your Asterisk server and the directory housing your AsteriDex application, e.g. http://192.168.0.44/asteridex4/dialcode.php. Once you've run this application, dial 223 from any phone on your Asterisk system and enter A-M-E. This will return the default entry for American Airlines from your AsteriDex database. You can review all of the dialplan code by pulling up odbc.conf. Our code shows how easy it is to retrieve multiple fields from a database, parse those fields, and place an outbound call based upon a response from the caller. And all of this is accomplished with a couple dozens lines of simple dialplan code.

Where To Go From Here. We've covered the installation of ODBC and provided a couple of quick examples on how to extract data from ODBC-compatible databases using Asterisk. But to maximize your benefits with ODBC, learning the Structured Query Language (SQL) is the key that unlocks the castle. That's where the real work is performed. You want your good data to stay that way. And you want the answers to your queries to be right.

Our sample code in func_odbc.conf and odbc.conf will show you how to organize things and Asterize your SQL queries to pass information back and forth between Asterisk and MySQL. But mastering syntax alone won't earn you a Black Belt in SQL design. Here are two brand new O'Reilly books that will. The first book was just released, and the second one will be available shortly: Simply SQL and Learning SQL. Enjoy!


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

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...

Asterisk on Steroids: The Orgasmatron Installer, Part II

In our last column, we introduced you to the new Orgasmatron Installer for PBX in a Flash. After a one-week break to prepare for our visit to the Atlanta Asterisk® Users Group 3d Annual InstallFest, we're back in the saddle today to flesh out the new baby.

For those that are new to all of this, let's briefly review what the Orgasmatron Installer has added to your Lean, Mean Asterisk Machine. Faxing and email now work out of the box. More than a dozen extensions and a number of hosting provider trunks are preconfigured as well. Delivery of CallerID names with numbers is now available from a half dozen providers of your choice. And, of course, the Flite text-to-speech engine is preconfigured with Cepstral TTS only a few keystrokes away. Also included are FreePBX 2.5, and Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. And here's the complete list with all of your new Nerd Vittles applications:

Security First! Because your phone bill matters, today we begin with security. The design of virtually all of the open source Asterisk PBX aggregations is to leave SIP and IAX ports on your new server exposed to the Internet. This is done to facilitate communications with your hosting providers as well as telephone extensions which may be connected to your server from the other side of the globe. The wrinkle with this design is that, if a bad guy can guess an extension number on your system and its password, they get a free ticket to do whatever could be done from that extension on your PBX. In the case of one unlucky company, this resulted in a phone bill of over $100,000. For details, read our Primer on Asterisk Security. So... Security Matters!

Anyone obviously can download PBX in a Flash and the Orgasmatron Installer. Thus, you need to assume that everyone on the planet knows your default passwords. We walked you through changing some of the important ones with the passwd-master script last week. Use it regularly. Now let's turn our attention to your extensions and trunk passwords.

Extension Security. There now are a couple of ways to secure your extensions from the bad guys. First, you need to establish very secure passwords for your extensions and voicemail boxes. Second, you need to specify the IP addresses that are authorized to access every extension on your PBX. And third, remember do repeat this drill every time you add a new extension to your system.

To change an extension password, open FreePBX using a web browser pointed to the IP address of your server: http://ipaddress/admin/. On PBX in a Flash systems, you'll be prompted for a username (maint) and whatever password you set when you ran passwd-master. Now click the Setup tab and then the Extensions option. You'll see the list of configured extensions on your PBX in the right column. Click on each of those extensions, and you'll see a form like this:



The password for this extension is stored in a field called secret. Make up a very secure password for every extension on your PBX. You will embed this password in the telephone connected to this extension. There's no other place you'll need it so a long and complex numeric password is essential.

The authorized IP addresses for this extension are stored in a field called permit. The way this works is that you first specify which IP addresses should be denied access (the deny field), and then you poke a little hole in the dike, if you're smart, to permit only one or a few IP addresses to connect to the extension. Leave the deny entry as it is. The default permit entry 0.0.0.0/0.0.0.0 opens the floodgates. It means any IP address can log into this extension. To restrict extension access to IP addresses on a private LAN of 192.168.1, the entry would look like this: 192.168.1.0/255.255.255.0. To further restrict extension access to a specific IP address (recommended!), the entry would look like this: 192.168.1.44/255.255.255.255. Use a permit entry that makes you sleep well at night. After all, it's your phone bill.

The third entry you'll want to change is further down the same data entry form, and that's the Voicemail Password field. This entry determines who can actually retrieve voicemails left for this extension. Set it accordingly.

Once you've made the three changes above, save your entries by clicking the Submit button at the bottom of the form. Repeat the drill for every extension, and then click the orange Apply Configuration Changes tab at the top of the screen and then Continue with Reload to reload your Asterisk dialplan.

Trunk Security. Securing the trunks on your PBX is equally important to securing extensions. Keep in mind that, with your trunk credentials, anyone can set up your trunk on their PBX to make calls on your nickel! Unlike the extensions, there are no working usernames and passwords in the default trunks with one exception. If you plan to use the providers we've preconfigured, simply insert your own username, fromuser, and secret settings in the fields provided, and you'll be making calls in a matter of seconds. The process is similar to the one we used for extensions. Choose Setup, Trunks and then click on each trunk and make your entries. Submit your entries and then reload the dialplan when you're finished.

In the case of the remote-peer trunk, this trunk is designed to make it extremely easy to interconnect Asterisk servers for interoffice communications. But it also means that a bad guy can easily interconnect with your server and start dialing. If you don't plan to connect to another Asterisk server, delete this trunk! If you do plan to connect to another Asterisk server, change the trunk secret and IP address of the host to which you are connecting. Do NOT leave the default secret in either the outgoing or incoming settings! Also change the password for the outbound route: Remote-Host. You may want to ultimately remove this password if you actually start interconnecting servers. Otherwise, users will have to enter this password whenever they may a call to an extension on the interconnected Asterisk server.

To interconnect your server to another server, you would simply add a new trunk called main-peer on the other server that looks like this (using your new password and correct IP address):


Configuring AsteriDex. AsteriDex is plug-and-play for most users. However, as configured, your AsteriDex web site is reachable from the Internet if you have mapped port 80 on your hardware-based firewall to your PBX in a Flash server or if you don't have a hardware-based firewall and your server is directly exposed to the Internet. If you don't mind people seeing your contact list or making prank calls that ring your extensions, this may be okay. If it's of concern to you, the easiest security precaution is to rename the asteridex4 directory to an obscure name that only you know, e.g. bahbah143. Here are the commands to issue after logging into your server as root. By using all of these commands, AsteriDex still will be accessible through FreePBX and the PBX in a Flash GUI:

cd /var/www/html
mv asteridex4 bahbah143
sed -i 's|asteridex4|bahbah143|' admin/modules/asteridex/page.asteridex.php
sed -i 's|asteridex4|bahbah143|' welcome/.htindex.cfg

The other adjustment you may need to make to AsteriDex is to configure who can access the Admin tab to add, modify, and delete entries in your database. As configured, the Admin tab is available to any computer with an IP address that begins with 192.168. This may not match your private subnet, and not all 192.168 IP address are non-routable. So you may wish to tighten this restriction to match your internal subnet. In the /var/www/html/asteridex4 folder (or whatever name you've chosen above), you'll find a configuration file: config.inc.php. Simply edit this file and change the $local_net entry. You also can set the long distance prefix ($LDprefix), your CallerID number ($CallerID), and the default extension to ring for click-to-dial from the web interface ($INtrunk and $defaultExt). The extension to dial can now be set from the web interface as well. Unless you really know what you're doing, leave everything else the way it is.

CallerID Superfecta. Most hosting providers deliver CallerID numbers as part of your payment for using their DIDs. Almost none deliver CallerID names without an additional charge. CallerID Superfecta is designed to fill that gap... for free. A number of us have worked on this project for years. And it now has been integrated directly into FreePBX. There are two steps to getting everything working properly on your new PBX. First, you need to identify which CallerID lookup sources you wish to use on your system. Then, you need to specify CallerID Superfecta as the lookup source on each Inbound Route where you want CallerID names looked up for incoming calls.

Open FreePBX with your web browser and navigate to Setup, CID Superfecta. You'll get a form that looks like this:


With the exception of AsteriDex and SugarCRM lookups which are almost instantaneous, keep in mind that each lookup takes a little time and slows down receipt of your inbound call. So long as you have a good Internet connection, you shouldn't have a problem using all of the sources. The way the CallerID Superfecta works is that, once it gets a name match in any of the sources beginning with AsteriDex and SugarCRM, it ends the lookups and provides the CallerID name it found to Asterisk for display on the extensions which are ringing in the designated inbound route. Filling out the form is self-explanatory for the most part. Tick off the lookup sources you wish to use. If you plan to use whocalled.us, you'll need to sign up for an account and provide your credentials before the lookup will work. With SugarCRM, fill in the blanks to match your implementation of SugarCRM. Click the SAVE button when you have CallerID Superfecta configured to meet your needs.

The final step in implementing CallerID Superfecta is to designate it as the CallerID Lookup Source for your Inbound Routes. Click on Setup, Inbound Routes and a list of your existing routes will be displayed in the right column. As installed, there will only be one: Any DID / Any CID. Click on this entry to display the form. Scroll down to the CallerID Lookup Source dropdown box and choose CallerID Superfecta. You'd do the same with any other inbound route you create down the road. Click the Submit button and reload your dialplan to enable CallerID Superfecta. Now sit back and wait on your first call.

CallWho for Asterisk. CallWho for Asterisk is a little script we put together to make it easy to look up and dial the numbers of people in your AsteriDex database. When you dial 4-1-2, you'll be prompted to enter the first three letters of the name of the person you wish to call. Once you key in the three letters, CallWho for Asterisk will look up every matching entry in your AsteriDex database and read you the list of matches. For example, if you had Joe Schmo and Joe The Plumber in your database, CallWho would say something like this:

Press 1 for Joe Schmo.
Press 2 for Joe The Plumber.

When you press 2, CallWho will place a call to Joe The Plumber. Not sure why you'd ever want to do that, but now you understand the way it works.

Before CallWho for Asterisk will work at all, you need to run the script which associates three letter codes with every entry in your AsteriDex database. And, whenever you add new entries to your database, you need to run it again. Using a web browser, here's the program to run. Be sure to use the correct IP address for your Asterisk server and your newly designated AsteriDex location instead of asteridex4:

http://192.168.0.44/asteridex4/dialcode.php

Cepstral TTS for Asterisk. PBX in a Flash is delivered with the Flite text-to-speech engine already enabled. But, unless you like the voices of Lurch and Fred Munster, you may wish to cough up a little cash and install Cepstral on your server. Cepstral now has a synthesized voice of Allison which exactly matches all of the other voice prompts in Asterisk. I'm embarrassed to report that we can't seem to get the correct installation script deposited in our Orgasmatron builds... ever! So, if you want to use Cepstral, here are the steps to download the real, working installation script and to install Cepstral:

cd /root/nv
rm install-cepstral
wget http://pbxinaflash.net/source/cepstral/install-cepstral
chmod +x install-cepstral
./install-cepstral

Once the 65MB download completes, you'll be prompted to agree to the license. You do this by pressing the Enter key to scroll down the license agreement. When you reach 100%, type yes to continue with the install. Press Enter to accept /opt/swift as the install directory. Very important: Type y to create the directory. The default is No which will mess up the installation. Now type yes to complete the install. Once the install completes, you can purchase a license for the Allison voice at this link. Under Voices, choose Language: US English, Voice: Allison-8kHz, and Platform: Linux. For non-commercial use, the $30 voice registration is all you need. For commercial use, you also need to acquire Concurrency Licenses which authorize a certain number of simultaneous voice ports on your system for Cepstral voices. These run $50 per port in 2-port multiples and are in addition to the $30 Allison voice license. For Nerd Vittles readers, you can save 15% on your purchase by sending an email to sales at cepstral.com explaining how you plan to use Cepstral and requesting the discount code.

We'll have an in-depth article on Cepstral in coming weeks. For those that want a head start, each of the Nerd Vittles text-to-speech applications typically includes dialplan code and one or more PHP/AGI scripts. The dialplan code can be found in /etc/asterisk/extensions_custom.conf. When you scroll through the dialplan code you will see entries like the following for each of the TTS applications:

exten => 611,5,Flite("Enter a 3 character airport code.")
;exten => 611,5,Swift("Enter a 3 character airport code.")
exten => 611,6,Read(APCODE,beep,3)
exten => 611,7,Flite("Please hold a moment.")
;exten => 611,7,Swift("Please hold a moment.")

The semicolon at the beginning of a line tells Asterisk this is a comment and to ignore it. To change the voice from the Munsters to Allison, just comment out the Flite lines and uncomment the Swift lines by deleting the leading semicolons. When you're finished making the changes, save the file and then reload your dialplan: asterisk -rx "dialplan reload". So, in the example above, the code would now look like this:

;exten => 611,5,Flite("Enter a 3 character airport code.")
exten => 611,5,Swift("Enter a 3 character airport code.")
exten => 611,6,Read(APCODE,beep,3)
;exten => 611,7,Flite("Please hold a moment.")
exten => 611,7,Swift("Please hold a moment.")

You also need to modify the PHP/AGI scripts that go with each application. All of these files are stored in /var/lib/asterisk/agi-bin. Typically the filenames begin with nv- and end in .php:
-rwxrwxr-x 1 asterisk asterisk 6835 Sep 16 2008 nv-callwho.php
-rwxrwxr-x 1 asterisk asterisk 201 Jul 12 2006 nv-config-555.php
-rwxrwxr-x 1 asterisk asterisk 201 Apr 2 13:08 nv-config.php
-rwxrwxr-x 1 asterisk asterisk 14329 Feb 10 2008 nv-mailcall.php
-rwxrwxr-x 1 asterisk asterisk 6072 Sep 24 2008 nv-mailit.php
-rwxrwxr-x 1 asterisk asterisk 10490 Apr 20 10:34 nv-news.php
-rwxrwxr-x 1 asterisk asterisk 6545 Apr 12 15:10 nv-today.php
-rwxrwxr-x 1 asterisk asterisk 21537 Apr 2 13:07 nv-weather.php
-rwxrwxr-x 1 asterisk asterisk 12043 Apr 2 13:07 nv-weather-world.php
-rwxrwxr-x 1 asterisk asterisk 22243 Apr 2 13:07 nv-weather-zip.php

In each of these scripts, you'll find a variable near the top that controls the TTS engine: $ttspick = 0 ;

To use Cepstral as the TTS engine instead of Flite, just change the $ttspick value from 0 to 1 and save the file.

Email That Works With SendMail. It's always been a knuckle drill to get your new server to reliably send outbound emails. Assuming your Internet service provider doesn't block downstream mail servers, the Orgasmatron Installer will get this working reliably. You can test it out by logging into your server as root and issuing the following command using your real email address. If you get the email, you can move on.
echo "test" | mail -s testmessage yourname@gmail.com

If you didn't get the email, you probably have a provider such as Comcast that blocks port 25 in many areas of the country. The easiest way to solve this is to set up a free Gmail account and use Gmail to deliver outbound messages from your server. This message thread on the PBX in a Flash Forum will walk you through the setup process. There's also a Comcast solution if you'd prefer not to use Gmail.

Stay Tuned. Your eyes are probably glazing over about now. I know mine are. So we'll quit here for today. In our next episode, we'll tackle the rest of the goodies that make up the Orgasmatron Installer. Enjoy!

Continue reading Part III.

Continue reading Part IV (Monday, May 25).


Tip of the Week. Ever wanted a 20-seat conference bridge for under $9 a month with a local phone number in any of 2600+ rate centers all over United States? You can add load balancing and automatic failover for an extra $1 per month. After you use the Orgasmatron Installer, just set up a conference extension in FreePBX and then head over to the PBX in a Flash Forum to read all about the latest rage in DID providers.


whos.amung.us If you're wondering what your fellow man is reading on Nerd Vittles these days, wonder no more. Visit our new whos.amung.us statistical web site and check out what's happening. It's a terrific resource both for us and for you.


 

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...

Why Wait? Build Your Own Skype Gateway to Asterisk

Photo and Background Story courtesy of Skype JournalAs the world awaits the much-hyped Digium® commercial offering of a Skype for Asterisk® gateway, we began exploring existing alternatives last week that provide individuals1 the same functionality at what will no doubt be considerably less cost. The Gizmo5 offering is darn-near perfect for those that need a quick solution and don't mind spending $20 a year to let someone else wrestle with the technical complexities that invariably accompany maintenance of cross-platform gateways such as this one.

NOTE: Article has been updated. For the latest edition, follow this link.

We, of course, like the technical challenge that comes with the territory so today we turn our attention to Greg Dorfuss' SipToSis software which forms the lynchpin of Gizmo's offering and which lets any Asterisk user create much the same gateway at no cost other than the expense of any Skype Out calls you may choose to make. When we're finished, you'll be able to call any Skype user in the world from any extension on your Asterisk server by entering either a Skype username or any 10-digit telephone number preceded by an 8 to take advantage of SkypeOut calling rates. You'll also be able to receive incoming calls from any Skype user on any extension of your Asterisk system. In short, what you get is a transparent interface to several hundred million Skype users from your Asterisk server. And the time to set this up is less than 15 minutes assuming you already have one of the Nerd Vittles Orgasmatron Builds in operation. These are available for Dell PowerEdge servers, Everex gPC desktop systems and minis, and most of the new Atom-based systems. If you have a garden-variety FreePBX-based Asterisk server such as PBX in a Flash, trixbox, or Elastix, just add another 5 minutes to reconfigure a few things.

Prerequisites. For today's project, we're assuming you have an existing FreePBX-based Asterisk server with either CentOS 5.2 or the Fedora 10 Remix featured in our Atomic Flash build. You'll need both a keyboard and mouse! For inbound Skype calling to work with other implementations including generic PBX in a Flash systems, you'll need to create a SIP URI for your Asterisk server: mothership@127.0.0.1. We've previously explained how to set one up in this article. The Atomic Flash installer, VPN in a Flash build, and the Orgasmatron II and III builds include this SIP URI functionality out of the box. You'll also need Java 1.5. To see if it's included in your distribution, issue the following command: rpm -q jdk. Finally, we're assuming you already have an existing Skype account. If not, download the Skype software for your Mac or Windows PC, and sign up. Try out a demo from any Skype phone. Just call nerdvittles.

Installing JAVA. If your particular Asterisk distribution doesn't have JAVA 1.5 or higher installed (rpm -q jdk), here's how to do it. Go to Sun's Java SE Development Kit 6u12 website, choose Linux for the platform, and agree to the license agreement. Then click Continue. Download jdk-6u12-linux-i586-rpm.bin and copy it to your Asterisk server. Make the file executable (chmod +x jdk-6u12-linux-i586-rpm.bin) and then run it. Scroll down the wordy license agreement AGAIN and type yes. Java 1.6 then will be installed on your system. Whew!

Basic Installation. Now we're ready to get started. Log into your Asterisk server as root and issue the following commands.

cd /root
mkdir skype
cd skype
wget http://www.skype.com/go/getskype-linux-centos
#Atomic Flash builds including VPN in a Flash
#should skip the next 3 yum commands.
#Then pick up again after the next comment line.
yum install xorg-x11-server-Xvfb
yum install qt4
yum install xterm
#everyone continues on from here
yum install libXScrnSaver.i386
wget http://pbxinaflash.net/source/skype/siptosis.tgz
rpm -ivh skype*
cd /
tar zxvf /root/skype/siptosis.tgz

FreePBX Design. The FreePBX setup that we recommend goes something like this. For outbound Skype calls, you have two choices.

1. To place a call to a regular phone number using SkypeOut (which costs you money), you'll simply dial 8 plus the area code and number. Our foreign friends will have to adjust their dialplans and /siptosis/SkypeOutDialingRules.props accordingly. Today's setup assumes 10-digit phone numbers!

2. To place a call to a Skype username using a softphone that supports SIP URI dialing such as X-Lite, you simply precede the Skype username with an asterisk, e.g. *echo123 will connect you to the Skype Call Testing Service.

For incoming Skype calls, the default setup routes those calls to a SIP URI: mothership@127.0.0.1. Whether you point this URI to an extension, ring group, or IVR is up to you. In the default Orgasmatron and Atomic Flash builds, the mothership URI is pointed to the Stealth AutoAttendant, an IVR that plays a welcoming message and then transfers the call to a ring group if no digit is pressed by the caller.

Configuring FreePBX. To put this setup in place, use a web browser to access FreePBX on your Asterisk server. You'll need to create a Custom Trunk and then an Outbound Route.

1. Choose Setup, Add Trunk, Add Custom Trunk. Fill in the form so that it looks like the following using your own CallerID number obviously:

When you're finished, click the Submit Changes button and then reload the dialplan when prompted.

2. Next choose Setup, Outbound Routes, Add Route. Fill in the form so that it looks like this:

When you're finished, click the Submit Changes button. Be sure to move this new OutSkype route to the top position in your Outbound Routes listing in the right margin! Then reload the dialplan when prompted.

3. If you're not using one of our custom Asterisk builds, add a new DayNight Control 1 option while you're still in FreePBX. Just specify where you want calls routed for Day mode and Night mode. Then, here's the easy way to activate SIP URI support on your Asterisk/FreePBX server. Copy the [from-sip-external] context from the extensions.conf file in /etc/asterisk. Now copy the content into extensions_override_freepbx.conf. Be sure to preserve the context name in brackets! Now make it look like the following. The additions we're making are shown in bold below:

[from-sip-external]
;give external sip users congestion and hangup
; Yes. This is _really_ meant to be _. - I know asterisk whinges about it, but
; I do know what I'm doing. This is correct.
exten => _.,1,NoOp(Received incoming SIP connection from unknown peer to ${EXTEN})
exten => _.,n,Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})})
exten => _.,n,Goto(s,1)
exten => s,1,GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk,${DID},1)
exten => mothership,1,Goto(app-daynight,1,1)
exten => pbxinaflash,1,Goto(app-daynight,1,1)
exten => e164,1,Goto(from-trunk,e164,1)
exten => fax,1,Goto(from-trunk,fax,1)

exten => s,n,Set(TIMEOUT(absolute)=15)
exten => s,n,Answer
exten => s,n,Wait(2)
exten => s,n,Playback(ss-noservice)
exten => s,n,Playtones(congestion)
exten => s,n,Congestion(5)
exten => h,1,NoOp(Hangup)
exten => i,1,NoOp(Invalid)
exten => t,1,NoOp(Timeout)

Finally, reload your Asterisk dialplan, and we're finished with Asterisk and FreePBX setup:

asterisk -rx "dialplan reload"

Activating Your Skype Gateway. Now we're ready to place your Skype gateway in production. You'll need to perform these steps from the console on your Asterisk server since we have to run Skype in graphics mode. This may look a bit complicated. It's really not. It's just a bit tedious to figure out the sequence of steps, but we've done that part for you.

For those on a CentOS-based system, here are the steps:

1. Start up X-Windows: xinit

NOTE: If xinit won't start on your particular machine, you may need to create /etc/X11/xorg.conf. Here's a generic config file that should work fine for our purposes:

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
EndSection

Section "Device"
Identifier "Card0"
Driver "vesa"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
Modes "800x600"
EndSubSection
EndSection

2. Next we need to start up Skype, log in, set it to autologin whenever we start it, and then in the Skype configuration, set it to run minimized: skype

NOTE: Place a Skype Test Call (echo123) to be sure your audio settings are set correctly. If a test call fails with a bad audio message, go into Options, Sound Devices and reconfigure your Audio settings until you can place the test call successfully. Otherwise, none of the rest will work! If you're using a Dell server such as the PowerEdge T100, you're probably S.O.L. without an advanced degree in Rocket Science.
HINT: Intel Atom-based motherboards are a piece o' cake!

3. Once you've got Skype working and all of the Skype settings configured above, shut down Skype.

4. Now start Skype again in background mode: skype &

5. Be sure to write down the PID for Skype in case you need to kill the job if something goes wrong. 🙂

6. You should have a command prompt back now. So issue these commands:

cd /siptosis
./SipToSis_linux

7. A message from Skype should pop up asking if you want to authorize external use of Skype: yes. Also be sure to mark the Checkbox to save this setting for future connections!

8. Now go to a softphone connected to an extension on your Asterisk server and dial *echo123

9. Go to any extension connected to your Asterisk server and dial 8 + your home phone number. This will place the outbound call through SkypeOut at 2¢ a minute.

Finally, here are a few navigation tips for managing your Asterisk console on CentOS systems:

1. Ctrl-Alt-F2 gets you a new login prompt for your server

2. Ctrl-Alt-F7 gets you back to the SipToSis/Skype session. You can kill SipToSis by holding down Ctrl-C for several seconds. To kill Skype: kill pid# (that you wrote down). To restart Skype: skype & and to restart SipToSis, just issue the command again: ./SipToSis_Linux

3. Ctrl-Alt-F9 gets you to the Asterisk CLI.

Automating the Skype Gateway Startup. Once you're positive everything is working reliably and you've rebooted and tried it again just to make certain there are no prompts, here's how to fire up your Skype gateway whenever you reboot your server.

Log into your server as root and issue the following commands:
cd /root
wget http://pbxinaflash.net/source/skype/start-skype
chmod +x start-skype
echo "/root/start-skype" >> /etc/rc.d/rc.local
reboot

For those using one of our Fedora 10 builds such as VPN in a Flash or the Atomic Flash installer, these systems have a full implementation of X-Windows and KDE. Just start the system in mode5 (graphics mode), log in, run Skype in one window and start up SipToSis in a terminal window using the commands in Step 6 above. Authorize external use of Skype when prompted.

Setting Up Speed Dials for Skype Friends. One of the wrinkles with Skype is that Skype uses names for its users rather than numbers. If you don't have a SIP URI-capable softphone, there's still an easy way to place calls to your Skype friends using FreePBX. Just add a Speed Dial number to your FreePBX dialplan. Choose Extension, then select the Custom type, provide an Extension Number which is the Speed Dial number (this could actually spell your friend's name using a TouchTone phone), enter a Display Name for your friend, and add an optional SIP Alias. Then insert the following in the dial field replacing joeschmo with your friend's actual Skype name. Save your entries and reload the dialplan when prompted.
SIP/joeschmo@127.0.0.1:5070

Security Warning. One final note of caution. Do NOT expose UDP port 5070 to the Internet unless you first secure this port with a username and password to avoid Internet intruders using your gateway as a free Skype dialing platform! You do not need 5070 exposed to the Internet to implement today's gateway solution for inbound or outbound Skype calling from your Asterisk server so we recommend you keep it securely behind at least one firewall.

Where To Go From Here. Well, those are the basics. You now can make one outbound Skype call at a time from your Asterisk server, and you can receive an inbound Skype call on any Asterisk extension when Skype users call your regular Skype name. If you want to start up your own business (like Gizmo5), then you'll need to do some tweaking. What you'll need is the STS Trunk Builder toolkit which is free, but proprietary. Enjoy!


Want a Bootable PBX in a Flash Drive? Our Atomic Flash bootable USB flash installer for PBX in a Flash has been quite the hit. Special thanks to all of our generous contributors! Atomic Flash provides all of the goodies in the VPN in a Flash system featured last month on Nerd Vittles. You can build a complete turnkey system using almost any current generation PC with a SATA drive and this USB flash installer in less than 15 minutes!

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

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

And it still isn't too late to make a contribution of $50 or more to the PBX in a Flash project and get a free Atomic Flash installer delivered to your door as our special thank you gift. See this Nerd Vittles article for details.


 

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. Skype and this suggested implementation are intended for individual use. Your use is, of course, governed by the Skype Terms of Service. []
  2. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []

Introducing Atomic Flash: 15-Minute Turnkey Asterisk Installs

PBX in a Flash offers a number of Asterisk- compatible PBX solutions to meet virtually every need. These range from base installs of Asterisk 1.4 and 1.6 in both 32-bit and 64-bit flavors. In addition, the Orgasmatron builds provide turnkey installs for Everex gPC systems and Dell PowerEdge SC440 and T100 servers. And our recent VPN in a Flash build for the Acer Aspire One NetBook introduced the ultimate portable, secure traveling communications server including the Hamachi VPN.

For 2009 we round out our offerings with the ultimate development tool, a bootable USB flash drive which can create turnkey, full-featured Asterisk PBX systems in 15 minutes or less. As its name suggests, this build was specially engineered for the new Atom-based motherboards found in most netbooks although it works just fine with Dell’s PowerEdge T100 servers as well. Many of the newer netbooks lack a CD/DVD drive so a bootable flash installer is ideal. In addition to a current generation computer, you’ll also need an 80GB or larger SATA disk drive which can be configured as sda1, sda2, and sda3. RAID setups are not yet supported unless you’re very familiar with reconfiguring Mondo Restores. With your new computer in hand, just plug in the Atomic Flash, and boot the computer from the flash drive. Type nuke and have a cup of coffee. When you return in 15 minutes and type a couple commands, your system will be ready for deployment. Add your trunk providers, match phones to the preconfigured extensions, secure passwords, and you’re all set. It’s that easy!

Make no mistake. This is a Bleeding Edge installer featuring a Fedora 10 Remix1 that’s less than a week old. It supports the latest and greatest motherboards, wired and WiFi networks, and it includes the KDE graphical user interface for those that love GUIs. Out of the box, it provides a functioning softphone as well as your own private Hamachi VPN connecting up to 15 additional systems so the entire setup can be deployed as a mobile communications hub in less time and for less money than most folks spend on their breakfast.

For those that demo systems for a living, no one will touch this presentation. Just show up at a customer site with a $300 Acer Aspire One NetBook and an Aastra 57i business phone. While the customer watches the Atomic Flash build a new PBX in a Flash server from the ruins of a Windows XP clunker, you can connect and configure the 57i and explain how simple VoIP networks can be.

When you finish your 10-minute slide show, your system will be operational. Dial any 800 number from your Aastra phone, and presto… instant, flawless communications! Now explain to the customer what the world of penny-a-minute communications is all about with every call between PBX in a Flash systems and other SIP phones absolutely free… worldwide.

Friends of PIAF. So how do you get one? If you don’t mind a preproduction version, which means we have to custom-build every flash drive, here’s how to get yours. First, this offer is for a limited time (until we get sick of cloning flash drives). And don’t expect to receive your unit overnight. In fact, it may be several weeks or more depending upon how busy we get with other Honey-Do’s. But we won’t forget you!

Now what? Just make a contribution of $50 or more to the PBX in a Flash project through PayPal, and we’ll give you one (as in gift for free), and we’ll even pay the shipping. Limit of one per contributor please! Keep in mind that $50 barely covers the cost of the 8GB flash drive, the shipping, the PayPal commission, and the labor (at 5¢ an hour) so your generosity is most appreciated. And when we get tired of working for 5¢ an hour, we’ll holler. 🙂

Once your Atomic Flash device arrives, please visit http://atomicflash.org or http://pbxonaflash.com for complete installation instructions.



The Perfect Complement. The stars have all lined up to provide a perfect opportunity for you to purchase a state-of-the-art NetBook. Click or hover on the image above for details. If you’d prefer a server, you now can grab a Dell Poweredge T100 server with dual 160GB SATA drives and 2GB of RAM saving $397 off the list price. Either hardware works great with Atomic Flash.

Are You Crazy? Why Are You Doing This? Well, yes and because it’s the First Anniversary of PBX in a Flash! We want everyone to experience PBX in a Flash in all its greatness now that we’ve got it down to a 15-minute walk in the park. These are tough economic times for many businesses around the world, and we want you to help us spread the word about the savings that can be realized through Voice Over IP. We also want to encourage those of you on the fence about a career to enter the Asterisk® reseller community, and we’re doing our part by providing the perfect sales and development tool.

So now’s your chance. We hope you’ll tell every business acquaintance and friend you have about PBX in a Flash. And you have our heartfelt thanks for your continuing support. It’s been a blast!


 

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. Fedora and the Infinity design logo are trademarks of Red Hat, Inc. Asterisk is a registered trademark of Digium, Inc. All other trademarks and registered trademarks are property of their respective owners. This software aggregation is neither provided nor supported by the Fedora Project and contains non-Fedora and modified Fedora content. Official Fedora software is available through the Fedora Project website []

Free At Last: The Emancipation of the Apple TV

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

Courtesy of Apple, Inc.

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

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

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

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

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

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


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

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

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


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

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

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


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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


Some Recent Nerd Vittles Articles of Interest…

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

What PBX in a Flash Brings to the Asterisk Table

As 2008 comes to a close, PBX in a Flash celebrates its First Anniversary and continues to be the only Asterisk® distro that offers users a choice of Asterisk 1.4 or 1.6 in either 32-bit or 64-bit flavors. In addition, you can choose our Lean, Mean Asterisk Machine or a preconfigured turnkey implementation with every VoIP bell and whistle on the planet. It’s all about choice and flexibility, and we offer both. For a preview of coming attractions, see the end of this article or take a look at the screen capture below. But today we hand over the editorial reins to some of our PBX in a Flash users to express in their own words why they chose PBX in a Flash and what their return on investment has been. We think you’ll be surprised by some of the responses. We certainly were.

You Never Know How Things Will Work Out

During the time of PBXIAF 1.0, I had been working with Trixbox for about 6 months. By the time PBXIAF 1.1 came out, I had learned enough about the way Trixbox can’t be updated to develop a healthy appreciation for the PBXIAF “compile on site, update as prudent” approach.

I happen to be a techno-nut -– but that notwithstanding, our small business was experiencing telephonic growing pains. After 7 years in business, an opportunity to expand our private label help desk product was easily ready to overrun the terrible copper lines we had for telephone service.

Since it was obvious VoIP was the only way to go – we began to explore what was out there. Vonage was riding high, Packet8 and many other competitors all got us around the limited copper into the office, each one we looked at had their own special quirks. All of them were using analog telephone adapters (ATAs) and either regular or slightly customized Analog phones.

We began a year of exploration that started with the BigGreenBox – hoping to learn enough about VoIP and this strange creature called FreePBX to be able to use it. But, with time marching on, Packet8’s Virtual Office product was selected, and put into use in a 10-phone system.

Although pretty much always under development, the web application that was provided was a little twisted, but worked once you got over its way of looking at call flow – rudimentary ring groups could be arranged in such a way as to simulate queues provided nor more than 8-10 callers were on hold. And so it went for a good year. We definitely used all our creativity to connect various IVR’s ($15/month each) to give the caller a good experience, but we were already clearly operating at the very limits of flexibility and capacity for the Packet8 system.

The average telephone bill during this period was approximately $380 per month (about 1/3 of what copper lines had cost) and almost nothing in hardware ($1,000 in proprietary telephones and ATAs).

Then the balance was broken when Packet8 rather arbitrarily stopped supporting a type of IVR transfer that was crucial to our work flow. At the same moment, the unthinkable happened. The help desk grew a little more. Less flexibility + even more demands for non-achievable call flow changes was the death knell for Packet8 at our office.

During this same time we had deployed several ISOs of the GreenBox in the lab and with field technicians….Several ISO’s! In a very short time. So many ISO’s, so fast – and a complete reinstall to go with each one. Yikes. It had become apparent to me that my career would suddenly change from network engineering to “PBX Upgrade and Reconfigure Monkey” if we deployed that distribution. Also – the forums were unproductive and negative much of the time. There are ways to disagree and still remain civil. Then, I rediscovered Nerd Vittles. This was about the time PBXIAF 1.1 was released.

The difference in the environment and team spirit – even when disagreements occurred – is very palatable. The community is full of people who are so wonderfully giving of their experience. The difference in the distributions – well- they can be summed up in about 6 words. Ward Mundy, Tom King, and Joe Roper.

This trio has brought together a remarkable set of skills and disciplines that produced a really, really good distribution, not solely RPM-based so knuckleheads like me can follow simpler instructions. [Asterisk code is] updated and compiled right on the box – and fully scripted. Security flaws get fixed in hours – sometimes minutes (when they find them – there’s been so FEW), not DAYS like the other guys. And all of it is based on FreePBX, arguably the most evolved UI for managing Asterisk.

Together – they got stability, reliability, and repeatability, and decorated it with enough solid features and functions to be a platform whose feature-function-benefit points are all top notch. Linux, Asterisk, Mysql, Apache, Text to Speech (2 different flavors), Voice Reminders, Wake Up Calls, Weather Reports, Tide Reports, Email by Phone, Headline News by Phone, and scripts that make it all go together just the way it needs to be: “stable and reliable”.

PBX In a Flash is a gift – an opportunity for our technical staff to learn a new area of our field, with the camaraderie of some genuine experts in the arena. We are 8 people, doing the work of 12 – just like a million small businesses. As an old network guy – learning a new skill has been tremendously exhilarating. And this technology is so flexible that I’m continually exhilarated learning new things… and for a long time to come! The professional growth has been great for all of us.

Now, the money. Way back up in the top of this [post], I told you the phone bill with Packet8 was on a good month $380 with barely the [functionality] needed to do our professional best.

Today, thanks to PBXIAF, we run 6 queues every day, with tremendous customer and client satisfaction. We use every part of the system to provide our customers with the best telephone interaction experience they could get anywhere. While handling about 10% more traffic, and with far superior call handling and work flow support, our average phone bill is $120 month.

Here’s the good part. With the $260 a month being saved, the company was able to afford to bring in group medical insurance for all our employees. How’s that for positively impacting 8 people every single day of their lives?

Ward, Tom, Joe – I could never have done it without you.

–tshif

And then there was this testimonial from a venue that all of us are thinking about these days:

Our small public middle school in Washington, DC has to make every penny count. I’m in charge of our technology and its meager budget. This past summer we moved to a new and bigger building and needed to migrate our phone system. We had an existing NEC Aspire system with 15 extensions that worked just fine – nothing fancy – and it hooked up to a single POTS line.

At the new building we needed to double the size to 30 extensions. As the Aspire system used VOIP, it should just be a matter of buying the handsets and a little labor to configure them. Right? [Wrong!] $17,000 is what they wanted to hook up the existing equipment that we moved over and add the 15 new extensions. My response: "Hell no!"

I’d wanted an excuse to setup an Asterisk server for a while, but I had heard how complicated it was. School was close to opening. I had a lot of other things to take care of. And I needed a solution that would most likely work the first time. I found PiaF then read up on the wiki and Nerd Vittles. I ordered a set of Aastra 57i’s and a used Dell PowerEdge 2650. We decided to go "pure VOIP" for flexibility and signed up with Vitelity.com.

I followed the great step-by-step directions for PiaF. I wanted to set mine up inside a Virtual Machine which added some complexity, but I found lots of helpful users in the forums that had documented their experiences before me.

Now we’re 5 months in. The system has more capabilities than our old NECs. The sound quality is better, and it’s easier to use. I had some problems with my server crashing, but I was able to rebuild it on different hardware and transfer our entire configuration in about an hour. Now everything is great. I love that we’re implementing more open source tools, open standards, and aren’t limited to vendor BS when we’re ready to expand. Other schools thought we were "crazy" to setup our own system. Now they want all the details to try and do it themselves.

The best part, of course, is that our whole setup was under $7K. That’s a $10,000 savings. To translate that with regards to the school, that savings allowed us to buy and set up four desktop machines in each of ten classrooms. Now THAT is making a difference.

Thanks to the PiaF team and community!

–jcasimir

And then there’s this one:

TODAY I TOOK CONTROL OF MY VOIP…..

I’ve been a happy VOIP user for 4 years running on Vonage. Even got my son hooked up on Vonage while he was in the Army stationed in Japan. But, when the lawsuits loomed over Vonage’s head, I started looking for something else, and I found Nerd Vittles. WOW! Being kind of a gadget junkie to start with and always looking for something interesting to do with my PCs, I started with Trixbox from Ward’s "build" and fumbled along. When PIAF came along I naturally followed.

I have two important successes that have made me love this VOIP/PIAF stuff.

1) When my grandson was diagnosed with a heart condition my daughter and her husband were stuck in hospital emergency rooms for hours at a time. Being about 500 miles from both our family and the other grandparents, they had a very difficult time getting news out to us since hospitals usually restrict the use of cell phones and don’t allow long distance calls from their phones. That only leaves (yuck!) pay phones. In just a few minutes time, I was able to buy a local DID to the hospital and connect it to my PIAF. I then set up an IVR that gave them access to a DISA. That way they could call us using a local number or call through the DISA to contact the other grandparents. Keeping everyone informed really eases your mind when the grandkids are ill!

2) When I got tired of my wife continuing to ask me for phone numbers when calling our family and friends, I finally decided to set up an IVR for her. So far, both of our kids’ home and cell numbers (as well as my cell number) have kept her happy. When she asks for more I’ll just add them. So far the "Wife Acceptance Factor" is high and I’m having great fun. Hanging up on recognized telemarketers is great, the Callerid Superfecta works great, and I like getting the Weather Forecast from Allison.

The port from Vonage was completed today. I’m using Future-Nine as my primary provider. So, like I said, today is the day I took control of my VOIP.

–jeffmac

And, speaking of role reversal…

PIAF to the Rescue!!

Here is a twist for you.

First, the problem:

My company has a ShoreTel system in place, 48 extensions. They have 2 PRI’s bonded together with dynamic channel allocation. Eight channels are dedicated to the phones, the rest to the Internet. When we have more calls than 8, the system robs channels from the Internet, up to 23 channels max, and returns them as the call volume drops. This all works well.

Monday, a pole a few blocks from our office had the transformer catch fire, and the provider’s equipment was affected. We lost both Internet and phones for several hours. Much of our business is time critical. With no incoming phone calls and no email, we almost lost out on a chance to bid on a VERY large deal. Fortunately, the customer knew the L.A. branch number and after being unable to get in touch with us, he called L.A.

Anyway, now it is critical to management that this NEVER happen again.

The Solution:

Tuesday: I studied the issue and wrote a proposal.

Wednesday: I fired up a PIAF box, established a 10 channel SIP trunk group to the ShoreTel system, and got everything setup for intersystem routing, etc.

Thursday: I am picking up a pay-as-you-go service with 10 channels from a VOIP provider with a single DID and setting our Telco service for failover/rollover to the VOIP DID. I am then ordering a second Internet circuit, 2meg x 2meg, to bring in the SIP trunks from the provider. As soon as that is done, I will dual-home the mail server so that we can get and send email via both Internet providers.

The End Result:

If the primary connection fails, phone service rolls over to the DID from the VOIP provider, rolls into PIAF, and cross trunks to the ShoreTel – AUTOMATICALLY!! Email switches to the secondary MX record and keeps right on rolling. One change in the firewall for the public NAT address and gateway and Internet [and phone service] is back up and running.

THANK YOU Ward, Tom, Joe and gang for making this possible.

–Greg Keys

And, last but not least…

You made my Grandma Cry!

My wife and I are currently living in Germany, and we’ve been using a Skype-In number so our friends and family can call us. For my wife it is important that the solution just works like a regular phone and so I had setup a Siemens M34 to interface with our DECT phone and it worked, mostly, for a few days until the entire system needed to be restarted. For most of our family, this solution works. But my grandmother is living in a different area code and can’t afford to call us as often as she would like.

I stumbled upon the PBX in a Flash project a few weeks ago and, after I found two old Grandstream GXP-2000 in the company junk closet (we are an Internet startup – someone is always buying new toys), I installed PiaF 1.2 using VMWare. I set up a Vitelity DID, the CallerID Superfecta, the Callerid Creep Detector, experimented with ring groups, routing, IVRs and was so impressed that I knew our Skype-solution days were numbered.

Last night, I took the plunge, reformatted the Skype system, and deployed PiaF 1.3. The install was so fast and painless. I copied the old configuration information into the new system. And, my new PBX was up and running in under and hour.

I had so much time left on my hands that I figured I might as well experiment. I followed another Nerd Vittles tutorial and created a few cell phone extensions for my family back in the states. I went to Vitelity and purchased another DID. I recorded a quick message, setup an IVR, and a new corresponding route. That’s when the fun started.

I called my grandmother and told her: "Grandma, we’ve got a new telephone number. Will you please call me right back at…". She was a little surprised when I told her that the number was now going to be a local call for her. The real surprise came when she called the number and heard, "Hi Grandma, welcome to your phone system. For Martin and Ashlee, please press 1, for Rachel please press 2,…". By the time she pressed 1 and Asterisk was ringing our home ring group, she was in tears.

We talked for quite a while about our lives, the Olympics, the hurricane, and everything else. This morning when I got up, I checked the call logs and saw that she had systematically called every single IVR point after we got off the phone.

I didn’t deploy PiaF as a mission-critical business application yesterday–though that day will come for me, but I did what the open-source Internet ideology is all about in my mind. I used the knowledge and experience others have gifted the community to create a solution that fit my situation.

Thanks Again, PiaF Team, from the bottom of my heart!

–Martin Modahl

For those of you that still need a New Year’s Resolution, we hope our fans have given you some ideas. And, when my wife again asks why I continue to work for 5¢ an hour, I’ve got something great for her to read.

Thanks, everybody. You’ve made it all worthwhile.


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

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

Be sure to include your real email address which will not be posted. The winner will be chosen by drawing an email address out of a hat (the old fashioned way!) from all of the comments posted over the next couple weeks. All of the individuals whose comments were used in today’s story will automatically be included in the drawing as well. Good luck to everyone and Happy New Year!!


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


 

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. This offer does not extend to those in jurisdictions in which our offer or your participation may be regulated or prohibited by statute or regulation. []