Home » Posts tagged 'IncrediblePBX' (Page 47)

Tag Archives: IncrediblePBX

The Most Versatile VoIP Provider: FREE PORTING

Introducing NeoRouter VPN: A Star Is Born

In our last article, we introduced PPTP VPNs for interconnecting remote users and branch offices to a central network hub. Known as a hub-and-spoke VPN, the advantage of this design is it lets remote users participate as peers in an existing home office LAN. It’s simple to set up and easy to maintain. The drawback is vulnerability to man-in-the-middle attacks.

Today, we want to turn our attention to the more traditional client-server VPN which still relies upon a central server but uses a star topology to connect remote nodes. The major difference is that only registered devices participate in the virtual private network so there is no direct access to other machines on the LANs of the registered devices. If you have servers scattered all over the countryside, this is an excellent way to manage and interconnect them. All data and communications between the nodes can then be routed through the encrypted VPN tunnel for rock-solid security.

With NeoRouter’s free software, you can set up your VPN server using a PC, a Mac, a Linux or FreeBSD machine, OpenWrt Backfire, and Tomato. VPN clients are available for PCs, Macs, Linux and FreeBSD PCs, OpenWrt, Tomato as well as Android phones and tablets. There’s even an HTML5 web application in addition to a Chrome browser plug-in. With the OpenWrt and Tomato devices or if you’re an extreme techie, you can broaden your NeoRouter star configuration to include bridging of remote LANs. See pp. 47-50 of the NeoRouter User’s Manual. And you can interconnect up to 256 devices at no cost. For $999, you can enlarge your VPN to support 1,000 devices. Screen sharing, remote desktop connections, HTTP, and SSH access all work transparently using private IP addresses of the VPN nodes which are automatically assigned to the 10.0.0.0 private network.

You may be wondering why we’ve moved on from Hamachi. Suffice it to say, LogMeIn has put the squeeze on the free version to the point that it’s now next to worthless. In fact, you’d be hard-pressed to find any mention of a free version of Hamachi (other than a trial edition) on LogMeIn’s current web site. Here’s a feature comparison which says it better than we could.

Today we are introducing the first of two NeoRouter VPN solutions. First, we have a simple installation script that works with any PBX in a Flash 2™ server. See also our more recent column for the dedicated server edition of NeoRouter VPN known as VPN in a Flash. It’s suitable for use on a dedicated server or running as a virtual machine. For smaller VPNs, we prefer the add-on module for PBX in a Flash. For larger deployments, you probably should opt for the dedicated machine. It also isolates your VPN server from your PBX which generally is the better network strategy. Regardless of the installation scenario you choose, keep in mind that neither option requires exposure of your entire server to the Internet. Only a single TCP port needs to be opened in your hardware-based firewall and IPtables Linux firewall.

NeoRouter Setup with PIAF2™. We’re assuming you already have a PBX in a Flash 2 server set up behind a hardware-based firewall. If not, start there. Next, we’ll need to download and run the installer for your new NeoRouter Server. It also installs the client. Just log into your server as root and issue the following commands:

wget http://incrediblepbx.com/install-neorouter
chmod +x install-neorouter
./install-neorouter

The installer will walk you through these five installation steps, but we’ll repeat them here so you have a ready reference down the road.

First, on your hardware-based firewall, map TCP port 32976 to the private IP address of your PIAF2 server. This tells the router to send all NeoRouter VPN traffic to your PIAF2 server when it hits your firewall. If you forget this step, your NeoRouter VPN will never work!

Second, we’re going to use your server’s public IP address as the destination for incoming traffic to your NeoRouter VPN. If this is a dynamic IP address, you’ll need an FQDN that’s kept current by a service such as DynDNS.com.

Third, each administrator and user is going to need a username to access your NeoRouter VPN. You can use the same credentials to log in from multiple client machines, something you may or may not want to do. We’re going to set up credentials for one administrator as part of the install. You can add extra ones by adding entries with one of the following commands using the keyword admin or user. Don’t use any special characters in the username and password!

nrserver -adduser username password admin
nrserver -adduser username password user

Fourth, make up a very secure password to access your NeoRouter VPN. No special characters.

You’re done. Review your entries very carefully. If all is well, press Enter. If you blink, you may miss the completion of the install process. It’s that quick.

Fifth, after your NeoRouter VPN is installed, you can optionally go to the NeoRouter web site and register your new VPN by clicking Create Standalone Domain. Make up a name you can easily remember with no periods or spaces. You’ll be prompted for the IP address of your server in the second screen. FQDNs are NOT permitted.

When a VPN client attempts to login to your server, the server address is always checked against this NeoRouter database first before any attempt is made to resolve an IP address or FQDN using DNS. If no matching entry is found, it will register directly to your server using a DNS lookup of the FQDN. Whether to register your VPN is totally up to you. Logins obviously occur quicker using this registered VPN name, but logins won’t happen at all if your server’s dynamic IP address changes and you’ve hard-coded a different IP address into your registration at neorouter.com.

Setting Up a NeoRouter Client. As mentioned previously, there are NeoRouter clients available for almost every platform imaginable, except iPhones and iPads. Hopefully, they’re in the works. So Step #1 is to download whatever clients are appropriate to meet your requirements. Here’s the NeoRouter Download Link. Make sure you choose a client for the Free version of NeoRouter. And make sure it is a version 1.7 client! Obviously, the computing platform needs to match your client device. The clients can be installed in the traditional way with Windows machines, Macs, etc.

CentOS NeoRouter Client. As part of the installation above, we have automatically installed the NeoRouter client for your particular flavor of CentOS 6, 32-bit or 64-bit. In order to access resources on your NeoRouter server from other clients, you will need to activate the client on your server as well. This gets the server a private IP address in the 10.0.0.0 network.

To activate the client, type: nrclientcmd. You’ll be prompted for your Domain, Username, and Password. You can use the registered domain name from neorouter.com if you completed step #5. Or you can use the private IP address of your server. If your router supports hairpin NAT, you can use the public IP address or server’s FQDN, if you have one.

To exit from NeoRouter Explorer, type: quit. The NeoRouter client will continue to run so you can use the displayed private IP addresses to connect to any other online devices in your NeoRouter VPN. All traffic from connections to devices in the 10.0.0.0 network will flow through NeoRouter’s encrypted VPN tunnel. This includes inter-office SIP and IAX communications between Asterisk® endpoints.

Admin Tools for NeoRouter. Here are a few helpful commands for monitoring and managing your NeoRouter VPN.

Browser access to NeoRouter Configuration Explorer (requires user with Admin privileges)

Browser access to NeoRouter Network Explorer (user with Admin or User privileges)

To access your NeoRouter Linux client: nrclientcmd

To restart NeoRouter Linux client: /etc/rc.d/init.d/nrservice.sh restart

To restart NeoRouter Linux server: /etc/rc.d/init.d/nrserver.sh restart

To set domain: nrserver -setdomain YOUR-VPN-NAME domainpassword

For a list of client devices: nrserver -showcomputers

For a list of existing user accounts: nrserver -showusers

For the settings of your NeoRouter VPN: nrserver -showsettings

To add a user account: nrserver -adduser username password user

To add admin account: nrserver -adduser username password admin

Test VPN access: http://www.neorouter.com/checkport.php

For a complete list of commands: nrserver –help

To change client name from default pbx.local1:

  • Edit /etc/hosts
  • Edit /etc/sysconfig/network
  • Edit /etc/sysconfig/network-scripts/ifcfg-eth0
  • Edit /etc/asterisk/vm_general.inc
  • reboot

For the latest NeoRouter happenings, follow the NeoRouter blog on WordPress.com.

GPL2 License. The install-neorouter application is open source software licensed under GPL2. The NeoRouter Server and Client software is freeware but not open source. This installer has been specifically tailored for use on PBX in a Flash 2 servers, but it can easily be adjusted to work with virtually any Linux-based Asterisk system. If you make additions or changes, we hope you’ll share them on our forums for the benefit of the entire VoIP community. Enjoy!

Originally published: Wednesday, April 18, 2012



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


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


 

Special Thanks to Our Generous Sponsors


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

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

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

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

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



Some Recent Nerd Vittles Articles of Interest…

  1. We’ve built a script to rename your PIAF2 server in all the right places. You can download it here. []

Introducing PPTP VPNs: The Travelin’ Man’s Best Friend

It’s been almost three years since we introduced VoIP Over VPN to securely interconnect Asterisk® servers. As LogMeIn® continues to squeeze the free Hamachi® VPN into oblivion, we’ll have a new, Really Free™ matrix VPN solution for you in coming weeks. This will let you interconnect up to 256 PBX in a Flash™ servers in minutes, not months, with no muss, no fuss, no fees, and no licensing worries. But today we want to begin VPN Month by turning our attention to those that need a virtual private network to connect back to a home office network or a home for that matter. This includes the traveling businessman or woman, the physician or lawyer with multiple remote offices, and any hub-and-spoke business such as a bank that has small branch offices that need to transparently link back to the mothership for network and communications services. The hidden beauty of PPTP VPNs is that all data (including phone calls) travels through an encrypted tunnel between the satellite office and home base. If you travel for a living and rely on other people’s WiFi networks for Internet access, a layer of network security will be a welcome addition.

