Home » Posts tagged 'asterisk' (Page 49)

Tag Archives: asterisk

The Most Versatile VoIP Provider: FREE PORTING

Programmer’s Paradise: Introducing the VoIP Phone of the Year, Yealink’s T46G

If you’ve been missing the Aastra programming platform these last couple years while America’s patent trolls continued to destroy the software development community in the United States, then you’ll be excited to learn that there’s a new kid on the block with a revolutionary phone. One can’t help wondering what the heck we are doing to ourselves. First, we destroy the programming community with tax breaks for off-shore developers, and then we grant bogus software patents for "inventions" that have been showing in SciFi movies for at least 30 years. Really? </end of rant>

Yealink’s new T46G steps into the VoIP phone spotlight where Aastra left off with a magnificent color screen and every VoIP phone feature you can dream up: HD voice, dual port gigabit Ethernet, POE, Bluetooth headset support, automatic provisioning via FTP/TFTP/HTTP/HTTPS, OpenVPN, STUN, 1,000 user local phone book with photos plus LDAP support, RTP multicast streaming, full-duplex speakerphone with AEC, 27 function keys plus four softkeys and cursor keys not to mention (let the alphabet soup begin) VAD, CNG, AEC, PLC, AJB, AGC, SMS, BLF, SNMP, SRTP, QoS, and on and on. But the most exciting features have got to be complete Asterisk® function support including call hold, DND, MWI, attended and unattended call transfers, voicemail, intercom, paging, and barge plus action URLs and Yealink’s XML web development platform. All of it is integrated into this phone. Virtually anything you could build with PHP and XML on the Aastra phones can now be created on the Yealink platform. It’s simple, non-proprietary, and just works! See the Nerd Vittles sidebar for a terrific deal on these phones if you hurry.

Legal Disclaimer. Our mission today is to introduce you to XML programming on the T46G. This is proof-of-concept code owned by Ward Mundy & Associates, LLC. It is not licensed for use at all without your first consulting a patent attorney and getting a green light to proceed. Then, and only then, you may consider it GPL2 code. In short, the delivered code is to teach programming design basics NOT to step on anybody’s claimed patents. Displaying an RSS news or weather feed or picture on a phone does not qualify as rocket science, but we can’t vouch for whether somebody, somewhere claims to have "invented" it. These sorts of features have been around since at least 1990 with AT&T’s Partner Plus phone system and IBM’s Simon Communicator. That places the features well outside the 20-year patent umbrella. But this is not legal advice, and consider yourself warned. Some of the examples rely upon RSS, XML, or HTML links from other organizations. Specifically, the News and Weather feeds use Yahoo! RSS feeds, the Sports feed uses ESPN’s RSS feed, the PIAF RSS Feed uses the PBX in a Flash security alert system, and the Photo of the Day uses Google+ public links to Lilliphoto’s incredible photography. Check with your attorney and explain your intended use before using any of these apps. Never remove credits from published material of others!

XML 101. XML stands for Extensible Markup Language and is a language used for describing data. It doesn’t really care what the data happens to be. In our case, we want to tell the T46G phone how to do something so we have to follow the XML design rules that the phone understands. These are all covered in Yealink’s XML Browser Developer’s Guide. So Step #1 is to actually write an XML program. Once you’ve written your XML program, then you need to host it on a web server. This could be your PBX in a Flash server which includes an Apache web server, or it could be a hosted web server on the Internet. The advantages to using a web server colocated on a private subnet where your phones reside are that (1) it’s easy to protect your stuff from the NSA and other prying eyes and (2) it’s easy to obtain data directly from your Asterisk server without much risk of compromising the results to strangers. Step #3 is to configure a button on your phone to run the XML application that you’ve deployed on your web server.

Hello World. All programming tutorials begin with a "Hello World" example that shows you how to display something simple on a monitor. On some platforms, capitalization doesn’t matter. On Yealink phones, it does so pay particular attention to the actual syntax required, or your program won’t work. Here’s how you write an XML program called hw.xml to display "Hello World" on your phone when you push a button to run the hw.xml program:

<TextMenu>
<Title>Hello World</Title>
<MenuItem>
<Prompt>Hello World</Prompt>
</MenuItem>
</TextMenu>

If you want to try this on your own server, log into your PBX in a Flash server as root, switch to the /var/www/html directory, create a yealink folder, switch to that folder, and use an editor to create the hw.xml program shown above:
cd /var/www/html
mkdir yealink
cd yealink
nano -w hw.xml

Once you’ve created the text, press Ctrl-X, Y, then Enter to save the file.

Step #3 is to assign the web application to a button on your phone. We’ll use the phone’s web GUI to do that. First, you’ll need the IP address of your phone. Press the OK button from the main screen to obtain it.

Using a web browser, go to the IP address from the previous step. Login to your phone using admin:admin as the username and password (unless you’ve changed it). Click on the DSSKey tab and then click Programmable Key in the left sidebar. Let’s use the Down cursor key to store our program for the time being. You’ll see it in the Key list. Click on the pull-down menu beside the Down key and choose XML Browser for the Type. In the blank field under the Value column, type: http://192.168.0.50/yealink/hw.xml. Substitute the private IP address of your PIAF server for 192.168.0.50. When you’re finished, click the Confirm button at the bottom of the page.

Switch to your phone and press the Down cursor key from the main screen, and Voila! Hello World.

Congratulations. You’re now a G-E-N-U-I-N-E XML Programmer!

PHP Basics. What you can’t do with XML programming is retrieve data from other sources. In other words, XML code is static data. For our examples today, however, we want to retrieve data from other sources and display it on our phone. We need another programming language to do that. PHP happens to be simple, and it’s included on all PBX in a Flash servers so let’s use it. As with XML, you need the programming guide to learn what the commands are. For today, all you need to know is that PHP programs have file names ending in .php and always begin with <?php and always end with ?>. Everything in between has to be a PHP command or function with each line ending with a semicolon. While your Yealink phone’s XML Browser can run PHP programs, it can only understand output that conforms to its XML rules. So the trick is to have your PHP program print out results that are formatted to look like the XML "Hello World" example above. Aside from that, a PHP program can do anything it wants under the covers.

Our "Hello World" hw.php example in PHP to display on the Yealink phone would look like this:

<?php
echo "<TextMenu>\n";
echo "<Title>Hello World</Title>\n";
echo "<MenuItem>\n";
echo "<Prompt>Hello World</Prompt>\n";
echo "</MenuItem>\n";
echo "</TextMenu>\n";
?>

Congratulations. You’re now a G-E-N-U-I-N-E PHP Programmer, too. Two diplomas in one day. WOW!

Yealink Main Menu. Shown above is the main screen which displays when you boot your phone. We’ll walk you through all the steps to get it configured as shown. You will note there are 10 function keys displayed as well as 4 Softkeys. Applications and features that you wish to use can be assigned to one of the 10 function keys, any of the four softkeys, or the cursor keys. Where you place apps that you build matters! Keep in mind that the feature set of the Softkeys below the display as well as the cursor keys will change whenever you place a call or make a menu selection. So it’s probably not a smart idea to place apps that you need during a call on a softkey, or they’ll disappear. You’re not limited to 10 function keys. There actually are 27 available. When you add more than 10, the 10th function key will allow you to scroll through two more screens full of functions. So you actually get 27 functions keys that can be assigned. If you only have 10, then all 10 are shown on the main screen as shown above.

The easiest way to configure Yealink’s Main Menu is through the phone’s web GUI described previously. You’ll find all the options under the DSSKey tab. A word about logos: JPEG wallpaper can be as large as 480×272 pixels; however, you probably don’t want a full screen image because the 10 function key tabs will cover up about 120 pixels on the left and right sides of the image. So leave those two areas as white on your 480×272 image, and you’ll end up with something that looks like the PIAF image above. You can download the PIAF image here. You upload and install it on the Settings tab in the phone GUI.

Yealink XML Basics. The XML platform on the Yealink phone supports several types of display screens, and we’ve tried to provide examples of the more important ones in our News, Weather, Photo of the Day, and Asterisk Phonebook applications. The TextMenu object is just what it says: a list of menu options from which you can make a selection. If you highlight a particular option and press the OK button or some other designated function key, the XML program stored with that menu option is run. If you highlight an option and press a Dial button or the Speakerphone button, a phone number stored with that option is dialed. The InputScreen object is a data entry screen. It lets the user key in a number or text using the numeric keypad in much the same way that you do it on any cellphone. It then passes the results to a PHP program indicating the variable name and its contents. This is what we use in the Weather by ZIP Code application to determine which weather forecast to display. The Directory object is self-explanatory as well. It gives a list of names and numbers and dials the number of the entry chosen by the user. The ImageScreen object displays a JPEG photo with automatic resizing. We built the Photo of the Day app to show you how to do it.

Just a few basics and you then can download the file, accept the license agreement, and take a look at the code. First, we’ve discovered a minor bug in the latest Yealink T46G firmware. The menus and queries hang about 4 out of every 5 attempts unless you configure your phone with a static IP address and set the DNS server addresses manually. We suspect this is a timing issue, but we wanted to alert you to avoid needless frustration in playing with this. Once you’ve taken care of this and installed the software, the initial display by pressing the #10 function key (XML Apps in the screenshot above) will bring up the Applications Menu shown above.

If you have also installed Incredible PBX on your PIAF server, then there are dial options in addition to display options with several of the applications. To initiate a display option, simply highlight a menu selection and press either OK or the Select button. To initiate an actual call, highlight a menu selection and press the Speakerphone button. Phonebook (411), News (951), and Weather by ZIP (947) dial the Incredible PBX apps shown in parentheses. Be advised that the National Weather Service recently revised their Weather by ZIP service. If you need the patch to return your Incredible PBX system to the living, you’ll find it on the PIAF Forum. Incredible PBX 11 and Incredible Pi 3.11 systems were automatically patched for you.

The Asterisk Phonebook option was specifically designed to support those users who have imported their Google Contacts into the Asterisk Phonebook. If you have not yet done this, visit the PIAF Forum to get the script. If you are using a dedicated domain for your Google Apps, there is also a patch to support domains other than gmail.com. When you choose this option, you’ll be prompted to enter a name. First, press the 2aB SoftKey twice to change the keyboard to abc format. Then it works for the alphabet just like your cellphone. Next, enter four or more characters of a first or last name or organization and press Search or OK button. The phonebook app then will find all matching entries in your Asterisk Phonebook. Both the phone number and name entry will be displayed. Highlight the desired choice and press the Speakerphone button to place the call. You will note that only six matches are displayed on the screen even though there is room for more. This doesn’t mean you’ve seen all matches! Just scroll down the list to see the next six entries. If you would prefer to simply say the name of someone in your AsteriDex phonebook and you’ve installed Incredible PBX, then highlight the Phonebook option on the Applications Menu and press the Speakerphone button. Say the name desired when prompted.

The News Headlines option retrieves the Yahoo! RSS News Feed. To display the information on your phone, highlight the News option and press Select or OK button. If you’d prefer to listen to the News headlines and you’ve installed Incredible PBX, then press the Speakerphone button.

The Weather by ZIP Code app retrieves the latest weather information from Yahoo! (text) or the National Weather Service (voice). Simply key in the 5-digit zip code and press Submit or OK to display the current conditions and forecast from Yahoo! If you press the Speakerphone button, you get to listen to the latest update from the National Weather Service.

The Sports Headlines app retrieves the latest sports news from ESPN’s RSS Feed and the Associated Press. Just highlight the option and press Select or OK.

The PBX in a Flash Security Alerts app retrieves the PIAF RSS Feed and displays the latest security bulletins together with links to forum posts documenting the problem and the fix.

The Photo of the Day app displays a collection of photographs from renowned photographer, Midori Chan. It provides an excellent demonstration of the image resolution quality of the Yealink T46G’s screen. In addition, it shows off the auto-sizing capability of the phone. A more practical application might be a collection of PowerPoint slides which could be displayed during a conference call on the phone. The possibilities are endless!

