The Most Versatile VoIP Provider: FREE PORTING

New, Free Hospitality Management System for Asterisk

In another terrific example of open source development at its finest, Claudio Pizzillo has released the beta of his Hospitality Management System for PBX in a Flash systems. Features of the Asterisk® hotel management system include:

  • Rooms inventory management with bulk FreePBX extension import
  • Call management by prefix with per minute and fixed rates
  • Check-In and Check-Out with associated actions
  • Billing with search by dates and/or by rooms with call detail
  • Integrated with Hotel wake-up module with web interface
  • Removal of voicemails and wake-ups on room check-out

Prerequisites. If you're using a PBX in a Flash system, you have all the pieces you'll need to get the Hospitality Management System working. If not, you'll need a LAMP-based Asterisk system with Apache, FreePBX, MySQL, and PHP that's configured to match PBX in a Flash aggregation.

Installation. To install the beta, log into your server as root and issue the following commands:

cd /var/www/html
wget http://www.kefa.it/hotel.tar.gz
tar zxvf hotel.tar.gz
rm hotel.tar.gz
cd hotel
chmod 775 loadmysql.sh
./loadmysql.sh

Next, edit /etc/asterisk/extensions_custom.conf and add the following code at the top of the [from-internal-custom] context. NOTE: This code forces all outbound calls to be routed to the receptionist extension unless the room/extension number is occupied. Make two substitutions below. For MYPBX, replace it with the IP address of your Asterisk server. For RECEPTION, replace it with the extension number for your receptionist's phone.

