Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Multiple IAX2 Trunks Load balancing


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
replyusman at gmail.com
Guest





PostPosted: Fri Dec 13, 2013 2:48 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

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.
Back to top
steve-lists at geekint...
Guest





PostPosted: Fri Dec 13, 2013 4:29 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

On 13 Dec 2013, at 07:48, Muhammad Usman <replyusman@gmail.com> wrote:
Quote:
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.

Sounds wonderful.

S
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
replyusman at gmail.com
Guest





PostPosted: Fri Dec 13, 2013 4:31 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

yeah -- searching how to perform this magic ...



On Fri, Dec 13, 2013 at 2:29 PM, Steven Howes <steve-lists@geekinter.net (steve-lists@geekinter.net)> wrote:
Quote:
On 13 Dec 2013, at 07:48, Muhammad Usman <replyusman@gmail.com (replyusman@gmail.com)> wrote:
Quote:
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.


Sounds wonderful.

S
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



--
                                    Regards:
                                    (Muhammad υѕмαη )
Back to top
asterisk at a-domani.nl
Guest





PostPosted: Fri Dec 13, 2013 5:18 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
Quote:
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.

Quote:
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.


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
dk at donkelly.biz
Guest





PostPosted: Fri Dec 13, 2013 7:21 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
Quote:
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.

Quote:
Thanks in advance.


Hans said:

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.

Don asks:

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

--Don



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
asterisk.org at sedwar...
Guest





PostPosted: Fri Dec 13, 2013 10:41 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

On Fri, 13 Dec 2013, Don Kelly wrote:

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

1) It's been said (but I've never experienced it) that IAX performs poorly
at high channel levels. Something about all those packets being handled
with a single socket (bound to port 4569). Maybe the OP is trying to
distribute the load over a handful of sockets.

2) Maybe the OP is trying to distribute the load over different physical
media.

3) Maybe the OP is just trying to develop a load balancing methodology.

Multiple trunks between the same pair of hosts does seem odd.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
asterisk at a-domani.nl
Guest





PostPosted: Fri Dec 13, 2013 10:53 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

On Fri, 2013-12-13 at 06:20 -0600, Don Kelly wrote:
Quote:
On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
Quote:
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.

Quote:
Thanks in advance.


Hans said:

Quote:

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?

++++++++++

Perhaps the O.P. can explain about his intentions...

In some situations it makes sense though:
If you have to connect two servers, and use different kind of
infrastructure / multiple providers...

hw


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
replyusman at gmail.com
Guest





PostPosted: Sat Dec 14, 2013 2:41 am    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

Friends let me define the scenario please;
Scenario:
2 asterisk servers (A & B) are connected using 05 IAX2 trunks between them. The machine A is running asterisk & Openvpn server in TUN mode (5 instances with difference IP addresses for clients). The machine B is running asterisk with 05 OpenVPN clients using 05 bandwidths. The IAX trunks are established between each pair of P-2-P ip address of machine A (The OPENVPN Server) & machine B (The Openvpn client).
Requirement:
Required dial plan configuration at machine A for incoming calls from VoIP Switch/VOS which can forward the calls to IAX2 trunks in round robin fashion like Load Balancing. If any trunk goes down it starts forwarding the traffic to other available trunks & when it gets UP the dialplan should perform as desired. Like L.B & Fail-over scenarios.



On Fri, Dec 13, 2013 at 8:52 PM, Hans Witvliet <asterisk@a-domani.nl (asterisk@a-domani.nl)> wrote:
Quote:
On Fri, 2013-12-13 at 06:20 -0600, Don Kelly wrote:
Quote:
On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
Quote:
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.

Quote:
Thanks in advance.


Hans said:


Quote:
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?


++++++++++

Perhaps the O.P. can explain about his intentions...

In some situations it makes sense though:
If you have to connect two servers, and use different kind of
infrastructure / multiple providers...

hw


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





--
                                    Regards:
                                    (Muhammad υѕмαη )