If you scroll up or down the PIAF Apps Menu, you’ll find the bonus SMS Messaging with Google Voice application. It’s also available by pressing SoftKey3 from the results screen within the Asterisk Phonebook app. There are two prerequisites to use this app. First, on your PIAF2 server, you’ll need to install SMS Dictator 2 as well as the SMS Message Blaster app included in that tutorial. These applications both are preinstalled in all versions of Incredible PBX, including the Raspberry Pi edition. Next you’ll need to create gvoice.php in /var/www/html/yealink and enter the username and password credentials for one of your Google Voice accounts. The file should look like this:

<?php
$GVACCT="username@gmail.com";
$GVPASS="yourpassword";
?>

You can take it for a spin by selecting the application from your T46G and plugging in a 10-digit cellphone number plus a brief text message. Click the Submit button to send the messages. Note that replies will NOT be delivered to your phone. Instead, they will go to whatever email forwarding address you used when you set up your Google Voice account. In order to take maximum advantage of the SoftKeys for data entry, you’ll need to use the X button to exit from the SMS application. This button can also be used to exit from any screen on the T46G.

Installing the XML Apps. For those with PBX in a Flash, the installation procedure is simple because Apache and PHP environment with CentOS 6 is already in place. Log into your server as root and issue the following commands to get everything in place:

cd /
wget http://pbxinaflash.com/PIAF4yealink.tar.gz
tar zxvf PIAF4yealink.tar.gz
rm PIAF4yealink.tar.gz

Configuring the Yealink T46G. Using a browser, open the phone GUI by pointing to the IP address of your phone. Press the OK button if you’ve forgotten your phone’s IP address. Login with admin:admin. Click the DSSKey tab and select Line Key 10-18 in the left sidebar. For Line Key10, choose XML Browser from the Type pulldown. Beside it in the Value column, enter the following using your server’s IP address: http://192.168.0.222/yealink/piaf.php. In the Label column, type: XML Apps. Now click the Confirm button to save your entries. After complying with the license agreement in /var/www/html/yealink/COPYING, you can take the apps for a spin by pressing Function Key 10 on your Yealink T46G. You can download a number of additional T46G apps from the T46G thread on the PIAF Forum.

Conclusions. With a phone as new as the T46G, we were more than a little skeptical of the XML programming platform that Yealink was providing. We were pleasantly surprised. Except for one typo in the documentation, the XML code was flawless and performed exactly as documented in Yealink’s excellent documentation. These six sample apps barely scratch the surface of what is possible using these new phones. We’ll look forward to seeing what others can produce in coming months. It’s great to have a terrific new VoIP phone to support future open source development. And the stunning color display is simply icing on the cake. Enjoy!


Deals of the Week. There are a couple of amazing deals still on the street, but you’d better hurry. First, for new customers, Sangoma is offering a board of your choice from a very impressive list at 75% off. For details, see this thread on the PIAF Forum. Second, a new company called Copy.com is offering 20GB of free cloud storage with no restrictions on file size uploads (which are all too common with other free offers). Copy.com has free sync apps for Windows, Macs, and Linux systems. To take advantage of the offer, just click on our referral link here. We get 5GB of extra storage, too, which will help avoid another PIAF Forum disaster.

Originally published: Monday, July 15, 2013



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


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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



Some Recent Nerd Vittles Articles of Interest…

The Future of VoIP Telephony in an Asterisk World

If you don’t think there’s a telephony revolution underway, then take a look at this year’s crop of new VoIP telephones. No doubt that Alexander Graham Bell would be a happy camper. We’ve picked three of our favorites to take for a spin this week. Pictured above (left to right) are the Mocet Communicator, Grandstream’s GXP2200, and Yealink’s T46G. These three devices offer three dramatically different, but equally effective, approaches to the future of VoIP telephony.




The Mocet Communicator is what we’d call a BYOI (bring-your-own-iPad) device. With it, you get a full-featured HD telephony platform plus all the feature comforts of a full-fledged iPad including Skype, a variety of free messaging apps such as iMessage and FaceTime, Google Voice featuring GV Connect, and any other app of any type you choose to install on your iPad. After installing the free IP Commander app from the App Store, the phone interconnects with iOS and your iPad seamlessly. It’s a one-minute operation to set up a SIP connection with PBX in a Flash™, Incredible PBX™, and Asterisk®. For the ultimate in ease of use, the FreePBX™ (commercial) EndPoint Manager fully supports all the Mocet devices. EPM is the best $25 you could ever spend on your server. The phone itself worked flawlessly inside a private LAN as well as from a remote site with either a direct IP connection or VPN connection to home base. For the ultimate in flexibility, you can add an inexpensive WiFi adapter. HD Voice quality with even an entry level DSL connection was spectacular. And, if the wow factor of causing your nerdy friends to wet their pants is a consideration, then this is the hands-down winner. Click this link for a rundown of the impressive feature set. Incidentally, you can still receive calls and make emergency calls even without the iPad connected.

Now let’s turn to what PBX in a Flash, Incredible PBX, and Nerd Vittles bring to the table with this new phone. We actually configured the "Red Hotline Button" a little differently than President Obama. Ours dials the Nerd Vittles CallWho™ application. The app is included in all Incredible PBX bundles as well. CallWho lets you place hands-free calls from your AsteriDex phonebook using simple voice commands. You can click on the YouTube video above for a one-minute demo.

If the Mocet Communicator has a drawback, it’s probably price, but hopefully that will improve in the next few months. The device itself retails for $229.95 with free 2-day Prime shipping using our Amazon link.1 Adding an iPad will set you back another $300+, but we love this phone. Its novel approach to hybrid VoIP technology is clearly the future direction of VoIP telephony, and the Mocet software will only get better with time.

Grandstream’s GXP2200 is proof positive that these hybrid VoIP phones are the wave of the future. Nerd Vittles reviewed this phone last November, and the feature set continues to improve. The GXP2200 is another approach to hybrid VoIP technology with Android serving as the base operating system for the phone itself. This brings you the best of all worlds for under $200 with no additional tablet to purchase. And you still get a terrific HD Voice platform with all the comforts of Android under the hood. See the Amazon link in our sidebar for the latest pricing. As with the Mocet Communicator’s iOS integration, Android brings a wealth of applications to the GXP2200 desktop including Skype, Facebook and Facebook Messenger, GrooVe IP for Google Voice, OBiON for free calling through any OBi device, dozens of additional messaging apps, and your choice of literally thousands of apps from the Google Play Store and Grandstream’s GS Market which features applications specifically tailored for the GXP2200. Since our original article appeared, Grandstream has released the expansion module for this phone. The addition of the 40-button sidecar with full BLF support for under $100 makes this a near perfect desktop phone for use with Asterisk. It’s one of a select few phones that we personally use all day, every day. It supports six SIP connections, and we use it to connect to several PBX in a Flash, RentPBX, and Incredible Pi servers scattered across the U.S. as well as a few SIP subaccounts hosted at Vitelity, VoIP.ms, and les.net. Performance is nearly flawless!

Yealink’s T46G Executive IP Phone may still be our top pick even with the new generation of hybrid phones. See the Nerd Vittles sidebar for an incredible deal on this phone with a show-stopping feature set: HD Voice, dual-port gigabit Ethernet connections, USB support for Bluetooth and WiFi (soon), integrated POE support plus included power adapter, multiple phonebook options with up to 1,000 entries, VLAN and OpenVPN integration, 10 line keys with 27 programmable buttons, SRTP encrypted communications, and a stunning color display. Two years ago this would have been a $500 phone, and now it’s a lunch tab away from the price of Digium’s entry-level SIP phone. Pretty amazing. For the latest tips and tricks in getting the T46G properly configured, come join the PIAF Forum discussion.

UPDATE: Having now used the T46G for a few days, our first impression is that this phone is an industrial-grade, feature-rich, state-of-the-art SIP device with all of the feature comforts a large organization would want in rolling out a new company-wide phone system. Sophisticated server redundancy is built into the phones to support automatic failover to a backup VoIP server in the event of a catastrophic system failure. Encrypted SRTP communications as well as OpenVPN support is integrated into each phone. The T46G also includes the XML programming functionality available in the Aastra and Digium phones. You can try out our demo XML apps by visiting the PIAF Forum. In addition, basic web server interaction is provided through event triggers on the phone that can generate Action URIs to receive and process HTTP GET requests and Action URLs to send HTTP GET requests when a specified telephone event occurs.

The phonebook implementation is exactly what a large organization would want: three phone numbers plus a phone, ring tone, and group entry per person plus customizable accounts and groups. Import and export of XML or CSV data through a web interface is a snap. In fact, the CSV format even supports export of images linked to every phonebook entry. For a large organization, it means the HR department could maintain a single phonebook database of up to 1,000 records with photos of every employee. That database then could be pushed to every phone in the organization by one HR employee using a web browser without ever touching or rebooting a single telephone. LDAP directories are also supported for the purists. Enjoy!





Deals of the Week. There are a couple of amazing deals still on the street, but you’d better hurry. First, for new customers, Sangoma is offering a board of your choice from a very impressive list at 75% off. For details, see this thread on the PIAF Forum. Second, a new company called Copy.com is offering 20GB of free cloud storage with no restrictions on file size uploads (which are all too common with other free offers). Copy.com has free sync apps for Windows, Macs, and Linux systems. To take advantage of the offer, just click on our referral link here. We get 5GB of extra storage, too, which will help avoid another PIAF Forum disaster.

Originally published: Tuesday, July 9, 2013



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


 

Don’t miss the first-ever FreePBX World on August 27-28 at the Mandalay Bay in Las Vegas. For complete details, see this post on the FreePBX blog.


 


We are pleased to once again be able to offer Nerd Vittles’ readers a 20% discount on registration to attend this year’s 10th Anniversary AstriCon in Atlanta. And, if you hurry, you also can take advantage of the early bird registration discount. Here’s the Nerd Vittles Discount Code: AC13NERD.


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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



Some Recent Nerd Vittles Articles of Interest…

  1. Many of our purchase links refer users to Amazon when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from Amazon to help cover the costs of our blog. We never recommend particular products solely to generate Amazon commissions. However, when pricing is comparable or availability is favorable, we support Amazon because Amazon supports us. []

Triple Treat: Some Asterisk Utilities to Brighten Your Summer

[purehtml id=12]

If you live and breathe Asterisk® but don’t visit the PIAF Forum regularly, you’re missing one of the best VoIP resources on the Internet. To get everyone in the Independence Day mood, we thought we’d share a few of the new goodies that have appeared on the PIAF Forum since The Great Crash of 2013. Although each of these utilities was designed to support PBX in a Flash™ and Incredible PBX™ systems, with a little tweaking, they’ll work equally well on other CentOS 6-based Asterisk servers of any flavor so long as the base version of Asterisk is at least 1.8. They also run just fine with Incredible PBX for the Raspberry Pi.

Import Google Contacts into Asterisk Phonebook. For everyone still using Gmail after the NSA disclosures, this app is for you. Now you can share your Google Contacts with Asterisk as well as the NSA. The beauty of this utility is that it also makes your Google Contacts available as a CallerID Name lookup source for CallerID Superfecta. So all of those cellphone numbers in your contacts will now display real CallerID names when those folks call you. Our special tip of the hat to John Babb for producing the original script and to @raphou for finding it and sharing it with the PIAF community.

Before you can import your Google Contacts into the Asterisk Phonebook, you first need to install Google’s gdata Python client. Just log into your server as root using an SSH client and issue the following commands:

cd /root
mkdir Google
cd Google
wget https://gdata-python-client.googlecode.com/files/gdata-2.0.18.tar.gz
tar zxvf gdata*
cd gdata*
chmod +x setup.py
./setup.py install
wget http://pbxinaflash.com/googlecontacts.py
nano -w googlecontacts.py

