[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serusers
Subject:    Re: [SR-Users] Questions about LCR module
From:       Fabian Borot <fborot () hotmail ! com>
Date:       2011-06-29 14:16:14
Message-ID: SNT110-W481CBD8E7544DBCBCE7071CD590 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


lcr.reload load the tables to memory and does not print
anything. lcr.dump_[gws|rules] prints what is in memory.

perhaps you didn't set lcr_count.  please read whole README carefully.

-- juha

you are right, I guess I did not have the module well configured

 

From: fborot@hotmail.com
To: sr-users@lists.sip-router.org
Subject: RE: Questions about LCR module
Date: Tue, 28 Jun 2011 16:48:49 -0400






























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





  		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  


[Attachment #5 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><pre>lcr.reload load the tables to memory and does not print<br>anything. \
lcr.dump_[gws|rules] prints what is in memory.<br><br>perhaps you didn't set \
lcr_count.  please read whole README carefully.<br><br>-- juha<br></pre><br>you are \
right, I guess I did not have the module well configured<br><div> \
<div>&nbsp;</div></div><br><br><div><hr id="stopSpelling">From: \
fborot@hotmail.com<br>To: sr-users@lists.sip-router.org<br>Subject: RE: Questions \
about LCR module<br>Date: Tue, 28 Jun 2011 16:48:49 -0400<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">
<br>



<div><style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">
<br>



<div><style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">


<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<div dir="ltr">

<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<div dir="ltr">Thanks Juha<br>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].<br>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<br><br>mysql&gt; select * from \
lcr_gw;<br>+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+<br>| \
id | lcr_id | gw_name&nbsp;&nbsp;&nbsp; | \
ip_addr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | \
hostname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | port | params | \
uri_scheme | transport | strip | tag&nbsp; | flags | defunct \
|<br>+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+<br>|&nbsp; \
1 |&nbsp;&nbsp;&nbsp; 200 | switchvox&nbsp; | 192.168.169.200 | pbx1.mydomain.com | \
5060 | none&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp; 0 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 0 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 |<br>|&nbsp; 2 |&nbsp;&nbsp;&nbsp; 201 | \
switchvox2 | 192.168.169.201 | pbx1.mydomain.net | 5060 | none&nbsp;&nbsp; \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp; 0 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 0 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 \
|<br>+----+--------+------------+-----------------+-------------------+------+--------+------------+-----------+-------+------+-------+---------+<br>mysql&gt; \
select * from lcr_rule;<br>+----+--------+--------+----------+---------+---------+<br>| \
id | lcr_id | prefix | from_uri | stopper | enabled \
|<br>+----+--------+--------+----------+---------+---------+<br>|&nbsp; 1 \
|&nbsp;&nbsp;&nbsp; 200 | 4444&nbsp;&nbsp; \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|<br>|&nbsp; 2 |&nbsp;&nbsp;&nbsp; 201 | 5555&nbsp;&nbsp; \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|<br>+----+--------+--------+----------+---------+---------+<br>mysql&gt; select * \
from lcr_rule_target;<br>+----+--------+---------+-------+----------+--------+<br>| \
id | lcr_id | rule_id | gw_id | priority | weight \
|<br>+----+--------+---------+-------+----------+--------+<br>|&nbsp; 1 \
|&nbsp;&nbsp;&nbsp; 200 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|&nbsp;&nbsp;&nbsp;&nbsp; 1 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |<br>|&nbsp; 2 |&nbsp;&nbsp;&nbsp; 201 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 |&nbsp;&nbsp;&nbsp;&nbsp; 2 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 \
|<br>+----+--------+---------+-------+----------+--------+<br><br>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?<br><br><pre><i>I am trying to port our setup \
from kamailio 1.4.3 to 3.1.4 and I see<br></i>&gt;<i> huge differences on the LCR \
module.<br></i><br>there is a script somewhere (read wiki) that upgrades the \
tables.<br><br>&gt;<i> I have these main questions:<br></i>&gt;<i> <br></i>&gt;<i> 1- \
does lcr_id replaces the grp_id?<br></i><br>not really.  lcr_ids denote independent \
lcr instances.<br><br>&gt;<i> 2- what happened to the fifo commands to add gws \
etc:<br></i><br>fifo commands to manipulate lcr tables are not supported by \
me.<br><br>-- juha<br></pre><br><br><div> <div>&nbsp;</div></div><br><br><div><hr \
id="ecxstopSpelling">From: fborot@hotmail.com<br>To: \
sr-users@lists.sip-router.org<br>Subject: Questions about LCR module<br>Date: Mon, 27 \
Jun 2011 17:23:05 -0400<br><br>



<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>

<div dir="ltr">
<br>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.<br>I have these main questions:<br><br>1- does lcr_id \
replaces the grp_id?<br>2- what happened to the fifo commands to add gws \
etc:<br><br>&nbsp;lcr addgw &lt;gw_name&gt; &lt;ip&gt; &lt;port&gt; &lt;scheme&gt; \
&lt;transport&gt; &lt;grp_id&gt; &lt;flags&gt; &lt;tag&gt; \
&lt;strip&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
............... add a gateway with flags, tag and strip \
............<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
................(flags, tag, and strip are optional arguments) .....<br>&nbsp;lcr \
rmgw&nbsp; &lt;gw_name&gt; \
..........................................................<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
............... delete a gateway<br>&nbsp;lcr addroute &lt;prefix&gt; &lt;from&gt; \
&lt;grp_id&gt; &lt;prio&gt; \
.................................<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
.............. add a route ( use '' to match anything in &lt;from&gt; )<br>&nbsp;lcr \
rmroute&nbsp; &lt;prefix&gt; &lt;from&gt; &lt;grp_id&gt; &lt;prio&gt; \
.................................<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
.............. delete a route<br><br><br>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"&nbsp; only the lcr tables<br><br>What would be the best \
way to use this module on this version?<br><br>Any help/hint would be greatly \
appreciated.<br>thank you<br><br>fborot<br><br><br><br><br><div> \
<div>&nbsp;</div></div> 		 	   		  </div></div></div></div> 		 	   		  </div></div> \
</div></div> 		 	   		  </div></div> 		 	   		  </div></body> </html>



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic