Redundancy with freepbx - what about the trunk?

Hi all,

I’ve been researching for weeks now but keep running into the same problems on how to make my servers redundant.

My setup:

  • I have 2 Asterisk (1.8) servers running Freepbx (2.9).
  • Server A is the main server with IP and
  • Server B is the backup server with IP
    -I have 1 external SIP trunk.
  • My phones register based on DNS SRV, no problems there.
  • Server B is allways standby just in case server A stops.

I want my environment to be redundant but don’t know how? I have configured the backup module in server B to do a restore from server A. This works fine except for one thing:
When the restore is finished the trunk settings are also restored and the trunk on server B is enabled and registers. The sip trunk sends its incoming data to the last registered server which is now server B but the phones are registered to server A because nothing is wrong with that server. Result: my calls are coming in on server B with all phones registered to A so nobody can answer.
Any ideas on how to fix this or maybe provide me with a better solution?

Thanks in advance

In FreePBX 2.10 we re-wrote the backup module and added pre and post restore hooks so you could than write a script to disable the trunk on restore. Not very doable in 2.9 since their are no hooks.