Believe it or not, Microsoft introduced the Point-to-Point-Tunneling-Protocol (PPTP) with Windows 95. Back then we knew it as Dial-Up Networking. Suffice it to say that, in those days, PPTP was anything but secure. Unfortunately, the bad name kinda stuck. For the most part, the security issues have been addressed with the possible exception of man-in-the-middle attacks which are incredibly difficult to pull off unless you are a service provider or have access to the wiring closets of your employer. You can read the long history of PPTP VPNs on Wikipedia for more background. If you’re traveling to China or other democracy-challenged destinations, you probably shouldn’t rely upon PPTP for network security. If these security considerations aren’t applicable in your situation, keep reading because PPTP VPNs are incredibly useful and extremely easy to deploy for an extra layer of VoIP and network security in most countries that have severe wiretapping penalties in place.

PPTP VPNs also provide home-away-from-home transparency to home office network services. Simply stated, with a PPTP VPN, you get a private IP address on the home office LAN that lets you do almost anything you could have done sitting at a desk in the home office. There’s more good news. Fifteen years ago, we paid Cisco thousands of dollars for hardware boxes known as PPTP VPN Concentrators. You can still find some of them on eBay. For history buffs, a little company in California originally built these boxes. I think we paid about $3,000 for them. One year later Cisco bought the company and promptly doubled the price. Today, you can Do It For Free™ using your existing PIAF2 server platform. And, trust me, today’s 2-minute setup runs circles around the hoops we jumped through 15 years ago to install PPTP VPNs. Once deployed, they revolutionized mobile computing.

If you’re already running one or more PIAF2™ servers, then adding a PPTP VPN server to an existing system is a job for a Fifth Grader. Remember, you only need to do this on one server at your home base even if you have a dozen. The other good news is there are PPTP VPN clients for almost any platform you can name. Linux, Windows, Macs, Android, as well as iPhones, iPads, and iPod Touch devices all have free PPTP VPN clients that can be activated in less than a minute giving you instant, secure home base access.

Getting Started. We’re assuming you already have a PBX in a Flash 2 server set up behind a hardware-based firewall. If not, start there. Next, we’ll need to download and run the installer for your PPTP VPN Server. Just log into your server as root and issue the following commands:

wget http://incrediblepbx.com/install-pptp
chmod +x install-pptp
./install-pptp

UPDATE: For those of you still running a PBX in a Flash 1.7.x server under CentOS 5, we have a separate install script for you thanks to the great work of scurry7:

wget http://incrediblepbx.com/install-pptp-centos5
chmod +x install-pptp-centos5
./install-pptp-centos5

The Server Install: Five Easy Pieces. The installer will walk you through these five installation steps, but we’ll repeat them here so you have a ready reference down the road.

First, on your hardware-based firewall, map TCP port 1723 to the private IP address of your PIAF2 server. This tells the router to send all PPTP VPN traffic to your PIAF2 server when it hits your firewall. If you forget this step, your PPTP VPN will never work!

Second, you’re going to need a dedicated IP address on your private LAN to assign to the PPTP VPN server. Make sure it’s not an IP address from your router’s DHCP pool of addresses, and make sure it’s not one of the addresses from Step #3 below.

Third, you’re going to need two or more sequential IP addresses on your private LAN to assign to PPTP VPN clients that connect to your server. Remember, the PPTP design makes every remote client a node on your local area network so each client needs a private IP address on your LAN. Figure out how many client devices will be simultaneously connecting to your server and add one to it. Make sure the addresses you choose are in sequential order and not part of your router’s DHCP pool of addresses. Don’t use the address reserved for your PPTP server in Step #2 above. The address range should look something like this entry: 192.168.0.41-49. If you get the syntax wrong, guess what happens? If you screw it up, you can edit your localip and remoteip entries in /etc/pptpd.conf.

Fourth, each user is going to need a username to access your PPTP server. We’re going to set up credentials for one user as part of the install. You can add extra ones by adding entries to /etc/ppp/chap-secrets. For an extra layer of security, make the username as obscure as a password. Just don’t use any special characters. Upper and lowercase letters sprinkled with numbers are perfect. We recommend a length of at least 8 alphanumeric characters.

Fifth, make up an equally secure password to access your PPTP server. Same rules apply as in Step #4.

You’re done. Review your entries very carefully. If all is well, press Enter. If you blink, you may miss the completion of the install process. It’s that quick.

Configuring PPTP Client Devices. As we mentioned, there are available PPTP clients for Linux and Windows machines and Macs as well as Android and Apple smartphones and tablets. We’ve documented the steps for the various client setups on the PBX in a Flash Forum. Come visit! You’ll also discover some great tips from our resident gurus. We also would encourage you to post any questions that arise in your use of PPTP VPNs in that thread. You’ll get a quick and courteous response.

Secure VoIP Calling. The collateral benefit of implementing a PPTP VPN on your PIAF server is that all calls between remote extensions and home base can now be transmitted through a secure VPN tunnel. The only adjustment necessary using a SIP client on either an Android or Apple device is to replace the public server IP address with the server’s LAN IP address, and all of the communications traffic will flow through the VPN tunnel. The way we set up our Android phone with the Bria SIP client is to allocate an extension from the home office PIAF server to the SIP client and then enter the private IP address of the PIAF server in the Bria configuration. Then, when you’re at home base with WiFi, the client just works. And, when you’re on the road, just turn on the PPTP VPN, and Bria will register through the VPN tunnel using the exact same settings. It’s that easy, and it works great with WiFi or 3G/4G.

Checking for Connected Clients. If you get curious about who is logged into your PPTP server, here’s the command that’ll let you know: last | grep ppp.

GPL2 License. The install-pptp application is open source software licensed under GPL2. It has been specifically tailored for use on PBX in a Flash 2 (and now PIAF 1.7.x) servers, but it can easily be adjusted to work with virtually any Linux-based Asterisk system. If you make additions or changes, we hope you’ll share them on our forums for the benefit of the entire VoIP community. Enjoy!

What’s Next? For a more traditional client-server VPN which still relies upon a central server but uses a star topology to connect remote nodes, see this new Nerd Vittles article on the NeoRouter VPN.

Originally published: Monday, April 9, 2012



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


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…

Travelin’ Man 3: Securing a PBX in a Flash or VoIP in the Cloud Server

UPDATE: Be sure to read about the latest enhancement to Travelin' Man 3 here.

We're big fans of playing with our own VoIP hardware. It has the advantage of allowing the installation of everything behind a secure, hardware-based firewall thereby eliminating almost all of the security issues associated with VoIP telephony. With PBX in a Flash™ and its Zero Internet Footprint™, you can run a secure VoIP server in your home or office with no port exposure to the Internet. This setup, of course, assumes that you have the necessary bandwidth to support Internet telephony and that you possess the necessary skill set to maintain your own Linux® server running Asterisk®, FreePBX®, Apache®, SendMail®, PHP®, and on and on. Not everyone does. And, of course, there are thousands of organizations in which employees and their phones are not colocated with the home office VoIP communications server. And, believe it or not, there are folks that run their VoIP server on the public Internet without any firewall protection. For all of you, today's your lucky day.

Lest you think that we've bitten off more than we can chew, we want to acknowledge the dozens of thought-provoking comments on the PIAF Forums that ultimately led to today's new release. That is the hidden beauty of open source development. So, thank you dad311, atsak, tbrummell, Hyksos, markieb, Ramblin, darmock, lowno, blanchae, bmore, vcallaway, jroper, mag, briankelly63, mbellot, phonebuff, The Deacon, Astrosmurfer, frontline, ou812, LostTrunk, lgaetz, kh40s, rossiv, and all of our other gurus that make the PIAF Forums a great place to learn something new every day.

Thanks to our good friends at RentPBX, who provide terrific technical and financial support to both Nerd Vittles and the PBX in a Flash project, you don't have to roll your own. And your phones can be anywhere because your communications server sits on the public Internet. If cost is a factor or for those outside the United States that need a U.S. presence to take advantage of services such as Google Voice, the $15 a month price point using the PIAF2012 coupon code makes RentPBX more than competitive with what it would cost you in electricity, Internet bandwidth, and hardware resources to do it yourself... minus the headaches. You get a stable PBX in a Flash or Incredible PBX platform from the git-go. In addition, issues of jitter and latency all but disappear from the VoIP equation because you can choose the site of your hosted PBX from a worldwide list of Internet POPs including five regions in the U.S. as well as Canada and Europe. Many sit within a few milliseconds of the Internet backbone.

What you don't have with a hosted PBX solution is a hardware-based firewall sitting between your server and the Big, Bad Internet. With PBX in a Flash, the risk is lessened because the IPtables Linux Firewall is baked into the fabric of PBX in a Flash. For a comprehensive overview of how IPtables works, read this article. It explains IPtables better than any book you could buy.

Today we're pleased to introduce Travelin' Man 3™, a completely new security methodology based upon FQDN Whitelists and DDNS. In a nutshell, you get set-it-and-forget-it convenience and rock-solid VoIP security for your Cloud-based PBX or any PBX in a Flash server that's lacking a hardware-based firewall and you get both transparent connectivity and security for your mobile or remote workforce. We'll quickly cover the mechanics of this new IPtables methodology that allows you to secure your hosted PBX without compromising flexibility. The nitty gritty details of IPtables and firewalls we'll leave for you to explore at your leisure.