exten => _X.,1,Set(result=${CURL(http://MYPBX/hotel/checkuser.php?Ext=${CALLERID(num)})})
exten => _X.,2,NoOp(Results: ${result})
exten => _X.,3,GotoIf($["${result}" = "OK"]?OK)
exten => _X.,4,GotoIf($["${result}" = "KO"]?KO)
exten => _X.,5(OK),Goto(outbound-allroutes,${DIAL},1)
exten => _X.,6,Hangup()
exten => _X.,7(KO),DIAL(SIP/RECEPTION)
exten => _X.,8,Hangup()

Remove the line-wrap between the first and second lines. Then save your changes to the file and reload your dialplan: asterisk -rx "dialplan reload"

Using the Hotel Management System. To use the application, use a web browser pointed to the actual IP address of your server: http://serverIP/hotel/. The web interface is self-explanatory. If you need additional assistance, post your questions and suggestions on the PBX in a Flash Forum. Enjoy!


Twitter Deals of the Week. The nation's premier provider of free directory assistance service, 1-800-FREE-411, now is offering free 5-minute phone calls to most destinations around the world. Just listen to two quick commercials and enjoy your free call. Thanks, @MichiganTelephone. And now you can send free SMS messages worldwide from your iPhone. Thanks, @TruVoIP.



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


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

Strike 3 for the Amazon Kindle Project

We’re fairly open-minded when it comes to new technology. We purchased a Kindle 2 and later a Kindle DX when they arrived on the scene. Amazon’s electronic store implementation with Sprint is every bit as good as the Apple Store for music and movies. And electronic ink (eInk) technology is quite an improvement over traditional computer displays and even outperforms non-color printing on paper. You really do have to see it to believe it. That’s where our love affair with the Kindle ends unfortunately.

Strike 1. Electronic books play an important role in reducing the squandering of natural resources. There’s also a substantial cost savings to publishers in distributing electronic books. In fact, it costs them almost nothing. But there’s a healthy dose of greed somewhere. Tim O’Reilly points the bony finger at Amazon which is free to charge whatever the market will bear for its electronic books. And they appear to be doing just that. Thanks to a boycott last year, the pricing of most New York Times best-sellers now has dropped below $10. But the dirty little secret is that the cost of technology books remains stratospheric.

In our non-scientific comparison of Kindle offerings with new and nearly new printed books in the technology category (even on Amazon’s own site), it was almost always possible to find a new or nearly new printed book at less cost than the Kindle alternative. Plus you get the accompanying CDs with the bonus materials that never are offered to Kindle purchasers. And, unlike the Kindle varieties, you can resell the real books once you’ve read them. Here are a few examples:

Python Cookbook. Amazon: 44 new and used books from $23.94. Kindle price: $29.67

Professional Excel Development. Amazon: 50 new and used from $29.65. Kindle price: $34.01

Quickbooks 2009 for Dummies. Amazon: 40 new from $13.64. Kindle price: $14.17

Practical Guide to Linux. Amazon: 36 new from $27.46. Kindle price: $28.34

Beginning PHP and MySQL. Amazon: 64 new and used books from $19.50. Kindle price: $25.90

Strike 2. The Kindle 2 reportedly has a nasty habit of cracking when attached to the $30 case which also is manufactured and sold by Amazon. The cases are $50 for the DX! Until a $5 million lawsuit was filed last week, Amazon was forcing customers to cough up $200 to repair their Kindles damaged by Amazon’s own case. Now they’ve had a change of heart. Too damn late!

Strike 3. The reliance on DRM technology to copy-protect Kindle books and prevent users from passing along their electronic books to others is just plain intolerable. The straw that broke the Camel’s Back occurred this past Thursday when Amazon took a page right out of George Orwell’s 1984. In this episode, Amazon literally snatched the already purchased 1984 books off every owners’ Kindles (without notice) because of a dispute between Amazon and one of its distributors. While the purchase price of the Orwell books was refunded, the entire episode labeled as Virtual Book Burning by InformationWeek reinforced just how unacceptable Big Brother tactics remain even in today’s digital world. Owners lost not only their books but also their personal notes about the book. Imagine someone coming onto your porch and removing a book you were in the middle of reading and annotating for a college class. But they left a check for the cost of the book on your coffee table. Yikes! The fact that it occurred with the infamous Big Brother handbook is just icing on the cake. Don’t you know that George Orwell is rolling over in his grave… because, no, you really can’t make this stuff up!

On the Horizon. Luckily, there’s a new, DRM-free eInk offering in the wings called txtr. In addition to 3G connectivity like the Kindle, the txtr also will include Wi-Fi support for the many hard-to-reach cellphone locations where a Kindle becomes next to worthless. The sooner, the better in our book. It’ll be a very long time before we do business with Amazon again. You’re OUT!


Twitter Deals of the Week. The nation’s premier provider of free directory assistance service, 1-800-FREE-411, now is offering free 5-minute phone calls to most destinations around the world. Just listen to two quick commercials and enjoy your free call. Thanks, @MichiganTelephone. And now you can send free SMS messages worldwide from your iPhone. Thanks, @TruVoIP.



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


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…

It’s TweedleD: Twitter & SMS Alerts with Every Asterisk Call

Twitter Direct Messages and SMS Instant Messages are great ways to send yourself important notes that you want to keep track of... privately. Today, we'll show you how to harness the power of Twitter and SMS to announce every call on your Asterisk® server with the name and number of the caller as well as the DID of the incoming call. Reconfiguring your Asterisk server takes less than 10 minutes. We think you'll find this to be the perfect complement to our free Urang II desktop screenpop utility.

Prerequisites. You'll need one of the Asterisk aggregations to get all of this working quickly. At a minimum, you need Asterisk 1.4 or 1.6, FreePBX, Apache, PHP 5, PHP/AGI, and SendMail or an equivalent. You'll also need a service that provides CallerID name lookups such as CallerID Superfecta. We're assuming you already have all of these components working including outbound email which is necessary to deliver the SMS alerts.

Overview. The design strategy for TweedleD is pretty straight-forward. When a call comes into your server, FreePBX should catch the call in an inbound route that looks for incoming calls on a particular DID. A CallerID Lookup source will be used in the Inbound Route to look up the name of the caller based upon their CallerID number. Then we will use a Custom Destination to route the call to a special Asterisk context which will run the TweedleD AGI script. This script actually sends out the Twitter Direct Messages as well as the SMS messages to your cellphone. Once the script completes its work, the context will send the call along to its final destination, e.g. an extension, a ring group, a day/night control, or an IVR.

NOTE: There is a 100-150 API calls per hour per IP address limit with the Twitter API. If you also are using one or more Twitter clients at your site, this is something worth keeping in mind if you have a busy phone system.

1. FreePBX Custom Context. The trick with designing FreePBX dialplans is to build them in reverse. So we'll start with the custom context and work our way back to the inbound route. First, log into your server as root and edit extensions_custom.conf in /etc/asterisk. At the end of the file, we want to create a new context that looks like this. We've provided several sample destinations at s,5 to show you the syntax. The first routes a call to an extension or ring group number. The second routes the call to Day/Night Control #1. And the third routes the call to an IVR. To find the correct IVR number or day/night control for what you want to do, review the IVR and app-daynight contexts in extensions_additional.conf to find the one you need. Obviously, you only use one s,5 line. Comment out the remaining ones as shown below. For Asterisk 1.6, replace the vertical bars in line s,3 with commas.

[custom-twitter]
exten=>s,1,Answer
exten=>s,2,Wait(1)
exten=>s,3,AGI(nv-twitter.php|${CALLERID(name)}|${CALLERID(num)})
exten=>s,4,NoOp(${CUSTOMDATA})
exten=>s,5,Dial(local/701@from-internal)
;exten=>s,5,Goto(app-daynight,1,1)
;exten=>s,5,Goto(ivr-6,s,1)
exten=>s,6,Hangup

2. Installing PHP/AGI Scripts. Next we need to install the script that actually generates the messages for Twitter and SMS. In addition, we'll install Justin Poliey's terrific twitter.lib.php which is a PHP implementation of the Twitter API that lets you do just about anything with Twitter that you could do with the Twitter API itself. For a good writeup on the capabilities of twitter.lib.php, see Antonio Lupetti's article. To install the necessary code, issue the following commands while still logged in as root:

cd /
wget http://bestof.nerdvittles.com/applications/TweedleD.tgz
tar zxvf TweedleD.tgz
rm TweedleD.tgz
cd /var/lib/asterisk/agi-bin

3. Configuring TweedleD. Now we need to configure the PHP script with your Twitter and SMS credentials so that TweedleD knows where to send the messages. Edit nv-twitter.php in the /var/lib/asterisk/agi-bin directory on your server: nano -w nv-twitter.php. You'll see a section of code near the top of the application that looks like this:

//-------- DON'T CHANGE ANYTHING ABOVE THIS LINE ----------------

$tweet = 0;
$username = "your-twitter-name";
$password = "your-twitter-password";
$user4msg = "recipients-twitter-name";

$sms = 0;
// $smsaddress = "1234567890@txt.att.net" ; // AT&T
// $smsaddress = "1234567890@message.alltel.com" ; // AllTel
// $smsaddress = "1234567890@messaging.nextel.com" ; // Nextel
// $smsaddress = "1234567890@messaging.sprintpcs.com" ; // Sprint
// $smsaddress = "1234567890@tmomail.net" ; // T-Mobile
// $smsaddress = "1234567890@vtext.com" ; // Verizon

$debug = 0;
$newlogeachdebug = 1;

$emaildebuglog = 0;
$email = "yourname@yourdomain" ;

//-------- DON'T CHANGE ANYTHING BELOW THIS LINE ----------------

There are four things you can enable and, depending upon what choices you make, you need to add your credentials for the various options. Let's go through them in the order they appear.

To enable Twitter Direct Messages, change $tweet=0 to $tweet=1. $username and $password are used to set your Twitter login credentials for your Twitter account. You must have one! $user4msg is the Twitter account name where the DMs should be delivered. They do not necessarily have to be delivered to your Twitter account although they can be. Be sure to preserve the quotes! And, remember, you can only send direct messages to people on Twitter that you are following, and they must be following you as well. If in doubt, attempt to send a direct message in Twitter to the desired recipient. Then you'll know for sure. TweedleD provides no error messages if things don't work. 🙁

To enable delivery of SMS messages to your cellphone, set $sms=1. TweedleD actually delivers SMS messages using email. Virtually all of the carriers provide an SMS-Email Gateway for this purpose. The trick is knowing the email domain for your desired carrier. The full list is available here. And here is an even newer Email to SMS Gateway list. In the script, we've provided samples for the major U.S. carriers so, if yours is in the list, just uncomment the appropriate line by removing the leading // on the line and replace 1234567890 with your 10-digit cellphone number.

If you want a debug log generated for each call, set $debug=1. The default is to overwrite the previous log (/var/log/asterisk/nv-twitter.txt) with each new call. If you'd prefer an ever-growing log, set $newlogeachdebug=0.

The debug log also can be emailed to you. Set $emaildebuglog=1 and enter your email address in $email.

When you've completed the configuration, save the file (Ctrl-X, Y, Enter) and reload the Asterisk dialplan: asterisk -rx "dialplan reload".

4. FreePBX Setup. Finally, we need to configure FreePBX to support TweedleD. We'll add a Custom Destination and then adjust our inbound route(s) to support the custom context we added in Step 1. Open FreePBX with a web browser and choose Admin, Tools, Custom Destinations, Add Custom Destination. For the Description, call it TweedleD. For the Custom Destination, enter the following: custom-twitter,s,1. Then click Submit. Now edit your Inbound Routes for the DIDs for which you wish to activate TweedleD. For each inbound route, make sure you have activated a CallerID lookup source and then set the destination to: Custom Destination: TweedleD. Save your changes and reload the dialplan.

Trying Out TweedleD. Now you're ready to place a test call. Just call into your system on one of the DIDs that has been configured for TweedleD. On the Asterisk CLI, you should see an entry that identifies the CallerID name and number of the caller. And, if you've activated delivery of notifications to Twitter and/or SMS, the messages will magically appear within seconds. Enjoy!


Tips of the Week. If you hurry, you can get 25GB of free, password-protected online storage with the new Microsoft SkyDrive offering. Or, for a free incoming call number for your Skype account, check this service out. A new precompiled version of Asterisk 1.6 for Mac OS X Leopard has been released. You can download it here. Finally, Sprint is offering a Netbook for 99¢ with any 2-year EVDO contract at Best Buy stores this week. Regular price for the Compaq Mini is $389.99. Add your cell phone or Asterisk DID to the DO NOT CALL Registry. Just call 888-382-1222 using the CallerID of the number to wish to block.


Sign of the Times. Before you get too comfortable with all your free Google apps, you might want to read this article. Despite assurances to the contrary from Google's President of Enterprise, it seems that the free version of Google Apps has quietly disappeared.

Update: Google Apps team invokes Brain Fart defense saying they momentarily forgot about "free" but it won't happen again. Heh, heh. Official Blog Posting.


VoIP Users Conference. Come join the fun. The VoIP Users Conference is held every Friday at noon, Eastern time. ISN: 8647*1061 (Hint: 8647 spells VOIP on your phone).


The World According to Twitter. Be on the lookout for David Pogue's new book, The World According to Twitter. It goes to press today! Incidentally, Pogue's books are just about the only reasonably priced tech books available for the Kindle, and they're all excellent.

Tomorrow's the Big Day. The last time this happened, it was a pretty quiet year. Just after noon tomorrow comes your once-in-a-lifetime moment when the time will officially be 12:34:56 7/8/9. The last time we had this much fun in our lifetime was... uh, about a year ago: 01:23:45 6/7/8. Can't wait for next year's thriller: 23:45:67 8/9/10. Ooops! That won't work on most clocks. Will it? Amazing what you can learn on Twitter. Isn't it? Thanks, @ejovi and @ev.



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


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

Introducing ISN: Free SIP Dialing From Any Asterisk Phone

Wouldn't it be nice to pick up any telephone on your Asterisk® system and place free SIP calls to anywhere in the world by dialing joe@sip.asterisk.com or any SIP URI? The problem, of course, is that most phones don't include alphanumeric keyboards much less the @ symbol. Well, not to worry. A group of Asterisk gurus headed up by John Todd came up with a clever plan using DNS that lets you dial any SIP URI using the 10 numeric keys plus the asterisk key on any standard telephone keypad. Today, we'll show you how to set up your Asterisk system to support ISN's (aka ITAD Subscriber Numbers).

Overview. In laymen's terms, the trick to ISN dialing is that we pass a number such as 1234*1061 to a DNS server that knows how to translate the numeric sequence into a SIP URI that looks like this: 1234@sip.pbxinaflash.com. In short, it takes the number after the asterisk and resolves it to a fully-qualified domain name which is preconfigured at freenum.org. And the result is inter-domain numeric SIP addressing using ordinary telephone instruments. For our recommended setup, you'll actually dial ISN numbers like this: **1234*1061. The leading asterisks will tell FreePBX to treat this as an ISN dial string.1

Prerequisites. We're assuming that you already have one of the FreePBX-enhanced Asterisk aggregations in place such as PBX in a Flash. If not, start there and then run the Orgasmatron Installer which provides all of the SIP URI functionality you'll need for this project. If you're not using PBX in a Flash, then review our tutorial on SIP URI's which will walk you through getting this functionality set up on your FreePBX-enhanced Asterisk server.

Adjusting Your Phones to Support ISN Dialing. We'll be using a somewhat different dial plan to make ISN calls so you'll probably have to adjust the default dialplan on your actual phones or ATA to get this to work. If you can place ISN calls with a softphone but you get a fast busy when you dial the same number on your hardware-based phones, then it's a dialplan problem. For Aastra phones, you can access the Aastra dialplan settings with a web browser. Just go to the IP address of the phone and login with admin:22222. Click on the Preferences option and you should see Local Dial Plan at the top of the page with an entry that looks like this: x+#|xx+*. Just change it to: x+#|xx+*|'*'xx+* and click the Save Settings button. No reboot of the phone is required. Notice that we've enclosed the asterisk in single quotes in the third option. That's the trick to getting Aastra phones to recognize * as part of an actual dial string. If you're using other phones, consult your user's guide for tips on modifying your dialplan to accommodate an asterisk as the first character in the dial string.

Enabling Outbound ISN Dialing. There are a number of ways to get ISN outbound dialing to work with Asterisk. We're going to show you a couple of methods. You can either set up a trunk and outbound route to handle the calls, or you can add an extension to your system which actual prompts for the ISN number when you dial that extension. There are also two ways to look up ISN numbers at freenum.org. The preferred method is using DNS queries with the new Asterisk ENUMLOOKUP function. An alternative method (which is especially useful with older versions of Asterisk that do not support ENUMLOOKUP) is to use FreeNUM's external public resolver to map ISN dial strings to SIP URIs. With PBX in a Flash and Asterisk 1.4.21.2 or later, both methods work.

Implementing the Trunk Method for ISN Dialing. With this option, you'll be able to pick up any (properly configured) phone on your Asterisk system and dial **1234*1061 to complete a free ISN SIP call. To set this up, we'll add a new trunk and outbound route in FreePBX. Then we'll insert a dialplan script in extensions_custom.conf to finish up. Once you reload your Asterisk dialplan, you'll be good to go.

Open FreePBX in a web browser, and choose Admin, Setup, Trunks, Add Trunk, Add Custom Trunk. Leave the General Settings blank for now. In the Dial Rules, insert X.*X. (be sure to include trailing period!) and, for the Custom Dial String, insert: local/$OUTNUM$@freenum. Click the Submit button to save your settings and reload the dialplan when prompted. Now add an Outbound Route called OutFreeNUM. For the Dial Pattern, use **|X.*X. with the trailing period again. For the Outbound Route Dial Pattern, you can get more elaborate so that you don't have to dial the ** prefix. Just be aware that this may not work with all handsets (including the Aastra's). It does work well with Zoiper softphones. Here's the dial pattern we actually use. With this dial pattern, you can dial most ISN numbers directly with no prefix, e.g. 16781234567*1061 works fine.

**|X.*X.
1NXXNXXXXXX*X.
NXXNXXXXXX*X.
XX*X.
XXX*X.
XXXX*X.
XXXXX*X.
XXXXXX*X.
XXXXXXX*X.

For the Trunk Sequence, choose local/$OUTNUM$@freenum. Save your entries and reload the dialplan once more.

Finally, log into your server as root and edit extensions_custom.conf in /etc/asterisk. At the bottom of the file, insert the following code:

[freenum]
exten => _X.,1,Set(TIMEOUT(absolute)=10800)
exten => _X.,2,NoOp(Number to Call: ${EXTEN})
exten => _X.,3,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)})
exten => _X.,4,GotoIf($["${isnresult}"=""]?6:5)
exten => _X.,5,Dial(SIP/${isnresult},40,r)
exten => _X.,6,Background(ss-noservice)
exten => _X.,7,Congestion
exten => _X.,8,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => T,1,Hangup