Once the editor opens, you need make a couple changes in googlecontacts.py. NOTE: We’ve adjusted the original code for use in the United States. If you’re living elsewhere, then grab the original code on the PIAF Forum.

The code you downloaded looks like this (plus some required indentation):
#!/usr/bin/python
# googlecontacts.py v0.1
# By: John Baab
# Email: rhpot1991@ubuntu.com
# Purpose: syncs contacts from google to asterisk server
# Requirements: python, gdata python client, asterisk
#
# License:
#
# This Package is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this package; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# On Debian & Ubuntu systems, a complete copy of the GPL can be found under
# /usr/share/common-licenses/GPL-3, or (at your option) any later version

import atom,re,sys,os
import gdata.contacts
import gdata.contacts.service

def main():
# Change this if you aren't in the US. If you have more than one country code in your contacts,
# then use an empty string and make sure that each number has a country code.
country_code = ""

gd_client = gdata.contacts.service.ContactsService()
gd_client.email = "yourname@gmail.com"
gd_client.password = "your_password"
gd_client.source = 'gcontact2ast'
gd_client.ProgrammaticLogin()
query = gdata.contacts.service.ContactsQuery()
query.max_results = 1000
feed = gd_client.GetContactsFeed(query.ToUri())

# delete all of our contacts before we refetch them, this will allow deletions
os.system("asterisk -rx \'database deltree cidname\'")

# for each phone number in the contacts
for i, entry in enumerate(feed.entry):
for phone in entry.phone_number:
# Strip out any non numeric characters
phone.text = re.sub('\D', '', phone.text)

# Remove leading digit if it exists, we will add this again later for all numbers
# Only if a country code is defined.
if country_code != "":
phone.text = re.sub('^\+?%s' % country_code, '', phone.text)

# Insert the number into the cidname database, reinsert the country code if defined.
os.system("asterisk -rx \'database put cidname %s%s \"%s\"\'" % (country_code,phone.text,entry.title.text))

if __name__ == "__main__":
main()

Before you save the script, you’ll need to make a few adjustments. First, insert your actual Gmail account name and password in lines 37 and 38. If you’re using 2-step authentication with your Google account, remember to generate and use an application-specific password. Your regular password won’t work! Second, if your Google Contacts include more than 1,000 phone entries, adjust the default setting on line 42. Now save the script: Ctrl-X, Y, then Enter. Then make the script executable: chmod +x googlecontacts.py.

Now you’re ready to import your Google Contacts. Just issue the following command: ./googlecontacts.py

You can check whether the import was successful by displaying a list of all the new entries in your Asterisk Phonebook. Here’s the command:

asterisk -rx "database show cidname"

Want to import entries from more than one Google account? It’s easy. Just make a duplicate of the script and repeat the setup process above with your new credentials. You’ll also need to comment out line 46 in the second script so that your previous import doesn’t get wiped out of the Asterisk Phonebook when you run the second script. Just make a mental note to run the scripts in the proper order whenever you wish to update your Asterisk Phonebook.

UPDATES: There’s now an Asterisk Phonebook app for Yealink T46G Color SIP phones. Once installed, you can look up and call numbers in your Asterisk Phonebook by pressing a button on your phone. Read all about it and download the app from the PIAF Forum.

For those using Google to host your own domain, there’s now a patch to let you import your Google Contacts into the Asterisk Phonebook as well. See this post on the PIAF Forum for the procedure.

If you’d like to keep your Asterisk Phonebook sync’d with your Google Contacts, then run the script every night by inserting the following line in /etc/crontab:

9 0 * * * root /root/Google/gdata-2.0.18/googlecontacts.py >/dev/null 2>&1

Now that you have your contacts imported, we need to adjust CallerID Superfecta so that incoming calls are scanned for a phone number match using the Asterisk Phonebook. Using a web browser, open FreePBX® and choose the CallerID Superfecta application. Modify CallerID Superfecta Lookup Sources in FreePBX to include Asterisk Phonebook. Make certain the Asterisk Phonebook entry appears near the top of the list so that it gets examined before any external lookup sources. This speeds up incoming call connections considerably.



Email Daily Call Log to Yourself. Many have requested a simple way to have a snapshot of your incoming daily calls emailed to the Asterisk administrator each day. Special thanks to @Boolah for the code. Using any PIAF system, simply create a file in /root called cdrlog.sh that looks like this:

#!/bin/bash
mysql -u root -ppassw0rd asteriskcdrdb -e 'SELECT calldate, clid FROM cdr WHERE DATE(calldate) = SUBDATE(CURDATE(), 1) AND did <> ""'

For Incredible PBX for the Raspberry Pi, the script should look like this:

#!/bin/bash
mysql -u root -praspberry asteriskcdrdb -e 'SELECT calldate, clid FROM cdr WHERE DATE(calldate) = SUBDATE(CURDATE(), 1) AND did <> ""'

Make the script executable: chmod +x /root/cdrlog.sh

Then run the script: /root/cdrlog.sh

If you’d like the listing of the previous day’s calls emailed to you each day, then add the following entry to /etc/crontab after inserting your actual email address:

8 0 * * * root /root/cdrlog.sh | mail -s "Daily Call Log" yourname@gmail.com >/dev/null 2>&1


Trunk Failure Email Alerts. One of the most frequently requested scripts on the PIAF Forum has been a utility which would alert you when one of your Asterisk trunks has failed. So here you go. This script monitors SIP, IAX2, and Google Voice trunks and sends you an email whenever one or more of the trunks fails. Just download the script, insert your email address at the top of the script, and add an entry to /etc/crontab to check the trunks as often as desired. The default setting is every 5 minutes.

cd /root
wget http://pbxinaflash.com/trunkcheck.tar.gz
tar zxvf trunkcheck.tar.gz
nano -w trunkcheck.sh
echo "5 * * * * root /root/trunkcheck.sh > /dev/null 2>&1" >> /etc/crontab


MP3 Playback of Voicemails with Optional Transcription. And we have a bonus application for you as well. By default, Asterisk voicemails that are delivered to your email address won’t play back on many computers and smartphones. This script fixes that while also providing the option to transcribe the first 15 seconds of the message into text. We’ve only tested this with PIAF-Green with Asterisk 11, but it also should work just fine with Incredible PBX 11 for the Raspberry Pi. To install it, log into your server as root and issue the following commands. If you want to activate the transcription feature, edit the downloaded script and change transcribe=0 to transcribe=1.

cd /root
wget http://pbxinaflash.com/installmp3stt.sh
chmod +x installmp3stt.sh
./installmp3stt.sh

Once you have run the installation script, you’ll need to make a couple of adjustments in the FreePBX GUI. Log into FreePBX 2.11 and choose Settings, Voicemail Admin, Settings and make the following changes:

format: wav|wav49
mailcmd: /usr/sbin/sendmailmp3

Now leave yourself a voicemail message after making certain that you’ve entered an email delivery address for the extension. Enjoy and Happy Fourth!


Deals of the Week. There are a couple of amazing deals still on the street, but you’d better hurry. First, for new customers, Sangoma is offering a board of your choice from a very impressive list at 75% off. For details, see this thread on the PIAF Forum. Second, a new company called Copy.com is offering 20GB of free cloud storage with no restrictions on file size uploads (which are all too common with other free offers). Copy.com has free sync apps for Windows, Macs, and Linux systems. To take advantage of the offer, just click on our referral link here. We get 5GB of extra storage, too, which will help avoid another PIAF Forum disaster.

Originally published: Wednesday, June 26, 2013



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


 

Don’t miss the first-ever FreePBX World on August 27-28 at the Mandalay Bay in Las Vegas. For complete details, see this post on the FreePBX blog.


 


We are pleased to once again be able to offer Nerd Vittles’ readers a 20% discount on registration to attend this year’s 10th Anniversary AstriCon in Atlanta. And, if you hurry, you also can take advantage of the early bird registration discount. Here’s the Nerd Vittles Discount Code: AC13NERD.


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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



Some Recent Nerd Vittles Articles of Interest…

Here We Go Again: Getting Ready for the Next Google Voice Train Wreck


Self-inflicted wounds are nothing new in the technology business, but Google spent much of last week working hard to take top honors for what is clearly one of the most selfish and short-sighted moves ever in the telecommunications marketplace. Less than a week after extolling the values of open source technology during Google I/O 20131, Google wasted little time performing a complete 180 by deep sixing further support of the open source XMPP protocol for messaging and VoIP communications. With one brief announcement, Google basically killed off years of Google Voice development and announced the upcoming demise of Google Voice, XMPP, and Jabber messaging as we know it. Never mind that literally millions of users have come to rely upon Google Voice and XMPP messaging as their primary sources of communications. Google now has declared XMPP too confining for their view of what the telecommunications world really needs. Instead, we get yet another proprietary communications protocol. So much for the Do No Evil ethos. With classic pot calling the kettle black ire, one of Microsoft’s leading cheerleaders wasted little time condemning the move.

So why the sudden change of heart at Google? Well, it had nothing to do with the needs of Google customers obviously. In the old days, Google at least labeled projects as beta (for years) to warn you that something might happen down the road, good or bad. That era is over. Now the carnage happens almost randomly. Remember Google knols? It was perhaps the greatest collection of medical and technical literature of all time. Poof! All gone. We won’t go through the entire litany. Suffice it to say, this is nothing new for Google. Every company is entitled to its New Coke moment. Google has had more than its fair share, and it should serve as a wakeup call to organizations and individuals that reliance upon Google infrastructure is a really bad idea.

The current train wreck turns out to be yet another turf war motivated by retribution against Microsoft’s recent decision to support XMPP in its Outlook.com unified messaging product, something most companies would have greeted with jubilation. Instead, Google is miffed that Microsoft was now supporting its messaging protocol while continuing to keep its own protocol proprietary. That meant Microsoft cellphones could chat with Android phones but not the other way around. The moral of the story for consumers is pretty simple. Don’t for a minute assume that any technology company has your best interests at heart. None of them do. It’s all about money and industry domination. Google viewed this as a brazen attempt by Microsoft to create a messaging platform that could speak Android while continuing to restrict access to the Microsoft messaging installed base. And Google chose to pick up its marbles and go home rather than hand Microsoft easy access to hundreds of millions of Android cellphone users. So we’re back to handing the Bell Sisters the unified messaging monopoly with SMS and MMS as the lowest common denominator. Welcome to Big Business!

What does all of this have to do with Google Voice? Well, it rides along on the same messaging platform as Google Talk, Microsoft Lync, and XMPP/Jabber-based solutions including Asterisk, FreeSwitch, Yate, Cisco Jabber, Openfire, and Avaya in addition to all of the Google Voice-compatible softphones and OBiHai devices. So expect a train wreck!

We’re all about VoIP communications so we’ll leave the cellphone messaging for others to sort out. The important question for those of us that depend upon Google Voice for VoIP communications is what can you do to insulate yourself from the upcoming disaster. You can bury your head in the sand and pretend this isn’t going to happen, and you’d be dead wrong for the reasons we’ve outlined above. And, remember, Google has served clear notice that XMPP is over as far as they are concerned unless Microsoft, Apple, and now Facebook blink. Of course, Google could always redeploy SIP for Google Voice calling. If you think any of that is likely to happen, you also might want to buy a lottery ticket which affords you about the same chance of seeing any of your dreams come true.

To keep things simple, let’s divide VoIP communications into four categories: inbound calling, outbound calling, messaging, and faxing. We’ll leave video for another day only because it remains a niche product. With the demise of Google Voice, we recommend not putting all of your eggs in one basket (again). Inbound calling is the most critical. That’s your phone number, and it’s how folks get in touch with you. If there are numbers (DIDs) that you don’t want to lose, now is the time to move them away from Google Voice before it’s too late. If Google elects to shut down Google Voice, your ability to port your numbers elsewhere is OVER! So don’t procrastinate on this one. Luckily, Vitelity (one of the primary supporters of Nerd Vittles and the PBX in a Flash projects) has provided an incredible deal to our fan club for many, many years. For $3.95 a month you get a DID with unlimited inbound calls. It’s not free, but it’s not expensive either. And the call quality and service reliability are as good or better than anyone else in the business. You can read all about the offer at the end of this article. Google charges $3 to port your number out of Google Voice to a new provider. The step-by-step tutorial is available in the PIAF Forum. Do it while you still can!

For outbound calling (terminations), the thought process is different. Unlike traditional analog telephony, there is no reason not to have multiple providers especially if you’re using Asterisk, PBX in a Flash, or Incredible PBX as your communications server. If one outbound path fails, your server can automatically send the calls out through another call path. So continue to cling to your Google Voice dream for outbound calling if you’re a Believer. But do a little advance planning while there’s no crisis. There are numerous termination providers and generally you get what you’re willing to pay for. If cheap is your primary objective and call quality is secondary, then Anveo Direct and VoIP.ms can’t be beat. Both allow you to spoof your CallerID to match a DID that you own so they work well with a service such as Vitelity that is being used to handle your inbound calls. We’ve written about both of them, and we use both of them with excellent results. There are many, many others. Visit the PIAF Forum for lots of additional recommendations.

SMS messaging is an evolving technology in the VoIP marketplace. Expect to see some terrific new services before the summer is over. If you’re in a hurry, the easiest current solution to implement is through Anveo Direct. Our recent article will walk you through the setup process to send and receive SMS messages with Asterisk.

Faxing remains a crap shoot using VoIP technology. If you want commercial quality, then choose one of Vitelity’s dedicated fax circuits. If you want analog faxing that usually works, then Anveo Direct and VoIP.ms are about as good as you can do. All versions of Incredible PBX for PBX in a Flash include a free faxing solution using the HylaFax/ AvantFax platform. A similar solution is provided on the Raspberry Pi platform. As we said, it’s not perfect but it usually works.

Continue reading Part II: Google Puts the Final Nail in the Google Voice Coffin

Originally published: Monday, June 3, 2013



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 for all of us.



 

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. Larry Page reportedly commented as follows: "I’ve personally been quite sad at the industry’s behavior around all these things. If you take something as simple as IM, we’ve had an open offer to interoperate forever. Just this week Microsoft took advantage of that by interoperating with us but not doing the reverse. Which is really sad and not the way to make progress. You can’t have people milking off of just one company for their own benefit…" []

The SIPaholic’s Dream Come True: Introducing Anveo Direct

We’re incredibly happy with the current list of providers that we recommend to PBX in a Flash™ users for VoIP trunking. At the top of our list is Vitelity, a leading VoIP provider that has been a major contributor to the Nerd Vittles and PBX in a Flash projects for many years. But, as often happens, one of our gurus on the PIAF Forum comes up with a terrific discovery that we just can’t wait to pass along. This week it was @w1ve who stumbled upon a new Anveo® Direct service for end-users with a special DID and SIP trunk offer. While the sub-account flexibility of Vitelity and some of the other providers is sorely missing, Anveo Direct does provide end-users with many of the same routing tools and SIP feature set that previously were reserved for use by major carriers. If you don’t believe some of the competition is less than thrilled, read this message thread on dslreports.com. And, until June 1, you can order DIDs in almost any U.S. region for 50¢ a month per DID with no setup fee. With Anveo Direct Value, that 50¢ buys you two trunks with 400 free incoming minutes a day. Outbound calls are pay-as-you-go and vary depending upon where you’re calling. Typical U.S. rates are $.001 to $.0055 per minute with least cost routing and automatic failover when a particular carrier’s route is having problems. As a point of reference, sending a one-page fax using Incredible Fax costs less than a penny and worked flawlessly using Anveo’s least costly routes.

DIDs also are available in more than 50 countries around the world, and all setup fees are waived until June 1. Most European DIDs are $1 or less per month. You’ll find the complete price list here. It’s worth mentioning that the 400 free incoming minutes a day applies collectively to all of your DIDs, not individually to each one. Additional incoming calls each day are billed at a penny a minute. The alternative is to purchase dedicated Anveo Direct trunks which provide unlimited inbound calling (one call at a time) for a monthly charge of $17 per trunk (worldwide), $11.25 per trunk (U.S. and Canada), or $6.50 per trunk (most of Europe). Monthly DID prices then are roughly 50% less.

Another nice surprise is that most of the DIDs include SMS messaging support. Incoming SMS messages are billed at a penny per message. Outbound SMS messages are routed through Europe and are billed at 4.4¢ per message. Unlike most providers, Anveo gives you the flexibility to configure your carriers and routes in almost any way you like. And there’s no proxy media so voice calls are passed directly from the carrier to your SIP endpoint. Anveo actually began as a wholesale provider of Voxbone services. With Anveo Direct, virtually all of the functions offered to commercial providers are now available to everybody. Along with fully redundant architecture and automatic SIP failover, Anveo offers you a choice of POPs in New York and Los Angeles as well as in Germany, Belgium, and China.

I know. I hear some of you saying, "Why would I want to pay good money for a DID when U.S. and Canadian calls plus the DIDs that Google Voice currently provides are all free?" Setting aside the ups and downs of Google Voice with Asterisk® over the years, it’s worth remembering that good things don’t last forever, and the word on the street is that Google’s generosity ship may be about to sail. In fact, it already has with worldwide iNum calls which Google originally handled for free. Now they’re 3¢ a minute even when calling across the street. Also keep in mind that, with VoIP, it costs you almost nothing to have a number of backup providers in place for that rainy day.

If you’ve used IPkall that provides free DIDs in the Seattle area with call routing to any SIP URI, then you will be generally familiar with the setup process for Anveo DIDs. There is no registration facility with Anveo Direct. Incoming calls to your DID are routed to SIP URIs of your choice. Outbound calls are sent to a SIP URI with a 6-character alphanumeric passcode of your choice. If this is all Greek to you, keep reading or stick with Vitelity. :wink:

Configuring a Destination SIP Trunk for Use with Anveo Direct

Before you can successfully configure a DID at Anveo Direct, you’ll first need to set up a SIP URI on your PIAF™ server. There are four initial steps: (1) enabling SIP URI access in your IPtables firewall, (2) mapping UDP 5060 to the IP address of your Asterisk server in your hardware-based firewall, (3) creating a SIP trunk for Anveo in FreePBX®, and (4) creating a custom context for incoming SIP URI calls from Anveo Direct.

Step #1: Just a couple of words of warning before we begin. You’ll need to open port 5060 on your hardware-based firewall and point it to your Asterisk server to use a SIP URI. Before you do that, make certain that you’ve installed Travelin’ Man 3 for PBX in a Flash which blocks inbound SIP connections except from trusted providers. Once Travelin’ Man 3 is installed, you’ll need to add Anveo Direct to your list of trusted providers for SIP connections (UDP 5060) with this command:

/root/add-ip anveo1 50.22.101.14
/root/add-ip anveo2 67.212.84.21
/root/add-ip anveo3 176.9.39.206
/root/add-ip anveo4 72.9.149.25
/root/add-ip anveo5 50.22.102.242
/root/add-ip anveo6 204.216.109.55

If you’re generally familiar with IPtables, you can add the following block of code directly:

-A INPUT -s 50.22.101.14/32 -p udp -m udp --dport 5060:5069 -j ACCEPT
-A INPUT -s 67.212.84.21/32 -p udp -m udp --dport 5060:5069 -j ACCEPT
-A INPUT -s 176.9.39.206/32 -p udp -m udp --dport 5060:5069 -j ACCEPT
-A INPUT -s 72.9.149.25/32 -p udp -m udp --dport 5060:5069 -j ACCEPT
-A INPUT -s 50.22.102.242/32 -p udp -m udp --dport 5060:5069 -j ACCEPT
-A INPUT -s 204.216.109.55/32 -p udp -m udp --dport 5060:5069 -j ACCEPT

Once you’ve completed this step, restart IPtables: service iptables restart. Then run: iptables -nL. Make certain that all of the above IP addresses are in the trusted providers list. Do NOT proceed until you’re sure your server is protected! It’s your phone bill.

Step #2: Now access your hardware-based firewall and map incoming UDP port 5060 traffic to the IP address of your PBX in a Flash server. The exact steps vary slightly depending upon the type of router you have. Look for a tab that deals with redirecting Internet traffic through your router to destination IP addresses.

Step #3: Using a web browser, open the FreePBX Administration GUI by pointing to the IP address of your server. In FreePBX 2.10 and 2.11, choose Connectivity -> Trunks -> Add SIP Trunk. Create an entry that looks like the following removing any other entries in the User Details section of the form. Then save your settings and update the dialplan. If you don’t have success with our settings, try the ones recommended by @w1ve.

Repeat this process by creating five additional SIP trunks named anveo-2, anveo-3, anveo-4, anveo-5, and anveo-6 using the other four IP addresses that Anveo uses to route SIP calls: 67.212.84.21, 176.9.39.206, 72.9.149.25, 50.22.102.242, and 204.216.109.55.

NOTE: If using a PJsip trunk, add these IP addresses in the trunk’s Match= field.

Step #4: Log into your server as root with SSH, and edit /etc/asterisk/extensions_custom.conf. Add the following code to the bottom of the file and save your changes. Then restart Asterisk: amportal restart.

[from-anveo]
exten => _.,1,Ringing
exten => _.,n,Goto(from-trunk,${SIP_HEADER(X-anveo-e164)},1)

Just a word of explanation about why we’re using a custom trunk context for Anveo rather than using the standard from-trunk entry. Because of its environment, Anveo doesn’t pass the DID of the trunk in the traditional way.1 Instead, it passes the DID in a customized SIP header as shown above. If you used from-trunk as the destination for the incoming calls, then FreePBX would process the call using the Default Inbound Route which most sane people map to Hangup or Congestion. By using the custom context above, we can grab the actual DID and use it for FreePBX routing purposes. For Anveo purposes, the actual SIP URI we’ll be using is serverDID@serverIPaddress where the 1904… number in the example is your actual DID which we’ll obtain in the next section. If you have a fully-qualified domain name for your server, you can use that after the @ symbol instead of your server’s public IP address.

Configuring a DID in Anveo Direct

Now that we have almost everything in place on your server, we’re ready to begin today’s adventure with Anveo. For openers, you’ll need to register for an account at Anveo Direct. It’s a simple process. Just click on the Get Started icon on the website and follow your nose. Once you’ve registered and confirmed your email address, login to your account and you’ll find a 60¢ credit for experimentation. Since you can purchase a DID for 50¢ and because it’s prorated to the 15th of this month, you’ll have plenty of money to test out the service without spending a dime.

There are three steps to complete on the Anveo site: (1) purchase a DID, (2) create a SIP URI which will be used to route the calls from a specific DID to your server, and (3) configure the DID to route calls using the SIP URI created in the previous step.

Step #1: If you haven’t already done so, log into your Anveo Direct account. Then purchase a DID in your favorite town. From the Inbound Service pulldown, choose Order Anveo Direct DID. Just fill in the blanks after choosing your desired DID.

Step #2: Choose Inbound Service -> Configure Destination SIP Trunks -> Add a New SIP Trunk. Fill in the blanks as shown below using the DID you created in step #1. Be sure to use the complete DID number. Either an IP address or FQDN is fine after the @ symbol. Then click SAVE.

If you read the "hint" in the form, you will note that you can replace the actual DID number (1904… in our example) with $[E164]$ to make the SIP URI generic. Then you don’t have to create separate SIP URI entries for every DID you purchase. We’re pleased to report that it works as advertised, and we’re using it in our sample trunk so you can try it for yourself.

