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