Failover-options Hosted FreePBX

Good evening,

I have a hosted FreePBX server with Vitelity. What kind of configuration options are there within the FreePBX server for an automatic failover solution? In the event of an internet outage in our office, we would like calls to automatically forward to a designated landline. Thanks for your help! I’ll be monitoring this question closely.

1 Like

Your hosted PBX will need to monitor your extensions and when they are “just not there” then disable the Vitelity trunk, Vitelity can then be set to do your failover. This is not part of FreePBX however.

However you can add “follow me’/vmx” behavior that will have your hosted solution also call your PSTN number if your extensions are “unavailable”

Great! Thank you for the reply. I’m very interested in both of your suggestions, and actively trying to find more information. Do you possibly have a resource for each that you could to point me to?

In Vitelity, there are two failover options:

  • Call failover set on a server - feature allows you to specify where calls should be routed (another server’s IP address) in the event your server/device becomes unavailable.
  • Call failover set on a DID - the call will failover to that number if your device is offline or rejects the call.

So for clarification’s sake, your first suggestion would involve configuring the Hosted PBX to monitor the extensions and disable the trunk when it is offline. This would make the DID appear as offline to Vitelity and trigger the automatic ‘Call failover set on a DID.’

Is there some sort of module for FreePBX to make it monitor the devices and disable the trunk if they are offline, or is this within the configuration of the trunk itself?

If I understand the ‘follow me’/vmx’ solution you provided:

  • Call is presented to system on inbound SIP trunk based DID number.
  • Station is rang, and based on Follow-Me or VmX feature (configured
    only when device cannot be reached), second call is routed to
    outbound trunk.
  • Call appears on external E.164 number (hopefully with original CNAM) and subscriber answers/accepts call.

Would this solution have to be configured for each extension?

Thanks again for your help.

There is no FreePBX module to do that. you will have to “hand-roll” a solution,
The Trunk will always be “up” as far the hosted FreePBX is concerned so maybe something like:-

if [ "$(rasterisk -x  'sip show peers'|grep OK|wc -l)" = "0" ] && [ -f /tmp/internetup ];then rm /tmp/internetup; mysql -pyourpassword -D asterisk -e "UPDATE trunks set disabled='on' WHERE name='your_trunk_name'";amportal -a r;else touch /tmp/internetup;mysql -pyourpassword -D asterisk -e "UPDATE trunks set disabled='off' WHERE name='your_trunk_name'";amportal -a r;fi

as a well timed cron job.

If you go the VMX way, then yes that would need to be configured on each extension because each extension would need a different destination surely, presumably a cell phone.

On vitelity, my understanding is -

Call failover on server is a setting on account/subaccount. It allows you to direct all DIDs in an account to a second SIP server if your first server isn’t registered (online). This is in the sub accounts menu. This would be good for a hot backup server.

Call failover on DID - will failover if the assigned account is not registered. It will also failover if the server is misconfigured. This is setup in the DID menu. It has more options for failover, either another SIP address, forward to a different DID (higher rates apply), or I think even to voicemail configured locally on Vitelity.

You really need to consider both failure locations -

Server -> extensions - Calls will still make it to voicemails, IVRs, etc. They won’t make it to the final destination though.

Vitelity -> Server - This is perhaps the most fatal situation. Calls will typically go to “number out of service” type message.

You likely need to address both situations. Dickos suggestion brings both cases together, which may or may not be a good thing depending on how well you have the server vitelity->server outage covered. In my case, I route all calls to an answering service when things are down so I think I am going to steal the idea :smile:

Where do you want the calls to go if they can’t reach the extensions?

How many extensions? How many DIDs?

Hmm if only I could “hand-roll” like that! Wow this is great. Thank you. I see mysql mentioned in your code, so perhaps our first step will actually be to get the MySQL Client Libaries/ Headers installed on the box. Any advice for this part?

By the way, do you know of a resource I might be able to use to teach myself to “hand-roll” like that?

Thanks again for your help.

It is unlikely that you do not have the mysql client binaries installed unless you actually “rolled your own” system :slight_smile:

I am unaware of any resources beyond the “standard” base resources:-

http://www.asteriskdocs.org/
http://wiki.freepbx.org/
http://www.voip-info.org/
https://www.google.com/

between them, I think you should be able to construct anything you want :wink:

a caveate if you do the cron thingy , you may need to add explicit paths to your binaries in the job as many OS’s run cron jobs under /bin/sh which usually has a limited path.