[asterisk-users] Multiple IAX2 Trunks Load balancing

Don Kelly dk at donkelly.biz
Fri Dec 13 06:20:37 CST 2013

On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
> Hi - I have 2 Asterisk servers connected using 05 IAX2 trunks. I want 
> to load balance incoming calls over IAX2 trunks. If any trunk goes 
> down the calls traffic will be shared with other available trunks.
> When it gets Up the script is supposed to perform as desired i.e in 
> load balance mode.

> Thanks in advance.

Hans said:


Generally, incoming traffic (http/mail/sip/vpn/etc) can easily spread with
the random functions with iptables. 
Perhaps also have a look at:

But i feel that might not work in this case, if all your trunk-connections
are already up-and-running.

If so, you might contemplate an alternative approach.
It sounds that you want to do the load balancing trick upon the application
layer (eg. within asterisk)

Perhaps it is possible to do the L.B. at the O.S. or network level, and let
all trunks appear to asterisk to one single trunk.

Don asks:

What's the value of load balancing multiple IAX trunks between the same
system pair? What resources are being balanced?


More information about the asterisk-users mailing list