[OpenSIPS-Users] load_balance not using group id in failure route

Steven Lam, KeenSystems B.V. s.lam at keensystems.eu
Tue Jan 3 13:34:54 CET 2012


Is nobody using this? :-(
I really want to know if I'm doing something wrong here...

Steven

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Steven Lam, KeenSystems B.V.
Sent: donderdag 29 december 2011 14:48
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] load_balance not using group id in failure route

Hi all,

Using the load balancer on OpenSIPS 1.7.1 I found that when calling load_balance in a failure_route with a group other than the one on the initial call, the load_balance still uses the "old" group.

For example:

The table looks like this:
+----+----------+------------------+-----------+
| id | group_id | dst_uri          | resources |
+----+----------+------------------+-----------+
|  1 |        1 | sip:192.168.9.22 | all=10    |
|  2 |        1 | sip:192.168.9.27 | all=20    |
|  3 |        2 | sip:192.168.9.18 | all=10    |
+----+----------+------------------+-----------+

Script looks like this:
...
if ( load_balance("1","all") ) {
     xlog("==================> Destination is $du\n");
     t_on_failure("1");
     t_relay();
     exit;
}
...

failure_route[1] {
 lb_disable();
  if ( load_balance("2","all") ) {
    t_on_failure("1");
    xlog("==================> New destination is $du\n");
    t_relay();
  } else {
    t_reply("500","Error");
  }
}

This will result in routing a INVITE to sip:192.168.9.27, when this fails the INVITE will be routed to sip:192.168.9.22 _NOT_ 192.168.9.18. To me this looks wrong.

Is this by design? If so how can I force load_balance to use a uri from group 2 after using one from group 1?

Hope someone can give me some advice on this.

Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120103/c9d32715/attachment.htm>


More information about the Users mailing list