Make sure you eliminate the line-wrap on line 3 above. Then save the file and reload your dialplan: asterisk -rx "dialplan reload". Now place a test call by dialing: **1234*1061. If the call doesn't connect to Nerd Vittles' demo site, check the Asterisk CLI and fix any reported errors.

Implementing the Extension Method for ISN Dialing. With this option, you'll be able to pick up any phone on your Asterisk system and dial FREE (3733) to place an ISN call. You'll be prompted to enter the number using the following format: 1234*1061. Note that there are no leading asterisks with this method. Instead of using ENUMLOOKUP to find the ISN number, we'll use FreeNUM's external public resolver to do the ISN translation into a SIP URI.

Log into your Asterisk server as root and edit extensions_custom.conf in /etc/asterisk. At the bottom of the file, insert the following context:

[custom-freenum]
exten => s,1,Answer
exten => s,2,Wait(2)
exten => s,3,Background(pls-entr-num-uwish2-call)
exten => s,4,Read(NUM2CALL,beep,30)
exten => s,5,GotoIf($["foo${NUM2CALL}" = "foo"]?10)
exten => s,6,Set(TIMEOUT(absolute)=10800)
exten => s,7,Background(pls-hold-while-try)
exten => s,8,Dial(SIP/${NUM2CALL}@public.freenum.org,30,m)
exten => s,9,Congestion
exten => s,10,Hangup
exten => h,1,Hangup
exten => i,1,Hangup
exten => T,1,Hangup

