Home » Posts tagged 'XiVO' (Page 4)
Tag Archives: XiVO
Security 101: A Fresh Look at Incredible PBX Security Audit Methodology
Incredible PBX remains one of the most secure VoIP server platforms on the planet for one simple reason. We always deploy a preconfigured Linux IPtables firewall with a whitelist that hides your server from everyone except you and trusted VoIP providers. IPtables is automatically configured and deployed as part of every initial install of Incredible PBX regardless of your platform. This includes XiVO with Debian 8 as well as CentOS 6 and 7, Ubuntu 14.04, Raspbian 7 and 8, and even SHMZ OS (not recommended). If your server happens to be housed behind a hardware-based firewall as well, then so much the better. That obviously isn’t possible with most Cloud-based servers so IPtables firewall security is a must.
Unlike most other VoIP server platforms, we don’t leave firewall configuration to chance. Nor do we assume you’re a firewall expert. It really doesn’t matter whether you are or not, you still need a server platform that is secure and protected. So we do it for you initially and, if you are a firewall expert or study to become one, you then can modify the default settings to meet your own requirements down the road. In the meantime, you and your server are protected.
As you probably have surmised, we conduct periodic security audits of our servers testing for vulnerabilities. And we perform these audits locally as well as remotely using servers we’ve deployed throughout the world. We also deploy honeypot servers from time to time in order to gather important information about what the bad guys are up to. With as many platforms as Incredible PBX now supports, just conducting local and remote security audits is no small feat.
Today we want to share some of the methodology we use in conducting our audits, and we’ll provide the results of our most recent remote security audit. We encourage everyone with a VoIP server, whether it’s Incredible PBX or some other platform, to periodically test your server(s) for vulnerabilities AND access. It not only could save you thousands of dollars, but it also protects the rest of us by assuring that you haven’t inadvertently provided malicious individuals with a zombie platform from which to launch denial of service and spam attacks against the Internet community. So let’s get started.
The first step in testing your server is to log into your server as root using SSH or Putty from multiple IP addresses. These sites should include logins from the home base of your server if it’s a dedicated machine, from your home PC, from a neighbor’s PC, from a public WiFi hotspot, and from your smartphone as well as someone else’s. If you gain access from all of these sites, you’ve got a problem. It means SSH access is not protected in any way on your server. While SSH is relatively secure, it has had its share of problems. And zero day vulnerabilities are regularly discovered in various Linux utilities so exposing all of your server’s important resources to the Internet is a very bad idea.
The second test deciphers the existing firewall rules that have been activated on your server: iptables -nL. If the results look like the following, you’ve got a major problem. It means there are no firewall rules blocking any access to your server:
root@incrediblepbx:~ $ iptables -nL Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
Next, reboot your server and repeat the first two tests to make certain that your firewall still is activated properly whenever your server experiences a power outage and comes back on line.
If your firewall is not running, try issuing the command, iptables-restart, and then retest: iptables -nL. If you get the same results shown above, then something has come unglued. Here’s how to easily fix things up. First, move to the directory where the iptables rules are stored on your server. For CentOS/SL/RHEL, it’s /etc/sysconfig. For Debian/Ubuntu/Raspbian, it’s /etc/iptables.
Next, copy the default Incredible PBX firewall settings to the proper file location.
For CentOS/SL/RHEL platforms:
cp -p /etc/sysconfig/rules.v4.ubuntu14 /etc/sysconfig/iptables cp -p /etc/sysconfig/rules.v6.ubuntu14 /etc/sysconfig/ip6tables
For Debian/Ubuntu/Raspbian platforms:
cp -p /etc/iptables/rules.v4.ubuntu14 /etc/iptables/rules.v4 cp -p /etc/iptables/rules.v6.ubuntu14 /etc/iptables/rules.v6
Next, edit iptables (CentOS/SL/RHEL) or rules.v4 (Debian/Ubuntu/Raspbian) and move to the bottom of the file where you’ll find a section that looks like this:
# The IP addresses are your server, user, and public addresses respectively -A INPUT -s 8.8.4.4 -j ACCEPT -A INPUT -s 8.8.8.8 -j ACCEPT -A INPUT -s 74.86.213.25 -j ACCEPT
Replace the existing IP addresses with the actual IP addresses of your server, user workstation, and public IP address. Be very careful here. If you don’t whitelist the IP address of the machine on which you are performing these tasks, you will lock yourself out when you restart your firewall. Once you’ve made the changes, save the file.
Finally, restart IPtables using the following command: iptables-restart. Then retest: iptables -nL.
We’re not going to spend a lot of time addressing what the proper firewall rules for your VoIP server should be. If you’re interested, you can take a look at the IPtables firewall setup that is deployed with Incredible PBX. On RHEL/CentOS/SL servers, you’ll find the firewall rules in /etc/sysconfig/iptables. On Debian/Ubuntu/Raspbian servers, the rules are in /etc/iptables/rules.v4. Suffice it to say that, if the only remote access required with your server is to connect to VoIP service providers, there is no reason to expose your web server or your SIP ports to the Internet, period. And this is true whether your server is sitting behind a hardware-based firewall or not.
The Incredible PBX security design uses a whitelist to provide access to most network services other than those that are absolutely essential to the operation of your server. The reason we use a whitelist is because blacklists don’t work. Those interested in doing harm to your server are perfectly capable of altering their IP addresses until they find one that isn’t blacklisted. And they also are adept at poisoning blacklists with IP addresses that are absolutely essential to the operation of your server, e.g. DNS servers and NTP servers.
As part of every Incredible PBX firewall install, we provide SIP and IAX access to many of the major VoIP providers around the globe. You may be wondering why we use IP addresses for providers rather than fully-qualified domain names. The reason is that IPtables doesn’t directly support FQDNs. Instead, when IPtables starts up, it looks up every FQDN and converts it into an IP address. If a server matching the FQDN happens to be off line, IPtables crashes and burns. The same is true if the lookup is attempted before DNS services are running on your server. So, the short answer to why we use IP addresses is because it is safer. The downside, of course, is you can’t eyeball the IP address and decipher to whom it belongs. If you ever have any doubt about the identity of the provider associated with any specific IP address, there’s a simple utility you can run to identify its owner: nslookup 178.63.143.236.
Here is a list of the providers included in the default Incredible PBX whitelist. Others can be added using the add-ip and add-fqdn utilities in /root. If you use FQDNs, be sure to add the entries to /root/ipchecker so that your IP addresses are periodically checked and updated when necessary. This is especially important for dynamic IP addresses at remote locations.
outbound1.vitelity.net inbound1.vitelity.net atlanta.voip.ms chicago.voip.ms dallas.voip.ms houston.voip.ms losangeles.voip.ms newyork.voip.ms seattle.voip.ms tampa.voip.ms montreal.voip.ms montreal2.voip.ms toronto.voip.ms toronto2.voip.ms london.voip.ms didforsale.com callcentric.com sipgate.com chi-in.voipstreet.com did.voip.les.net magnum.axvoice.com proxy.sipthor.net sip.voipwelcome.com incoming.future-nine.com outgoing.future-nine.com DEN.teliax.net LAX.teliax.net NYC.teliax.net ATL.teliax.net IPkall (defunct) used two IP addresses: 66.54.140.46 and 66.54.140.47 gvgw1.simonics.com sip2sip.info googlelabs.com talk.google.com gmail.com
The major drawbacks to firewall whitelists are (1) you can inadvertently lock yourself out of your own server and (2) someone that needs access to your server from remote locations may have more difficulty connecting without intervention by a network administrator to authorize remote access. With Incredible PBX, we’ve provided some tools to ease the pain. First, Incredible PBX is deployed with both the PPTP and NeoRouter VPN platforms already in place. With a VPN IP address, remote logins are minimized because they work from almost anywhere. Second, Incredible PBX includes the PortKnocker utility which lets a remote user "knock" on the server using three randomly assigned port numbers to gain temporary access. Many Incredible PBX platforms also support Travelin’ Man 4 which lets you authorize remote access by telephone. You also need to test remote VPN, PortKnocker, and Travelin’ Man 4 access as part of your security audits.
Testing for vulnerabilities is only half of the puzzle. Also make certain that your server has the proper Linux tools in place to allow you to whitelist additional IP addresses so that remote users can deploy phones or gain access to your server when necessary. Try to run the nslookup and dig utilities to verify that they are installed on your server. If not, install them with yum install bind-utils (CentOS/SL/RHEL) or apt-get install dnsutils (Debian/Ubuntu/Raspbian).
Security Audit Results. We’re pleased to report that no vulnerabilities were identified in any of the Incredible PBX platforms; however, good security practices dictate that the IPkall IP addresses should probably be removed from the whitelist now that the company has ceased providing VoIP services.
For CentOS/SL/RHEL platforms:
sed -i '/66.54.140.46/d' /etc/sysconfig/iptables sed -i '/66.54.140.47/d' /etc/sysconfig/iptables sed -i '/66.54.140.46/d' /etc/sysconfig/rules.v4.ubuntu14 sed -i '/66.54.140.47/d' /etc/sysconfig/rules.v4.ubuntu14 iptables-restart
For Debian/Ubuntu/Raspbian platforms:
sed -i '/66.54.140.46/d' /etc/iptables/rules.v4 sed -i '/66.54.140.47/d' /etc/iptables/rules.v4 sed -i '/66.54.140.46/d' /etc/iptables/rules.v4.ubuntu14 sed -i '/66.54.140.47/d' /etc/iptables/rules.v4.ubuntu14 iptables-restart
We did identify a couple of access anomalies that kept the add-ip and add-fqdn utilities in /root from functioning properly. These glitches meant that a few administrators could not easily add remote IP addresses to their whitelists. Three fixes are recommended. First, be sure the utilities documented in the previous paragraph are installed on your server. Second, on CentOS/SL/RHEL platforms or servers installed using the Incredible PBX ISO, issue the following commands after logging into your server as root:
sed -i 's|/etc/iptables/rules.v4|/etc/sysconfig/iptables|' /root/add-ip sed -i 's|/etc/iptables/rules.v4|/etc/sysconfig/iptables|' /root/add-fqdn
Third, for Incredible PBX deployments on the CentOS 7 platform, issue these commands while logged in as root:
chattr -i /root/add-ip sed -i 's|iptables-persistent|iptables|' /root/add-ip chattr +i /root/add-ip
Be safe!
Originally published: Tuesday, August 9, 2016
Go For the Gold: Incredible PBX for XiVO, CentOS, Ubuntu, or Raspbian. https://t.co/zZDnO8OUVt #asterisk #NoGotchas pic.twitter.com/wv3KkuMJha
— Ward Mundy (@NerdUno) August 8, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
Tempus Fugit: Introducing Incredible PBX Alarm Clock for Asterisk and XiVO
So you’re in a hurry and need a quick way to remind yourself of an upcoming appointment. With Siri or your Apple Watch, you can say "Hey Siri, set an alarm for 9 a.m." On an Android phone, just say "OK Google, set an alarm for 9 a.m." And with the Amazon Echo, shout out "Alexa, set an alarm for 9 a.m." But, hey, everyone doesn’t have a fancy smartphone or an Echo. Besides that, they’re not always convenient.
If you have Incredible PBX™ for Asterisk® or XiVO® running in your home or office, it’s even easier. Just pick up any phone and dial *88 plus the time for the alarm using "military time." Dialing *880900 will set an alarm for 9 a.m. and *882100 will set an alarm for 9 p.m. If it’s already later than 9 a.m. when you dial *880900, then the alarm will be set for the following morning at 9 a.m. Doesn’t get any easier than that.
As we mentioned, this new application is primarily for Incredible PBX users, but it will work with any Asterisk server if you have previously installed Telephone Reminders. The Telephone Reminders app is included in all previous releases of Incredible PBX for XiVO, PBX in a Flash, Elastix, CentOS, Scientific Linux, Ubuntu, Debian, and even the Raspberry Pi.
Installing Incredible PBX Alarm Clock on the XiVO Platform
If you’re already using our latest Incredible PBX creation for the XiVO platform, then installation of the Alarm Clock application is a one-minute procedure. If you downloaded Incredible PBX for XiVO after July 13, the Alarm Clock application already is included. Otherwise, log into your server as root and issue the following commands:
cd /root wget http://incrediblepbx.com/alarms-xivo.sh chmod +x alarms-xivo.sh ./alarms-xivo.sh
Installing Incredible PBX Alarm Clock on the Other Platforms
As we mentioned, the Alarm Clock application requires an existing setup of Incredible PBX with Telephone Reminders on any of the following platforms: PBX in a Flash, Elastix, CentOS, Scientific Linux, Ubuntu, Debian, or Raspbian for the Raspberry Pi. If you’re using any of these Incredible PBX platforms, simply log into your server as root and issue the following commands to get the Alarm Clock application installed and configured:
cd / wget http://incrediblepbx.com/alarms4incredible.tar.gz tar zxvf alarms4incredible.tar.gz rm -f alarms4incredible.tar.gz cd /root ./alarms4incredible.sh
A Quick Introduction to Military Time for All of Our Civilian Friends
"Military time" means the day begins at 0001 for 12:01 a.m. The morning ends at 1159 for 11:59 a.m. For P.M. times, they start at 1200 for noon and end at 2359 for 11:59 p.m. Now’s your chance to play soldier in case you missed the draft. Enjoy!
Taking the Incredible PBX Alarm Clock for a Spin
Once you’ve got the Alarm Clock application in place, it’s time for a test drive. Check your watch for the current time and add 2 minutes. Convert the time to military time. Then pick up any phone connected to your PBX and dial *88 plus the four-digit number for the alarm time you calculated. Remember, if you choose a time that has already come and gone for today, your alarm will be scheduled for the corresponding time tomorrow so don’t cut it too close if your watch doesn’t keep perfect time.
For those wanting to learn how to write Asterisk dialplan code, now is a perfect time. The Alarm Clock application was written without a single line of code from any high-level language including PHP. On the XiVO platform, you’ll find the code at the bottom of /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf
.
On the other Incredible PBX platforms, you’ll find the code at the top of /etc/asterisk/extensions_custom.conf
. Just search for *88 in the dialplan.
Reviewing Scheduled Alarms with a Web Browser
You can use the Telephone Reminders web application at http://IPaddress/reminders to review alarms which you have scheduled using *88. With Incredible PBX, they look just like other Telephone Reminders which you may have scheduled either using a phone by dialing 123 or using the Telephone Reminders web application.
Originally published: Monday, July 18, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
As Easy As 1-2-3: Introducing Incredible PBX Telephone Reminders for XiVO
UPDATE: The first release of Incredible PBX for XiVO is now available here. Please consider this article superseded by the new release which includes the Telephone and Web Reminders applications.
We’re back in the saddle today after a terrific two-week break in Hawaii. Thanks for your patience while we recharged our batteries. Today we’re pleased to introduce Incredible PBX Telephone Reminders for the XiVO platform. It’s a 15-second installation on any XiVO server.
How It Works. The original functionality of the application has been preserved. Dial 1-2-3 on a phone connected to your XiVO system and enter the password you assigned during installation. Then you can record a reminder message, specify the phone number to which the reminder should be delivered, schedule the date and time for delivery, and decide whether to enable recurring reminders of one of the flavors supported: single reminder, weekday reminder, daily reminder, monthly reminder, or annual reminder. There also a web interface to schedule reminders using the Festival TTS engine. Simply visit http://XiVO-ipaddress/reminders for access. If you were a pioneer and installed Telephone Reminders before the web component was available, just download the latest tarball below and run the installer again. As with all Nerd Vittles software, Telephone Reminders is pure (and free) GPL code with No Gotchas!
Installing Telephone Reminders for XiVO. As mentioned, installation is as simple as downloading and running a script. Log into your XiVO server as root and issue the following commands to put everything in place:
cd /root wget http://incrediblepbx.com/reminders-xivo.tar.gz tar zxvf reminders-xivo.tar.gz ./reminders-xivo.sh
Scheduling Reminders by Phone with XiVO. Once you complete the install, pick up any telephone connected to your XiVO server and dial 1-2-3. When prompted, enter the numeric password that you assigned during installation. If you ever want to change it, just download the latest version and run the installation script again. Doesn’t get any easier than that to stay current. Keep in mind that anyone with access to extension 123 on your XiVO server can schedule reminders, and the reminders can be sent to any telephone number in the world that is supported by your dialplan and trunks. So use a secure password! It’s your phone bill.
Scheduling Reminders via the Web with XiVO. As noted, there’s also a web interface to Telephone Reminders. Make certain you have first installed the Incredible PBX Firewall WhiteList so that the bad guys don’t schedule costly phone calls on your dime! To access Telephone Web Reminders, point your browser to the IP address of your server using standard http, e.g. http://12.34.56.78/reminders. The web component uses the Festival TTS engine to transcribe your reminders for delivery by phone.
Firewall Installation on XiVO Platform. If you didn’t install XiVO using one of our tutorials, please add the Travelin’ Man 3 IPtables Firewall now!
apt-get -y install dnsutils echo "*/10 5-22 * * * root /root/ipchecker > /dev/null 2>&1" >> /etc/crontab wget http://incrediblepbx.com/firewall-xivo.tar.gz tar zxvf firewall-xivo.tar.gz rm -f firewall-xivo.tar.gz ./tm3-xivo.sh
Historical Overview and Tweaking. For the big picture of the Telephone Reminders project and to learn some of the additional settings you can configure, visit the Best of Nerd Vittles page. Enjoy!
Published: Monday, June 20, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
2016: The Year of the May Bromance with XiVO, Asterisk 13, and the GPL
Remember that girl that you never much noticed in high school that happened to cross your path years later and there was that instant attraction. It’s one of our favorite country songs.
What a month it has been. 30 days ago we’d never met. And then it happened. We were introduced to XiVO by a single post on the PIAF Forum. It’s difficult to choose a single adjective that describes how feature-rich XiVO is as a real-time Asterisk platform. Ten years of development coupled with some really talented Canadian developers puts XiVO in a league of its own. Pure GPL code. No gotchas. No hidden agenda. Incredible documentation. No snake oil salesmen trying to peddle add-ons for money. And, thanks to the endless patience of Sylvain Boily and Pascal Cadotte Michaud, two of the key XiVO developers, we’ve had quite a joy ride this month. Today we want to share what we’ve learned and provide everything you need step-by-step to hit the ground running with XiVO. In less than an hour, you’ll be sitting in front of your own XiVO server, and you can judge for yourself. All we can ask is "Where have you been all these years?" XiVO really is THAT GOOD!
UPDATE: The first release of Incredible PBX for XiVO is now available here. Please consider this article superseded by the new release.
Let’s Start with the Features. If you make frequent changes to your Asterisk platform, then you’ll really appreciate XiVO’s realtime implementation. Changes are loaded almost instantaneously. Contrast that with some other platforms with hundreds of users where simple changes require several minutes or more to reload the Asterisk dialplan. Here’s an example:
Speaking of hundreds of users, consider the time required to generate accounts and phone configurations for hundreds of users. With XiVO, a simple spreadsheet can be used to build all the user accounts in seconds. And XiVO’s Endpoint Manager supports all of the major phone manufacturers and configures your phones in seconds. With other solutions, you’ve got a fee for the Endpoint Manager add-on itself and then another annual maintenance fee to assure that the software will continue to work. Contrast that with XIVO’s GPL alternative. Choosing Configuration:Provisioning:Plugins:Update generates templates for dozens of great SIP phones in seconds with just four button clicks. Adding your own new models is a breeze.
We’ve already written about XiVO upgrades and backups, the twin-edged sword with most Asterisk implementations. Yes, you can go the proprietary route and stumble through dozens of menus and arcane commands to load upgrades and create backups. With XiVO, backups are automatic and the updates are fast and furious. Every morning a new backup arrives in /var/backups/xivo, and a new version of XiVO is released every three weeks. You can upgrade your server in under a minute with one simple command. Did we mention reported bugs are addressed in under 30 days!
One of the real failures of the other GUI offerings is their lack of tools to perform most tasks in any way other than using the GUI. For developers and those that maintain numerous phone systems from afar, this becomes a nightmare. XiVO offers a better alternative. Yes, there’s an incredible GUI. But there’s also a robust collection of APIs that provide programmatic access to manage and query virtually every piece of the XiVO puzzle. As if that weren’t enough, there’s also real documentation and samples to show you how to use each piece.
Have we got your attention yet? We haven’t even touched upon Call Centers and High Availability (HA) server deployments, but they’re included at zero cost. For today and just getting started, suffice it to say that XiVO covers all the bases with open source code. And all of these features already are incorporated into the product you’re about to install. So, if those two items have been on your Wish List and you’d prefer to avoid paying an arm and a leg for proprietary, commercial add-ons with recurring annual fees, today’s your lucky day. Break open the latest XiVO documentation, all 479 pages of it and enjoy!
We’ve barely scratched the surface of what you can do with XiVO. Simply stated, anything you can do with the other GUI offerings, you can do better, quicker, and cheaper with XiVO. And, if there are features you need that aren’t there, all you have to do is ask. We’re porting applications to XiVO at the rate of about one new application a day. You can do the math on feature sets and measure where we’ll be when the summer is over.
Getting Started with XiVO. Jump to the latest tutorial to install XiVO.
Bookmark Getting Started with XiVO and you can follow our progress in coming months. Enjoy!
For additional tips & tricks with XiVO, take a look at our previous articles:
2016, The Year of (real) VoIP Choice: Meet XiVO, a UC Solution for Any Business
The XiVO Adventure Continues: Adding Incredible PBX Goodies to Your Sandbox
2016, Celebrating The Preakness: CallerID Superfecta Rides Again with XiVO
Choosing Wisely: Mastering Asterisk IVR and AutoAttendant Design with XiVO
Choosing a XiVO Hardware Platform
- XiVO Platform Tutorial: Installing XiVO on a Dedicated PC
- XiVO Platform Tutorial: Installing XiVO VM on VirtualBox
- XiVO Platform Tutorial: Installing XiVO VM on VMware ESXi
- XiVO Platform Tutorial: Installing XiVO VM at ImpactVPS
- XiVO Platform Tutorial: Installing XiVO VM at Digital Ocean
- XiVO Platform Tutorial: Installing XiVO VM at CloudAtCost
- XiVO Platform Tutorial: Installing XiVO VM at RentPBX
XIVO Initial Setup Tutorial
XiVO Initial Setup Tutorial: Getting Started with XiVO
XIVO Trunk Implementation Tutorials
- XiVO Trunks Tutorial: Installing a Vitelity SIP Trunk
- XiVO Trunks Tutorial: Installing a VoIP.ms SIP Trunk
- XiVO Trunks Tutorial: Installing a RingPlus SIP Trunk
- XiVO Trunks Tutorial: Installing a FreeVoipDeal (Betamax) SIP Trunk
- XiVO Trunks Tutorial: Installing a Google Voice-Simonics SIP Trunk
- XiVO Trunks Tutorial: Installing an Anveo Direct Outbound SIP Trunk
- XiVO Trunks Tutorial: Installing a Skype Connect SIP Trunk
XIVO Call Routing Tutorials
- XiVO Call Routing Tutorial: Creating Inbound Routes for DIDs
- XiVO Call Routing Tutorial: Creating Outbound Routes for PSTN Calling
Taking Nerd Vittles’ XiVO IVR for a Test Drive
There’s a Demo IVR running at www.pacificnx.com on their XenServer virtualization platform. Scott McCarthy, a leading outside XiVO developer and a principal at PacificNX, tells us they soon will have a $20 a month platform specifically tailored to XiVO. And that’s what you’ll be hearing when you call the Nerd Vittles Demo IVR:
Nerd Vittles Demo IVR Options
1 – Call by Name (say "Delta Airlines" or "American Airlines" to try it out)
2 – MeetMe Conference
3 – Wolfram Alpha (Coming Soon!)
4 – Lenny (The Telemarketer’s Worst Nightmare)
5 – Today’s News Headlines
6 – Weather Forecast (enter a 5-digit ZIP code)
7 – Today in History (Coming Soon!)
8 – Speak to a Real Person (or maybe just Lenny if we’re out)
Published: Tuesday, May 31, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
Mastering XiVO IVR and AutoAttendant Design
Today we want to talk a little about design choices and IVRs. First and foremost, we don’t want to leave anyone behind during our XiVO adventure. XiVO is a platform that adjectives really can’t describe. It’s that good and, frankly, we’re having a hard time believing it’s been around for almost a decade and nobody much talked about it. Leave it to the crazy Americans to only look at stuff from the U.S. of A. Funny thing is that the two major GUIs for Asterisk® now are both Canadian-based.
America calling pic.twitter.com/bMqg601m8l
— 🇺🇦Evan Kirstel #B2B #TechFluencer (@EvanKirstel) May 24, 2016
One of our PIAF Forum readers posted a comment last week that said:
The only downside I see is that XiVO does not have [a] GUI for building IVRs. To build [a] complex, nested IVR system, everything has to be thought about in great detail writing contexts and dial plans to suit your unique requirements. It would be nice if XiVO offered a GUI for building IVRs.
This raises some issues about GUI design and development that are worth addressing. As with any GUI, the development cycle is lengthy and incredibly complex. This is especially true with XiVO where new versions are released every two weeks! In our second XiVO article, we showed how easy the upgrade procedure was. Those coming from other Asterisk platforms will appreciate this little shocker. XiVO doesn’t break stuff with their upgrades. Frankly, the only other company I can say that about is SONOS. If you don’t have their music platform, you’re missing a treat.
Introducing new components into any "main product" can cause all sorts of problems with the pieces that used to work. If you don’t believe it, look at some of the "other forums" and look at the number of message threads complaining that the new X Widget broke the Y widget and now nothing works. While we can’t speak for everyone, I think it’s safe to say nobody that depends upon their phone system wants to see it go up in flames regularly because some developer had a great new idea that didn’t quite do what it was supposed to do.
To their credit, the XiVO developers were smarter than that. They’ve not only built a mighty mousetrap, but they’ve done it in a way that supports outside integration of additional components without breaking the main product. There are numerous "hooks" that allow anyone with any skill set to add missing pieces. Some of these hooks are exclusively for programmers, but many were designed to let anybody integrate almost anything into the XiVO platform.
So, when a user says "I wish XiVO had an IVR Builder in the GUI," our first inclination was to chuckle and respond with "You just don’t appreciate how lucky you are not to have an IVR Builder in the GUI." What the commenter didn’t appreciate is that you don’t need to pre-build components with XiVO before developing an IVR. With the "other" GUI, you first had to create Custom Destinations and Custom Contexts and Miscellaneous Applications and Miscellaneous Destinations and Custom Recordings in the GUI before you could take advantage of the IVR GUI to build much of anything. Think about that for a minute. Yes, there was an IVR builder but, before you could use it, you first had to transform every component to be incorporated into the IVR using a large number of subcomponents to translate all of your Asterisk pieces into the GUI’s special lingo. Think of them as GUI pigeonholes, and you had to decipher which Asterisk square pegs went in which GUI round holes. We can’t count the number of times we’ve begun the IVR creation process only to have to stop and create missing components because the IVR builder simply wouldn’t recognize a feature as being part of our Asterisk dialplan.
Building IVRs and AutoAttendants with XiVO
The anatomy of an IVR in Asterisk could not be more straight-forward. You have a prerecorded message that plays to the caller giving them choices from which to choose from a menu of selections. The caller presses one of the 12 keys on their phone, and the IVR goes off and does some task: calls an extension, plays a recording, runs an Asterisk application, makes an outside call, or kicks off another IVR with another recording and more choices. Some options in the IVR may not be mentioned, and this is commonly referred to as the Stealth AutoAttendant. None of this is rocket science.
To build an IVR, you need these components: (1) a prerecorded message, (2) a list of the choices you want to provide to the caller with the corresponding destinations on the PBX to execute those choices, and (3) a template to follow to create the IVR dialplan code in XiVO.
Trust us when we say the major problem with IVRs is not that they’re difficult to build in XiVO. The real issue with most IVRs is that the person that implemented the IVR spent all their time worrying about the mechanics of PBX implementation and didn’t put sufficient thought into the IVR layout and the caller’s experience when actually interacting with the IVR. If you haven’t heard Allison Smith speak about IVR design, put it on your Bucket List for the next AstriCon or do some reading. That’s a long-winded way of saying that filling in the blanks of an IVR template is just as easy as point-and-click or drag-and-drop except for the eye candy. Just be thankful the XiVO platform gives you the flexibility to do it yourself without having to create imaginary destination hooks and recording linkages before they can be used in the product’s IVR GUI because the developers didn’t have the foresight to think outside their own GUI’s box. Every Windows user can appreciate that problem.
For today, we’re assuming you’ve done your homework and have already sketched out the options you want to incorporate into your IVR or IVRs. No GUI can help with that! So we’ll pick up from there and show you how easy it is to incorporate your IVR design into XiVO.
Adding Prerecorded Messages in XiVO
For openers, you obviously need a recording to greet callers and tell them what their choices are when using your IVR or AutoAttendant. You can build these recordings yourself on the XiVO platform or, for a more professional IVR, you can send the text off to Allison Smith and let her record the voice prompts for you. Digium makes it easy. Visit their web site, type in the text, and you’ll have your recording in a couple of days. No, they’re not free, but they’re not expensive either.
Since we’re just getting started, let’s assume you want to create a recording prototype on your own to work out the kinks in your IVR first. Here’s how. We’re assuming you’ve already read the Nerd Vittles XiVO tutorial and put the Festival TTS platform in place. Next, log into your XiVO server as root. To keep things simple, let’s put the recordings in WAV format in the /var/lib/xivo/sounds/playback directory which is reserved for our custom recordings:
cd /var/lib/xivo/sounds/playback
To actually generate the sound file that Asterisk can play back, execute the command below after placing your text between the quotation marks and giving the sound file a name, e.g. ivr-number1.wav:
echo "Text goes here" | /usr/bin/text2wave -F 8000 -o ivr-number1.wav
Here’s an example:
echo "Thank you for calling. Press 1 for Tom, 2 for Dick, or 3 for Harry. Press 0 to be connected to the operator." | /usr/bin/text2wave -F 8000 -o ivr-number1.wav
Marrying IVR Choices to PBX Destinations
Whether you’re deploying an IVR using FreePBX® or XiVO, you still have to translate your Plain English options into code that the GUI understands so that calls get routed successfully to the intended destinations.
Let’s begin with the FreePBX Way. Our previous IVR tutorial showed how it was done:
As you can see from the above routing procedure, there were interim steps for every single option in this IVR menu except #8. What you may not appreciate is that you first had to create both a Misc Destination AND a Custom Extension before these options could be used in FreePBX. Otherwise, the options simply didn’t appear in the IVR GUI’s pull-down pick lists.
If you wished to incorporate a custom context that wasn’t assigned an extension number on your PBX, there was a different GUI procedure. For something as simple as retrieving the time of day, you had to get the custom context registered with FreePBX before the dialplan code could be used in the IVR. According to the FreePBX developers, this functionality was considered an "advanced feature and should only be used by knowledgeable users."
Our purpose in documenting all of this is to demonstrate that building IVRs even in a GUI is much more than point-and-click. It requires mastery of some fundamental Asterisk dialplan concepts not to mention the GUI’s own labyrinth of secret pigeonholes. Once you’ve had to master all of that, we believe it’s simpler to build IVRs using simple commands rather than jumping through all of the convoluted hoops required just to make your IVR GUI platform happy.
Let’s compare this methodology to the XiVO way of doing things by way of example. Then you can decide for yourself which approach is more complex. Would you know all of these on your own? Probably not. But now you can see how simple it really is. There really are only two words you need to learn: Dial and Goto. 🙂
Call an Extension: Dial(Local/701@default) Call a Ring Group: Dial(Local/801@default) Call a PSTN Number: Dial(Local/8005551212@default) Call a SIP URI: Dial(SIP/2233435945@rentpbx.mundy.org) Access DISA with permission: Dial(Local/3472@default) Join a Conference: Dial(Local/2663@default) Playback Yahoo News: Dial(Local/951@default) Playback Weather Forecast: Dial(Local/947@default) Identify IVR Option as Invalid and Repeat Menu: Goto(i,1) Hangup on Caller for Choosing Invalid Option: Goto(t,1) Execute Time of Day Custom Context: Goto(new-time,s,1) Send Caller to a Second IVR and Play Second Recording: Goto(ivr-2,s,3)
Building XiVO IVRs from an IVR Template
We can’t speak for everyone, but we’ve always told folks not to write a book about how to do something. Just give us an example that’s easy to follow and we’ll take it from there. So here you go.
In the XiVO world, IVRs are nothing more than custom contexts. They have a name in [brackets], and they’re stored in config files saved in /etc/asterisk/extensions_extra.d. A config file can include multiple contexts or only one. For IVRs, we recommend you save each one in a single configuration file that houses a single context.
We’re going to give you a template to follow in creating all of the IVRs you can dream up. All you need is a custom recording for each one and your list of choices and destinations for those choices. The examples above tell you everything you need to know to build awesome IVRs.
After downloading the template, we recommend that you not edit it directly. Make a copy with a new file name and change the context name in the template to match your new file name. We also do one other little trick with all of our custom contexts. They always begin and end with comment lines like this using the context name:
;# // BEGIN ivr-template ;# // END ivr-template
The reason for this is it makes it incredibly easy to remove the entire context with a single command:
sed -i '\\:// BEGIN ivr-template:,\\:// END ivr-template:d' ivr-template.conf
This doesn’t matter so much when you only have a single context in a single file. But it is immensely helpful when you’ve stored dozens of contexts within the same file. Some may prefer to store all of the related IVR contexts for their entire IVR tree in a single file. And then you’ll appreciate this tip when it’s time to make major changes in your IVR.
Let’s begin by putting your template in place and then cloning it to ivr-number1:
cd /etc/asterisk/extensions_extra.d wget http://incrediblepbx.com/ivr-template.tar.gz tar zxvf ivr-template.tar.gz rm -f ivr-template.tar.gz cp -p ivr-template.conf ivr-number1.conf sed -i 's|ivr-template|ivr-number1|' ivr-number1.conf
The rest of today’s exercise can be performed in the XiVO GUI using its built-in editor. Open the GUI with your browser and navigate to Services -> iPBX -> Configuration files and then open ivr-number1.conf by clicking on the pencil icon beside it.
Anatomy of the XiVO IVR Template
First things first. Change the sound recording in line s,3 to match the recording you made above without the .wav extension: ivr-number1. Leave the directory path just as it is. So your line should now look like this:
exten => s,3(skip),Set(IVR_MSG=/var/lib/xivo/sounds/playback/ivr-number1)
Next, take a look at the structure of the file. You’ll note that there are options labeled exten => 0,1, through exten => 9,1,. These match the numeric keys on a telephone obviously. In the IVR world, it’s called a phone tree. All you need to change is what comes after the second comma on each line. This destination should be one of the XiVO commands we documented above telling XiVO how to process the call. For option 0, let’s assume you wanted to route the call to extension 701. Your 0 branch would look like this:
exten => 0,1,Dial(Local/701@default)
The remaining dial options should be obvious. If you want to designate a particular option to be invalid, make the option look like this:
exten => 9,1,Goto(i,1)
Another alternative is to remove the line entirely; however, we prefer the above approach because it makes it easy to change things down the road if you decide to use option 9 as a call destination.
Two other options warrant a brief explanation. The i option tells XiVO how to process the call if the caller chooses an invalid option. The t option tells XiVO what to do if the 3-second timeout occurs without the caller pressing a key. You can modify these to meet your own requirements. As configured, an invalid option sends the caller back to the recording to start over. And the timeout option hangs up the call.
Finally, phone trees can get quite complex. A GUI can’t fix that either. Pressing option 2 might trigger phone tree 2 while pressing 3 might trigger phone tree 3. Programmers could obviously rewrite the dialplan to handle all of these separate phone trees with their separate branches in one giant, convoluted chunk of dialplan code. But why? Just make each phone tree a separate IVR housed in its own file with its own context. And navigate between the IVRs using simple Goto commands such as Goto(ivr-number2,s,3). To return to the main IVR, do the same thing pointing to the line number to which the call should be redirected, e.g. Goto(ivr-number1,s,3). You obviously don’t need to answer each call but once so skip those lines in the IVR dialplan when choosing the line number to which to redirect processing.
Routing Incoming Calls to Your IVR
If you’ve already set up one or more DIDs on your PBX, then you probably routed those Incoming Calls to a user or ring group. Changing the routing to send the calls to your IVR is easy. Just edit the DID entry for the Incoming Calls you wish to redirect and set the Destination to Customized and the destination Command to the context of your IVR: Goto(ivr-number1,s,1). Save your change and you’re all set. Remember, XiVO is a real-time Asterisk server so all of your changes take effect immediately. There’s no rewriting of the entire Asterisk dialplan. Enjoy!
Letting Callers Dial Extensions Within IVR
Some administrators prefer to let callers dial an extension directly while an IVR is playing. You can easily add this functionality in XiVO. This post on the PIAF Forum showed how. Simply edit /etc/asterisk/extensions_extra.d/ivr-1.conf and modify the code like this. Be sure to change the number of X’s in the last line to match the length of your extension numbers. Then reload your dialplan.
;exten => s,n,ExecIf($["${IVR_MSG}" != ""]?Background(${IVR_MSG})) ;exten => s,n,WaitExten(10,) exten => s,n,Read(Digits,${IVR_MSG}) exten => s,n,Goto(${Digits},1) exten => _XXX,1,Dial(Local/${Digits}@default)
Taking Nerd Vittles’ XiVO IVR for a Test Drive
There’s a Demo IVR running at www.pacificnx.com on their XenServer virtualization platform. Scott McCarthy, a leading outside XiVO developer and a principal at PacificNX, tells us they soon will have a $20 a month platform specifically tailored to XiVO. And that’s what you’ll be hearing when you call the Nerd Vittles Demo IVR:
Nerd Vittles Demo IVR Options
1 – Call by Name (say "Delta Airlines" or "American Airlines" to try it out)
2 – MeetMe Conference
3 – Wolfram Alpha (Coming Soon!)
4 – Lenny (The Telemarketer’s Worst Nightmare)
5 – Today’s News Headlines
6 – Weather Forecast (enter a 5-digit ZIP code)
7 – Today in History (Coming Soon!)
8 – Speak to a Real Person (or maybe just Lenny if we’re out)
Published: Thursday, May 26, 2016
UPDATE: The first release of Incredible PBX for XiVO is now available here. Please consider this article as a supplement to the new release.
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
2016, Celebrating The Preakness: CallerID Superfecta Rides Again with XiVO
If you missed The Preakness Saturday, another Triple Crown bit the dust… or the mud in this case. But, if you had the winning Superfecta ticket, you made a $316 profit on your $1 bet. For the rest of us, there’s still a Superfecta win to celebrate, and this one’s free. We’ve begun porting CallerID Superfecta to the XiVO platform and today we’ll share that code with you together with lots of other goodies in our third roundup of Incredible PBX add-ons for the XiVO PBX. If you’re just joining the party, start with the first and second articles on XiVO, and then you’ll be ready to roll up your sleeves for Chapter 3.
UPDATE: The first release of Incredible PBX for XiVO is now available here. Please consider this article superseded by the new release.
Installing CallerID Superfecta for XiVO
As we mentioned in April, it’s always nice to see your baby grow up. Nearly a decade ago, we introduced an AGI script for Asterisk@Home known as CallerID Trifecta for FreePBX® 2.2.0. As sources of CNAM lookups expanded, a number of other individuals contributed code to support those lookups. When we added a fourth CNAM lookup source, the original application morphed into CallerID Superfecta. Then we gave up. The source lookups became too numerous to mention.
For today, we’ve changed the design a bit to better accommodate the XiVO platform. There’s a single AGI script that houses the various CNAM lookup sources and the code to extract CallerID names from those sources. And there’s a dialplan script that let’s you specify which CNAM sources to use and in which order. As with the original release, CallerID lookups take the phone number of the caller and walk through your CNAM lookup sources in the order you specify until a CallerID name match is found. Then the result is returned to the PBX for use with the incoming call. The reason for all of this is historical. The Bell Sisters decided it was more profitable to dump CallerID name information in the bit bucket rather than passing it along with incoming calls. In that way, they could charge folks for looking up the matching name in their proprietary databases. A few CallerID lookup sources remain free, but many now are pay-as-you-go platforms with a typical lookup costing about half a cent. Unfortunately, all providers consider "WIRELESS CALLER" a successful lookup. Ka-Ching! We’ve documented the procedure to add additional CNAM lookup sources on the PIAF Forum. Please share your work!
This release of CallerID Superfecta provides four lookup sources. That’s what a Superfecta is all about, picking four winners:
0 - AsteriDex SQLite3 database
1 - OpenCNAM (free from cache or commercial)
2 - BulkCNAM (commercial only with free trial)
3 - TelcoData (provider, city, and state of caller)
There are three simple steps to putting everything in place. First, run the scripted commands below. Second, specify which CNAM sources you wish to use and in what order. Third, register with the commercial providers you’d like to use and plug your credentials into the CallerID Superfecta script.
To install CallerID Superfecta, log into your server as root and issue the following commands:
cd / apt-get -y install php5-xmlrpc wget http://incrediblepbx.com/cid-superfecta.tar.gz tar zxvf cid-superfecta.tar.gz rm -f cid-superfecta.tar.gz /etc/init.d/asterisk restart
By default, CallerID Superfecta will attempt to use all four of the providers in the order shown to retrieve a CNAM match. If you have migrated your AsteriDex database to XiVO as we covered in last week’s article, then CallerID names will be provided for your most frequent incoming calls without ever accessing external sources. You won’t break anything by leaving all four CNAM sources activated. But, without signing up for service with OpenCNAM or BulkCNAM, your CNAM results will be diminished considerably. And a result of "WIRELESS CHARLESTON SC" from TelcoData doesn’t provide much of a clue as to who is calling. But at least you don’t get charged for that one.
In the next release, we will add an optional feature that will populate entries in AsteriDex from CNAM data returned from OpenCNAM and BulkCNAM. The good news is, if you leave AsteriDex at the top of the CallerID Superfecta search list, you’ll never pay for the CNAM lookup of the same number twice. The bad news is, to keep the bad guys from self-populating your database with expensive phone numbers, you’ll need to password-protect the Voice Dialing application if it is part of your inbound IVR.
To change the source list or sequence of CNAM lookups, open the XiVO GUI and navigate to IPX configuration -> Configuration files. Then edit cid-superfecta.conf. Find the line that looks like the following and specify the sources you wish to use and the sequence in which they should be searched using the source numbers listed above to replace 0-1-2-3. Separate your entries with hyphens. Then SAVE the file.
same = n,AGI(nv-cid-superfecta.php,${XIVO_SRCNUM},0-1-2-3)
To use the commercial CNAM services of either OpenCNAM or BulkCNAM, you first must register with them and provide a credit card. You then will be provided credentials to use for your CNAM lookups. These need to be inserted at the top of /var/lib/asterisk/agi-bin/nv-cid-superfecta.php. Then SAVE the file.
Activating Traditional Asterisk Call Detail Recordings
If you want to preserve the numbers AND names of those that call your PBX, you’ll need to activate the traditional CDR reporting mechanisms in Asterisk®.
To activate SQLite3 logging of calls:
cd /etc/asterisk sed -i 's|no|yes|' cdr.conf echo "[master]" > cdr_sqlite3_custom.conf echo "table = cdr" >> cdr_sqlite3_custom.conf echo "columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield" >> cdr_sqlite3_custom.conf echo "values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}', '${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}', '${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}', '${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}'" >> cdr_sqlite3_custom.conf chown asterisk:www-data cdr_sqlite3_custom.conf chmod 660 cdr_sqlite3_custom.conf sed -i 's|noload => app_cdr.so|;noload => app_cdr.so|' modules.conf sed -i 's|noload => cdr_sqlite3_custom.so|;noload => cdr_sqlite3_custom.so|' modules.conf sed -i 's|noload => func_cdr.so|;noload => func_cdr.so.so|' modules.conf touch /var/log/asterisk/master.db chown asterisk:asterisk /var/log/asterisk/master.db chmod 640 /var/log/asterisk/master.db /etc/init.d/asterisk restart
To also activate CSV logging of calls:
cd /etc/asterisk echo "[csv]" >> cdr.conf echo "loguniqueid=yes" >> cdr.conf echo "loguserfield=yes" >> cdr.conf echo "accountlogs=yes" >> cdr.conf sed -i 's|noload => cdr_csv.so|;noload => cdr_csv.so|' modules.conf /etc/init.d/asterisk restart
To retrieve SQLite3 call log data, here are a few examples to get you started:
ALL: sqlite3 /var/log/asterisk/master.db "select * from cdr"
DATE: sqlite3 /var/log/asterisk/master.db "select * from cdr where calldate >= '2016-05-22'"
NPA: sqlite3 /var/log/asterisk/master.db "SELECT * from cdr WHERE clid LIKE '%<843%'"
DEST: sqlite3 /var/log/asterisk/master.db "SELECT * from cdr WHERE dstchannel LIKE '%411%'"
FLDS: sqlite3 /var/log/asterisk/master.db "PRAGMA table_info(cdr)"
To retrieve the CDR log in CSV format suitable for spreadsheets, download:
/var/log/asterisk/cdr-csv/Master.csv
Adding Asterisk ULAW Sound Files to Your XiVO PBX
At least for us, the default sound files distributed with XiVO didn’t work. Here’s how to add the ulaw versions of all the files to your server:
cd /usr/share/asterisk/sounds/en wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-ulaw-current.tar.gz wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-ulaw-current.tar.gz tar zxvf asterisk-extra-sounds-en-ulaw-current.tar.gz tar zxvf asterisk-core-sounds-en-ulaw-current.tar.gz rm -f *.tar.gz chown asterisk:asterisk *.ulaw
Adding DISA Support to Your XiVO PBX
If you’re new to PBX lingo, DISA stands for Direct Inward System Access. As the name implies, it lets you make calls from outside your PBX using the call resources inside your PBX. This gives anybody with your DISA credentials the ability to make calls through your PBX on your nickel. It probably ranks up there as the most abused and one of the most loved features of the modern PBX.
We use two-step authentication with DISA to make it harder for the bad guys. First, the outside phone number has to match the whitelist of numbers authorized to use your DISA service. And, second, you have to supply the DISA password for your server before you get dialtone to place an outbound call. Ultimately, of course, the monkey is on your back to create a very secure DISA password and to change it regularly. If all this sounds too scary, don’t install DISA on your PBX.
1. Download the DISA dialplan script into your /root folder where it can be edited:
cd /root wget http://incrediblepbx.com/disa-xivo.tar.gz tar zxvf disa-xivo.tar.gz rm -f disa-xivo.tar.gz nano -w disa-xivo.txt
2. When the editor opens the dialplan code, move the cursor down to the following line:
exten => 3472,n,GotoIf($["${CALLERID(number)}"="701"]?disago1) ; Good guy
3. Clone the line by pressing Ctrl-K and then Ctrl-U. Add copies of the line by pressing Ctrl-U again for each phone number you’d like to whitelist so that the caller can access DISA on your server. Now edit each line and replace 701 with the 10-digit number to be whitelisted.
4. Move the cursor down to the following line and replace 12341234 with the 8-digit numeric password that callers will have to enter to access DISA on your server:
exten => 3472,n,GotoIf($["${MYCODE}" = "12341234"]?disago2:bad,1)
5. Save the dialplan changes by pressing Ctrl-X, then Y, then ENTER.
6. Now copy the dialplan code into your XiVO setup, remove any previous copies of the code, and restart Asterisk:
cd /root sed -i '\:// BEGIN DISA:,\:// END DISA:d' /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf cat disa-xivo.txt >> /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf /etc/init.d/asterisk restart
7. The traditional way to access DISA is to add it as an undisclosed option in an IVR that is assigned to one of your inbound trunks (DIDs). For the demo IVR that we installed last week, edit the ivr-1.conf configuration file and change the "option 0″ line so that it looks like this. Then SAVE your changes.
exten => 0,1(ivrsel-0),Dial(Local/3472@default)
8. Adjust the inbound calls route of one of your DIDs to point to the demo IVR by changing the destination to Customized with the following Command:
Goto(ivr-1,s,1)
Here’s how ours looks for the Nerd Vittles XiVO Demo IVR:
9. Now you should be able to call your DID and choose option 0 to access DISA assuming you have whitelisted the number from which you are calling. When prompted, enter the DISA password you assigned and press #. You then should be able to dial a 10-digit number to make an outside call from within your PBX.
SECURITY HINT: Whenever you implement a new IVR on your PBX, it’s always a good idea to call in from an outside number 13 TIMES and try every key from your phone to make sure there is no unanticipated hole in your setup. Be sure to also let the IVR timeout to see what result you get.
Adding Vitelity to XiVO for Flawless VoIP Calling
We already have shown you several ways to take advantage of free VoIP calling in the U.S. and Canada as well as internationally. But, the old adage still holds true. You get what you pay for. And, if you’re using XiVO for your business or if you like a good night’s sleep without worrying about whether your spouse is going to stab you because of lousy phone connections, then splurge and spend a penny and a half a minute for outbound calls while getting unlimited incoming calls (4 at a time!) for only $3.99 a month. You’re worth it. The signup link for Vitelity is at the end of today’s article. Once you have your credentials, create a subaccount on the Vitelity site and then you’re ready to set up your Vitelity trunks with XiVO. We’ll use one trunk for incoming calls and a second trunk for outbound calls. The setup procedure for both trunks is already documented on the PIAF Forum. Make that your next stop!
PIONEERS: For Flawless VoIP, Choose Vitelity SIP Trunks for your XiVO PBX https://t.co/Kvovaj2f8F #asterisk #XiVO pic.twitter.com/XbUOP21GzV
— Ward Mundy (@NerdUno) May 16, 2016
Simultaneous Cellphone Ringing for Inbound Calls with XiVO
Speaking of incoming calls, wouldn’t it be nice if your cellphone also rang when XiVO calls arrived on your main extension. Then you don’t have to worry about missing a call just because you stepped out of the office.
If you took our earlier advice and purchased a RingPlus phone with free monthly service, then you’re already covered. Setting up the RingPlus SIP trunk last week covered all the bases. And, there’s more good news from RingPlus. Now you can buy a phone in their Classifieds section without previously owning a phone. So you can hit the ground running with a phone AND a free calling plan. For example, $149 currently buys a brand new Moto E with 3,000 4G/LTE and SIP minutes, 3,000 SMS messages, and 3,000 MB of LTE data every month. And the monthly cost: ZERO!
But, let’s assume you’re not the sharpest tool in the shed, and you still want your cellphone to ring when extension 701 rings on your PBX. Here’s how.
In the User setup for your extension:
1. Enter your cellphone number in the Mobile Phone Number field. Be sure it includes any necessary dial prefix so that it’s routed out through the correct trunk.
2. On the same screen, you’ll find a Preprocess subroutine field. Enter the following there: pre-mobility
3. SAVE your changes.
Keep in mind that outbound calls in XiVO are routed out using dialing prefixes. If you have set up a trunk with a provider that allows CallerID spoofing such as Vitelity, Anveo Direct, or VoIP.ms, then you can preserve the caller’s original CallerID number on the forwarded call to your mobile phone provided the dial string for your cellphone number matches the format you set up for the trunk you wish to use. For example, if Exten for Vitelity is 8NXXNXXXXXX, then you would enter the number for your cellphone with an 8 prefix: 89991234567.
Munin Makes XiVO Shine
If you look under the Services tab and choose Graphics, the World of Munin will suddenly appear. There are literally dozens of gorgeous charts to tell you anything and everything you’d ever want to know about your server’s performance. Enjoy!
Endpoint Management on Steroids… and It’s FREE
If you’ve longed for an endpoint manager that would automatically configure your phones, the wait is over. XiVO supports literally dozens of phones out of the box. And the setup is integrated into the setup procedure for the users and devices. To get started, choose the Configuration tab and click Plugins. Next click on the + icon to load the default endpoint config files. We couldn’t do justice to this topic in a blog. That’s what tutorials are for. And XiVO has a 700+ page reference guide that will tell you everything you ever wanted to know about endpoint management.
Adding NeoRouter VPN to XiVO
We’ll finish up for this week by showing you how easy it is to add the NeoRouter Client to XiVO. In less than five minutes, you’ll be able to use XiVO’s NeoRouter private IP address to access your server securely from anywhere in the world. Start by reading our last introduction to NeoRouter. If you do not already have a NeoRouter Server, follow this tutorial to set one up before you begin.
If you’re running XiVO on a 64-bit platform, issue the following commands to install the free NeoRouter client:
cd /root wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrclient-2.3.1.4360-free-ubuntu-amd64.deb dpkg -i nrclient-2.3.1.4360-free-ubuntu-amd64.deb
If you’re running XiVO on a 32-bit platform, do this instead:
cd /root wget http://download.neorouter.com/Downloads/NRFree/Update_2.3.1.4360/Linux/Ubuntu/nrclient-2.3.1.4360-free-ubuntu-i386.deb dpkg -i nrclient-2.3.1.4360-free-ubuntu-i386.deb
Unless you want your server identified in NeoRouter as localhost, we recommend changing your hostname and rebooting your server at this juncture. Just edit /etc/hostname and give it a name, e.g. xivo. Then reboot.
Now log back into your server as root and then log into your NeoRouter client. This will assign a private IP address to your XiVO server. The nrtap entry running ifconfig will tell you what that address actually is.
nrclientcmd ifconfig
Taking Nerd Vittles’ XiVO IVR for a Test Drive
There’s a Demo IVR running at www.pacificnx.com on their XenServer virtualization platform. Scott McCarthy, a leading outside XiVO developer and a principal at PacificNX, tells us they soon will have a $20 a month platform specifically tailored to XiVO. And that’s what you’ll be hearing when you call the Nerd Vittles Demo IVR:
Nerd Vittles Demo IVR Options
1 – Call by Name (say "Delta Airlines" or "American Airlines" to try it out)
2 – MeetMe Conference
3 – Wolfram Alpha (Coming Soon!)
4 – Lenny (The Telemarketer’s Worst Nightmare)
5 – Today’s News Headlines
6 – Weather Forecast (enter a 5-digit ZIP code)
7 – Today in History (Coming Soon!)
8 – Speak to a Real Person (or maybe just Lenny if we’re out)
Published: Monday, May 23, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
2016, The Year of (real) VoIP Choice: Meet XiVO, a UC Solution for Any Business
We promised you that 2016 was going to be a year filled with surprises, and today we’re pleased to introduce another open source, pure GPL3 solution for any business. Whether your requirements are a call center or a versatile phone system for hundreds of employees, XiVO™ offers a compelling unified communications solution that checks all the boxes. Unlike some products that function merely as a code generator for Asterisk®, XiVO is in a league of its own. XiVO is actually an integral component of the Asterisk application itself. It manages your telephony server in realtime using its versatile PostGreSQL database platform. Did we mention it’s also a great playground for hobbyists and SOHO VoIP enthusiasts? Let’s get started.
UPDATE: The first release of Incredible PBX for XiVO is now available here. Please consider this article superseded by the new release.
There’s no way to do justice to a product like XiVO in a single article. So our plan is to introduce XiVO today and get your platform up and running where you can make and receive free calls throughout the United States and Canada. Then you can add Incredible PBX components and additional SIP providers as we continue to build them out. Just follow along with our Incredible PBX development for XiVO on the PIAF Forum, and you’ll get a first-hand look at how sausage is made. We already have text-to-speech applications for news and weather up and running. You can take them for a test drive by calling the XiVO demo:
And, of course, we’ve integrated the Travelin’ Man 3 IPtables firewall to provide rock-solid security for XiVO, and we’ll cover that today as well. As part of this development process, you’ll discover how easy it is to build Asterisk applications for XiVO on your own. And hopefully you’ll share some of your creations with the rest of us. That’s what open source development is all about.
Choosing an Experimental Platform for XiVO
We’re just getting started with XiVO development so, like us, we’re assuming you’ll want to kick the tires a bit before jumping into a new VoIP solution for the long haul. That means you first must choose a platform on which to install XiVO. We have several recommendations for you. If you have a robust desktop machine with lots of RAM and processing power, then installing XiVO under VirtualBox may be the way to go. We actually use an iMac with 16GB of RAM, and it provides plenty of horsepower to run VirtualBox and XiVO. With VirtualBox, we’ll start by downloading the XiVO ISO.
We didn’t mention that XiVO has been under development for over 10 years and is supported by the original developers with financial support from Avencall. Because of its Canadian roots, it seems only fitting that many may wish to consider CloudAtCost in Canada as an appropriate site to host your experimental XiVO server. A one-time payment of $10.50 still buys you a sandbox in the cloud for life with coupon code TAKE70, and XiVO installs on the CloudAtCost platform without a hiccup. For a CloudAtCost implementation, we’ll start by creating a Debian 8 server.1 And then we’ll download and run the XiVO installation script to build our XiVO server. Finally, we’ll walk you through setting up XiVO on a $5/month Digital Ocean Droplet which provides state-of-the-art performance at rock-bottom Cloud pricing. So begin by choosing your hardware platform from the three options below:
1. Installing XiVO as a VirtualBox Virtual Machine
For standalone implementations including VirtualBox, we’ll begin by downloading the 64-bit XiVO Server ISO to your desktop. Next, create a VirtualBox 64-bit Debian VM platform with 1024 MB RAM and at least a 10GB virtual drive. In System Settings, enable I/O APIC and disable the other options. Select a Sound Card to match your machine and configure Network Adapter 1 as a Bridged Network Device. In the Storage Settings (shown below) for your (1) Empty IDE Controller, (2) select the downloaded XiVO ISO as your installation media. Start the VM and proceed through the initial install.
Click Install, choose your language, pick your time zone, choose your keyboard map, create a very secure root password, and choose a Debian mirror that’s close to your server. Choose /dev/sda as your bootloader assuming that’s the disk drive configured by VirtualBox. In less than 10 minutes, the install will complete and your VM will reboot. Log into your server as root and obtain your IP address: ifconfig. You’ll need it for the web configuration step that comes next.
2. Installing XiVO as a CloudAtCost Cloud-Based Server
You can’t use an ISO as the installation media at CloudAtCost so we have to start by building a 64-bit Debian 8 virtual machine with at least 512 MB RAM and a 10GB virtual drive. No need to choose a larger drive at the moment since there’s a bug in CloudAtCost’s installer for Debian 8. See the footnote for details. Once your virtual machine is built, log in as root and issue the following commands to kick off the XiVO install:
apt-get -y remove apache2* apt-get update apt-get -y upgrade reboot # log back in as root and... wget http://mirror.xivo.io/fai/xivo-migration/xivo_install_current.sh bash xivo_install_current.sh
3. Installing XiVO as a Digital Ocean Droplet
As with CloudAtCost, you’ll need to begin your XiVO adventure at Digital Ocean by first signing up for an account. With our referral code, you’ll get a $10 credit (and so will Nerd Vittles). That’s good for two full months of service to kick the tires of XiVO without ever spending a dime. Once your account is set up, create a $5/month Debian 8 (64-bit) Droplet. When you receive the email with your droplet credentials, log into your new server as root using SSH/Putty and issue the following commands to get Debian 8 squared away:
apt-get update apt-get upgrade -y dd if=/dev/zero of=/swapfile bs=1024 count=1024k chown root:root /swapfile chmod 0600 /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap defaults 0 0" >> /etc/fstab sysctl vm.swappiness=10 echo vm.swappiness=10 >> /etc/sysctl.conf free reboot
After the reboot, log into your server again with your new root password and kick off the XiVO install:
wget http://mirror.xivo.io/fai/xivo-migration/xivo_install_current.sh bash xivo_install_current.sh
Enabling SSH Root Access with XiVO
If you installed XiVO using the XiVO ISO, then root logins via SSH are disabled by default. Only enable it if you plan to also implement the firewall in the next step! To enable root logins via SSH, log into the server console as root and edit the SSH config file: nano -w /etc/ssh/sshd_config. Find the line in the Authentication section that begins with PermitRootLogin and change it to: PermitRootLogin yes. Save your change (Ctrl-X, y, ENTER) and then restart SSH: /etc/init.d/ssh restart.
Setting Up a Firewall to Protect XiVO
We don’t build PBXs without a rock-solid firewall, but it’s your phone bill so the choice is all yours. The Travelin’ Man 3 implementation of the Linux IPtables firewall provides a safe computing platform using a WhiteList to only allow access by trusted users and providers. You can add additional users to the whitelist as desired using add-ip and add-fqdn in the /root folder. Restart your firewall using only this command: iptables-restart. If you’ll be using FQDNs in your WhiteList, then add the ipchecker script to your cron jobs. Then review Step #5 in the TM3 tutorial.
echo "*/10 5-22 * * * root /root/ipchecker > /dev/null 2>&1" >> /etc/crontab
It’s imperative that you set this up from a client workstation that’s running SSH or Putty. Otherwise, you may inadvertently lock yourself out from your own server. While logged into your server via SSH as root, issue the following commands:
cd /root wget http://incrediblepbx.com/firewall-xivo.tar.gz tar zxvf firewall-xivo.tar.gz rm -f firewall-xivo.tar.gz ./tm3-xivo.sh
Configuring XiVO with a Web Browser
Once the basic install is completed, you use a web browser to actually configure and manage your XiVO server. To get things started, point your browser to the IP address of your XiVO server. Choose your Language. Accept the GPL3 license agreement. Then fill in the blanks to create a Hostname for your server (XiVO), a domain name (some domain that you own or one chosen from your favorite dynamic DNS provider), a very secure Web interface password (choose as if your phone bill depends upon it). The network interface and DNS server entries should already be correct. Click Next.
On the second configuration screen, choose an Entity (department/organization name or IncrediblePBX will suffice). Then set up the Contexts to manage calls on your PBX:
- Internal Calls Context: manages extension numbers that can be reached internally
- Incalls Context: manages calls coming from outside of your system
- Outcalls Context: manages calls going from your system to the outside
Here’s what we’ll be using by way of example:
Finally, validate your entries to complete the configuration. Now log into your XiVO server as root using your newly created web password. You should get a status screen that looks something like this. If you had any doubts about the quality of the XiVO product, this should put your mind at ease. 🙂
Logging Into the XiVO Web Interface
To make changes in your XiVO setup, you’ll need to log into the web interface at the IP address of your XiVO PBX. Login with root as the username together with the Web Interface Password you set up above. You can change this password at any time under the Configuration tab by clicking on Users and editing your existing settings.
Creating Users and Lines with XiVO
For those migrating from the FreePBX® world, you’re probably most familiar with the procedure for creating extensions. More advanced administrators may have switched to device and user mode where users and devices are created separately. Phone numbers or extensions were associated with users while phone instruments were associated with devices. In the World of XiVO, we’ll start with the simplest configuration, and you can move on from there when you’re ready. In our scenario today, we’ll create a couple of users. Each user has a Name, Language, Time Zone, and other optional characteristics such as a Mobile Phone Number which can ring simultaneously whenever a user receives a call to his or her local XiVO phone number. By adding a Line (aka Phone Number) for the user as the user account is created, XiVO will automatically generate a separate Line with username and password credentials. This Line will be associated with the User during the initial user setup procedure, and this Line then can be registered to a SIP phone, softphone, or XiVO client (which we will cover separately down the road). In the example below, we’re using Nerd Uno’s extension 701 (associated with line 3jz8tsr0) to call Nerd Dos’ extension 702 (associated with line 8fmne2x4).
XiVO has an excellent tutorial that covers creating Users with a SIP Line. So jump there and add a couple of Users following the steps in the tutorial. When you’re finished, you’ll have two Users and two associated Lines with credentials to set up SIP phones. Since you’re just getting your feet wet and will probably make some mistakes, it’s probably a good idea to turn off Fail2Ban while you’re experimenting. Otherwise, you may accidentally lock yourself out of your server (ask us how we know) and think it’s a problem with XiVO. Here’s how:
/etc/init.d/fail2ban stop
To set up your SIP phones, you’ll need the credentials for each of the two lines. Under the Lines tab, click on the Pencil icon to reveal the Username and Password. Fill in the missing pieces as shown below and make certain that your NAT entry is set to Yes.
With those credentials in hand, go ahead and configure a couple of SIP phones and make certain you can call between them with audio in both directions before proceeding. For those with a Mac, Telephone is perfect for experimentation because you can set up multiple softphones and place calls between them.
IMPORTANT: If your server is sitting behind a NAT-based firewall, you must set the external and local network IP addresses for XiVO in General Settings -> SIP Protocol. You’ll find the fields in the Network tab.
Configuring a SIP Trunk for Google Voice with XiVO
Now that you have internal calls working, let’s turn our attention to connecting your PBX to the rest of the world. We obviously can’t cover the setup for every SIP provider, but we can provide a good example that will get our U.S. friends free calling in the U.S. and Canada. We’ve chosen the Simonics SIP Gateway to Google Voice because a one-time payment of $5.99 gets you a traditional SIP trunk to interface with any existing Google Voice number. If you don’t have a Google Voice number, sign up here. In your Google Voice Settings, make sure Forward Calls to Google Chat is enabled and disable Call Screening in the Calls tab. Then, with your Google credentials and Google Voice number in hand, visit the Simonics web site to sign up for service. Sign in with your Google credentials and complete the registration process. Once you have your Simonics account name and password, log into your XiVO web portal.
With credentials in hand, on the XiVO side, start by choosing the SIP Protocol tab under Trunk Management. There are actually three tabs to configure for the SIP trunk. Begin in the General tab and make it look like this using your credentials. NOTE: The complete FQDN for the Simonics gateway should be gvgw.simonics.com:
Next, click on the Register tab and reenter your credentials. Leave the empty fields exactly as shown. Be sure the Register box is checked.
Next, in the Signaling tab, change the Monitoring option to Yes and then click Save. Monitoring is the XiVO equivalent of the SIP Qualify option.
We also need to make one minor adjustment in the SIP Protocol Defaults in the General Settings. Just Save your settings after checking Match users with ‘username’ field.
Next, we need to tell XiVO how to process Incoming and Outgoing Calls using the Google Voice SIP trunk. Under the Call Management section, let’s begin with the Incoming Calls setup by creating a new Incoming Calls DID for your 11-digit Google Voice number. To keep things simple, we’ll route the incoming calls to the User mapped to extension 701:
For Outgoing Calls, we need to route calls with a specific dial string out the Simonics SIP trunk using the to-extern context. By way of example, we’ve set this up using a dialing prefix of 48 (GV) and a 10-digit number. We’re letting XiVO supply the missing 1 country code required by Google Voice, and we’ll let XiVO strip off the 48 prefix in processing the outbound calls. If this is your only outgoing trunk, you may prefer not to use a dial prefix at all. In that case, change the dial string to a 10-digit number (NXXNXXXXXX) and set Stripnum to 0.
Well, that’s enough for today. There’s complete XiVO PDF Documentation available here. We’ll have lots more to say about XiVO in coming weeks. Come join the party!
Published: Thursday, May 5, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
- There’s a glitch in the CloudAtCost builds for Debian8. Regardless of how much disk storage you allocate, CloudAtCost will only use 10GB. Moral: Don’t waste your resources by allocating more than 10GB of disk space. This is an experimental platform, and 10GB will suffice. If you really need more space, this thread on the PIAF Forum will walk you through expanding the storage allocation beyond the 10GB threshold. [↩]
Sleep Well: Create a $10.50 Incredible Backup Server in the Cloud with WebDAV
With the impending demise of Copy.com, it seemed like a good time to revisit the subject of backups and to do a little advance preparation for that rainy day when your Incredible PBX™ server decides it’s taken its last breath. We recently documented how to build an Incredible PBX in the Cloud for a one-time cost of $10.50. And we showed you how to build a Linux Sandbox in the Cloud for the same bargain-basement price. Today, we’re adding a third way to spend one day’s lunch money with our new Backup Server in the Cloud at CloudAtCost. And, like the other two, a one-time investment of $10.50 gets you a 10GB cloud repository to store your most important Asterisk® files for life!1 If you’re feeling really adventurous, you can double or quadruple your resources and your storage capacity at the same great 70% off rates with CloudAtCost coupon code: TAKE70. Some have asked us for a referral code to give credit where credit is due. Thanks for thinking of us, but we already have all of the CloudAtCost resources we could ever use. So this one, like the two before it, is on us!
https://youtu.be/INVaNT1R_jE
We recommend you start by building an Incredible PBX platform at CloudAtCost using our previous tutorial. Is it production-ready? Probably not. Is it a good standby server which can swing into action when your primary server croaks? Absolutely. Can it be used for off-site storage of backups from your primary Incredible PBX server? You bet. And today we’ll show you how. It’s about a 10-minute process once you have Incredible PBX up and running in the Cloud. We’ll also provide an updated Incredible Backup script to transparently upload backup images to your new CloudAtCost backup server.
It’s been quite a while since we first explored WebDAV back in 2005. Today we’re going to bolt on WebDAV to your existing Incredible PBX platform so that some of that spare storage space in the Cloud can be used to house snapshot images of your Incredible PBX production server. Since this will be a fully-functioning Incredible PBX server in addition to serving as a backup server, it can perform double-duty as a hot standby on a moment’s notice. When disaster strikes, restore the latest backup which happens to be colocated on your Cloud server, and you’ll be back in business.
Overview. As you probably know, WebDAV is an acronym for Web-based Distributed Authoring and Versioning. Simply put, it is an HTTP protocol extension that allows people anywhere on the Internet to edit and manage documents and other files using the same protocol and port used for surfing the web. In the Mac and Linux worlds, WebDAV provides a Disk Volume that “looks and feels” like any other networked hard disk. In the Windows world, WebDAV is called Web Folders. They can be used like any other mapped drive in Network Neighborhood. If you’re still a little fuzzy about the WebDAV concept, think of how you link to another drive on your local area network. WebDAV gives you the same functionality across the entire Internet with virtually the same ease of use. Depending upon user privileges, of course, you can copy files to and from a WebDAV volume, and the protocol imposes versioning control through file locking to assure that multiple people with access rights don’t change the same file at the same time.
Initial Setup of WebDAV in the Cloud. For today, we’re assuming you already have a functioning Incredible PBX server at CloudAtCost running under CentOS 6.7. If not, start with our tutorial here. If you’d prefer to use the Linux Sandbox configuration for your WebDAV platform, skip down to the next section. To keep things simple, we’re going to set up a separate dav directory within your existing Incredible PBX cloud server to use for WebDAV storage. This means files and folders managed with WebDAV will appear in /var/www/html/dav on your server. We’ll password-protect the directory using Apache web credentials for the admin user. You first must set up these credentials by issuing the following command while logged into your server as root:
htpasswd /etc/pbx/wwwpasswd admin
To activate WebDAV on your Incredible PBX server at CloudAtCost, while still logged into your server as root, issue the following commands:
mkdir /var/www/html/dav chown asterisk:asterisk /var/www/html/dav chown asterisk:asterisk /var/lib/dav cd /etc/pbx/httpdconf wget http://incrediblepbx.com/dav.conf service httpd restart
Keep in mind that WebDAV is running on an Incredible PBX server which means that remote HTTP access will require that your remote IP address be in the IPtables WhiteList. You can add it easily using the add-ip or add-fqdn utilities in /root. Don’t forget, or none of this will work.
Setting Up WebDAV on a CloudAtCost Linux Sandbox. If you’d prefer to set up WebDAV on a Linux Sandbox at CloudAtCost rather than the Incredible PBX platform, begin by installing the sandbox by following along in the Nerd Vittles tutorial. Once you’re up an running, issue the following commands to activate WebDAV:
mkdir /etc/pbx htpasswd -c /etc/pbx/wwwpasswd admin mkdir /var/www/html/dav chown apache:apache /var/www/html/dav cd /etc/httpd/conf.d wget http://incrediblepbx.com/dav.conf service httpd restart
You won’t have to whitelist the IP address of your local Incredible PBX server in the IPtables firewall running on your WebDAV server at CloudAtCost because port 80 already is whitelisted in the default Linux Sandbox setup.
Accessing WebDAV in the Cloud. As installed, you’ll need your username (admin) and your Apache password assigned above to access your WebDAV server in the Cloud. Use a browser for read only access to the dav directory at the IP address of your server, e.g. http://23.45.67.89/dav. Or establish a network share to the WebDAV resource for read and write access.
Configuring a Local CentOS/SL Server for WebDAV Access. Linux needs something special in order to treat remote WebDAV resources as part of your local file system. Fortunately, there is a packaged solution that does all the heavy lifting for you. On every CentOS/Scientific Linux server from which you want to access remote WebDAV resources, issue the following commands while logged into the server as root:
yum -y install davfs2 mkdir /dav cd /root wget http://incrediblepbx.com/incrediblebackup-dav chmod +x incrediblebackup-dav
Configuring a Local Debian/Ubuntu/Raspbian Server for WebDAV Access. The setup drill is much the same as it is for CentOS except the package installation syntax needs to be adjusted. On every Debian, Ubuntu, or Raspbian (Raspberry Pi) server from which you want to access remote WebDAV resources, issue the following commands while logged into the server as root:
apt-get -y install davfs2 mkdir /dav cd /root wget http://incrediblepbx.com/incrediblebackup-dav chmod +x incrediblebackup-dav
Connecting to Your WebDAV Server in the Cloud. The new Incredible Backup script, /root/incrediblebackup-dav, will automatically make a connection to your new WebDAV server in the Cloud once you’ve entered your admin credentials and the IP address of your WebDAV server. Do this by editing incrediblebackup-dav. Just plug in your admin password and the IP address of your WebDAV server in the Cloud. Then save the file.
In case you’re curious, here is the command to access WebDAV as a file system from your local server. Assuming admin:passwd555 were your remote Apache credentials and 23.45.67.89 was the IP address of your CloudAtCost server, the mount command would look like this:
echo passwd555 | mount.davfs http://23.45.67.89/dav /dav -o username=admin
All of the /dav files on the WebDAV server in the Cloud then would be accessible in the /dav directory on your local server until the WebDAV connection was closed/unmounted. You can add, edit, and delete files and directories. All of your local changes will automatically be synchronized with your WebDAV server in the Cloud.
To close the WebDAV connection, issue the following command:
umount.davfs /dav
Making a Backup to Your WebDAV Server in the Cloud. This is the easy part. Once everything is in place and you have configured the Incredible Backup script with your admin credentials and WebDAV server’s IP address, you’re ready to kick off a backup. Just issue the following command while logged into your server as root:
/root/incrediblebackup-dav
Restoring a Backup from Your WebDAV Server in the Cloud. There are two ways to do this. If your local server and Cloud-based server are running identical versions of Incredible PBX, then you can restore the backup image to your Cloud server and run Incredible PBX in the Cloud. Simply move the desired backup file from /var/www/html/dav on the Cloud server to /backup and then run incrediblerestore from the /root folder. Once the restore completes, reboot your Cloud server, reconfigure the IP addresses of your phones, and you’re back in business.
If you’d prefer to restore a backup from the Cloud to a local server, then you would first build a new server to match the one from which the backup was originally made. Next, configure the new server to support WebDAV access to your Cloud-based server following the tutorial above. Then execute the following commands after logging into your local server as root. Use the credentials, IP address, and actual backup filename saved on your Cloud server:
mkdir /backup cd /root echo passwd555 | mount.davfs http://23.45.67.89/dav /dav -o username=admin cp /dav/backupfilename.tar.gz /backup/. umount.davfs /dav ./incrediblerestore /backup/backupfilename.tar.gz rm /backup/backupfilename.tar.gz
WebDAV Cautionary Notes and Gotchas. First, WebDAV does a lot of heavy lifting under the covers because its intended for use as a collaboration tool by multiple people accessing and updating the same resources. So synchronization is important. When we’re moving huge files from a local server to the WebDAV cloud, this synchronization activity can give the appearance that your server has hung either during the backup procedure or thereafter. It hasn’t. So, after you run the Incredible Backup script to upload a new backup image, leave your server alone for a while. On your local server, don’t attempt to list /dav or otherwise use it for about an hour to be safe. On a Raspberry Pi, just be patient while the backup procedure completes. After that, you should be good to go. Depending upon the Linux flavor of your local server, the Incredible Backup script may not dismount your WebDAV resource successfully. You can do this manually LATER although it won’t hurt anything to leave the connection in place. As noted above, the dismount command is umount.davfs /dav.
Second, be very careful in configuring Incredible Backup to make certain that you specify the correct IP address for your WebDAV server in the Cloud. WebDAV will try to connect to any IP address, and you don’t want to inadvertently upload your backup files to someone else’s server. Third, ALWAYS use a web browser to access your WebDAV server in the Cloud after your backup completes to make certain that a backup with the current date and time is shown in the directory listing. Particularly with RedHat OS flavors, it may take some time for the entire tarball upload to complete even though the script will indicate it has finished. Again, patience is a virtue. Don’t reboot. Things will get sorted out in due course.
Finally, as with other network connections, if the WebDAV connection fails for some reason, your backup would be stored locally in the /dav folder rather than on WebDAV in the Cloud. That’s obviously not too helpful in the event of a local disk crash. So don’t forget to check your WebDAV server in the Cloud to verify successful completion of the backup.
Enjoy!
Republished: Monday, April 25, 2016
9 Countries Have Never Visited Nerd Vittles. Got a Friend in Any of Them https://t.co/wMfmlhiQ9y #asterisk #freepbx pic.twitter.com/TPFGZbqWB6
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.
BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.
The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.
VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
Some Recent Nerd Vittles Articles of Interest…
- The lifetime promise is, of course, in the eye of the beholder. It may be your lifetime but, more than likely, it’s the lifetime of CloudAtCost. The two are not necessarily the same so plan accordingly. 🙂 [↩]