SIP trunk with two hosts

I have a sip trunk defined between FreePBX and Cisco Callmanager. I have two callmanagers. The trunk is only active on one callmanager at a time. I want to be able to allow the other callmanager to activate the sip trunk to FreePBX in the advent of the other callmanager failing. I have the below in the sip trunk config for incoming and outgoing, but the more I read the more I think it will not work.


Will the above work. If not how do I go about configuring this?


That did the trick although I can’t test a failure at the moment of one of the callmanagers. Using the Local/[email protected] with an outbound route with both sip trunks seems to work though. Thanks again for the help…

Let’s say all your extensions to Call Manager are 99XX.

Set up Outbound Routes for 99XX to go to the CM1 trunk first then the CM2 trunk.

Change your custom extension to point to “Local/[email protected]”.

Or you can put a specific outbound route after the @ using the format @outrt-000-Name where 000 is the number of the outbound route in your Outbound Routes list annd Name is the route name.

By using SIP/[email protected] you are restricting yourself by going around FreePBX’s Outbound Routes feature.

“Dynamic” is for peers that will register with you. Call Manager will not authenticate/register, so this is not the right approach.

How about this: set up two trunks, one for each Call Manager server. Either of the Call Managers, then, can send calls to Asterisk. For the outbound routing, simply set up your FreePBX outbound route to choose the primary Call Manager trunk first, then the secondary. This way if your primary Call Manager subscriber is down, it will just move on to the secondary.

Setting up two trunks is simple, but all my extensions in FreePBX are custom extensions with “SIP/[email protected]” for dialing out to the callmanagers in order to get directory dial and IVRs to work with extensions on callmanager. I’m not sure how to get this to use the primary and then the secondary should the primary fail.


I used “dyanmic” for the incoming trunk for the host definition. That will allow calls into the FreePBX box to work if one of the callmanagers is down I suspect. I just can’t find how to failover to another host if the callmanager that the outgoing trunk points to is down. The FreePBX box is used only for Voicemail and IVR functions. So the only time that a call goes out from it is for a directory dial or an IVR selection.