NOTE: For those using some Incredible PBX builds in which PJsip is assigned port 5060 and chan_sip is assigned port 5061, you should make an adjustment in your incoming dial string: $[E164]$@serverIPaddress:5061.

Step 3: From the Inbound Service pulldown, choose Configure Anveo DIDs. Click on the EDIT tab beside the DID you wish to configure. You’ll get a form that looks like the following:

Choose the Call Options tab and select the SIP URI that you configured in Step #2. Click SAVE.

Choose the Geo. Pop tab and select the POP server closest to you. Click SAVE.

Choose the Codecs tab and select the codecs you wish to enable. We recommend using only G.711u until you’re sure everything is working correctly. Click SAVE.

Completing the FreePBX Setup for Anveo Direct

We’re almost finished. The last step is to create an Inbound Route in FreePBX for the DID you just purchased from Anveo Direct. So jump back over to FreePBX in your browser. Choose Connectivity -> Inbound Routes -> Add Incoming Route. Fill out the form using the complete DID Number, e.g. 1904… Choose a Destination for Incoming Calls that works on your server. It could be an extension, a ring group, an IVR, or any other resource that’s available. In our example, we’ve chosen the Weather Underground application from Incredible PBX. Save your settings and update the dialplan.

Now you’re ready to place your first call, or you can call the number shown above to try out our demo system using Anveo. Ignore the + symbol when dialing calls. It’s not necessary.

Making Outbound Calls with Anveo Direct

If you also want to use Anveo to place outbound calls, all of the rates are per minute. The rate tables can be downloaded from here. Before you can place outbound calls, you’ll need to create a Call Termination Trunk under Outbound Service. In the form, you set up a 6-character code for access to the SIP URI and also specify the IP addresses from which calls can be placed. A sample is shown below. You obviously need to create a VERY secure access code. The code must begin with a zero and may contain any number as well as A-Z and a-z for each character. Once you’re finished, SAVE your settings. This is the area where Anveo’s Least Cost Routing methodology really shines. If you’re cheap (like us), use the settings shown. If you prefer higher quality trunks, change the Carriers to All Carriers. It gets more complicated if you want it to, but these settings will get you started with incredible rates.

The final step is to define a Custom Trunk (AnveoOut) and Outbound Route (AnveoSIP) in FreePBX to send outbound calls to Anveo. Typically, you would specify a dialing prefix (555 in the example) to force certain calls to use the Anveo Direct route. Here’s a sample Custom SIP Trunk to handle the calls. The custom dial string should look like this using your own 6-character code, of course: SIP/012345$OUTNUM$@sbc.anveo.com.

Once you’ve saved your settings, create an Outbound Route for the calls that looks something like what’s shown below. Be sure to add the CallerID number you wish to use for the outbound calls and make the 555 prefix match what you used when you created the Custom Trunk in the last step. When you Save your setup, be sure to move the Outbound Route up the priority list on the right so that these calls get evaluated before your other calling routes.

Receiving SMS Messages with Anveo Direct

To receive SMS messages from Anveo, there’s an SMS tab in the DID configuration menu for each of your DIDs. You must have a web server with PHP 4 or 5 to manage the incoming messages. It’s important to use a file name for the web link that is difficult for people to guess. Otherwise, anybody can bombard you with SMS messages if they happen to guess the web link. Here’s a sample to get you started. In the Anveo SMS tab for your DID, you’d insert something like the following and check the Forward to URL box:

http://myserver.org/smsmessenger.php?from=$[from]$&to=$[to]$&message=$[message]$

On your web server using whatever filename you chose for the smsmessenger.php file, insert the following code replacing the $deliverto contents with your actual email address:


<?php
$deliverto = "youremailname@gmail.com";
$from = $_REQUEST['from'];
$to = $_REQUEST['to'];
$message = $_REQUEST['message'];
$subject="SMS Message from $from to $to";
$comment="SMS Message\n\n FROM: $from\n\nTO: $to\n\nMSG: $message\n\n";
mail("$deliverto", "$subject", "$comment", "$from");
?>

Once this is in place, people can simply send an SMS message to your 11-digit DID, and it will be delivered to the email address you inserted for $deliverto. Incoming SMS messages are a penny apiece.

Sending SMS Messages with Anveo Direct

Sending SMS messages through Anveo Direct is similar to the key procedure used for placing outbound calls. Before you can send SMS messages, however, you’ll need to activate an API account which is free. This gets you an API key. Once you have a key, SMS messages are sent using API requests to https://www.anveo.com/api/v2.asp. Sample PHP scripts to handle the details are available on the Anveo Direct web site. The procedure works well, but the messaging rates are not cheap at 4.4¢ per message. In addition, there appears to be a glitch in the "sent from" feature of the API which results in outbound SMS messages always appearing to come from an international number in the United Kingdom. But, again, the functionality is there, if you need it. For the time being, the SMS messaging functionality built into Incredible PBX is free and much easier to use. See the SMS Dictator article on Nerd Vittles for details. Enjoy!

Originally published: Monday, May 6, 2013



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 Baaaaack: Skype Returns to PBX in a Flash with Asterisk 11 and FreeSwitch

It’s been a long road, but we finally have a reliable Skype™ implementation for Asterisk® 11. Ironically, it uses components from ArchLinux™ as well as FreeSwitch™. But, hey, it works! It sounds great. And it lets you talk (for free) to over a half billion of your closest friends around the world. So today we present a Skype solution that works with a full-featured PBX. It can run on any Windows®, Mac®, or Linux® Desktop using the PIAF-Green™ Virtual Machine with Oracle’s free VirtualBox®. There’s more good news. It’s a 5-minute install once you’ve downloaded the PIAF-Green appliance. And the appliance includes a one-click installer for a Skype gateway. All you’ll need is a dedicated Skype account with your username and password. Before you can finish your cup of coffee, you’ll be up and running. For those that prefer to do it yourself, there’s a complete tutorial on the PBX in a Flash™ Forum. Our special thanks to @sukasem for solving the riddle.

PIAF-Green Virtual Machine: How It Works

We’ve written extensively about Oracle® VM VirtualBox and the PIAF-Green Virtual Machine. If all of this is new to you, start here for some background. For today, we’ve built a custom PIAF-Green appliance that’s designed to handle inbound and outbound calling using a dedicated Skype account. You can interconnect this appliance with other Asterisk servers, or you can use it as a standalone Asterisk server by adding extensions, trunks, and features just as you would with any other PIAF-Green server. By default, inbound calls to the Skype account on your server are routed to extension 701. That can be adjusted to meet your requirements. 11-digit outbound calls (e.g. 1-843-284-6844) are routed out through your Skype trunk which means you’ll need Skype Credit or a Skype Subscription to complete the calls. You can modify the outbound route SkypeOut to accommodate international calling, 10-digit calling, and free Skype-to-Skype calling worldwide if desired. We’ll cover the setup below. But, first, let’s get your PIAF-Green Virtual Machine up and running with FreeSwitch and Skype.

Installing the PIAF-Green Virtual Machine

Step #1 is to download the PIAF-Ast11-FS-Skype Open Virtualization Appliance (.ova) from SourceForge. This appliance includes a customized version of PIAF-Green with Asterisk 11 and FreePBX 2.11 as well as FreeSwitch and a Skype installer. Because Skype is proprietary, we cannot include it in the turnkey appliance, but the one-click installer will do all of the heavy lifting for you.

Step #2: Verify the checksums for the PIAF-Green 64-bit .ova appliance to be sure everything got downloaded properly. To check the MD5/SHA1 checksums in Windows, download and run Microsoft’s File Checksum Integrity Verifier.

For Mac or Linux desktops, open a Terminal window, change to the directory in which you downloaded the .ova file, and type the following commands:

md5 PIAF-Ast11-FS-Skype.ova (use md5sum for Linux)
openssl sha1 PIAF-Ast11-FS-Skype.ova

The correct MD5 checksum for the latest appliance release is 93b016298c18455184cfd596774c05ba. The correct SHA1 checksum for the latest release is 09b24ad03a99ecc4eeef58a5d123c3c03096a2e0.

The correct MD5 checksum for the original appliance was bfa436f4f4a1cf2dd5ac92c3fbb7c65f. The correct SHA1 checksum for the original appliance was 95228d4c2ed533092899da88721dbde8d20d8b73.

Step #3: Double-click on the downloaded .ova file which will begin the import process into VirtualBox. It only takes a couple minutes, and you only do it once. IMPORTANT: Be sure to check the Reinitialize the Mac address of all network cards box before clicking the Import button.

Once the import is finished, you’ll see the new PIAF virtual machine in the VM List of your VirtualBox Manager Window. You’ll need to make a single, one-time adjustment to the PIAF-Green Virtual Machine configuration to account for differences in network cards on different host machines.

Click on the PIAF-Ast11-FS-Skype Virtual Machine in the VM List. Then click Settings -> Network. For Adapter 1, check the Enable Network Adapter option. From the Attached to pull-down menu, choose Bridged Adapter. Then select your network card from the Name list. Then click OK. That’s all the configuration that is ever necessary for your appliance. The rest is automagic.

Running the PIAF-Green Virtual Machine in VirtualBox

Once you’ve imported and configured the appliance, you’re ready to go. Highlight the Virtual Machine in the VM List on the VirtualBox Manager Window and click the Start button. The PIAF boot procedure with CentOS 6.4 will begin just as if you had installed PBX in a Flash on a standalone machine. You’ll see a couple of dialogue boxes pop up that explain the keystrokes to move back and forth between your host operating system desktop and your PIAF VM.

Here’s what you need to know. To work in the PIAF Virtual Machine, just left-click your mouse while it is positioned inside the VM window. To return to your host operating system desktop, press the right Option key on Windows machines or the left Command key on any Mac. For other operating systems, read the dialogue boxes for instructions on moving around. Always shut down PIAF gracefully! Click in the VM window with your mouse, log in as root, and type: shutdown -h now.

Run PIAF-Green Virtual Machine behind a hardware-based firewall with no Internet port exposure!

To begin, position your mouse over the VM window and left-click. Once the PIAF VM has booted, log in as root with password as the password. Change your root password immediately by typing passwd at the command prompt. Now set up a secure maint password for FreePBX as well. Type passwd-master. If you’re not in the Eastern U.S. time zone, then you’ll want to adjust your timezone setting so that reminders and other time-sensitive events happen at the correct time. While logged into your server as root, issue the following command: /root/timezone-setup.

To access the FreePBX GUI, use a browser to log into your PIAF server by pointing to the IP address of the PIAF VM that’s displayed in the status window of the CLI. Click on the User button to display the Admin choices in the main PIAF Menu. Click on the FreePBX option to load the FreePBX GUI. You will be prompted for an Apache username and password. For the username, use maint. For the password, use whatever password you set up with passwd-master.

PIAF-Green Virtual Machine: Installing Skype with the One-Click Installer

Now the fun. First, be sure you’ve set up a Skype account that can be dedicated for exclusive use with PIAF-Green. Once you have your Skype username and password in hand, you’re ready to begin. While logged into your server as root, issue the following command: /root/skype-install.

Accept the license agreement and then you’ll be prompted for your Skype username (one word!) and password. Type carefully. Once you’ve checked your entries, press the Enter key to begin the install. Skype will be downloaded and installed after which FreeSwitch will be configured for use with PIAF-Green. The whole process takes about a minute.

PIAF-Green Virtual Machine: Taking Skype for a Test Drive

The easiest way to make sure everything is working is to assemble all of the needed components on your Windows or Mac desktop and then walk through an inbound and outbound call using Skype.

First, let’s get Skype and FreeSwitch running under PIAF-Green. From the command prompt, issue the following commands:

pkill skype
pkill Xvfb
sh /usr/local/freeswitch/skypopen/skype-clients-startup-dir/start_skype_clients.sh
/usr/local/freeswitch/bin/freeswitch