Back to top
b.lavallee at globalta...
Guest





PostPosted: Sun Dec 15, 2013 8:08 pm    Post subject: [asterisk-users] Multiple IAX2 Trunks Load balancing Reply with quote

Are you looking for something like this?

Note: This will continuously go between the two trunks until the caller hangs up, can be fixed by adding loop counter.

;
; extensions.conf
;
[LOADBALANCE]
exten => _X.,1,NoOp(Connect to least used trunk)
; - show active count
exten => _X.,n,NoOp(Calls: ${GROUP_COUNT(TRUNK01CNT)}/${GROUP_COUNT(TRUNK02CNT)} of ${MATH(${GROUP_COUNT(TRUNK01CNT)}+${GROUP_COUNT(TRUNK02CNT)},int)})
; - goto least used trunk
exten => _X.,n,GotoIf($[${GROUP_COUNT(TRUNK01CNT)} < ${GROUP_COUNT(TRUNK02CNT)}]?TRUNK02,${EXTEN},1:TRUNK01,${EXTEN},1)
;
;
[TRUNK01]
exten => _X.,1,NoOp(Using Trunk 01)
; - set trunk used counter
exten => _X.,n,Set(GROUP()=TRUNK01CNT)
; - dial trunk
exten => _X.,n,Dial(IAX/T01/${EXTEN})
; - add loop counter to stop infinite loop
exten => _X.,n,NoOp(Use next TRUNK02 is congestion or chanunavial)
; - next trunk if CONGESTION
exten => _X.,n,GotoIf($["${DIALSTATUS}"="CONGESTION"]?TRUNK02,${EXTEN},1)
; - next trunk if CHANUNAVAIL
exten => _X.,n,GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"]?TRUNK02,${EXTEN},1)
exten => _X.,n,Hangup()
;
;
[TRUNK02]
; - same as above
exten => _X.,1,NoOp(Using Trunk 02)
exten => _X.,n,Set(GROUP()=TRUNK02CNT)
exten => _X.,n,Dial(IAX/T02/${EXTEN})
exten => _X.,n,NoOp(Use next TRUNK01 is congestion or chanunavial)
exten => _X.,n,GotoIf($["${DIALSTATUS}"="CONGESTION"]?TRUNK01,${EXTEN},1)
exten => _X.,n,GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"]?TRUNK01,${EXTEN},1)
exten => _X.,n,Hangup()
;
; - end

On 12/14/13, 4:41 PM, Muhammad Usman wrote:

Quote:
Friends let me define the scenario please;
Scenario:
2 asterisk servers (A & B) are connected using 05 IAX2 trunks between them. The machine A is running asterisk & Openvpn server in TUN mode (5 instances with difference IP addresses for clients). The machine B is running asterisk with 05 OpenVPN clients using 05 bandwidths. The IAX trunks are established between each pair of P-2-P ip address of machine A (The OPENVPN Server) & machine B (The Openvpn client).
Requirement:
Required dial plan configuration at machine A for incoming calls from VoIP Switch/VOS which can forward the calls to IAX2 trunks in round robin fashion like Load Balancing. If any trunk goes down it starts forwarding the traffic to other available trunks & when it gets UP the dialplan should perform as desired. Like L.B & Fail-over scenarios.



On Fri, Dec 13, 2013 at 8:52 PM, Hans Witvliet <asterisk@a-domani.nl (asterisk@a-domani.nl)> wrote:
Quote:
On Fri, 2013-12-13 at 06:20 -0600, Don Kelly wrote:
Quote:
On Fri, 2013-12-13 at 12:48 +0500, Muhammad Usman wrote:
Quote:
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.

Quote:
Thanks in advance.


Hans said:


Quote:
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?


++++++++++

Perhaps the O.P. can explain about his intentions...

In some situations it makes sense though:
If you have to connect two servers, and use different kind of
infrastructure / multiple providers...

hw


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users





--
Regards:
(Muhammad υѕмαη )


Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services