Now move to the top of the file and insert the following line in the [from-internal-custom] context:

exten => 3733,1,Goto(custom-freenum,s,1)

Save the changes you've made to the file and then edit (or create, if necessary) sip_custom.conf and insert the following line:

promiscredir=yes

Save the file and then restart Asterisk: amportal restart. Now place a test call by dialing 3733. When prompted for the ISN number, enter 1234*1061 and press # to avoid the timeout delay. Be aware that on non-FreePBX systems, this code would go in sip.conf; however, that file gets overwritten with any FreePBX reload. Hence the reason that we've placed the code in sip_custom.conf.

Creating a SIP URI for Your Asterisk Server. Before you can receive any inbound calls with ISN dialing, you'll need at least one SIP URI for your Asterisk server. The format of a SIP URI is much like an email address: somename@yourdomain.dyndns.org or somenumber@yourdomain.dyndns.org. Step 1 is to register a fully-qualified domain name (FQDN) for your Asterisk server. Step 2 is to actually set up the SIP URI's on your server.

If you already have a registered domain, then we recommend you create a sip subdomain: sip.yourname.org. Then point that subdomain to the IP address of your Asterisk server. If your Asterisk server has a dynamic IP address, then register a subdomain with a service such as dyndns.org and point that domain at your Asterisk server. We've previously covered how to install software on your Asterisk server to make sure your FQDN always resolves to the correct dynamic IP address. Here's the link for DNS-O-Matic.

Once you have FQDN covered, you're ready to set up a SIP URI. With Orgasmastron builds of PBX in a Flash, the work already has been done for you. You should already have a SIP URI of mothership@yourFQDN. For everyone else, the drill involves moving a copy of the [from-sip-external] context into extensions_override_freepbx.conf in /etc/asterisk so that it can be edited without risking an overwrite from FreePBX. To find out the location of the [from-sip-external] context, issue the following commands while logged into your server as root:

cd /etc/asterisk
grep from-sip-external *

The result will look something like this:

extensions.conf:[from-sip-external]
extensions_override_freepbx.conf:[from-sip-external]
sip_general_additional.conf:context=from-sip-external

If the middle line is there, the context already has been copied over. Otherwise, list out the file showing [from-sip-external] which varies depending upon your version of FreePBX: cat extensions.conf. Now cut-and-paste the entire [from-sip-external] context into extensions_override_freepbx.conf. Then edit the override file and add an entry for each SIP URI you wish to create. The entries should be inserted just below the exten => s,1... line. Here are some samples:

exten => 16781234567,1,Goto(from-trunk,${DID},1)

This entry would let you control the routing of 16781234567 by creating a new incoming route in FreePBX with a DID entry of 16781234567. Then you can point the SIP URI to any FreePBX resource, e.g. an extension, ring group, IVR.

exten => e164,1,Goto(from-trunk,e164,1)

This entry would route e164@yourFQDN to the Inbound Route created for a DID number entry of e164.

exten => 18431234567,1,Goto(custom-windyhouse,s,1)

This entry would route incoming calls to 18431234567@yourFQDN to s,1 in a custom context called [custom-windyhouse] in extensions_custom.conf.

exten => 17065439876,1,Dial(SIP/17066313456@sip.otherdomain.com)


This entry would route incoming calls to 17065439876@yourFQDN to another SIP URI.

exten => 12021234567,1,Dial(local/12029876543@from-internal)

This entry would route incoming calls to 12021234567@yourFQDN to a cellphone at 12029876543 using your Asterisk dialplan to choose an appropriate trunk for the call.

exten => 18883331212,1,Dial(SIP/skype_joe@proxy01.sipphone.com)

This entry would route incoming calls to 18883331212@yourFQDN to a Skype user named joe using the free Gizmo5 gateway.

Once you've made all desired SIP URI entries, save the override file and reload your Asterisk dialplan.

Using the PBX in a Flash ITAD Number. So you're probably asking, "What's in this for me?" Well, a couple of things actually. First, if you're a PBX in a Flash user, we want you to join our free calling network. We already have reserved the 1061 ITAD number for our group. Just cut-and-paste the form below, fill in the blanks, and email it to us. We'll set up an ISN number for your server (one per customer, please) so that others can contact you without spending a dime. The other option is to obtain your own ITAD number for your organization and set it up on your own server. We'll get to that in a minute.

If you want to join our club (and we really don't mind if you're not using PBX in a Flash), then cut-and-paste the form below into your email and fill it out. And here's the email link. Once we receive your request, we'll set up an ISN number for you that matches your existing phone number. So, if your phone number is 16781234567, your new ISN number will be 16781234567*1061. Please include your international codes with your phone number. Before we activate your ISN number, we'll place a test call to your SIP URI to verify it's working. Please be sure it is before applying. 🙂

Name:
Mailing Address:
Phone Number:
SIP URI for Your Server: _____________@_____________________________
ISN Number (leave blank):
Publish Entry in Directory? Yes or No (choose one)

Obtaining Your Own ITAD Number. We know there are lots of you that prefer to do things yourself. And that's perfectly fine. We're going to quickly show you how. But, if you want to be included in the PBX in a Flash directory, please send us the form above with your own ISN contact number once you get things working.

To get your own ITAD number, visit this link and follow the instructions for requesting your own number. It's easy, but detail matters so do it right the first time! Within a few days, you'll get your shiny new number. And, in a few more days, freenum.org will notify you that your account has been established.

Setting Up An ISN Account at FreeNum.org. Once you receive your login credentials from FreeNUM, log in to your account. Leave the DNS Wildcard setting the way it is. All you have to do is insert your fully-qualified domain name in the FQDN placeholder. For example, if your FQDN were sip.big.edu, then the last part of the DNS entry should look like this:

sip:\\1@sip.big.edu!" .

Save your entry and wait an hour. Then test it by dialing your new ISN number or, after logging into your server as root, use a command like the following. Turn your SIP URI around from 6781234567*1061 so that it looks like this:

dig @freenum.org NAPTR 7.6.5.4.3.2.1.8.7.6.1061.freenum.org.



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


Aretta Introduces Free NetPBX. In an industry first, Aretta Communications is rolling out a free Asterisk hosted solution known as NetPBX Free Edition. The only cost is for the minutes you use, and the free hosted service will support one inbound or outbound call at a time. Everything including the SIP trunking is preconfigured so the system is literally plug-and-play. We'll provide a more in-depth review once we've had some time to play.


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. The dial string has been modified a bit to mesh with special dial codes in FreePBX. See the comments for details. []

Some Summertime Distractions for Asterisk Lovers


In addition to Spoleto and the Bridge Run, Charleston has many great traditions, one of which is a prompt transition from a rainy, cold winter into sweltering summer. We got a very long spring break this year, but now we’re paying for it. After spending a couple weeks on Balsam Mountain, it was nothing short of culture shock driving back into Charleston last night. But we’re glad to be home. And this week, we celebrate summer with a list of some of our favorite vacation discoveries that didn’t involve snakes and bears. Some are related to Asterisk®, and some aren’t. So here goes.

Streaming Video with Roku. If you haven’t figured out why Time Warner and Comcast have been pushing for Internet bandwidth caps, here’s a hint. Streaming video not only is killing their pipes, but more importantly (to them) it’s killing their pay-per-view and HBO/Showtime monopolies. If you enjoy (or can even remember) great television and movies without thousands of commercials, then we’ve got two discoveries that will make your summer! The first one is Roku, a little $100 device about the size and weight of a couple packs of cigarettes. You plug it into your TV and the Internet, pop the popcorn, and you’re ready for some fun. With an $8.95 Netflix subscription (which buys you one-at-a-time DVD rentals by mail), you also get unlimited movies streamed to your Roku device. It’s not their entire catalog, but it’s a substantial subset including most of the Starz catalog. The Roku player supports composite, S-video, component, and HDMI video connections as well as stereo and optical audio. A new addition allows the rental or purchase of first-run movies from Amazon (at Blockbuster prices). More offerings are promised for later this summer. Can Hulu be far behind? If you’ve been holding off purchasing a Blu-Ray player, then here’s another option. LG’s new $200 BD370 Blu-Ray Disc Player incorporates this same technology in addition to YouTube access. We haven’t used the BD370 yet, but we sure do want one.

Cellphones for Preteens. We laughed at our friends from Naples, Florida last summer when they were lamenting the fact that every child in their daughter’s second grade class had a cellphone except for theirs. They swore that they wouldn’t give in. That lasted until Christmas when the shiny new LG Xenon appeared. Chuckling all the way to spring, we recently met the same fate with the Samsung A767 Propel after our 9-year-old raised over $300 selling all of her old toys at the neighborhood yard sale. Bottom line: All the kids are going to have them by the time they turn 10. And with the family plans available from a number of providers, the costs are no longer prohibitive for most of us. You might as well get them trained to use cellphones responsibly while they’re young. Trust me. It’s a lot more difficult once they hit high school or college and know everything. There is a difference between adult and kid usage of cellphones. They rarely make a call. But you’ll want an unlimited texting plan. And none of the kids want an iPhone. They much prefer one the newer phones that includes a full keyboard for texting. Apple, are you listening?

If you go down this road with the rest of us that swore we wouldn’t do it, demand two things: (1) that your kids not use cellphones while driving and (2) that they not hold cellphones up to their ears while making calls. The jury is still out on whether cellphone usage leads to brain tumors. But it seems pretty obvious when you review the research provided by organizations not funded by the cellphone industry. Remember the tobacco companies swore that cigarettes were safe for decades, and they paid good money for authoritative-sounding research to back them up. Read this. And watch this. Then decide whether you want to gamble with the lives of your children. Better safe than sorry.

Deals, Deals, and More Deals. If you always shop for technology purchases at the same few stores, then send us a check for all the money we’re about to save you. There’s a green eBates coupon in the right pane just below that will usually save you 1-5% on all your technology and clothing purchases and just about anything else. It costs nothing to use it, and you’ll get $5 just for signing up. So do we. 🙂 To go with those savings, there are some bargain web sites that you won’t want to miss. Our old favorite is TechBargains, but there’s also a new kid on the block, DealNews. Check ’em out. You’ll find something you just can’t live without… at bargain basement prices.

SMS Messaging with Asterisk. We’ve always lamented the fact that Asterisk had no built in SMS messaging capability. This is primarily because the cellphone providers keep a fairly tight lock on the SMS business since it’s their Cash Cow. There is a simple solution actually.

Virtually all of the cellphone providers have an Email-to-SMS gateway that can be used for sending SMS messages to their customers. For example, to send a message to a cellphone subscriber on the AT&T network, you just send an email message to 6781234567@txt.att.net. Click here for a complete list of the email gateway addresses.

That got us to thinking how simple it really would be to create a bash script that delivered the same message to every provider used by your friends. Who cares if all but one of the messages goes in the bit bucket. Your SMS message still will get delivered. For example, in the United States, if you’ve covered AT&T, Verizon, Alltel, Sprint, T-Mobile, US Cellular, Cricket, and Nextel, that pretty much gets 99% of the cellphones. If there’s a service that we’ve left out that you really need, just add another line to the bash script with the domain of that carrier.

So, log into your server as root and create a bash script named sms.sh that looks like the following: nano -w sms.sh

#!/bin/bash

# Script for sending SMS messages
# For additional cell carriers, see:
# http://en.wikipedia.org/wiki/List_of_carriers_providing_Email_or_Web_to_SMS

msg="Just testing the new SMS batch script."
subj="SMS Message"
num2call="8431234567″

echo "$msg" | mail -s "$subj" $num2call@message.alltel.com
echo "$msg" | mail -s "$subj" $num2call@txt.att.net
echo "$msg" | mail -s "$subj" $num2call@sms.mycricket.com
echo "$msg" | mail -s "$subj" $num2call@messaging.nextel.com
echo "$msg" | mail -s "$subj" $num2call@messaging.sprintpcs.com
echo "$msg" | mail -s "$subj" $num2call@tmomail.net
echo "$msg" | mail -s "$subj" $num2call@email.uscc.net
echo "$msg" | mail -s "$subj" $num2call@vtext.com

Fill in the msg, subj, and num2call fields. Press Ctl-X, Y, then Enter to save your file. Then make it executable: chmod +x sms.sh. Now give it a try: ./sms.sh

You can alter the sender address for your emails from the default of root by inserting an entry like the following in /etc/mail/genericstable: root    joeschmo@gmail.com. Then restart SendMail: service sendmail restart.

Micro$oft Bing. I have to admit that I’ve always had a soft spot for Microsoft. They came from humble beginnings and outsmarted almost everybody during the 80’s and 90’s… until Google entered the picture and did much the same thing to them. You’ve also got to hand it to Microsoft. They may not get it right the first, or second, or third time. But they don’t give up. And their reincarnated search engine, Bing, is worth a look. It includes an Explorer Pane that categorizes search results in a left panel that is customized to your search query. There’s also a Quick Preview providing website popups. The theory is to give you a sneak peak at a particular site to see if it’s what you’re looking for. As with many Microsoft creations, it’s just too slow at the moment to be of much value. Good idea. Not so good implementation.