Second, switch back to your desktop PC or Mac and install the Skype client for your operating system. Make sure that you have a different Skype account that can be used for this testing. Once installed, run Skype on your desktop and log in with your different Skype credentials.

Third, while still on your desktop PC or Mac, download and install the Yate SIP softphone. Run the Yate client and choose Settings -> Accounts -> New. Plug in the IP address of your PIAF-Green Virtual Machine (type status in the Linux CLI if you don’t know it). For the extension, use 701. For the password use 1234secret. Make sure the client shows it registered. If not, check your IP address, extension, and password for typos.

Now let’s try a call to your PIAF-Green Virtual Machine using the Skype client on your desktop computer. Plug in the Skype name that you assigned to the virtual machine and click the dial button. Within a couple seconds, your Yate SIP softphone should start ringing. Click Answer on the phone and say a few words. Yes, there will be echo. You’re using both phones on the same desktop. Click Hangup. If you run the Asterisk CLI in the appliance window of VirtualBox, you can watch the entire process unfold with realtime alerts from both Asterisk and FreeSwitch.

As configured, you can use your Yate softphone to make outbound PSTN calls through Skype on the PIAF-Green Virtual Machine, but this requires you to have money in your Skype Credit account. If you have a positive balance, simply dial an 11-digit number, e.g. 1-843-284-6844. If you only want to make free calls to other people using Skype anywhere in the world, then you need to adjust your FreePBX dialplan slightly. Log into FreePBX as explained above and then make the following change to SkypeOut which is accessible by going to Connectivity -> Outbound Routes -> SkypeOut:

In the original version of the appliance, to place PSTN calls by dialing 10-digit numbers and to place calls to other Skype users by dialing *SkypeName from a SIP softphone, you needed to adjust the Dial Patterns for SkypeOut so that they looked like what is shown above. Then clicking Submit Changes and Apply Changes implemented the changes. With the current release, these features already are included.

PIAF-Green Virtual Machine: Auto-Starting Skype and FreeSwitch on Bootup

Once you’re sure everything is working as it should, you’ll find it more convenient to automatically start Skype and FreeSwitch whenever you boot up your PIAF-Green Virtual Machine. Just issue the following commands while logged into your server as root and then reboot to try it out:

echo "sh /usr/local/freeswitch/skypopen/skype-clients-startup-dir/start_skype_clients.sh" \
>> /etc/rc.d/rc.local
echo "ulimit -s 240" >> /etc/rc.d/rc.local
echo "/usr/local/freeswitch/bin/freeswitch &" >> /etc/rc.d/rc.local
reboot

PIAF-Green Virtual Machine: Skype Tips and Tricks

We’ve designed the one-click Skype installer so that you can rerun it at a later date if it becomes necessary to change your Skype credentials.

As a cautionary note, be advised that you cannot load Incredible PBX on this build without wiping out the Skype and FreeSwitch functionality, but we’re working on it.

One of the wrinkles with Skype is that Skype uses names for its users rather than numbers. If you don’t have a SIP URI-capable softphone, there’s still an easy way to place calls to your Skype friends using FreePBX. The solution is to set up speed dial numbers for your Skype friends by adding a Speed Dial number to your FreePBX dialplan. Let’s set one up for Skype’s Call Testing Service to show how it’s done. Choose Applications -> Extensions -> Other (Custom) Device in FreePBX. Provide an Extension Number (8378 spells T-E-S-T) which will be the Speed Dial number. This could just as easily spell your friend’s name using a TouchTone phone. Next enter a Display Name for the extension, e.g. Test Skype. Then insert the following in the dial field. If you were setting up a custom extension for a friend, just replace echo123 with your friend’s actual Skype name using the syntax below. Save your entries and reload the dialplan when prompted.

SIP/echo123@127.0.0.1:5070

Now you can dial 8378 using your Yate softphone or any extension on your PBX to connect to the Skype Call Testing Service. Enjoy!

Originally published: Friday, April 26, 2013



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…

The Definitive VoIP Quick Start Guide: Introducing PBX in a Flash 2.0.6.4.3

Each time we release a new version of PBX in a Flash™, I’m reminded of one of my favorite childhood books and one of the best mottos of all time: "I Think I Can!" You can’t really appreciate what goes into an open source product like PBX in a Flash until you try doing it yourself. The sad part is we and the CentOS™ development team are part of a dwindling few non-commercial entities that still are in the open source "business." If you want to actually learn about Asterisk from the ground up using pure source code to customize your VoIP deployment, PBX in a Flash has no competition because your only other option is to roll your own starting with a Linux DVD. So our extra special kudos go to Tom King, who once again has produced a real masterpiece in that it is very simple for a first-time user to deploy and, at the same time, incredibly flexible for the most experienced Asterisk developer. The new PIAF 2.0.6.4.3 ISOs not only provide a choice of Asterisk® and FreePBX® versions to get you started. But now you can build and deploy standalone servers for SugarCRM™, NeoRouter™ VPN, and OpenFire™ XMPP using the 32-bit and 64-bit PIAF™ ISOs. So let’s get started, shall we?

Making a Hardware Selection

We’re going to assume that you need a VoIP telephony solution that will support an office of up to several dozen employees and that you have an Internet connection that will support whatever your simultaneous call volume happens to be. This is above and beyond your normal Internet traffic. To keep it simple, you need 100Kbps of bandwidth in both directions for each call.1 And you need a router/firewall that can prioritize VoIP traffic so that all your employees playing Angry Birds won’t cause degradation in VoIP call quality. Almost any good home router can now provide this functionality. Remember to disable ALG on your router, and it’s smooth sailing.

For computer hardware, you’ll need a dedicated machine. There are many good choices. Unless you have a burning desire to preserve your ties with Ma Bell, we recommend limiting your Ma Bell lines to your main number. Most phone companies can provide a service called multi-channel forwarding that lets multiple inbound calls to your main number be routed to one or more VoIP DIDs much like companies do with 800-number calls. If this works for you, then any good dual-core Atom computer will suffice. You’ll find lots of suggestions in this thread. And the prices generally are in the $200-$400 range. For larger companies and to increase Asterisk’s capacity with beefier hardware, see these stress test results.

If your requirements involve retention of dozens of Ma Bell lines and complex routing of calls to multiple offices, then we would strongly recommend you spend a couple thousand dollars with one of our consultants. They’re the best in the business, and they do this for a living. They can easily save you the cost of their services by guiding you through the hardware selection process. They also have turnkey phone systems using much the same technology as you’ll find in PBX in a Flash. You won’t hurt our feelings. :-)

Choosing the Right PIAF Platform

We get asked this question about a hundred times a week on the forums so here goes. There are more than two dozen permutations and combinations of CentOS, Asterisk, and FreePBX to choose from when you decide to deploy PBX in a Flash. We always recommend the latest version of CentOS because it tends to be the most stable and also supports the most new hardware. You have a choice to make between a 32-bit OS or 64-bit. Our preference is the 32-bit platform because it is better supported. The performance difference is virtually unnoticeable for most VoIP applications. With Asterisk, we always recommend an LTS release because those have long-term support. That narrows your choices to Asterisk 1.8 or Asterisk 11. If you plan to use Digium® Phones (and we’ll get to that), then you’ll want either Certified Asterisk 1.8 or Asterisk 11. The conventional wisdom in the Asterisk community has been to avoid just released Asterisk versions like the plague. We think we’ve turned the corner on that approach. Asterisk 1.8 is close to end of life, and with Asterisk 11, you’re in great shape from a support standpoint for many years to come. We personally run Asterisk 11 and have yet to find something that functionally would qualify as a show stopper. That’s not to say there aren’t some bugs and security issues from time to time. A pretty serious collection of them was found a few months ago, but it affected all versions of Asterisk. So… our bottom line is that Asterisk 11 is the latest and greatest with the best feature set. If we were building a system for a commercial business, it would be our hands-down choice. In the PBX in a Flash world, we have colors for various versions of PBX in a Flash that support different versions of Asterisk. Asterisk 11 happens to be PIAF-Green, Asterisk 1.8=PIAF-Purple, Asterisk 10=PIAF-Red, Certified Asterisk 1.8=PIAF-Brown.

Choosing the Right Phones

If there is one thing that will kill any new VoIP deployment, it’s choosing the wrong phones. If you value your career, you’ll let that be an organization-driven decision after carefully reviewing at least 6-12 phones that won’t cause you daily heartburn. You and your budget team can figure out the price points that work in your organization keeping in mind that not everyone needs the same type of telephone. Depending upon your staffing, the issue becomes how many different phone sets are you and your colleagues capable of supporting and maintaining on a long term basis.

Schmooze Com has released a public beta of their commercial End Point Manager (EPM) at a price point of $25 per server. They’ve been using the application internally to support their commercial customers for over a year so it is not your typical beta software. Suffice it to say, it’s the best $25 you will ever spend. You can sign up for an account with Schmooze through our commercial support site and purchase the software now. After taking a look at the Admin User Guide, if you’re a true pioneer, drop us a note and we’ll get you a sneak peek. The beauty of this software is it gives you the flexibility to support over 150 different VoIP phones as well as other devices almost effortlessly. Using a browser, you can configure and reconfigure almost any phone on the market in a matter of minutes. So the question becomes which phones should you show your business associates. That again should be a decision by you and your management and budget teams, but collect some information from end-users first. Choose a half dozen representative users in your company and get each of them to fill out a questionnaire documenting their 10 most frequent daily phone calls and listing each step of how they processed those calls. That will give you a good idea about types and variety of phones you need to consider for different groups of users. Cheaper rarely is better. Keep in mind that phones can last a very long time, even lousy ones. So choose carefully.

The phone brands that we would seriously consider include Cisco, Aastra, Snom, Digium, Mitel, Polycom, Yealink, and Grandstream. Do you need BLF, call parking or multiple line buttons, a hold button, conferencing, speakerphone, HD voice, power over Ethernet support, distinctive ringtones for internal and various types of external calls, Bluetooth, WiFi, web, SMS, or email access, an extra network port for a computer, headset support, customizable buttons (how many?), quick dial keys, custom software, XML provisioning, VPN support? How easy is it to transfer a call? Do you need to mimic key telephones? Also consider color screens, touch screens, busy lamp indicators, extension modules (what capacity?). What do we personally use: several Digium phones of various types, a couple of Aastra phones, a Grandstream GXP2200, and a collection of Panasonic cordless DECT phones, a fax machine, and Samsung Galaxy Note II connected through an OBi202 with an OBiBT Bluetooth Adapter to our PIAF server.

Installing PBX in a Flash

With the office politics out of the way, let’s get to the fun stuff.

For most deployments, choose the default install by pressing Enter.

Leave the UTC System Clock option unchecked and pick your Time Zone. Tab to OK and press Enter.

Choose a very secure Root Password. Tab to OK and press Enter. Your server will whir away for 5-10 minutes installing CentOS 6.4. When the reboot begins, remove the DVD or USB thumb drive.

For today, we’re installing PBX in a Flash. So leave it highlighted, tab to OK, and press Enter.

Now pick your PIAF flavor, tab to OK, and press Enter.

The PIAF Configuration Wizard will load. Press Enter to begin.

Unlike any other aggregation, PIAF gives you the opportunity to fully configure Asterisk using make menuconfig if you know what you’re doing. For everyone else, type N and then confirm your choice.

Next, you’ll need to choose your Time Zone again for PHP and FreePBX. Don’t worry if yours is missing. A new timezone-setup utility is available in /root to reconfigure this to any worldwide time zone.

Next, choose your version of FreePBX to install. Ignore the screen info regarding Incredible PBX. It’s out of date. The following limitations apply if you plan to also install Incredible PBX and Incredible Fax:

Incredible PBX 3 requires PIAF-Purple and FreePBX 2.9
Incredible PBX 4 requires PIAF-Purple and FreePBX 2.10 (32-bit only)
Incredible PBX 11 requires PIAF-Green and FreePBX 2.11