And, speaking of leisure, we always get the question: "Have you tested it?" For frequent readers of Nerd Vittles, you already know the answer. We eat our own dog food! In the case of Travelin' Man 3, we gave it a healthy workout just last week from the deck of the Carnival Fantasy as we passed by Cape Canaveral and in Key West with 4G service, and finally in several ports with WiFi access in the Bahamas. The beauty of the new design is you'll know instantly if it's not working because you'll never get your VoIP SIP phone to connect back to your VoIP server. We had zero problems using nothing more than an Android phone for both DynDNS updates and Bria SIP phone service. Being a pioneer isn't always easy, but... Somebody's gotta do it™. 😉

Unlike previous iterations of Travelin' Man, version 3 lets you configure remote phone access from the server and keep one or hundreds of phones in sync even with changing IP addresses using dynamic DNS update software at the sites of the remote phones. Whether the site is a remote office or a floating hotel room, any PC or Mac whether it's a desktop or netbook can automatically manage the dynamic DNS updates while keeping all of the local phones securely connected to the VoIP Cloud. And any jail-broken iPhone can manage the updates as well. With Android phones, it's even better. You have your pick of several great apps: DynDNS Client, Dynamic DNS Client, or Dynamic DNS Updater. We've found the DynDNS Client to be nearly perfect. As we'll explain in a minute, this version of Travelin' Man is not compatible with prior versions so you'll need to choose either the manual methodology of previous iterations or version 3 which does it automagically.

A New Approach to WhiteLists. Our new approach to IPtables is to lock down your server using a WhiteList of safe IP addresses and fully-qualified domain names (FQDNs) that should be given access to your hosted VoIP server. Then we'll periodically check to see if the IP addresses associated with the FQDNs have changed and make the necessary adjustments automatically. If any intruder attempts to access any port on your PBX, their packets are simply discarded by IPtables so the bad guys never know your server exists.

We've experimented with BlackLists for VoIP security, and the bottom line is they just don't work because of inherent problems with reliability and completeness. You spend your entire day updating lists of the bad guys only to discover that they've morphed to thousands of new IP addresses. Think Whack-A-Mole. IP addresses can easily be changed, and zombies have made attacks from third-party PCs a daily occurrence. Earlier this month, Nerd Vittles was hit with a denial of service attack from 30,000+ zombie PCs. This was in spite of the fact that we already block well over 100,000 IP addresses with the world's finest blacklists. Now it's 130,000. 🙄 Of course, none of the owners of these PCs had any idea how their computers were being used. I'm reminded of a famous judge's secretary who received a knock at her door one Sunday morning from the FBI. They informed her that she was using her computer to host porno movie downloads. I won't offend your tender sensibilities by repeating what she actually told those "young men."

There's also the problem of dynamic IP addresses which means an address that was used by a bad guy yesterday may be handed out by the same ISP to your grandma tomorrow. And it didn't take the bad guys long to poison blacklists with IP addresses that you actually need for services such as DNS or network time services. If you've ever had an IP address that ended up on one of the major blacklists, you know what a hassle it is to get your IP address unBlacklisted. The Soup Nazi has nothing on these folks.

Bottom Line: Public web sites are pretty much forced to use BlackLists because they want their sites to be generally accessible. With a VoIP server, we have the luxury of choice, and WhiteLists are much more effective for server security.

Overview. Our recommended design works like this. Block everything. Then permit packets from known hosts and non-routable IP addresses only, and limit known hosts to only the services they actually need. For example, a VoIP provider such as Vitelity that is providing a DID for your inbound calls doesn't need web access to your server. They need SIP and RTP access. Nothing more. The same goes for a remote user: SIP and RTP access so their SIP phone works. Nothing more. You, as Administrator, need complete access to the server but only from a specific, defined IP address. We, of course, don't want IPtables to have to inspect and filter every single packet flowing into and out of your server because that would bog things down. And we don't want users on your private LAN and remote users with dynamic IP addresses to have to wrestle with updating their phones just to stay connected. So, we've opened up all non-routable IP addresses and, once we've verified that a remote site is authorized access, then subsequent packets flowing into and out of the server for that IP address will be passed along without additional packet inspection. And once we set up the FQDN for a remote user, local dynamic DNS update clients can be used to automate the process of keeping IP addresses current. Then, every few minutes, we'll let your server check whether there's been a change in any users' dynamic IP addresses. If so, we'll simply refresh the IP addresses of all FQDNs using an IPtables restart to bring the phones back to life. To end users, The Phones Just Work™.

Finally, a word about security for VoIP in the Cloud servers. If you run a virtual machine from any hosting provider with wide open access to SIP, IAX, and web services, it's just a matter of time before your server is going to be compromised, period! If you foolishly use credit card auto-replenishment for one or more of your hosting providers then you might as well mail a blank check to the bad guys and wait for them to cash it. Today's tools will take you less than a minute to permanently lock down your server. So... JUST DO IT™.

To give you some idea of how far the Android platform has come, here are a couple screenshots of our Samsung 4G Skyrocket smartphone running three simultaneous VoIP apps all day, every day: Bria SIP extension to our PIAF2 server in Charleston, CSipSimple extension to our RentPBX VM in California, and GrooveIP session with Google Voice. Try that on your 3G iPhone 4S. 😉

We're officially releasing this for RentPBX users running PBX in a Flash or Incredible PBX 3™. These folks have been our pioneers for a very long time, and we like to take care of them first. Properly installed, Travelin' Man 3 should work fine on any PIAF™ or Incredible PBX system. We'll make a backup of /etc/sysconfig/iptables before replacing your IPtables setup with the PIAF default setup. It assumes ALL of your traffic is flowing on eth0. If that's not the case, don't use it without major modifications! We would hasten to add that Travelin' Man 3 is licensed as GPL2 open source software. So it's available NOW to everyone to use or to embellish as they see fit. We hope every provider of VoIP services offering virtual machines in the cloud as well as those without a hardware-based firewall to protect your Asterisk server will take advantage of the opportunity to customize and deploy this code for their particular IPtables environment. To paraphrase Bill Clinton: "It's your phone bill, stupid!"

Deploying Travelin' Man 3. Here's how to deploy Travelin' Man 3 on your server. In Step #1, we run secure-iptables. This locks down virtually all IP ports and services in the original IPtables configuration for PBX in a Flash to either the IP address or the FQDN of the administrator. Be advised that this setup uses the default ports for all PIAF services, e.g. SSH, WebMin, HTTP, etc. If you use custom ports, you'll need to modify the script accordingly. If the administrator is on the move or has a dynamic IP address on his or her desktop or notebook PC/Mac that will be used to administer the cloud server, then use an FQDN, not a static IP address, when you run secure-iptables.

Step #2 is automatic and is part of secure-iptables. It opens SIP and IAX port access for "trusted providers" such as Google, Vitelity, etc. This is covered in detail below. We also open accessibility from non-routable IP addresses. You obviously can close or limit private LAN access, if desired. We included it for the benefit of those running and administering PBX in a Flash on private LANs where internal security is not a concern.

In Step #3, we'll let you set up additional access for other providers, users, and phones. You get your choice of up to 9 separate services in addition to the whole enchilada, and each account gets a name and a file to keep track of the latest IP address entry: somename.iptables. These are stored in /root. Don't delete them! New accounts can be added using either a static IP address (add-ip) or an FQDN (add-fqdn). These accounts also can be deleted whenever necessary (del-acct). You can rerun secure-iptables whenever you like, but it automatically deletes all custom user accounts. Here's the list of services from which to choose. Mix and match as desired to meet your own requirements.

0 - All Services
1 - SIP (UDP)
2 - SIP (TCP)
3 - IAX
4 - Web
5 - WebMin
6 - FTP
7 - TFTP
8 - SSH
9 - FOP

Just a word of caution. IPtables stores its setup in /etc/sysconfig/iptables, but it actually runs from an image in memory on your Linux server. As part of the load process, IPtables converts all FQDNs stored on disk to static IP addresses. This speeds up firewall processing enormously. While it's possible to add IPtables rules in memory without writing them to disk (as in the original Travelin' Man design), don't do it with Travelin' Man 3! You will lose these settings whenever IPtables is restarted by running any of the above scripts or whenever a refresh of FQDN IP addresses becomes necessary. Whatever you do, never ever run the command: service iptables save. This command is used to write the IPtables entries in memory to disk. In doing so it writes only static IP addresses to disk. This will erase (a.k.a. ruin) your Travelin' Man 3 FQDN setup and force you to start over with Step #1. Otherwise, none of your FQDN's would ever get refreshed because they've all disappeared and become static IP addresses.

IPtables also has a major shortcoming IMHO. We support FQDNs in IPtables to make it more flexible. However, a failed FQDN during an IPtables restart will cause IPtables not to load at all. We have worked around this by adding our own restart command which you should always use: iptables-restart. You've been warned.

Locking Down Your Server. While there's still time, let's spend a minute and lock down your server to the public IP address of the PC that you use to administer the system. If you don't know the public IP address of the desktop machine you use to manage your server, then click on this link using a browser on that machine, and our web site will tell you the IP address.

