Round Robin Load Balancing

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Round Robin Load Balancing

Post by noiptel »

1. Brekeke Product Name and version:

2. Java version:

3. OS type and the version:

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

6. Your problem:
Does the Brekeke SIP Server offer Round Robin Load Balancing for multiple endpoints?
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

Brekeke PBX has the Round Robin function.

If you want to make it at Brekeke SIP Server, try the DialPlan like below.

Code: Select all

Rule-1
~~~~~~~~~~~~~~
[Matching Patterns]
  $request = ^INVITE
  &cntLoadBalance = 1

[Deploy Patterns]
  To = sip:user1@IP_Addr_1
  &&cntLoadBalance = 2


Rule-2
~~~~~~~~~~~~~~
[Matching Patterns]
  $request = ^INVITE
  &cntLoadBalance = 2

[Deploy Patterns]
  To = sip:user2@IP_Addr_2
  &&cntLoadBalance = 3


Rule-3
~~~~~~~~~~~~~~
[Matching Patterns]
  $request = ^INVITE
  &cntLoadBalance = 3

[Deploy Patterns]
  To = sip:user3@IP_Addr_3
  &&cntLoadBalance = 4


Rule-4
~~~~~~~~~~~~~~
[Matching Patterns]
  $request = ^INVITE

[Deploy Patterns]
   To = sip:user4@IP_Addr_4
   &&cntLoadBalance = 1

It makes a Round Robin.
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Yes we are using SIP Server. I tried the dialing plan suggested, but it seems I am only geetting a rule match on the last rule. Also I am unable to put double "&&" had to put only one. Se my dialing plan below



IM9Q1
Rule-1
~~~~~~~~~~~~~~
[Matching Patterns]
$request=^INVITE
$request=sip:7091(52376.+)@
$registeredaddr("im9q1")=(.*)
$svkdialplan.authnoipendpoint("im9q1")=(.+)
&cntLoadBalance=1

[Deploy Patterns]
$auth=false
To=sip:%1@%2
$session=com.sample.radius.proxy.NoIPRadiusAcct im9q1
$continue=false
&cntLoadBalance=2

IM9Q2
Rule-2
~~~~~~~~~~~~~~
[Matching Patterns]
$request=^INVITE
$request=sip:7091(52376.+)@
$registeredaddr("im9q2")=(.*)
$svkdialplan.authnoipendpoint("im9q2")=(.+)
&cntLoadBalance=2

[Deploy Patterns]
$auth=false
To=sip:%1@%2
$session=com.sample.radius.proxy.NoIPRadiusAcct im9q2
$continue=false
&cntLoadBalance=3

IM9Q3
Rule-3
~~~~~~~~~~~~~~
[Matching Patterns]
$request=^INVITE
$request=sip:7091(52376.+)@
$registeredaddr("im9q3")=(.*)
$svkdialplan.authnoipendpoint("im9q3")=(.+)

[Deploy Patterns]
$auth=false
To=sip:%1@%2
$session=com.sample.radius.proxy.NoIPRadiusAcct im9q3
$continue=false
&cntLoadBalance=1


Brekeke SIP Server , Version 2.3.7.4 Standard
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

>> . Also I am unable to put double "&&" had to put only one. Se my dialing plan below

Which version of Brekeke SIP Server are you using?
It seems you are using a old version...

Try the latest version!
it should work.
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Thank you for script. It is working fine.

The only issue that we now have is that when a call is sent to one of the endpoints and call is rejected by endpoint the call does not go to the next endpoint but it is returned with a 503 SIP codec.

How can we make it so that calls go to next endpoint and not get returned in the event enpoint is down or rejects call?
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Let me rephrase this, the call is sometimes rejected because of the 4th line of the matching pattern (Authentication denied) hence the deploy pattern is not executed and further calls will hit the same rule and not advance to the next. How can we make the load balance to try the next rule to continue the round robin on these cases?
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

The Failover plugin will meet your requirement because it can make a failover based on a SIP response too..
http://wiki.brekeke.com/wiki/How-to-mak ... -Dial-Plan


For example, Rule-1 will be..
------------------------------------
[Matching Patterns]
$request=^INVITE
$request=sip:7091(52376.+)@
$registeredaddr("im9q1")=(.*)
$registeredaddr("im9q2")=(.*)
$registeredaddr("im9q3")=(.*)
$svkdialplan.authnoipendpoint("im9q1")=(.+)

[Deploy Patterns]
$auth=false
To=sip:%1@%2
$session = plugin.failover sip:%1@%3 sip:%1@%4
------------------------------------
Harold
Posts: 289
Joined: Sun Sep 21, 2008 10:31 pm
Location: Japan

Post by Harold »

Please note.. you need to use Advanced Edition of Brekeke SIP Server if you use the Failover plugin..

I recommend you to contact SVK Software to get some technical assistance because it seems you are using SVK's plugins..
Post Reply