FusionPBX for ex-Trixbox users

This blog is intended to be read in sequential order as it is a series of steps that I followed to build a fully functioning fusionpbx phone system. However you might just need to find out how to do a particular thing so you might want to use the search box below to find that specific step. Please give feedback - if you know a better way to do something share it!

Wednesday, January 12

Outbound failover

I have multiple VOIP provider accounts and I wanted to have failover so that if one provider is down it will automatically try the next provider.  This can be achieved in the outbound routes section of the dialplan by having your first and second actions being:
set continue_on_fail=true
set hangup_after_bridge=true

The first one says that if you fail to bridge the call to a provider on the first attempt then don't give up - continue to the next instruction - the default action would be to stop executing instructions after the first attempt.
The second one says that if you do successfully bridge the call, that will be the last instruction you execute - without this the continue on fail would cause each bridge instruction to be executed in order - so if you have 3 different voip providers this would mean that every call you make would be placed 3 times! (after you hang up the first time it would call them again).

After these actions you can have each of your bridge actions to each of your providers.

As an aside, I have a troublesome provider that will not route my call if the caller_id value I pass to them is not my registered VOIP number with them.  So in my outbound routes I have to set effective_caller_id_number=myvoipnumber before I bridge to them.  This overrides the normal setting I have of set effective_caller_id_number=${outbound_caller_id_number}.  I also have set effective_caller_id_name=${outbound_caller_id_name} but the provider doesn't mind what I set that to.