Now log into your virtual machine as root using SSH and issue the following commands:

cd /root
wget http://incrediblepbx.com/travelinman3.tar.gz
tar zxvf travelinman3.tar.gz
yum -y install bind-utils
./secure-iptables

When prompted for the FQDN or IP address of your Administrator PC, use the FQDN if you have one. Otherwise, type in the IP address and press the Enter key. Agree to the terms of service and license agreement by pressing Enter. When the IPtables file displays, verify that you have typed your FQDN or IP address correctly, or you will lock yourself out of your own server. Press Ctrl-X to exit the editor, and then press Enter to update IPtables and save your new configuration.

NOTE: If you are running PBX in a Flash in a cloud environment, be sure to add an entry to Travelin' Man 3 with the IP address of your cloud server. ifconfig will tell you what the IP address is. To add the entry, issue the command: /root/add-ip cloud 12.34.56.78 using your actual cloud IP address.

WARNING: If you use an FQDN for your Administrator PC and it points to a dynamic IP address, be sure to also add this same FQDN using add-fqdn. Otherwise, IP address changes will not be detected, and you may lock yourself out of your own server.

Nobody can access your server except someone seated at your PC or on your private LAN with your login credentials. You can repeat this process as often as you like because each time the script is run, it automatically restores your original IPtables configuration. Now let's grant access to your SIP providers and those using remote SIP or IAX phones.

Using DynDNS to Manage FQDNs. The key ingredient with Travelin' Man 3 is automatic management of dynamic IP addresses. When a user or even the administrator moves to a different location or IP address, we don't want to have to manually adjust anything. So what you'll first need is a DynDNS account. For $20 a year, you can set up 30 FQDNs and keep the IP addresses for these hostnames current 24-7. For $30 a year, you can manage 75 hostnames using your own domain and execute up to 600,000 queries a month. That's more than ample for almost any small business but, if you need more horsepower, DynDNS.com can handle it. What we recommend is setting up a separate FQDN for each phone on your system that uses a dynamic IP address. This can include the administrator account if desired because it works in exactly the same way. When the administrator extension drops off the radar, a refresh of IPtables will bring all FQDNs back to life including the administrator's account. Sounds simple? It is.

Preparation. Before we make further modifications to IPtables in Step #3, let's make a list of all the folks that will need access to your VoIP Server in the Cloud. For each entry, write down the name of the person, server, or phone as well as the type of entity which needs server access. Then provide either the static IP address or FQDN for each entry. If one or more of your IP addresses are dynamic (meaning the ISP changes them from time to time), we'll cover managing dynamic IP addresses in a minute. For now, just make up a fully-qualified domain name (FQDN) for each dynamic IP address using one of the available DynDNS domains. For static IP addresses, use the FQDN or the IP address. HINT: FQDNs make it easy to remember which entry goes with which provider.

Make a list of your providers NOT in this list: Vitelity (outbound1.vitelity.net and inbound1.vitelity.net), Google Voice (talk.google.com), VoIP.ms (city.voip.ms), DIDforsale (209.216.2.211), CallCentric (callcentric.com), and also VoIPStreet.com (chi-out.voipstreet.com plus chi-in.voipstreet.com), Les.net (did.voip.les.net), Future-Nine, AxVoice (magnum.axvoice.com), SIP2SIP (proxy.sipthor.net), VoIPMyWay (sip.voipwelcome.com), Obivoice/Vestalink (sms.intelafone.com), Teliax, and IPkall. The providers listed above are already enabled in the secure-iptables setup script. We call them Trusted Providers only because we trust them and have personally used all of them. We consider them reliable folks with whom to do business. It doesn't mean others aren't. It simply means these are ones we have tested with good results over the years. The only providers you'll need to add are ones we haven't provided. Also be sure to check whether the FQDNs of the providers above cover the server for your account. If not, you'll need to manually add those FQDNs as well. Keep in mind that trusted providers will have full SIP and IAX access to your server so stick with tried-and-true providers for your own safety. The PBX in a Flash Forum and DSL Reports are good sources of information on The Good, The Bad, and The Ugly.

Finally, list with a name each phone that will be connected to an extension on your server. If you have 10 traveling salesmen, then you might want to name them all by last name and also provide FQDNs with their last names, e.g. smith.dyndns.org and jones.dyndns.org. No spaces or punctuation in names or FQDNs! We strongly recommend using FQDNs wherever you can because it means zero work for you when a provider changes an IP address. Here's the table we use:

Name
Type: Person, Provider, Server, Phone
IP Address Type: Static or Dynamic
FQDN or IP Address
Services Desired: SIP, IAX, Web, FTP, SSH, etc.

Step #3: Adding Authorized Users. Now take your list and add each account to your server while logged in as root and positioned in the /root directory. For static IP addresses, use add-ip. For dynamic IP addresses and FQDNs, run add-fqdn and plug in the FQDN for each account. When one of your accounts needs to be removed, just run del-acct from the /root folder on your server and plug in the name of the account to delete. If a user changes from a static IP address to a dynamic IP address or vice versa, just delete the user and then add them again with the new IP address or FQDN. All of the accounts are stored in /root and have names like this: name.iptables.

Step #4: Setting Up DynDNS Client Updates. There are actually two pieces in the Dynamic DNS update puzzle. At the end-user side, you need to deploy a DynDNS update client on the same subnet as the phone of your user. See the links above to download the update software you prefer. In the case of cellphones with SIP phone capability, this could be as simple as installing the DynDNS update client directly on the phone itself. Plug in your DynDNS credentials as well as the FQDN associated with the particular phone, and the rest is automatic.

Step #5: Setting Up IPtables Auto-Refresh. Finally, we need a way for your server to discover when a refresh of FQDNs becomes necessary because someone's IP address has changed. The simplest way to do this is to automatically run a simple script (ipchecker) that polls the DNS authoritative server to determine whether the dynamic IP address associated with an FQDN has changed. If so, we'll update the account.iptables file to reflect the new IP address and then restart IPtables. This will refresh all IP addresses associated with FQDNs. If all or most of your users spend time sleeping each day, you may wish to run the script only during certain (waking) hours of the day so your server has less of a load. The other consideration is how often to check. The guideline here is how long can any user live without their SIP phone being connected to your server. 10 minutes may be reasonable for some. 60 minutes may suffice for others. For us, it's 3 minutes. It's your choice. The way Travelin' Man 3 works is, whenever at least one account has an IP address change, it will trigger a restart of IPtables to do an IP address refresh for all of the FQDNs.

The top of the ipchecker script in /root looks like this:

#!/bin/bash

# Insert the account filenames to be checked below
# Remember to increment the account[#] for new entries

account[0]=larry.iptables
account[1]=curly.iptables
account[2]=moe.iptables

# ipchecker (c) Copyright 2012, Ward Mundy & Associates LLC.

You'll need to edit the script (nano -w /root/ipchecker) and modify the section in bold to reflect the actual FQDN account names you've created on your server that are associated with dynamic IP addresses only. You don't want to monitor accounts with static IP addresses or FQDNs that never get updated. When those extensions are off-line, it's not because their IP address changed, and restarting IPtables won't really help to improve the situation. Be sure to increment the account[n] array for each new account that you want to monitor and use the exact format shown in the example above. Before you enter an account in the script, display the contents of the file using cat /root/accountname.iptables. Make certain that the file includes BOTH an FQDN, then a space, and then an IP address. If not, delete the account (del-acct) and add it again using add-fqdn.

Once you've entered all of your accounts with dynamic IP addresses, save the script: Ctl-X, Y, then Enter. Run the script manually now to be sure it works as you intended: /root/ipchecker. Be advised that typos that list accounts that don't exist will cause problems. Error checking consumes processing cycles by requiring additional queries so we've left it out. That means it's solely up to you to check your account names for accuracy. And, remember, only include accounts that have dynamic IP addresses with FQDNs.

Step #6: Automating FQDN Refreshes with Cron. Finally, you'll need to add an entry to the bottom of /etc/crontab using nano. If you wanted the script to run 24 hours a day at 10 minute intervals, here's the command:

*/10 * * * * root /root/ipchecker > /dev/null

If you wanted the script to only run between the hours of 8 a.m. and 9 p.m. (server time zone) at 10 minute intervals, then you'd use something like this:

*/10 8-21 * * * root /root/ipchecker > /dev/null

On our RentPBX complimentary account which we use while traveling, we actually set the interval to 3 minutes. Since the DNS lookups use dig, changes on Android phones using the DynDNS client are almost instantaneous even with automatic switching between WiFi and cellular service. Finally, be sure to type date on your server and verify which time zone your cloud server thinks it's in! Adjust the times in /etc/crontab accordingly.

Be sure to check back here periodically for updates and follow the latest happenings about Travelin' Man 3 in this thread on the PIAF Forums. Enjoy!

Originally published: Thursday, March 29, 2012   Updated: April 19, 2014

UNLESS YOU DISCONTINUE USING FQDN'S WITH IPTABLES, IT IS ABSOLUTELY ESSENTIAL THAT YOU MONITOR YOUR SERVER DAILY IF YOU ARE RELYING EXCLUSIVELY UPON IPTABLES AS YOUR FIREWALL PROTECTION MECHANISM AND YOU ARE USING FQDN'S AS PART OF YOUR CENTOS SECURITY METHODOLOGY!



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


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

Meet the OBi110: A Permanent Google Voice Fix for Asterisk

We’re going to take a little time off for Spring Break and leave you with a terrific new tutorial from our good friend, Tom King. But first, despite pitching Google Voice as one of Asterisk’s Top 10 Tricks as recently as last October, Digium® apparently has had a change of heart. Our frustration with Asterisk® and Digium over the tepid support for Google Voice™ continues to build with the discovery that the latest (several) releases of Asterisk 10 break Google Voice connectivity entirely. The default Asterisk 10 install in PBX in a Flash™ continues to work just fine. The Digium response can be summed up in two words: "Oh Well." They’re apparently too busy doing Amazing New Things™ to worry about keeping your one-month-old PBX functioning reliably. So… we’ve pretty much given up on Digium’s attitude toward Google Voice ever changing. It’s simply not a priority for them which, of course, is their prerogative. But it also means everyone needs to start considering other alternatives if Google Voice reliability matters to you.

So today we start down a new path for our users and readers as well as the rest of the VoIP community. We hope to have a FreeSwitch® announcement soon to reliably handle Google Voice and Skype for Asterisk-based servers. These two functions have worked flawlessly with FreeSwitch since Anthony Minessale and Brian West first released them a couple years ago. In the meantime, reliability of Google Voice in Asterisk continues its downward spiral with almost monthly nightmares. The latest debacle is a month old today. Happy Birthday! 🙄

There’s another alternative as well. Sherman Scholten at OBiHai tells us they are poised to release the OBi202 with all the usual OBi110 goodies plus T.38 real-time faxing over IP plus support for PPPOE, VLANs, and up to 4 SIP or Google Voice trunks. Add a firewall with DRDOS attack protection and VPN pass-through plus some amazing PBX-like functionality for management of collaborative calling, and you really couldn’t ask for much more in a product which will retail for under $100. OBiHai has been kind enough to send us a complimentary unit, and we’ll have a full review for you soon.

In the meantime, we have a short term answer for anyone that depends upon Google Voice to perform tasks (such as making phone calls) where reliability matters. It’s the under $50 OBi110. You’ll find a link to buy one while supporting Nerd Vittles in the right column. And today we’ll show you how to set it up to use with Asterisk and PBX in a Flash™ so that Google Voice calls flow into and out of your server reliably and transparently without worrying about who may have "improved" things while you were sleeping.

PIAF2 Preliminaries. If you’re currently using PBX in a Flash 2 for your Google Voice needs, then the first thing you need to do is remove any Google Voice trunks you’ve activated using the Google Voice module in FreePBX. Once you’ve done that, you’ll also want to disable the jabber and gtalk modules in Asterisk. This has no impact upon the separate gvoice command line utility which will continue to work fine with the speech-to-text apps that we’ve released over the last month. The Google Voice for Python project is well supported and (fortunately) is separate and apart from the Asterisk project. We’ve also documented on the PIAF Forums how to keep gvoice running reliably on your server.

To disable Google Voice in Asterisk, log into your server as root and edit modules.conf in /etc/asterisk. Change the two lines in the [modules] context for these two modules by changing the word load to noload. Then save your changes and restart Asterisk: amportal restart.

noload => res_jabber.so
noload => chan_gtalk.so

Step2. Once you have your OBi110 in hand, the rest of the process to get it handling inbound and outbound Google Voice calls for Asterisk is simple as long as you don’t skip any steps. Just download Tom King’s new tutorial and follow along. You’ll be up and running in under 15 minutes with a reliable, independent alternative for Google Voice calling with Asterisk. Enjoy!

Originally published: Friday, March 16, 2012


Well, we’re just a few folks shy of 5,000 followers on Google+. See the right column for today’s tally under Google Goodies. That’s less than 10% of our weekly Nerd Vittles fan club. So what are you waiting for? We can’t promise you one of these but, if you become #5000 to put us in your Google+ circles, we do want to hear from you! Please include your mailing address. 😉



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


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…

SMS Dictator: Send SMS Messages Using Any Asterisk Phone

Here's another Google™ speech-to-text application for your Asterisk® goody bag. Today's installment lets you pick up any phone on your Asterisk system, dictate a brief message, have it transcribed by Google, and then delivered as an SMS text message to any 10-digit number of your choosing. The installation process on PBX in a Flash™ systems takes only a minute. And you'll find Asterisk SMS Messaging to be a welcome addition to your VoIP Swiss Army Knife.

Prerequisites. For the installer to work seamlessly, you'll need a PBX in a Flash 2 server with the PERL gvoice CLI tool. You can test whether this is working by logging into your server as root and issuing the command: gvoice. When prompted for your Google Voice account name, enter it and include @gmail.com. Then enter your password. If you get a gvoice prompt, all is well. Type quit to exit. If you get errors or the gvoice app doesn't exist, click on the gvoice link in this paragraph to get things squared away.

You'll also need a Google Voice™ account that can be used to send the SMS messages. Today's SMS installer will prompt you for your Google Voice account name in the format: myname@gmail.com. Then you'll be prompted for your Google Voice password. Once you've entered your credentials, the rest is automagic. With a little manual tweaking of the installation script, you can get this working on any Asterisk-based server running under Linux.

As configured, SMS Dictator™ uses extension 767 (S-M-S) to generate SMS messages. If this conflicts with an extension on your server, you can edit the extensions_custom.conf dialplan in /etc/asterisk.

Legal Disclaimer. What we're demonstrating today is how to use a publicly accessible web resource to respond to dictation requests generated by a phone connected to your Asterisk server. We're assuming that Google has its legal bases covered and has a right to provide the public service they are offering. We are not vouching for Google or the services being offered in any way. By using our tutorial, YOU AGREE TO ASSUME ALL RISKS, LEGAL AND OTHERWISE, ASSOCIATED WITH USE OF THIS FREELY ACCESSIBLE WEB TOOL. NO WARRANTY EXPRESS OR IMPLIED IS BEING PROVIDED BY US INCLUDING ANY IMPLIED WARRANTY OF FITNESS FOR USE OR MERCHANTABILITY. You, of course, have an absolute right not to read our articles or implement our code if you have reservations of any kind or are unwilling to assume all risks associated with such use. Sorry for legalese, but it's the time in which we live I'm afraid. Plain English: "Don't Shoot the Messenger!"

Installation. To install SMS Dictator, log into your PBX in a Flash server as root and issue the following commands:

cd /root
wget http://nerdvittles.com/sms-dictator.sh
chmod +x sms-dictator.sh
./sms-dictator.sh

Accept the license agreement and fill in your Google Voice credentials when prompted. In under a minute, you'll be ready to test things out.

Taking SMS Dictator for a Spin. Now you're ready to try it. Pick up any phone connected to your Asterisk server. Dial S-M-S (767). When prompted, dictate a brief message and press #. If the transcription played back is correct, press 1. Or you can press 2 to try again. When prompted, enter the 10-digit number of the SMS recipient. If the number read back to you is correct, press 1 to send the SMS message or press 2 to enter a new 10-digit number. It's as simple as that.

AsteriDex Integration. If you're using AsteriDex for your contacts, then it's pretty simple to look up SMS contact numbers from there instead of having to remember them and manually key them in. Log into your server as root and replace the 767 dialplan code in /etc/asterisk/extensions_custom.conf with the following. Be sure to insert your credentials in the gvoice line (3d from the bottom), save your changes, and reload your Asterisk dialplan by entering this command: asterisk -rx "dialplan reload"

; SMS Dictator for AsteriDex
exten => 767,1,Answer
exten => 767,n,Wait(1)
exten => 767,n(record),Flite("After the beep. I will reecord your S.M.S message. When you're finished. press the pound key.")
exten => 767,n,agi(speech-recog.agi,en-US)
exten => 767,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 767,n,Flite("I think you said: ${utterance}")
exten => 767,n,Flite("If this is correct. press 1.")
exten => 767,n,Flite("To start over. press 2.")
exten => 767,n,Flite("To cancel and hang up. press 3.")
exten => 767,n,Read(MYCHOICE,beep,1)
exten => 767,n,GotoIf($["foo${MYCHOICE}" = "foo1"]?continue)
exten => 767,n,GotoIf($["foo${MYCHOICE}" = "foo2"]?record)
exten => 767,n,Playback(goodbye)
exten => 767,n,Hangup
exten => 767,n(continue),Set(SMSMSG=${utterance})
exten => 767,n(pickcontact),Flite("At the beep say the name of the person or company you wish to contact. Then press the pound key.")
exten => 767,n,agi(speech-recog.agi,en-US)
exten => 767,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 767,n,AGI(nv-callwho.php,${utterance})
exten => 767,n,NoOp(Number to call: ${NUM2CALL})
exten => 767,n,GotoIf($["foo${NUM2CALL}" = "foo0"]?pickcontact)
exten => 767,n,Flite("Sending S.M.S message. One moment please.")
exten => 767,n,System(gvoice -e GVname@gmail.com -p GVpassword send_sms ${NUM2CALL} "${SMSMSG}")
exten => 767,n,Flite("S.M.S message has been sent. Good bye.")
exten => 767,n,Hangup