Finally, you need to choose a very secure maint password for access to FreePBX using a browser. You can pick your own, or the installer will generate one for you. Don’t forget it.

The installer will give you one last chance to make changes. If everything looks correct, press the Enter key and go have lunch. Be sure you have a working Internet connection to your server before you leave. :wink:

In about an hour, your server will reboot. You should be able to log in as root using your root password. Write down the IP address of your server from the status display (above) and verify that everything installed properly. Note that Samba is disabled by default. If you want to use your server with Windows Networking, run configure-samba once your server is up and running and you’ve logged in.

Configuring PBX in a Flash

Most PIAF Configuration is accomplished using the FreePBX Web GUI. Point your browser to the IP address shown in the status display above to display your PIAF Home Page. Click on the Users tab. Click FreePBX Administration. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose in the Config Module phase of the PBX in a Flash installation procedure above.

If you’re new to Asterisk and FreePBX, here’s the one paragraph primer on what needs to happen before you can make free calls with Google Voice. You’ll obviously need a free Google Voice account. This gets you a phone number for people to call you and a vehicle to place calls to plain old telephones throughout the U.S. and Canada at no cost. You’ll also need a softphone or SIP phone to actually place and receive calls. YATE makes a free softphone for PCs, Macs, and Linux machines so download your favorite and install it on your desktop. Phones connect to extensions in FreePBX to work with PBX in a Flash. Extensions talk to trunks (like Google Voice) to make and receive calls. FreePBX uses outbound routes to direct outgoing calls from extensions to trunks, and FreePBX uses inbound routes to route incoming calls from trunks to extensions to make your phones ring. In a nutshell, that’s how a PBX works. There are lots of bells and whistles that you can explore down the road. FreePBX now has some of the best documentation in the business. Start here.

To get a minimal system functioning to make and receive calls, here’s the 2-minute drill. You’ll need to set up at least one extension with voicemail, and we’ll configure a free Google Voice account for free calls in the U.S. and Canada. Next, we’ll set up inbound and outbound routes to manage incoming and outgoing calls. Finally, we’ll add a phone with your extension credentials.

A Few Words About Security. PBX in a Flash has been engineered to run on a server sitting safely behind a hardware-based firewall with NO port exposure from the Internet. Leave it that way! It’s your wallet and phone bill that are at stake. If you’re running PBX in a Flash in a hosted environment with no hardware-based firewall, then immediately read and heed our setup instructions for Securing Your VoIP in the Cloud Server. We would encourage you to visit your PIAF Home Page regularly. It’s our primary way of alerting you to security issues which arise. You’ll see them posted (with links) in the RSS Feed shown above. If you prefer, you can subscribe to the PIAF RSS Feed or follow us on Twitter. For late-breaking enhancements, you also should regularly visit the Bug Reporting & Fixes Topic on the PIAF Forum.

Extension Setup. Now let’s set up an extension to get you started. A good rule of thumb for systems with less than 50 extensions is to reserve the IP addresses from 192.x.x.201 to 192.x.x.250 for your phones. Then you can create extension numbers in FreePBX to match those IP addresses. This makes it easy to identify which phone on your system goes with which IP address and makes it easy for end-users to access the phone’s GUI to add bells and whistles. In FreePBX 2.10 or 2.11, to create extension 201 (don’t start with 200), click Applications, Extensions, Generic SIP Device, Submit. Then fill in the following blanks USING VERY SECURE PASSWORDS and leaving the defaults in the other fields for the time being.

User Extension … 201
Display Name … Home
Outbound CID … [your 10-digit phone number if you have one; otherwise, leave blank]
Emergency CID … [your 10-digit phone number for 911 ID if you have one; otherwise, leave blank]

Device Options
secret … 1299864Xyz [randomly generated]
dtmfmode … rfc2833
Voicemail Status … Enabled
voicemail password … 14332 [make this unique AND secure!]
email address … yourname@yourdomain.com [if you want voicemail messages emailed to you]
pager email address … yourname@yourdomain.com [if you want to be paged when voicemail messages arrive]
email attachment … yes [if you want the voicemail message included in email]
play CID … yes [if you want the CallerID played when you retrieve message]
play envelope … yes [if you want date/time of the message played before the message]
delete Vmail … yes [if you want the voicemail message deleted after it’s emailed to you]
vm options … callback=from-internal [to enable automatic callbacks by pressing 3,2 after playing a voicemail message]
vm context … default

Write down the passwords. You’ll need them to configure your SIP phone.

Extension Security. We cannot overstress the need to make your extension passwords secure. All the firewalls in the world won’t protect you from malicious phone calls on your nickel if you use your extension number or something like 1234 for your extension password if your SIP or IAX ports happen to be exposed to the Internet.

In addition to making up secure passwords, the latest versions of FreePBX also let you define the IP address or subnet that can access each of your extensions. Use it!!! Once the extensions are created, edit each one and modify the permit field to specify the actual IP address or subnet of each phone on your system. A specific IP address entry should look like this: 192.168.1.142/255.255.255.255. If most of your phones are on a private LAN, you may prefer to use a subnet entry in the permit field like this: 192.168.1.0/255.255.255.0 using your actual subnet.

Adding a Google Voice Trunk. There are lots of trunk providers, and one of the real beauties of having your own PBX is that you don’t have to put all of your eggs in the same basket… unlike the AT&T days. We would encourage you to take advantage of this flexibility. With most providers, you don’t pay anything except when you actually use their service so you have nothing to lose.

For today, we’re going to take advantage of Google’s current offer of free calling in the U.S. and Canada through the end of 2013. You also get a free phone number in your choice of area codes. PBX in a Flash now installs a Google Voice module under FreePBX -> Connectivity that lets you set up your Google Voice account with PBX in a Flash in just a few seconds once you have your credentials.

A Word to the Wise: All good things come to an end… especially those that are free. So plan ahead with some alternate providers that keep your phones working should Google decide to pull the plug or change the terms with Google Voice.

Signing Up for Google Voice. You’ll need a dedicated Google Voice account to support PBX in a Flash. The more obscure the username (with some embedded numbers), the better off you will be. This will keep folks from bombarding you with unsolicited Gtalk chat messages, and who knows what nefarious scheme will be discovered using Google messaging six months from now. So keep this account a secret!

We’ve tested this extensively using an existing Gmail account rather than creating a separate account. Take our word for it. Inbound calling is just not reliable. The reason seems to be that Google always chooses Gmail chat as the inbound call destination if there are multiple registrations from the same IP address. So… set up a dedicated Gmail and Google Voice account2, and use it exclusively with PBX in a Flash. Google Voice no longer is by invitation only. If you’re in the U.S. or have a friend that is, head over to the Google Voice site and register. If you’re living on another continent, see MisterQ’s posting for some tips on getting set up.

You must choose a telephone number (aka DID) for your new account, or Google Voice calling will not work… in either direction. You also have to tie your Google Voice account to at least one working phone number as part of the initial setup process. Your cellphone number will work just fine. Don’t skip this step either. Just enter the provided confirmation code when you tell Google to place the test call to the phone number you entered. Once the number is registered, you can disable it if you’d like in Settings, Voice Setting, Phones. But…

IMPORTANT: Be sure to enable the Google Chat option as one of your phone destinations in Settings, Voice Setting, Phones. That’s the destination we need for PBX in a Flash to function with Google Voice! Otherwise, inbound and/or outbound calls will fail. If you don’t see this option, you may need to call up Gmail and enable Google Chat there first. Then go back to the Google Voice Settings and enable it. Be sure to try one call each way from Google Chat in Gmail. Then disable Google Chat in GMail for this account. Otherwise, it won’t work with PIAF.

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

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

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

Configuring Google Voice Trunk in FreePBX. All trunk configurations now are managed within FreePBX, including Google Voice. This makes it easy to customize PBX in a Flash to meet your specific needs. Click the Connectivity tab in FreePBX 2.11 and choose Google Voice [Motif]. To Add a new Google Voice account, just fill out the form. NOTE: The form has changed from prior releases of FreePBX. Do NOT check the last box: Send Unanswered to GoogeVoice Voicemail, or you’ll have problems receiving incoming calls.

Google Voice Username is your Google Voice account name without @gmail.com. Password is your Google Voice password. NOTE: Don’t use 2-stage password protection in this Google Voice account! Phone Number is your 10-digit Google Voice number. Next, check only the first two boxes: Add Trunk and Add Outbound Routes. Then click Submit Changes and reload FreePBX. Down the road, you can add additional Google Voice numbers by clicking Add GoogleVoice Account option in the right margin and repeating the drill. For Google Apps support, see this post on the PIAF Forum.

Outbound Routes. The idea behind multiple outbound routes is to save money. Some providers are cheaper to some places than others. It also provides redundancy which costs you nothing if you don’t use the backup providers. The Google Voice module actually configures an Outbound Route for 10-digit Google Voice calling as part of the automatic setup. If this meets your requirements, then you can skip this step for today.

Inbound Routes. An Inbound Route tells PBX in a Flash how to route incoming calls. The idea here is that you can have multiple DIDs (phone numbers) that get routed to different extensions or ring groups or departments. For today, we’ll build a simple route that directs your Google Voice calls to extension 201. Choose Connectivity -> Inbound Routes, leave all of the settings at their default values except enter your 10-digit Google Voice number in the DID Number field. Enable CallerID lookups by choosing CallerID Superfecta in the CID Lookup Source pulldown. Then move to the Set Destination section and choose Extensions in the left pull-down and 201 in the extension pull-down. Now click Submit and save your changes. That will assure that incoming Google Voice calls are routed to extension 201.

IMPORTANT: Before Google Voice calling will actually work, you must restart Asterisk from the Linux command line interface. Log into your server as root and issue this command: amportal restart.

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

General Settings. Last, but not least, we need to enter an email address for you so that you are notified when new FreePBX updates are released. In FreePBX 2.11, choose Admin -> Module Admin and click on the Upgrade Notifications shield on the right. Plug in your email address, click Submit, and save your changes. Done!

Setting Up a Desktop Softphone. PBX in a Flash supports all kinds of telephones, but we’ll start with the easy (free) one today. You can move on to "real phones" once you’re smitten with the VoIP bug. For today, you’ll need to download a softphone to your desktop PC or Mac.

The easiest way to get started is to set up a YATE softphone on your Desktop computer. Versions are available at no cost for Macs, PCs, and Linux machines. Just download the appropriate one and install it from this link. Once installed, it’s a simple matter to plug in your extension credentials and start making calls. Run the application and choose Settings -> Accounts and click the New button. Fill in the blanks using the IP address of your server, 201 for your account name, and whatever password you created for the extension. Click OK.

Once you are registered to extension 201, close the Account window. Then click on YATE’s Telephony Tab and place your first call. It’s that easy!

Monitoring Call Progress with Asterisk. That about covers the basics. We’ll leave you with a tip on how to monitor what’s happening with your PBX. There are several good tools within the FreePBX GUI. You’ll find them under the Reports tab. In addition, Asterisk has its own Command Line Interface (CLI) that is accessible from the Linux command prompt. Just execute the following command while logged in as root: asterisk -rvvvvvvvvvv.

What’s Next? We’ve barely scratched the surface of what you can do with PBX in a Flash. Log into your server as root and type help-pbx for a list of simple install scripts that can add almost any function you can imagine. And Incredible PBX 11 and Incredible Fax can be installed in under 2 minutes to provide you almost every Asterisk application on the planet. You can read the complete tutorial here.

New App of the Week. We’re pleased to introduce Trunk Failure Email Alerts for Asterisk supporting SIP, IAX2, and Google Motif trunks. Just insert your email address in this little script and run it every hour as a cron job. You’ll get an email alert whenever any of your VoIP trunks fail. Enjoy!

