Thanks Juha
I populated the lcr tables by hand. This is how they look now, I have 2 lcr_ids [1 and 2], each instance has its own gw. And each instance has its own prefix to match for [4444 and 5555].
The idea is that a call comes in with R-URI 444413051234567, it should match the lcr_id= 200, then it should go out using gw 192.168.169.200 etc
mysql> select * from lcr_gw;
+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+
| id | lcr_id | gw_name | ip_addr | hostname | port | params | uri_scheme | transport | strip | tag | flags | defunct |
+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+
| 1 | 200 | switchvox | 192.168.169.200 | pbx1.mydomain.com | 5060 | none | 1 | 1 | 0 | | 0 | 0 |
| 2 | 201 | switchvox2 | 192.168.169.201 | pbx1.mydomain.net | 5060 | none | 1 | 1 | 0 | | 0 | 0 |
+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+
mysql> select * from lcr_rule;
+----+--------+--------+----------+---------+---------+
| id | lcr_id | prefix | from_uri | stopper | enabled |
+----+--------+--------+----------+---------+---------+
| 1 | 200 | 4444 | | 0 | 1 |
| 2 | 201 | 5555 | | 0 | 1 |
+----+--------+--------+----------+---------+---------+
mysql> select * from lcr_rule_target;
+----+--------+---------+-------+----------+--------+
| id | lcr_id | rule_id | gw_id | priority | weight |
+----+--------+---------+-------+----------+--------+
| 1 | 200 | 1 | 1 | 5 | 1 |
| 2 | 201 | 2 | 2 | 5 | 1 |
+----+--------+---------+-------+----------+--------+
Then I tried the sercmd commands to reload and dump and I do not see the contents o the screen. Is this how is supposed to work now?. How do I know that the new values are being loaded into memory w/o restarting kamailio?
I am trying to port our setup from kamailio 1.4.3 to 3.1.4 and I see
> huge differences on the LCR module.
there is a script somewhere (read wiki) that upgrades the tables.
> I have these main questions:
>
> 1- does lcr_id replaces the grp_id?
not really. lcr_ids denote independent lcr instances.
> 2- what happened to the fifo commands to add gws etc:
fifo commands to manipulate lcr tables are not supported by me.
-- juha
From: fborot@hotmail.com
To: sr-users@lists.sip-router.org
Subject: Questions about LCR module
Date: Mon, 27 Jun 2011 17:23:05 -0400
I am trying to port our setup from kamailio 1.4.3 to 3.1.4 and I see huge differences on the LCR module.
I have these main questions:
1- does lcr_id replaces the grp_id?
2- what happened to the fifo commands to add gws etc:
lcr addgw <gw_name> <ip> <port> <scheme> <transport> <grp_id> <flags> <tag> <strip>
............... add a gateway with flags, tag and strip ............
................(flags, tag, and strip are optional arguments) .....
lcr rmgw <gw_name> ..........................................................
............... delete a gateway
lcr addroute <prefix> <from> <grp_id> <prio> .................................
.............. add a route ( use '' to match anything in <from> )
lcr rmroute <prefix> <from> <grp_id> <prio> .................................
.............. delete a route
3- it looks like the kamctl fifo lcr reload can not be used anymore, instead I found that there is a sercmd command that can be used to "show" and "reload" only the lcr tables
What would be the best way to use this module on this version?
Any help/hint would be greatly appreciated.
thank you
fborot