Next Steps. The SMS messaging possibilities, of course, are endless. A lively discussion is underway in the PIAF Forums about SMS message blasting using Asterisk. This could include notifications to Little League teams about schedule changes, or alerts from a school about emergencies, or community alerts about tornados. You can probably think up a dozen more on your own. Come join the discussion, and we'll we'll address adjusting today's application to handle SMS message lists for roboSMSing and more in the coming weeks. Enjoy!

3/2/2017 Update: A patched version of pygooglevoice to support SMS messaging is now available here.

Originally published: Monday, March 12, 2012



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


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

PBX in a Flash 2: One Incredible VoIP Platform

We’ve got lots of great news for you this week. So it’s hard to know where to start. Let’s begin on the hardware front. For frequent readers of Nerd Vittles, you know that we’ve been a fan of the Acer Aspire Revo since it was released almost two years ago. At that time, the market price was about $200. Today, NewEgg sells one for $350. What’s changed besides the price almost doubling? Well, not much if you’re looking for a home or SOHO VoIP server to handle your communications needs. You get a better version of Windows for the garbage can and a dual-core Atom processor. Neither one is really necessary for our purposes.

We try to stay away from do-it-yourself hardware projects, but this one was just too good to pass up. NewEgg has been featuring a couple of Foxconn barebones kits in the $100 range that require zero talent to build. Basically, you add a stick of RAM and a hard disk and Voilà, you’re done. We’ve been late to the solid-state drive (SSD) party so here was a golden opportunity to experiment. For about $100, you can purchase a 60 to 128 GB Type III SSD depending on the sale of the week. SSDs (not to be confused with STDs) provide an incredibly fast storage device. No moving parts, little heat, no noise. In short, a perfect VoIP platform for those needing a PBX with less than 50 extensions. Add $20 for a 4GB stick of notebook RAM, and you’ve got yourself an awesome little VoIP server with the footprint of about 3 packs of cigarettes (if you remember what those are). Buy a second one if you want redundancy. And, yes, a PIAF2™ app is coming soon to keep the units in sync. For now, check out this thread on the PIAF Forums for ordering details. You’ll also find detailed tips for getting WiFi functioning AND secure on the third page of the thread.

PIAF2: One Incredible Platform. So now that you’ve got VoIP hardware, what’s next? Here’s how we build up our systems today. Start by downloading the 32-bit PIAF2 ISO. Then make yourself a bootable thumb drive using a 1GB or larger flash drive. Our tutorial will show you how. Boot up your new server with the thumb and install PIAF2 with Asterisk® 1.8 and FreePBX® 2.9. Once you answer a few prompts, head out to lunch. Your server will be ready when you get back. Log into your server as root and install Incredible PBX™: install-incredpbx3. Want a fax server, too? Just run: install-incredfax2. And, if this is for personal use, then there’s now an easy option to add Skype as well: install-skype2. Want backups to a thumb drive? It’s finally ready!

Sounds simple? It is. But what about documentation? Well, we’ve got you covered there, too. For PBX in a Flash™ installation, it’s here. For Incredible PBX and Incredible Fax™, it’s here. For Skype, it’s here. And, for Incredible Backup™ and Restore (30-day beta), it’s here.

There are lots of choices in the VoIP space today. But Nobody Beats FREE.™ And the ease with which you can add every VoIP bell and whistle on the planet leaves PIAF2 with no rivals, period. The thanks, of course, goes to our compatriot, Tom King, who has worked tirelessly to make this simple enough for any Fifth Grader. Why not make a little contribution to the project once you’re up and running. You’ll be rewarded tenfold. 😉

Originally published: Monday, March 5, 2012



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 Perfect Threesome: iNum + VoIP.ms + Google Voice

We’ve got a terrific new VoIP development for you today especially for those who travel internationally. For several years, a VoIP company called VoxBone has been pushing hard to establish an International Number™ (iNum™) for every phone on the planet so that every telephone could call every other telephone at little or no cost. They’re not quite there, but two recent events will certainly hasten the implementation. The first was an announcement from VoIP.ms that they would provide a free iNum DID and free iNum calling to every one of their customers with a credit balance in their account. The second was last week’s announcement from Google that they, too, would support free iNum calling worldwide using any Google Voice account. Today, we’ll show you how to take advantage of these two developments to begin making free calls worldwide using your PBX in a Flash™ server, a WiFi-enabled smartphone, and an available WiFi connection. Basically, the plan is to use free iNum calling to get back to your PBX for dial tone and then use DISA for free Google Voice calling in the U.S. and Canada.

Until everyone has an iNum or Google opens up Google Voice outside North America, the hidden beauty of iNum for those of us who have both is the cost savings that can be achieved by phoning home with iNum from anywhere in the world for free. And, once the call hits your Asterisk® PBX, it’s incredibly simple to route the call to DISA, prompt for a password, and then place a call to anywhere in the U.S. or Canada at no cost with PIAF2™ and Google Voice.

This can be accomplished in several ways. First, you can download a SIP phone and use it in conjunction with your VoIP.ms account and a smartphone to make free iNum calls from any WiFi hotspot in the world. Bria is our favorite on both the iPhone/iPad and Android platforms. If $10 is too rich for your blood, there are some free alternatives: CSipSimple for Android and 3CXPhone for Android or iPhone. A second alternative is to use Google Voice or Gtalk to connect back to your PIAF2 server via iNum and then use DISA and your local trunks to place outbound calls. A final alternative is to take advantage of the numerous local numbers now available in many countries to phone home using iNum. The only cost of these calls is the cost associated with calling the local number. You’ll find a list of the local phone numbers to make these calls on the iNum web site or in the footnote to this article.1 So today we’ll show you how to set up your PIAF2 server to support free iNum calling. It’s a 15-minute project.

VoIP.ms Setup. To get started, if you’re not already a customer, register for a voip.ms account by filling out their registration form.

Once you submit the form, you’ll have to confirm your registration by clicking on the link that is emailed to you. Then you’re ready to login with your email address and the password you set up when you created your account. That’ll bring you to the Main Portal Page for your new voip.ms account.

You’ll need a positive balance in your VoIP.ms account in order to create your free iNum account so deposit some money using PayPal or a credit card by clicking Finances, Add Funds. The minimum deposit is $25 which can be used to make penny a minute calls in the U.S. and Canada or equally reasonable calls to any phone number in the world. We won’t be doing any of that today. For today, all of our calls will be free thanks to iNum and the generous support of VoIP.ms. But the nest egg will be there as a backup to your other PIAF2 VoIP providers which is an excellent idea anyway.

Like Vitelity, VoIP.ms lets you create subaccounts to compartmentalize your VoIP services. This makes it easy to use VoIP.ms on multiple PIAF2 servers or even standalone SIP telephones. It also provides added security by separating out account names and passwords for VoIP services from your main VoIP.ms portal account that let’s you manage your settings and VoIP funding, a very good idea. So let’s first set up an account to use with Asterisk just to show you how easy it is.

From the Main Portal Menu, click on Subaccounts, Create Subaccount. The Subaccount creation form will display. Fill it out so it looks something like this. Just click on the form below to enlarge it if you want a better view.

Once you’ve clicked the button to create the subaccount, it takes about a minute for voip.ms to activate it. Then click Main Menu, Portal Home. The bottom of the portal page will now show your subaccount.

Let’s create one more subaccount. We’ll use this one so that we can access VoIP.ms from a standard SIP app running on our iPhone or Android device. We can use the subaccount either to make outbound calls directly from VoIP.ms on a pay per minute basis, or we can use it to make free iNum calls. To create the subaccount, repeat the process above and fill in the blanks using your own credentials and a very secure password. Be sure to choose ATA device, IP Phone or Softphone for the Device Type. We always leave International Calls Disabled unless we really plan to make international calls. This will not affect your ability to make iNum calls, and it reduces your financial exposure in the event your subaccount is compromised. Never, ever use auto-replenishment from your credit card on a VoIP provider account from any provider.

Before we get too far along, let’s activate your new iNum DID. Click on DID Numbers, Order DID. When the DID Order Form displays, click on the iNum link to order your free iNum DID.

When the iNum DID order form displays, fill out the form by clicking on the POP location nearest to your server. Then, in the SIP/IAX Routing column, be sure to select the Subaccount we created previously rather than the default Main Account. Finally click the Click Here to Order button.

You’ll get a Confirmation display that shows your new iNum DID. Write it down! We’ve already set up the proper routing for your new iNum DID in the previous step so you can ignore the Managing Your DID message.

That completes the setup of your VoIP.ms account with your free iNum DID. Now let’s configure your PBX in a Flash server to support VoIP.ms and iNum. We’re assuming you already have a PBX in a Flash server configured with at least one Google Voice account activated. If not, stop here and complete that step using the PIAF2 tutorial and optionally the Incredible PBX 3 and Incredible Fax 2 tutorial.

Smartphone SIP Client Setup. We used the free cSipSimple Android app to set up a connection with our second subaccount at VoIP.ms using cSipSimple’s Basic Setup Wizard. Here are the entries required to gain connectivity:

