IAX Multihomed - any success stories?

Has anyone had any success getting IAX2 to work on a multi-homed server?

Here’s the scenario:

I have an Asterisk at a client site, and an Asterisk at my datacenter. The two are connected via IAX2. Now at my datacentre, my Asterisk box is multi-homed (with 2 network cards) - going out to two different subnets and eventually two different Internet connections.

What I would like to do is to set up two IAX accounts on my client’s Asterisk, one for each of my server’s two public IP addresses. Is that possible? I’m trying to achieve a level of redundancy such that if my primary link is offline, the client will try to connect using the secondary.

And yes, I have tried it, and no it doesn’t seem to work. I’ve tried setting up ip routes but the only IAX connection that seems to work is the one for network with the default gateway.


I am in this situation:

  1. My Asterisk server here at home/office uses an adsl connection for SIP VoIP accounts.

  2. The same server connects an external IAX server using another adsl connection (different router). Just yesterday I finished to setup it), This connection is on another lan card (a wireless one).

  3. I have my IAX softphone with an usb handset that I normally use to connect my home/office asterisk when for example I stay all the day in a different office, that can use both as incoming the first or second adsl.


  • I routed the IAX udp port from both my 2 routers to the internal IPs of my server.

  • The second iax server had a specific pubblic IP, so with the “route add” command I routed for/from the second router that IP address.

  • ALL the IP addresses of my customer’s xDSL are:


and others

So I defined per each IP net the routing to/from the second route. All of these routers uses the wireless connection.

I spent a lot of time in tests but now all seems to work fine.