Originally published: Friday, April 19, 2013



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…

The 5-Minute PBX: PIAF-Green Virtual Machine for Windows, Mac, or Linux

In our never-ending trek to build the Perfect PBX™, we have another installment for you today featuring the just released PBX in a Flash™ 2.0.6.4.3 with a CentOS® 6.4 LAMP stack (32-bit or 64-bit), Asterisk® 11.3, and FreePBX® 2.11. Once you download the image, you can have a turnkey PBX running under VirtualBox® on almost any desktop computer in less than 5 minutes. We’re not talking about a crippled telephony platform with limited functionality. What you’ll have is the same platform that hundreds of thousands of organizations use to run their corporate phone systems. And, if you want the Incredible PBX™ feature set with literally dozens of open source telephony applications including news, weather, stocks, tide reports, SMS messaging, free faxing with Incredible Fax™, telephone reminders, wakeup calls, and more then just add a couple minutes to run two one-click installers. Welcome to the world of open source!

The real beauty of PBX in a Flash has not been that someone with sufficient expertise couldn’t assemble something just as good or even better. Watch the AstriCon presentations from last year if you have any doubts. The beauty of PIAF is it puts this technology down where the goats can get it. It provides a toolset that encourages further development by simplifying the learning curve for a broad cross-section of the VoIP community while not compromising functionality or flexibility. The source code for the major components is included in the build so you can customize and recompile Asterisk or load a new version of Asterisk or any additional Linux app in minutes without losing your existing setup.

As many of you know, we have literally hundreds of gurus on the PIAF Forum. That doesn’t mean any particular person or group knows everything. It’s merely a designation that a particular individual is an expert at something. The collective wisdom of the group is what makes PBX in a Flash as a project better because we’ve put in place a platform that experts from many different disciplines can build upon without needing to learn everything about everything. Simply stated, you can be a terrific chef without knowing how to build a stove!

Turning to Asterisk® 11 and FreePBX® 2.11, from everything we’re seeing, these new releases are shaping up to be a remarkable step forward both in terms of toolset and in the new mindset of the development community. That’s a good thing. For our part, we want to get our latest preview release of PBX in a Flash with CentOS 6.4, Asterisk 11.3 and the latest FreePBX 2.11 beta into as many hands as possible with a near zero investment in hardware and setup time.

The Ultimate VoIP Appliance: PIAF Virtual Machine for VirtualBox

Today brings us to a new plateau in the virtual machine development era. Thanks to the masterful work of Tom King on PBX in a Flash 2.0.6.4.3, we’re pleased to introduce a new product that can be installed in under 5 minutes and will run on any Windows PC, Mac, or Linux machine as well as Solaris. And, unlike the dedicated machine platforms and OpenVZ compromises of years past, today’s PIAF-Green Virtual Machine is state-of-the-art giving you everything a bare metal install from source code would have provided. Most importantly, the components are truly portable. They can be copied to a 4GB flash drive1 for the price of a good hamburger and installed from there onto any type of machine that happens to be in front of you. Five minutes later, you have a fully functional Asterisk server with FreePBX and exactly the same feature set and source code that you would have had doing a bare metal PIAF install to a dedicated server. And we’ve built both 32-bit and 64-bit production-ready PIAF-Green Virtual Machines with Asterisk 11.3 and FreePBX 2.11. The choice is yours. No Internet access required to perform the install. Sound too good to be true? Keep reading or, better yet, try the PIAF appliance for yourself. The install process is simple:

  1. Download and install VirtualBox onto a Desktop Machine of your choice
  2. Download and double-click on the PIAF-Green Virtual Machine to import it into VirtualBox
  3. Select the PIAF-Green Virtual Machine in VirtualBox Manager Window and click the Start button

Introducing Oracle VM VirtualBox

We’re late to the party, but Virtual Box®, Oracle’s virtual machine platform inherited from Sun, is really something. It’s not only free, but it’s pure GPL2 code. VirtualBox gives you a virtual machine platform that runs on top of any desktop operating system. In terms of limitations, we haven’t found any. We even tested this on an Atom-based Windows 7 machine with 2GB of RAM, and it worked without a hiccup. So step #1 is to download one or more of the VirtualBox installers from VirtualBox.org or Oracle.com. As mentioned, our recommendation is to put all of the 100MB installers on a 4GB thumb drive. Then you’ll have everything in one place whenever and wherever you happen to need it. Once you’ve downloaded the software, simply install it onto your favorite desktop machine. Accept all of the default settings, and you’ll be good to go. For more details, here’s a link to the Oracle VM VirtualBox User Manual.

Installing the PIAF Virtual Machine

Step #1 is to download the PIAF-Green Open Virtualization Appliance (.ova) of your choice from SourceForge.

Step #2: Verify the checksums for the 32-bit or 64-bit .ova appliance to be sure everything got downloaded properly. To check the MD5/SHA1 checksums in Windows, download and run Microsoft’s File Checksum Integrity Verifier.

For Mac or Linux desktops, open a Terminal window, change to the directory in which you downloaded the .ova file of your choice, and type the following commands (substitute 64 for 32 obviously if you’re using the 64-bit appliance):

md5 PIAF-Green-32.ova (use md5sum for Linux)
openssl sha1 PIAF-Green-32.ova

The correct MD5 checksum for PIAF-Green-32.ova is 7691127afd065412e40429cee49a4738. The correct SHA1 checksum for PIAF-Green-32 is 9b3828649dc9644d046ef83cb227aea4c1473c65.

The correct MD5 checksum for PIAF-Green-64.ova is 460ed99c5d57ef553b7a3df7118daaa6. The correct SHA1 checksum for PIAF-Green-64 is e2120eb692431482817d35bcf316c6b949fc2d9f.

Step #3: Double-click on the downloaded .ova file which will begin the import process into VirtualBox. It only takes a couple minutes, and you only do it once. IMPORTANT: Be sure to check the Reinitialize the Mac address of all network cards box before clicking the Import button.

Once the import is finished, you’ll see a new PIAF virtual machine in the VM List of your VirtualBox Manager Window. You’ll need to make a couple of one-time adjustments to the PIAF-Green Virtual Machine configuration to account for differences in sound and network cards on different host machines.

Click on the PIAF-Green Virtual Machine in the VM List. Then click Settings -> Audio and check the Enable Audio option and choose your sound card. Save your setup by clicking the OK button. Next click Settings -> Network. For Adapter 1, check the Enable Network Adapter option. From the Attached to pull-down menu, choose Bridged Adapter. Then select your network card from the Name list. Then click OK. That’s all the configuration that is ever necessary for your PIAF-Green Virtual Machine. The rest is automagic.

Running the PIAF Virtual Machine in VirtualBox

Once you’ve imported and configured the PIAF Virtual Machine, you’re ready to go. Highlight PIAF Virtual Machine in the VM List on the VirtualBox Manager Window and click the Start button. The PIAF boot procedure with CentOS 6.4 will begin just as if you had installed PBX in a Flash on a standalone machine. You’ll see a couple of dialogue boxes pop up that explain the keystrokes to move back and forth between your host operating system desktop and your PIAF VM.

Here’s what you need to know. To work in the PIAF Virtual Machine, just left-click your mouse while it is positioned inside the VM window. To return to your host operating system desktop, press the right Option key on Windows machines or the left Command key on any Mac. For other operating systems, read the dialogue boxes for instructions on moving around. Always shut down PIAF gracefully! Click in the VM window with your mouse, log in as root, and type: shutdown -h now.

Run the PIAF Virtual Machine behind a hardware-based firewall with no Internet port exposure!

To begin, position your mouse over the VM window and left-click. Once the PIAF VM has booted, log in as root with password as the password. Change your root password immediately by typing passwd at the command prompt. Now set up a secure maint password for FreePBX as well. Type passwd-master. If you’re not in the Eastern U.S. time zone, then you’ll want to adjust your timezone setting so that reminders and other time-sensitive events happen at the correct time. While logged into your server as root, issue these commands to download and run the timezone-setup script:

cd /root
wget http://pbxinaflash.com/timezone-setup.tar.gz
tar zxvf timezone-setup.tar.gz
./timezone-setup

Next, use a browser to log into your PIAF server by pointing to the IP address of the PIAF VM that’s displayed in the status window of the CLI. Click on the User button to display the Admin choices in the main PIAF Menu. Click on the FreePBX option to load the FreePBX GUI. You will be prompted for an Apache username and password. For the username, use maint. For the password, use whatever password you set up with passwd-master.

Now read the latest PIAF Quick Start Guide and begin your VoIP adventure. Then you’ll want to do some reading on VirtualBox. We’ve barely scratched the surface. Setting up Headless VMs that run in the background on any server is a breeze. From the command line, here’s an article to get you started. But you also can start Headless VMs from within the GUI by highlighting the VM and clicking Shift->Start. Always shut down VMs gracefully: Close->ACPI Shutdown. You’ll find more great tips at virtualbox.org and GitHub.

One of the real beauties of VirtualBox is you don’t have to use a GUI at all. The entire process can be driven from the command line. Other than on a Mac, here is the procedure to import, configure, and run the PIAF-Green-32 Virtual Machine:
 
VBoxManage import PIAF-Purple.ova
VBoxManage modifyvm "PIAF-Green-32" --nic1 nat
VBoxManage modifyvm "PIAF-Green-32" --acpi on --nic1 bridged
VBoxHeadless --startvm "PIAF-Green-32" &
# Wait 1 minute for PIAF-Green to load. Then decipher IP address like this:
VBoxManage guestproperty get "PIAF-Green-32" /VirtualBox/GuestInfo/Net/0/V4/IP
# Now you can use SSH to login to PIAF-Green at the displayed IP address
# Shutdown the PIAF-Green Virtual Machine with the following command:
VBoxManage controlvm "PIAF-Green-32" acpipowerbutton

On a Mac, everything works the same way except for deciphering the IP address. Download our findip script for that.

Fail2Ban Bug. A bug has been reported in the current Fail2Ban implementation that keeps it from blocking IP addresses of intruders attempting to gain brute-force access to your Asterisk accounts. An interim bug fix that restores proper Fail2Ban functionality is available on the PIAF Forum.

Adding Incredible PBX 11 and Incredible Fax

You can read all about the Incredible PBX 11 and Incredible Fax feature set in our recent Nerd Vittles article. If you decide you’d like to add one or both to your PIAF-Green Virtual Machine, just log into your server as root and issue the following commands. NOTE: You must install Incredible Fax after installing Incredible PBX, or you will lose the ability to install Incredible PBX at a later time. With Incredible Fax, there are a number of prompts during the install. With the exception of the prompt asking for your local area code, just press Enter at every other prompt.

cd /root
wget http://incrediblepbx.com/incrediblepbx11.gz
gunzip incrediblepbx11.gz
chmod +x incrediblepbx11
./incrediblepbx11
./incrediblefax11.sh

The Incredible PBX 11 Inventory. For those that have never heard of The Incredible PBX, here’s the current 11.0 feature set in addition to the base install of PBX in a Flash with the CentOS 6.4, Asterisk 11, FreePBX 2.11, and Apache, SendMail, MySQL, PHP, phpMyAdmin, IPtables Linux firewall, Fail2Ban, and WebMin. Incredible Fax, NeoRouter and PPTP VPNs, and all sorts of backup solutions are still just one command away and may be installed using the scripts included with Incredible PBX 11 and PBX in a Flash. Type help-pbx and browse /root for dozens of one-click install scripts.

Originally published: Thursday, April 4, 2013   Updated: Monday, April 15, 2013



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


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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



Some Recent Nerd Vittles Articles of Interest…

  1. Many of our purchase links refer users to Amazon when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from Amazon to help cover the costs of our blog. We never recommend particular products solely to generate Amazon commissions. However, when pricing is comparable or availability is favorable, we support Amazon because Amazon supports us. []