Once your SIP client is connected to VoIP.ms through your smartphone, you can make free iNum calls using this dial syntax: 0118835100xxxxxxxx where xxxxxxxx is the last 8 digits of your iNum beginning with 0. As noted previously, you do NOT have to enable international calls on your VoIP.ms subaccount for these calls to go through.

PBX in a Flash iNum Setup. We’ll be using the FreePBX GUI to configure PBX in a Flash to support iNum. Using your browser, log into the IP address of your server: http://ipaddress/admin. When prompted for your username and password, use maint and whatever FreePBX password you assigned when your server was set up.

To simplify things, we’re going to set up 2 trunks: one for your VoIP.ms subaccount and another for iNum. Begin by choosing Trunks, Add SIP Trunk in the FreePBX GUI. For Trunk Name, use voipms. For Maximum Channels, choose 2. For the Dial Pattern, enter 1 | NXXNXXXXXX and, in Outgoing Settings for the PEER Details, enter the following using your subaccount name and password as well as the POP you chose for your subaccount:

canreinvite=yes
nat=yes
context=from-trunk
host=atlanta.voip.ms
secret=subacctpw
type=peer
username=137786_myinum
disallow=all
allow=ulaw
fromuser=137786_myinum
trustrpid=yes
sendrpid=yes
insecure=invite
qualify=yes

Leave all the fields for Incoming Settings blank. For the Registration String, the syntax is subacctname:subacctpw@atlanta.voip.ms:5060/8835100xxxxxxxx. Using our example and assuming you’re using the Atlanta POP, the entry would look like this where xxxxxxxx is your own 8-digit iNum beginning with 0:

137786_myinum:secretPassword21@atlanta.voip.ms:5060/8835100xxxxxxxx

Verify that your server got a successful registration with your VoIP.ms subaccount by clicking Tools, Asterisk Info, SIP Info.

Now click Setup, Trunks, Add Custom Trunk. For Trunk Name, use iNum. For Maximum Channels, choose 5. For Dial Pattern, use 0XXXXXX. including the period! For Custom Dial String, use SIP/0118835100$OUTNUM$@voipms.

Next, we need to create an Inbound Route. Use your full iNum DID number in the DID Number field, e.g. 8835100xxxxxxxx where xxxxxxxx is your personal iNum beginning with a 0. Activate CallerID Superfecta for the CID Lookup Source. And choose a Destination for the incoming iNum calls. This could be an extension, an IVR, or whatever else you’ve set up on your server. For now, route it to a working extension on your PBX so we can test it below. Then you can edit the inbound route and change it to any destination.

Finally, create an Outbound Route. Name the route OutiNum. For the Dial Pattern, use 0XXXXXX. with the trailing period. For the Trunk Sequence for Matched Routes, choose inum. After you save the trunk settings, move it to the top of your trunk listing in the right column of FreePBX. What this route does is allow you to call other iNum numbers (including your own) by simply dialing the last 8-digits of any iNum that begins with 8835100 or 0118835100. These 8 digits will ALWAYS begin with a 0.

Now let’s modify at least one of your existing Google Voice Outbound Routes so that you also can make iNUM calls with Google Voice by dialing from any extension using the full 8835100xxxxxxxx international number. Go to Outbound Routes and click on the name of one of your Google Voice trunks. Add the following new Dial Pattern and click Submit Changes: 8835100XXXXXXXX

Taking iNum for a Spin. To test things out, use a phone connected to an extension other than the one you chose to route incoming iNum calls to above. Dial the last 8 digits of your own iNum DID, and that extension should begin ringing. Answer the other extension and make sure you have audio in both directions. Next, dial your complete iNum DID beginning with 8835100. This should also cause the other extension to ring even though the call was initiated through your Google Voice trunk. If you’d like to get a Weather Report by Zip Code, we’ve set up an iNum for you to try. Just dial 09901997.
Enjoy!

Originally published: Monday, February 27, 2012



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…

  1. Local iNum Access Numbers include the following: []

Thumbs Up: A New Flash Drive Installer for PIAF2 + CentOS6

Original photo courtesy of Green House Co. Ltd.

With the advent of netbooks and the gradual disappearance of optical drives, it’s just a matter of time until USB thumb drives will be the only remaining physical installation method still available for most software. Look no further than Apple’s Lion OS if you don’t believe it. Of course, if Microsoft has its way, no installation of Linux will be available with some Windows 8 hardware… for your own safety, of course. We’ll leave that for the courts to sort out.

Since inception, one of the key goals of the PBX in a Flash™ project has been to provide an install option that works reliably with USB thumb drives. Thanks to the great work of bmore on the PIAF Forums, a USB Flash Drive installer was developed for PBX in a Flash 1.7.5.6.2. And today, we’re pleased to deliver a more flexible thumb drive installation method for 32-bit PIAF2™ installs running under CentOS™ 6.2. With this new thumb drive installer comes support for every current version of Asterisk® and FreePBX®.

With PIAF2, you get your choice of Asterisk 1.8.8.0 or 10.0.0 as well as FreePBX 2.8, 2.9, or 2.10. And, with the standard PIAF2 ISO installer, you also have the option of exiting to the Linux command prompt to compile a network driver or to select from a broad selection of newer Asterisk releases. If you choose this option, you’ll be prompted to log into your server as root with the root password you chose initially. Once logged in, you can execute any series of Linux commands or issue one of the following commands to choose a specific release of Asterisk:

  • piafdl -p beta_1881_purple (loads Asterisk 1.8.8.1)
  • piafdl -p beta_1882_purple (loads Asterisk 1.8.8.2)
  • piafdl -p beta_1890_purple (loads Asterisk 1.8.9.0)
  • piafdl -p beta_1891_purple (loads Asterisk 1.8.9.1)
  • piafdl -p beta_1892_purple (loads Asterisk 1.8.9.2)
  • piafdl -p beta_1893_purple (loads Asterisk 1.8.9.3)
  • piafdl -p beta_1001_red (loads Asterisk 10.0.1)
  • piafdl -p beta_1010_red (loads Asterisk 10.1.0)
  • piafdl -p beta_1011_red (loads Asterisk 10.1.1)
  • piafdl -p beta_1012_red (loads Asterisk 10.1.2)
  • piafdl -p beta_1013_red (loads Asterisk 10.1.3)

WARNING: Asterisk 10.1.x releases reportedly break Google Voice! The good news is that the new PIAF deployment policy for Asterisk releases is working. We no longer incorporate the latest Asterisk releases as the default PIAF install before independent testing. You, of course, are free to load and test any of the releases you wish using the commands outlined above.

If you compiled a network driver and wish to resume the installation process, just reboot the server. If you chose a specific flavor of Asterisk, simply accept the license agreement and the customized PIAF2 install will continue. Here’s a quick overview of what happens next.

The PIAF2 installer then syncs the time on your server to NTP, installs the latest yum updates for CentOS 6.2, installs the versions of Asterisk and FreePBX you selected (HINT: Incredible PBX requires FreePBX 2.9) and some other utilities including WebMin, Festival and Flite text-to-speech support for Asterisk, and, of course, the Google Voice GUI which lets you configure PIAF2 to make free calls in the U.S. and Canada in a matter of seconds. Finally the PIAF2 installer patches your system to activate the IPtables firewall for both IPv4 and IPv6 as well as adding Fail2Ban monitoring for Asterisk, SSH, and your Apache web server.

As part of the install procedure, you also will be prompted to choose a version and master password for FreePBX and the other VoIP web utilities. Once your server reboots, you can log into the Linux CLI using your root password to obtain the IP address of your server. Then you can access the PIAF2 web GUI with a browser pointed to the same IP address. To access the FreePBX GUI, choose that icon from the Admin menu. Just click on the User button to get there. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose during the PIAF2 install. We’ll walk you through the install steps once we get your USB thumb drive set up.

PBX on a Flash

Here’s the 5-minute drill to get a USB thumb drive loaded with the latest and greatest 32-bit PIAF2 ISO. Once you get that far, follow the PIAF2 install steps outlined below to get your system up and running. In less than an hour, you’ll have a fully functioning, rock-solid reliable PBX that can meet all of your telephony requirements. And, remember, it’s free and always will be™.

Prerequisites. To get everything installed on your USB Flash Drive, you’ll obviously need at least a 1GB Flash Drive. HINT: 2GB flash drives may be cheaper! Next, you’ll need a Windows XP/Vista/7 computer on which to set up the thumb drive. On the Windows PC, you’ll need to download and install the latest, greatest version of ISO2USB from SourceForge. We recommend you also download and install the HP Formatting Utility for flash drives. Finally, you’ll need to download the 32-bit PIAF 2.0.6.2.1 ISO from SourceForge.

Creating USB Flash Drive. Step #1 is to partition and format your USB flash drive as a FAT32 device. Some flash drives are temperamental about the formatting step. We can’t recommend strongly enough using the HP Formatting Utility to make certain you get a reliable, properly formatted thumb drive! Also be careful that you are, in fact, formatting your thumb drive and not your Windows hard disk!

Step #2, once the device is properly formatted, run ISO2USB. You’ll get a screen that looks like what is shown above. Click on the … button to the right of DiskImage ISO and choose the PIAF2 ISO that you downloaded to your Desktop. Make certain that the destination device shown on the bottom line of the display is your USB flash drive. You do not want to accidentally trash your primary drive!

