[SR-Users] Question about using LCR wit multiple gateways

Gary Chen Gary.Chen at lightyear.net
Wed May 9 19:02:46 CEST 2012


Kamilio 3.2.0

I'd like to use one gateway as primary gateway and the another gateway as backup for failover.

I could not make it to work. Here is my table entries:
Lcr_gw:
+----+--------+-------------------------+-----------------+----------+------+--------+------------+-----------+-------+--------+------+-------+---------+
| id | lcr_id | gw_name                 | ip_addr       | hostname | port | params | uri_scheme | transport | strip | prefix | tag  | flags | defunct |
+----+--------+-------------------------+-----------------+----------+------+--------+------------+-----------+-------+--------+------+-------+---------+
|  1 |      2     | gateway1                 | 10.10.1.1      | NULL          | 5060 | NULL     |          1             |         0         |  NULL | NULL   | NULL |     0 |    NULL |
|  2 |      2     | gateway2                 | 10.10.1.2      | NULL          | 5060 | NULL     |          1             |         0         |  NULL | NULL   | NULL |     0 |    NULL |

Lcr_rule:

+-------+--------+--------+----------+---------+---------
| id    | lcr_id | prefix | from_uri | stopper | enabled
+-------+--------+--------+----------+---------+--------
| 1     |      2 | 1      | NULL     |       0 |       1
| 2     |      2 | 011    | NULL     |       0 |       1
+-------+--------+--------+----------+---------+--------

Lcr_rule_target:
+-------+--------+---------+-------+----------+--------+
| id    | lcr_id | rule_id | gw_id | priority | weight |
+-------+--------+---------+-------+----------+--------+
| 1     |      2 |   1    |     1 |        9 |      1 |
| 2     |      2 |   1     |     2 |        8 |      1 |
| 3     |      2 |   2     |     1 |        9 |      1 |
| 4     |      2 |   2     |     2 |        8 |      1 |

When making call , it only uses the first gateway. If first gateway failed, it could not find second gateway.
What is the correct table entry for this to work?

Thanks.

Gary

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120509/d5b8e752/attachment.htm>


More information about the sr-users mailing list