A good bit already has been written about Bing’s picture and video search capabilities. Suffice it to say, once they tamed the content, it’s worth a look. Actually, it was worth a look even before they tamed the content. 🙂 But give Microsoft credit, they quickly recognized that there needs to be a way to make the web accessible to younger children and students without exposing them to an endless stream of pornography. What happened to the good old days of reading National Geographic to find all that stuff?

Microsoft’s Farecast technology also is interesting. It brings new, smart tools to the process of purchasing airline and hotel accommodations. Much of this toolkit was acquired by Microsoft, but it’s pretty slick. The downside of Bing, when compared to Google, is that there seems to be a tilt toward Microsoft content in results. And there still is a lot of drill-down (aka Windows) to find exactly what you’re looking for. Both are deeply rooted in the Microsoft psyche so I doubt it’ll ever go away. But have a look anyway. It’s an interesting, new product to at least have in your search toolkit.

Let There Be Music. All-you-can-eat streaming music plans have been around for a while. But there’s never been anything quite like the new Napster service from Best Buy. $5 a month for access to 7 million songs on either your PC or a Sonos sound system is just too good to pass up. We’ve previously written about this so we won’t repeat it all here. Have a look at the article if you’re a music addict. And, if streaming DRM’d music isn’t your thing, check out this PC Mag article on Virgin Media’s new offering. It will let you download an unlimited number of MP3’s from Universal’s entire music catalog for about $20 a month. Unbelievable!

People Tracking. If you glance over to the right margin, you’ll get a good sample of Google’s Latitude offering that pinpoints your location on a Google map using GPS data from your cellphone. AT&T offers something similar for "only" $10-$15 a month. This data can be either the location of the nearest cellphone tower or, if your phone is GPS-enabled, it can be the actual GPS coordinates of your phone. There are obviously privacy issues that need to be weighed, and Google has carefully addressed most of those issues. You can restrict access to select friends, or just family, or no one at all. In coming months, we’re going to build something similar with Google Maps to display a map with the default location of incoming calls on certain color SIP phones. Stay tuned. In the meantime, feel free to monitor our summer vacation as we move from Charleston, to the beach, and back to the mountains. Not too exciting, but it may give you some ideas for future uses of this technology. For those of you with young daughters, think of it as LoJack for Parents!

Footnote: Uh, oh. Google.everything just died. 8:30 a.m., June 16. Bad way to start your day. Good time to check out Bing. 🙂

Hurricane Tracking. If hurricanes are a part of your everyday life and you haven’t visited Stormpulse.com yet, you’re missing the ultimate storm tracking site on the net. Not only do they provide up-to-the-minute predictions from all of the world’s best sources, but you also get map overlays showing virtually anything you’d ever want to know that’s weather-related. Unbelievably good! And, for a ringside seat, visit our own Pawleys Island WebCam. We’ll wave to you later this week.

Promising New Asterisk Appliance. Every now and then we read an article about a new Asterisk appliance that really shows some promise. So it is with Michael Graves’ recent writeup of Jazinga, a $1095 Asterisk appliance that does just about anything and everything a small business would ever need in a phone system using a simple but intuitive web interface. Have a look. We think you’ll agree. Very slick, indeed. Only wish it were $595 instead of $1095.

Some Great Blogs. And, speaking of blogs, there are some other telephony blogs in addition to Graves on SOHO VoIP that are worth a look from time to time. Here’s another Baker’s Dozen of our favorites in no particular order:

FreeNum Dialing System. Another new project worth a careful look is FreeNum. Taking a page from Nextel, FreeNum lets you make SIP calls from ordinary telephones after registering your organization. The format of a FreeNum dial string looks like 1234*567 where your extension is 1234 and your ITAD (Internet Telephony Administrative Domain) number is 567. FreeNUM relies upon DNS and, as such, is perfectly suited for transparent use over the Internet. In coming weeks, we’ll have more to say about FreeNUM including a methodology for letting all PBX in a Flash systems register with a shared ITAD for transparent communications worldwide. Here’s the article.

Twitter. The entire planet is aflutter with Twitter. We finally bit the bullet, and we’d be the first to admit that Twitter fills an important gap in today’s Internet-centric 21st century world. Not only does it provide instantaneous searches of very current content, it’s also quite useful as a micro-blogging tool if you like to keep current on technology happenings without always waiting for full-blown articles to appear. Many of the topics in this article were first introduced to Twitter users over the last few weeks. So there’s much more to Twitter than periodic reports of individuals’ bathroom and sleeping habits. You can get a sampling by reviewing our Twitter entries in the right pane of this blog. And there are literally hundreds of Twitter clients to meet your every need. Here’s a link to a great Twitter FAQ. Then give Twitter a try if you haven’t already. NerdUno is looking forward to hearing from you.

Wordle.net. We’ve mentioned Wordle before, but no article on Internet fun would be complete without at least a passing reference. The way Wordle works is that you pass it some text. It then rearranges the words in a hierarchical order that exposes the word usage count of the various words in the text it examined. You can see an example below which took the subject matter from the PBX in a Flash Help Forum and passed it through Wordle. You’ll note that "Resolved" is just about the same size as "problem" and "question." That actually speaks volumes about the quality of our forum. Give it a try. We think you’ll agree. We’ve done some other samples to give you some ideas: the Gettysburg Address, the Declaration of Independence, and MLK’s I Have A Dream speech. Try a few of your own. It’s a summertime blast. Enjoy!



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


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 TTS: Introducing Today in History

If you're a history buff and want a convenient way to find out everything that ever happened Today in History, then this week's text to speech (TTS) application for Asterisk® should be just what you need. Pick up any phone connected to your Asterisk system and dial T-O-D-A-Y (86329 for the spelling-impaired). The script will retrieve today's historical events and today's birthdays of interest from Yahoo News and play the results back to you over the phone using either Flite or Cepstral to handle the TTS translation. To speed up the retrieval process, you can also set this up as a cron job to download the latest events each day while you're sleeping. Thereafter, when you dial T-O-D-A-Y, the results are played back for callers instantaneously.

Prerequisites. If you're using PBX in a Flash, then all of the tools you'll need are already in place. And we have a script for you that will install the application in just a few seconds. For other users, you'll need an Asterisk server with PHP5 and either Flite or Cepstral to handle the text-to-speech chores.

Overview. If you've previously installed other Nerd Vittles text to speech applications, then the drill this time around is quite similar. There's a PHP/AGI script which gets stored in /var/lib/asterisk/agi-bin. In this script (nv-today.php), you can change the default Flite TTS engine to Cepstral by changing the $ttspick variable setting from 0 to 1. Then there is a snippet of dialplan code that needs to be added to the [from-internal-custom] context in extensions_custom.conf for FreePBX installations. Once you reload your Asterisk dialplan, you're ready to go.