Here’s the tricky part to this. You need to know the drive names of the devices on the target machine where you ultimately will be using this thumb drive. Try these commands on your target machine using a Linux LIVE CD if you’re unsure: dmesg | grep logical AND dmesg | grep sectors. For most modern machines with IDE drives, the names will be sda, sdb, etc. For older machines, they may be hda, hdb. You’ll know if it doesn’t work. 🙂

The gotcha with CentOS 6.x is that, whenever you boot a machine using a USB flash drive with CentOS 6.x, the device names get switched for that boot only. The USB boot device becomes sda even if your hard disk on the system shows up as sda when it is running without a thumb drive. So… in the ISO2USB setup, change the Hard Disk Name to sdb, and change the USB Device Name to sda. For Foxconn hardware and AMD BIOS machines, use sdc instead of sdb. A few other systems use sdd. In all cases, use sda for the USB Device Name. And, as we noted, you’ll know quickly if you made the wrong choice. Just recreate the thumb drive using the next letter in the alphabet. 😉

Once you’ve double-checked your USB destination drive (HINT: the drive size is quite different), choose OK to begin. When the ISO install completes, don’t forget to Eject your USB flash drive before removing it from the Windows PC!

Using the USB Flash Installer. When using the new flash installer, remember that we need to boot your new machine from the thumb drive. On most newer Atom-based computers, you accomplish this by inserting the USB device, turning the machine on, and then pressing F12 during the boot sequence to choose the boot device. You’ll just have to watch the screen of your new computer to see if some other key is used to pull up the boot selection screen. If all else fails, you can adjust the boot sequence in the BIOS settings to boot first from the USB device. If you change your BIOS boot sequence, just remember to remove the device when the initial install of CentOS completes and the PIAF2 reboot sequence begins. If instead you again see the initial PIAF2 install screen warning you that your disk is about to be erased, then remove the thumb drive and reboot the machine once again.

PIAF Installation. Once you’ve booted with your PIAF2 thumb drive, you’ll be prompted to choose an installation method. For most users, simply pressing the Enter key will get things started. Choose a time zone when prompted and then enter a very secure root password for your new server. The installer then will load CentOS 6.2 onto your server. When complete, your server will reboot. Remove the thumb drive at this point, and you’ll be prompted to choose the version of Asterisk to install. See the discussion above for making a selection. If you see a Linux login prompt instead, it means sdb was the wrong device name for your server’s hard disk. Log in as root using the password you set up previously and issue the following commands to decipher the correct device name. Then rebuild your thumb drive using the correct device name and start again.

ls /dev/sd*
ls /dev/dd*

If all went well, after choosing the version of Asterisk to install, you’ll be prompted for a version of FreePBX and a master password for FreePBX. Make it very secure! We recommend FreePBX 2.9 if you plan to use Incredible PBX. Once you’ve made your choices, the PIAF2 installer will load Asterisk, FreePBX, and all the other PBX in a Flash components including Google Voice.

Once your server reboots, log into the Linux CLI using your root password and write down the IP address of your server from the status display.

Security Warning: Always, always, always run PBX in a Flash behind a secure, hardware-based firewall with no PBX in a Flash ports exposed to the Internet! After all, it’s your phone bill.

FreePBX Setup. Most of your life with PBX in a Flash will be spent using the FreePBX web GUI and your favorite browser. Just click on the image below to enlarge. To access the FreePBX GUI, point your browser at the IP address you wrote down. Read the RSS Feed in the PIAF GUI for late-breaking security alerts. Then click on the Users button which will toggle to the Admin menu. Click the FreePBX icon. When prompted for your username and password, the username is maint. The password will be the FreePBX master password you chose in completing the PIAF2 install.

To get a minimal system functioning, here’s the 5-minute drill. You’ll need to set up at least one extension with voicemail, configure a free Google Voice account for free calls in the U.S. and Canada, configure inbound and outbound routes to manage incoming and outgoing calls, and plug your maint password into CallerID Superfecta so that names arrive with your incoming calls. Once you add a phone with your extension credentials, you’re done.

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. To create extension 201 (don’t start with 200), click Setup, 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 [make this unique AND secure!]
dtmfmode … rfc2833
Voicemail & Directory … 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 the email message]
play CID … yes [if you want the CallerID played when you retrieve a message]
play envelope … yes [if you want the date/time of the message played before the message is read to you]
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. Incredible PBX automatically randomizes all of the extension passwords for you.

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.

Courtesy of wordle.net

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 this year. You also get a free phone number in your choice of area codes. PBX in a Flash now installs a Google Voice module for FreePBX that lets you set up your Google Voice account with PBX in a Flash in just a few seconds once you have your credentials.

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 account, 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 Setup tab and choose Google Voice in the Third Party Addons. To Add a new Google Voice account, just fill out the form:

Phone number is your 10-digit Google Voice number. Username is your Google Voice account name without @gmail.com. NOTE: You must use a Gmail.com address in the current version of this module! Password is your Google Voice password. NOTE: Don’t use 2-stage password protection in this Google Voice account! Be sure to check all three boxes: Add trunk, Add routes, and Agree to TOS. 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 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.

CallerID Superfecta Setup. CallerID Superfecta needs to know your maint password in order to access the necessary modules to retrieve CallerID information for inbound calls. Just click Setup, CID Superfecta, and click on Default in the Scheme listings in the right column. Scroll down to the General Options section and insert your maint password in the Password field. You may also want to enable some of the other providers and adjust the order of the lookups to meet your local needs. Click Agree and Save once you have the settings adjusted.

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. Scroll to the bottom of the General Settings screen after selecting it from the left panel. Plug in your email address, click Submit, and save your changes. Done!

Adding Plain Old Phones. Before your new PBX will be of much use, you’re going to need something to make and receive calls, i.e. a telephone. For today, you’ve got several choices: a POTS phone, a softphone, or a SIP phone. Option #1 and the best home solution is to use a Plain Old Telephone or your favorite cordless phone set (with 8-10 extensions) if you purchase a little device known as a Sipura SPA-3102. It’s under $70. Be sure you specify that you want an unlocked device, meaning it doesn’t force you to use a particular service provider. This device also supports connection of your PBX to a standard office or home phone line as well as a telephone.

Configuring a SIP Phone. There are hundreds of terrific SIP telephones and softphones for Asterisk-based systems. Once you get things humming along, you’ll want a real SIP telephone such as the $50 Nortel color videophone we’ve recommended previously. You’ll also find lots of additional recommendations on Nerd Vittles and in the PBX in a Flash Forum. If you’re like us, we want to make damn sure this stuff works before you shell out any money. So, for today, let’s download a terrific (free) softphone to get you started. We recommend X-Lite because there are versions for Windows, Mac, and Linux. So download your favorite from this link. Install and run X-Lite on your Desktop. At the top of the phone, click on the Down Arrow and choose SIP Account Settings, Add. Enter the following information using 201 for your extension and your actual password for extension 201. Then plug in the actual IP address of your PBX in a Flash server instead of 192.168.0.251. Click OK when finished. Your softphone should now show: Available.

Enabling Google Voicemail. Some have requested a way to retain Google’s voicemail system for unanswered calls in lieu of using Asterisk voicemail. The advantage is that Google offers a free transcription service for voicemail messages. To activate this, you’ll need to edit the [googlein] context in extensions_custom.conf in /etc/asterisk. Just modify the last four lines in the context so that they look like this and then restart Asterisk: amportal restart

;exten => s,n(regcall),Answer
;exten => s,n,SendDTMF(1)
exten => s,n(regcall),Set(DIAL_OPTIONS=${DIAL_OPTIONS}aD(:1))
exten => s,n,Goto(from-trunk,gv-incoming,1)

But I Don’t Want to Use Google Voice. If you’d prefer not to use Google Voice at all with PBX in a Flash, that’s okay, too. Here’s how to disable it and avoid the chatter in the Asterisk CLI. Log into your server as root and edit /etc/asterisk/modules.conf. Change the first three lines in the [modules] context so that they look like this. Then restart Asterisk: amportal restart.

autoload=yes
noload => res_jabber.so
noload => chan_gtalk.so

There’s now a patch that automatically adjusts Asterisk to accommodate Google Voice whenever you have added Google Voice extensions to your system. To download and install the patch, visit the PIAF Forum.

Where To Go From Here. We’ve barely scratched the surface of what you can do with your new PBX in a Flash system. If you’re new to all of this, then your next step probably should be the Nerd Vittles’ Incredible PBX 3.0 and Incredible Fax 2.0 tutorial. It’s a 5-minute addition. And, of course, all 50 Asterisk applications in Incredible PBX are free and always will be. Enjoy!

PBX on a Flash

Getting Your Own PIAF Thumb Drive. Some of you have asked about how to obtain your very own PIAF thumb drive. Well, it’s easy. Just make a contribution of $50 or more to the Nerd Vittles and PBX in a Flash projects by clicking the PayPal Donate button at the top of this page, and we’ll get one off to you pronto. And, thanks in advance for your support of freeware and open source projects!

Originally published: Monday, February 20, 2012



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…