As we celebrate Labor Day, it seemed appropriate to document why XiVO separates the men from the boys so your phones don’t end up as boat anchors buried in the sand. Today our focus is “High Availability (HA)” and “Multi-Tenant (MT)“, two very expensive options for many PBXs including some that loosely tout their platforms as free.
In the PBX context, HA means that, when your server fails, there’s another one waiting in the wings to automatically take over. Much of this technology is based upon open source tools, but Sangoma sells a pair of limited term licenses as a FreePBX® add-on for a cool $3,000 not including hardware AND annual maintenance fees. With XiVO, it’s FREE! You can pair two Raspberry Pi’s or two Cloud servers, or you can mix-and-match with any combination of servers you choose. Here’s how we did it in 3 minutes flat:
Multi-tenant has been discussed for the FreePBX platform for the better part of a decade. As best we can tell, it’s still a pipe dream. Virtual machines running separate servers are the suggested solution even though this requires managing multiple Asterisk platforms forever. With XiVO’s FREE Entities module, MT is a cake walk. We’ll walk you through the 5-minute setup process thanks to the tips provided by Amy Grant on the PIAF Forum.
Deploying XiVO High Availability Servers with NeoRouter
Here’s the HA setup drill. First, you build two identical XiVO platforms running the same version of Incredible PBX for XiVO. Then you set the first server up as the Master and the second one as the Slave. As we said, these servers don’t need to be on the same hardware platform. And they need not be colocated although they have to share the same private LAN. We’ll handle that little detail by taking advantage of the NeoRouter client software that’s already installed as part of every Incredible PBX for XiVO build.
Unless both of your servers reside on the same local area network, you will need to deploy a NeoRouter server somewhere, but NOT on your XiVO Master since the NeoRouter server itself would become a single point of failure should it die along with your primary server. The Slave server would be a great choice. We covered the NeoRouter Server setup a long time ago in this tutorial, but don’t use the vintage install script. Instead you’ll need to deploy a current version of the Free NeoRouter Server that matches your server platform now that we support operating systems other than CentOS. Incidentally, all of the supported Cloud platforms that we’ve documented for XiVO also support NeoRouter.
We’ve made NeoRouter Server setup easy with this script which works with CentOS/SL, Ubuntu, Debian, and Raspbian. The actual setup steps covered in our original tutorial still are the same.
cd /root wget http://incrediblepbx.com/install-neorouter-server chmod +x install-neorouter-server ./install-neorouter-server
After you have your Free NeoRouter Server in place, the next step is to run nrclientcmd on each XiVO server and login to your NeoRouter Server with your credentials. The NeoRouter Server will assign a private IP address to each machine on the NeoRouter VPN. The addresses will be in the range 10.0.0.1 to 10.0.0.255. We’ll use these assigned addresses when setting up the Master and Slave XiVO HA servers.
High Availability Prerequisites with XiVO
In the Incredible PBX for XiVO context, the prerequisites list for your two HA servers is a short one. (1) You need two functioning Incredible PBX for XiVO machines on the same local area network. (2) Both the Master and Slave must be running the same version of XiVO. (3) All trunk registration timeouts (expiry) must be less than 300 seconds. (4) The Slave server must have no phone provisioning plugins installed.
For those using Google Voice trunks with OAuth in conjunction with Incredible PBX for XiVO, keep in mind that this is NOT an integral component of XiVO so it technically is not supported. However, you can easily make it work by configuring any desired Google Voice trunks on BOTH the Master and Slave machines using add-gvtrunk before enabling High Availability. Then the Google Voice trunks will continue to work even after a failover to Slave.
High Availability Limitations with XiVO
When the Master node fails, some features are not available on the Slave:
- Call history / call records are not recorded.
- Voicemail messages saved on the Master node are not available.
- Custom voicemail greetings recorded on the Master node are not available.
- Phone provisioning is disabled, i.e. a phone will always keep the same configuration, even after restarting it.
- Phone remote directory is not accessible because the provisioned IP address points to the Master.
Configuring Your Servers for High Availability
Like most XiVO tasks, setting up High Availability on your Master and Slave servers is a 5-minute process. Begin by configuring HA in the Web interface: Configuration ‣ Management ‣ High Availability. (1) Configure the first server as Master with the Remote Address of the Slave. (2) Login to the Linux CLI of Master as root and restart XiVO: xivo-service restart. (3) For the second machine, configure the server as Slave with the Remote Address of the Master.
Next, return to the Linux CLI of Master while still logged in as root. (1) Set up file synchronization by running this script: xivo-sync -i. (2) Start configuration synchronization by running: xivo-master-slave-db-replication 192.168.1.2 using the actual IP address of your Slave. (3) Finally, synchronize the two servers by running xivo-sync on Master. Done! Isn’t it nice saving $3,000 for 5 minutes work using open source software? 🙂
If you love the nitty gritty details, you can read up on XiVO HA in their excellent documentation.
Here’s what pbxstatus will show on Master and Slave while both servers are operational:
And here’s what happens when you halt Master. Within a minute or two, your designated Slave server will come to life:
Choosing Compatible Phones for High Availability
That’s only half the story, of course. Now that you have HA up and running, the remaining trick is that you want your phones to continue to work when things switch over to Slave. To accomplish this, you’ll need to use SIP phones that are compatible with HA technology. Some are, and many are not. XiVO has made it easy for you by publishing a compatibility list. Their documentation includes Officially Supported Devices as well as Community Supported Devices. HINT: Snom, Yealink, and Aastra 6700i and 9000i series phones are your safest bets.1 Here’s what a SIP extension setup would look like on Yealink’s popular T46G:
Deploying Multi-Tenant Technology with XiVO
If you’re new to MT technology, the idea here is to provide separate extensions and trunks for use by different departments within an organization. The reasons should be obvious. These departments have separate budgets and separate clientele, and you probably don’t want the public calling a central number in order to reach everyone in an organization. And the organization wants to identify costs and log calls associated with its various departments.
XiVO handles MT using Entities. When you set up Incredible PBX for XiVO, it automatically created a single Entity named Incredible PBX. You can create additional ones and name them anything you like in the XiVO Web interface: Configuration ‣ Management ‣ Entities.
Next, create Contexts to support your new Entity. Mimic the existing contexts in IPX ‣ IPX Configuration ‣ Contexts and provide unique names for each of them. Be sure you associate each of the new contexts with the new entity you created. Then set up users, lines, trunks, and call routing for the new entity in the same way you did it for the original IncrediblePBX entity. Take a look at Amy Grant’s setup with Google Voice on the PIAF Forum for additional tips. Simple and it’s FREE!
Originally published: Monday, September 5, 2016
— Ward Mundy (@NerdUno) April 22, 2016
Need help with Asterisk? Visit the PBX in a Flash Forum.
Special Thanks to Our Generous Sponsors
Awesome Vitelity Special. Vitelity has generously offered a terrific discount for Nerd Vittles readers. You now can get an almost half-price DID from our special Vitelity sign-up link. If you’re seeking the best flexibility in choosing an area code and phone number plus the lowest entry level pricing plus high quality calls, then Vitelity is the hands-down winner. Vitelity provides Tier A DID inbound service in over 3,000 rate centers throughout the US and Canada. When you use our special link to sign up, Nerd Vittles gets a few shekels down the road to support our open source development efforts while you get an incredible signup deal as well. The going rate for Vitelity’s DID service is $7.95 a month which includes up to 4,000 incoming minutes on two simultaneous channels with terminations priced at 1.45¢ per minute. Not any more! For our users, here’s a deal you can’t (and shouldn’t) refuse! Sign up now, and you can purchase a Tier A DID with unlimited incoming calls and four simultaneous channels for just $3.99 a month. To check availability of local numbers and tiers of service from Vitelity, click here. NOTE: You can only use the Nerd Vittles sign-up link to order your DIDs, or you won’t get the special pricing! Vitelity’s rate is just 1.44¢ per minute for outbound calls in the U.S. There is a $35 prepay when you sign up. This covers future usage. Any balance is refundable if you decide to discontinue service with Vitelity.
3CX is a software PBX that’s easy to install & manage. It includes integrated softphones, WebRTC conferencing and essential add-ons out of the box, at no additional cost. Try the free edition at www.3cx.com. Better yet, download the PIAF5 ISO powered by 3CX. Free version includes support for 8 simultaneous calls with a SIP trunk.
Some Recent Nerd Vittles Articles of Interest…