Hi,
I tried the lcr module for rel_0_9_0 found at
http://tutpro.com/tmp/lcr-0.9.0.tgz, but it seems that subsequent calls
of next_gw() always return the same gateway as the first call of
next_gw(). Do I miss something?
Here's my setup:
mysql root@ser> select * from lcr;
+--------+----------+--------+----------+
| prefix | from_uri | grp_id | priority |
+--------+----------+--------+----------+
| | % | 1 | 1 |
+--------+----------+--------+----------+
1 row in set (0.00 sec)
mysql root@ser> select * from gw;
+-----------------+------------+------+--------+
| gw_name | ip_addr | port | grp_id |
+-----------------+------------+------+--------+
| sipgw1.inode.at | 833315646 | 5060 | 1 |
| sipgw2.inode.at | 1780932433 | 5060 | 1 |
| sipgw3.inode.at | 850092862 | 5060 | 1 |
| sipgw4.inode.at | 1797709649 | 5060 | 1 |
| sipgw5.inode.at | 866870078 | 5060 | 1 |
| sipgw6.inode.at | 883647294 | 5060 | 1 |
+-----------------+------------+------+--------+
And in my ser-config I do:
route[0]
{
# ...
if(!load_gws())
{
sl_send_reply("500",
"Internal server error, unable to load gateways");
break;
}
if(!next_gw())
{
sl_send_reply("503", "Service not available, no gateways
found");
break;
}
t_on_failure("2");
# ...
t_relay();
}
failure_route[2]
{
if(method == "INVITE" && t_check_status("408|500|503"))
{
if (!next_gw())
{
t_reply("503", "Service not available, no more gateways");
break;
}
t_on_failure("2");
# ...
t_relay();
}
}
But the failure route 2 always routes to the same gateway as the route 0
or previous calls of failure route 2.
Thanks,
Andy