How It Works. The PHP/AGI script only does real work once a day. It always checks to see if there is an existing /tmp/today.txt file with today's file stamp. If there is, it exits gracefully. If today's file doesn't exist or if the file's time stamp is earlier than midnight, then the script downloads the latest information for today in history and creates a text file of the data. Then either the Flite or Cepstral TTS engine is called to convert the text file into /tmp/today.wav. The dial plan code is used to answer calls to extension 86329. Then it runs the PHP/AGI script, and finally it plays back /tmp/today.wav. Note: The PHP/AGI script, if run as a cron job or from the command prompt, should never be run as the root user, but only as the asterisk user. Otherwise, the today.txt and today.wav files cannot be replaced by the script when it subsequently is run from the dialplan.

Script Installation. If you're using PBX in a Flash, log into your server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/today/today.pbx
chmod +x today.pbx
./today.pbx

Automatic Updates Using crontab. If you'd like to automatically generate the Today in History files each day, add the following entry to the bottom of /etc/crontab:

01 0 * * * asterisk /var/lib/asterisk/agi-bin/nv-today.php

Manual Installation. For those using a different Asterisk aggregation that includes PHP5, FreePBX, and Flite, add this code to /etc/asterisk/extensions_custom.conf in the [from-internal-custom] context:

exten => 86329,1,Answer
exten => 86329,2,Wait(1)
exten => 86329,3,Set(TIMEOUT(digit)=7)
exten => 86329,4,Set(TIMEOUT(response)=10)
exten => 86329,5,Flite(Please stand bye while we retrieve: Today in History.)
exten => 86329,6,AGI(nv-today.php)
exten => 86329,7,Playback(/tmp/today)
exten => 86329,8,Wait(1)
exten => 86329,9,Hangup

Then issue the following commands from the command prompt after logging in as root:

cd /root
mkdir today
cd today
wget http://bestof.nerdvittles.com/applications/today/today.zip
unzip today.zip
rm -f today.zip
cp nv-today.php /var/lib/asterisk/agi-bin/nv-today.php
chmod 775 /var/lib/asterisk/agi-bin/nv-today.php
chown asterisk:asterisk /var/lib/asterisk/agi-bin/nv-today.php
asterisk -rx "dialplan reload"

Running the Application. Now you're ready for a test run. Pick up any phone connected to your Asterisk system and dial T-O-D-A-Y. After a brief pause to download the data, today's events in history and today's birthdays will be played back over your phone using your favorite text to speech voice. To eliminate the pause the first time the application is run each day, simply add the crontab entry as outlined above. 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...

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

Asterisk on Steroids: The Orgasmatron Installer, Part IV

If you haven't installed our two dozen turnkey Asterisk® applications in under 5 minutes, it's not too late! We recently introduced our Orgasmatron Installer for PBX in a Flash. And today we wrap up the tutorials with Part IV in this series. Faxing and email work out of the box. More than a dozen extensions and a number of hosting provider trunks are preconfigured. Delivery of CallerID names with numbers is available from over a dozen providers of your choice. ODBC database connectivity is now painless. And the Flite text-to-speech engine is preconfigured with Cepstral TTS only a few keystrokes away. Also included are FreePBX 2.5, Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. Here's the complete list of what 5 minutes of your time brings to this one-of-a-kind Asterisk server platform:

In Part II of this series, we walked you through securing your system and configuring a few of the major applications: AsteriDex, CallerID Superfecta, CallWho, Cepstral, and Emailing with SendMail. In Part III, we covered faxing with nvFax, FONmail, FreePBX backups, the Gizmo5 FreePBX module, setup of Hamachi VPNs, interconnecting Asterisk servers with IAX, setting up on-the-fly conferences, ODBC database implementation, and telephone reminders using a phone or web browser. Today, we'll cover the remaining applications in the Orgasmatron build: Hotel-Style Wakeup Calls, Mondo Full System Backups, Yahoo Newsclips, SIP URI support, TeleYapper, Tide Reports with xTide, Weather Reports by telephone, and how to use the Zaptel updater.

Hotel-Style Wakeup Calls. This application was specifically designed for FreePBX and does just what the name implies. From any phone connected to your PBX, dial *68 and follow the prompts using 4-digit numbers for the desired wake up call times. Then wait for your wakeup call. Doesn’t get much easier than that. There are a number of configuration options which can be set by logging into FreePBX and choosing Admin, Tools, Wakeup Calls. Operator mode lets you specify extensions which can set up wakeup calls for any extension. You also can define the ring time, number of retries, and the time to wait between retries. For the complete tutorial, see this Nerd Vittles article.

Mondo Full System Backups. One of the age-old limitations of Asterisk@Home and now trixbox was the inability to make a full disk backup of your PBX so that it could be restored after a catastrophic event, man-made or otherwise. Tom King solved all of that with his implementation of Mondo Rescue for PBX in a Flash systems. There are numerous options for storing the backups. We prefer using a USB flash drive and rotating between two of them. With falling prices of flash drives, you now can purchase 8GB and 16GB models for peanuts. To enable the backup system, insert a USB flash drive on your PBX. Log into your server as root and type dmesg. Scan through the contents of the display until you find the device name for your USB flash drive. The listing should look something like this:

