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.
>
Hi,
Generally, incoming traffic (http/mail/sip/vpn/etc) can easily spread
with the random functions with iptables.
Perhaps also have a look at:
http://www.linuxvirtualserver.org/VS-NAT.html
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.