usb-storage: waiting for device to settle before scanning
Vendor: Kingston Model: DataTraveler 2.0 Rev: PMAP
Type: Direct-Access ANSI SCSI revision: 00
SCSI device sdc: 15874048 512-byte hdwr sectors (8128 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 15874048 512-byte hdwr sectors (8128 MB)
sdc: Write Protect is off
sdc: Mode Sense: 23 00 00 00
sdc: assuming drive cache: write through
sdc: sdc1
sd 8:0:0:0: Attached scsi removable disk sdc
sd 8:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete

In the listing above, it would tell you that your device is named sdc1. In Mondo parlance, this device name would be /dev/sdc1. Your mileage may vary obviously depending upon the type server you are using. Don't guess! Otherwise, you may end up inadvertently formatting (aka erasing) your primary hard disk since this is the first step in the Mondo backup process.

Once you are positive that you have the correct device name for your flash drive, edit /etc/asterisk/disk-backup.conf. Change line 11 to the following: CONFIGURED="1". Then change line 50 to the device name for your flash drive: USBDEVICENAME="/dev/sdc1". Save your changes. Now run a test backup to be sure everything is working properly: /etc/cron.weekly/disk-backup.cron.

You can review the contents of your flash drive by making a script with the following commands. Be sure to make the script executable and use the actual device name for your flash drive:

#!/bin/bash
mount -t vfat /dev/sdc1 /mnt/usbmondo
df /mnt/usbmondo
echo " "
ls -all -h /mnt/usbmondo
umount /mnt/usbmondo

Be aware that Mondo backups may not properly restore on some of the new Atom-based netbooks. A patch has been released by the Mondo development team which we currently are testing. This newer version also supports creation of bootable flash drives as part of the backup process. Stay tuned.

Yahoo Newsclips for Asterisk. This was one of the first Nerd Vittles text-to-speech (TTS) applications for Asterisk, and it remains one of the most popular. To use it, dial 511 from any phone on your Asterisk system. The default setup gives a choice of numerous Yahoo news and sports feeds which will be read to you over the telephone. For detailed setup instructions, see the original Nerd Vittles article. The application, by default, uses the Flite text-to-speech engine. If you have purchased Cepstral, you can easily reconfigure Newsclips for Asterisk to use Cepstral as the TTS engine. Just edit nv-news.php in /var/lib/asterisk/agi-bin and change the $ttspick entry in line 16 from 0 to 1.

Asterisk SIP URI Support. Direct SIP-to-SIP communications is one of the most exciting emerging trends in Internet telephony. Within 10 years, Gartner predicts that 50% of all phone traffic will be pure IP from end to end. You can start using it with your new server to make free phone calls today. All that's really needed is a SIP URI for your server. SIP URI's work just like email addresses except they tell phone systems where to deliver calls over the Internet. The Orgasmatron build preconfigures a number of SIP URI's for you including mothership, e164, and fax. This means that anyone can contact you by "dialing" your SIP URI using either the IP address of your server or a fully-qualified domain name that points to that IP address. A typical SIP URI would look like this: mothership@192.77.210.14. This tells the calling system to route the call to the mothership context on the Asterisk server living at 192.77.210.14. You also can contact the demo applications on your server by dialing nv-demo@192.77.210.24.

The next logical step with SIP URI's is to interconnect your server with a traditional POTS phone number using your SIP URI. You can sign up for a free incoming phone number at ipkall.com. For your account type, choose SIP. For your SIP phone number, enter: mothership. For your SIP proxy, enter the fully-qualified domain name (FQDN) or IP address of your server, e.g. mypbx.dyndns.org. Choose a password and enter your real email address, and ipkall.com will beam you a Washington state phone number within a day or so. Just use it at least once a month, and you've got free inbound calls using a real telephone number forever. You can do much the same thing with Gizmo by signing up for an account using the FreePBX web interface included in the Orgasmatron build. You can't beat the price! For more detail on SIP proxies, see this Nerd Vittles article. To add your new number to directory assistance listings in the United States, just go to listyourself.net and sign up.

The other great use for SIP-to-SIP communications is to register yourself in the ENUM system so that other Asterisk and FreeSwitch systems can translate your plain old telephone number into a SIP URI and place the call SIP-to-SIP without any communications charges. To sign up for the service, go to both 164.org and enumplus.org. It only takes a minute. ENUM is implemented for default outbound calls by default on Orgasmatron builds. This means your server will attempt to place the call for free through ENUM before using your other outbound trunks for which you have to pay a fee to a provider.

TeleYapper. This application is an automated message broadcasting service commonly known as a call blasting or phone blasting system. It is licensed for non-commercial use including the following: to send prerecorded phone messages for neighborhood association announcements, school closings, tornado alerts, little league practices, fund raisers, municipal government reminders, and for just about any other non-commercial purpose. TeleYapper is simple to use. Dial extension M-S-G (674) on your Asterisk system and enter your password. You'll be prompted to record a message. Next you enter the group number for delivery of your TeleYapper message. The system will tell you how many recipients are in the group you have chosen. You then can begin the phone blasting session, or you can choose to resend messages to failed calls on a previous try to the same group. TeleYapper keeps track of which calls were successfully delivered and which were not so that follow-up calls can be placed. For detailed instructions on how to add entries to your TeleYapper database, see this Best of Nerd Vittles article.

Tide Reports with xTide. As the name implies, the xTide for Asterisk TTS application lets you retrieve tide and lunar information about any U.S. port by dialing 8433 (T-I-D-E) from any phone connected to your Asterisk system.

The default port setting for xTide for Asterisk is Pawleys Island, South Carolina. You can change this to meet your needs. There are three steps to reconfiguring the desired port city. First, identify a port city supported by xTide. Second, test the port city you have chosen using the tide application. Third, configure xTide for Asterisk for your desired port city. To identify whether a particular port city is supported by xTide, visit this link and search for the city you wish to use. Once you have verified that your desired location is supported, test it manually with the tide application that was installed as part of xTide for Asterisk. Log into your server as root and issue the command: tide -l "portcity", e.g. tide -l "boston".

Once you have verified that you get a tide report for your chosen city, simply reconfigure xTide for Asterisk to support that destination. While still logged in as root, edit /etc/asterisk/xtide.conf and change the contents to your new city. Be careful NOT to add any blank lines to the config file!

SITE="pawleys"
SITENAME="Pawlees Island, South Carolina"

You'll note that the spelling of the SITENAME was modified slightly to assist the TTS application. Complete details for configuring xTide for Asterisk as well as instructions for changing to Cepstral TTS support are included in the Best of Nerd Vittles article.

Weather Reports by Phone. Three separate TTS weather applications are included in the Orgasmatron build. You can retrieve weather forecasts by zip code and airport code as well as by international city. Dial Z-I-P and enter a 5-digit zip code. Or dial 6-1-1 and enter a three-character U.S. airport code. Or dial 6-1-2 and choose the international city preconfigured in your system. By default, the Worldwide Weather Forecasts for Asterisk application comes preconfigured to support 10 cities around the world. Here's the list:

0 - Tokyo
1 - Washington
2 - Berlin
3 - Florence
4 - Gough Island
5 - London
6 - Moscow
7 - Sydney
8 - Toronto
9 - Zurich

For details on changing the city codes as well as tips in using the other weather applications, see the Best of Nerd Vittles articles.

Miscellaneous Scripts. For your convenience, a script is included to update your zaptel setup whenever you add a card to your system or install a new Linux kernel. You'll find the script in the /root/nv folder on your server: zaptel-update.sh. There's also a script to install A2Billing: install-a2billing. There's also a detailed FAQ to walk you through configuring the Amazon S3 cloud computing service to work with PBX in a Flash as an off-site storage facility: s3cmd.faq. For configuration tips on configuring S3, see this Nerd Vittles article.

CallerID Superfecta 2.1. It's only been 10 days since the new FreePBX-based CallerID Superfecta was released. But wait until you see this new version. The original release of this application included 3 data sources. This one has 15 including the first Canadian source! There are too many new features to mention all of them here, but here's the short list:

1. Added Local Caching to MySQL
2. Retention of Valid Caller ID Name if Provided by Trunk
3. "Automatic" Support for sources requiring authentication
4. Post CID retrieval processing for source scripts
5. Altered whocalled behavior to return textual CallerID info
6. Support for sources with CID and SPAM rankings
7. Enhanced script error reporting in debug interface
8. "Report Back" capability to populate Data sources

You'll have to install this yourself unless you downloaded the Orgasmatron Installer (v1.4) after 5 pm EDT yesterday, May 24. The install instructions are included in the release notes, and it only takes a few seconds. Here's a link to the writeup on the new module on the PBX in a Flash Forum.

Unrelated But Still Interesting. If you're fascinated by all discoveries relating to words beginning with the letters o-r-g-a-s-m, be sure to check out Mary Roach's recent Ted Talk. Enjoy. 🙂

Read Part I and download the software.

Read Part II.

Read Part III.



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