<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello once again, <br>
<br>
It looks like core issue was not a termination of regexp. Was not
getting segfaults, but did not get a match either. <br>
After changing rule_id from 2617960 to 0, rule got loaded properly:<br>
<br>
sercmd> lcr.dump_rules<br>
{<br>
lcr_id: 90<br>
rule_id: 0<br>
prefix: 118<br>
from_uri: <a class="moz-txt-link-abbreviated" href="mailto:sip:00000000@xx.xx.lt">sip:00000000@xx.xx.lt</a><br>
request_uri: 118<br>
stopper: 1<br>
}<br>
{<br>
gw_index: 1<br>
priority: 0<br>
weight: 100<br>
}<br>
3<br>
<br>
I suspect that lcr code somehow a bit differently stores such rules
internally and primary id fragmentation results in rules set loaded
with improper rule_id: <br>
<br>
sercmd> lcr.dump_rules<br>
{<br>
lcr_id: 90<br>
rule_id: 0<br>
prefix: 118<br>
from_uri: <a class="moz-txt-link-abbreviated" href="mailto:sip:00000000@xx.xx.lt">sip:00000000@xx.xx.lt</a><br>
request_uri: 118<br>
stopper: 1<br>
}<br>
<br>
Here, in dump above it should contain rule_id=2617960, but contains
0. Also for such rule gw fails to be identified.<br>
<br>
Antanas<br>
NTT<br>
<br>
<div class="moz-cite-prefix">On 2012.07.24 12:20, Antanas Masevicius
wrote:<br>
</div>
<blockquote cite="mid:500E68E4.10109@ntt.lt" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello, <br>
<br>
Looks like i finally got it. REGEXP patterns in from_uri and
request_uri must be terminated between //.<br>
Maybe someone could add a notice about this in LCR documentation?
<br>
Only got it after reading some documentation on pcre lib.<br>
<br>
best regards, <br>
<br>
Antanas<br>
NTT <br>
<br>
<div class="moz-cite-prefix">On 2012.07.24 11:17, Antanas
Masevicius wrote:<br>
</div>
<blockquote cite="mid:500E5A13.4070801@ntt.lt" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello, <br>
<br>
thanks for the tip Alex, but still getting the same error:<br>
<br>
lcr [hash.c:166]: could not find (disabled) rule with id
<2617960><br>
<br>
if it helps, here is my ldd output for lcr.so:<br>
<br>
linux-vdso.so.1 => (0x00007ffffe7ff000)<br>
libpcre.so.3 => /lib/libpcre.so.3
(0x00007faf0cfd1000)<br>
libsrdb1.so.1 =>
/usr/local2/lib64/kamailio/libsrdb1.so.1 (0x00007faf0cdbf000)<br>
libkcore.so.1 =>
/usr/local2/lib64/kamailio/libkcore.so.1 (0x00007faf0cbb3000)<br>
libc.so.6 => /lib/libc.so.6 (0x00007faf0c852000)<br>
/lib64/ld-linux-x86-64.so.2 (0x00007faf0d42e000)<br>
<br>
Here is extended debug excerpt: <br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_val.c:117]: converting STRING [118]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG: lcr
[lcr_mod.c:1236]: loading, cycle 0 with <1> rows<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:62]: freeing rows at 0x7f0dc4afe4d8<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[5] at
0x7f0dc4afaa50<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:118]: allocate 48 bytes for result set at
0x7f0dc4afdee8<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[0] at
0x7f0dc4afaa50<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:92]: RES_NAMES(0x7f0dc4afe420)[1]=[ip_addr]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[4] at
0x7f0dc4afdf78<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:92]: RES_NAMES(0x7f0dc4afe440)[5]=[params]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:136]: use DB1_STRING result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:136]: use DB1_STRING result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:100]: use DB1_INT result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[12] at
0x7f0dc4afe3d8<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_val.c:73]: converting INT [0]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_val.c:56]: converting NULL value<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_val.c:56]: converting NULL value<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[1] at
0x7f0dc4afe420<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[4] at
0x7f0dc4afdf78<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[12] at
0x7f0dc4afe3d8<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:62]: freeing rows at 0x7f0dc4afe488<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:155]: allocate 104 bytes for result names
at 0x7f0dc4afe598<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[2] at
0x7f0dc4afe558<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:92]: RES_NAMES(0x7f0dc4afe518)[4]=[transport]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:136]: use DB1_STRING result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[7] at
0x7f0dc4afe440<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:136]: use DB1_STRING result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:85]: allocate 16 bytes for RES_NAMES[11] at
0x7f0dc4afe420<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:92]: RES_NAMES(0x7f0dc4afaa50)[12]=[id]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[3] at
0x7f0dc4afe538<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:85]: freeing RES_NAMES[8] at
0x7f0dc4afdf78<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_res.c:94]: freeing result names at
0x7f0dc4afe598<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:100]: use DB1_INT result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:92]: RES_NAMES(0x7f0dc4afe400)[1]=[gw_id]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
db_mysql [km_res.c:100]: use DB1_INT result type<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG:
<core> [db_val.c:73]: converting INT [0]<br>
Jul 24 11:12:54 xx /usr/local2/sbin/kamailio[26004] DEBUG: lcr
[hash.c:166]: could not find (disabled) rule with id
<2617960><br>
<br>
Antanas<br>
NTT <br>
<br>
<div class="moz-cite-prefix">On 2012.07.24 10:53, Alex Balashov
wrote:<br>
</div>
<blockquote
cite="mid:jsw0x3m2e1qc416n7mbn2246.1343116426508@email.android.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div>When calling load_gws(), try putting $rU and $fu in
double quotes, e.g. "$rU" rather than $rU bare. </div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-size:75%;color:#575757">-- Alex<br>
<br>
--<br>
Sent from my Samsung mobile, and thus lacking in the
refinement one might expect from a proper keyboard. <br>
<br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
235 E Ponce de Leon Ave<br>
Suite 106<br>
Decatur, GA 30030<br>
Tel: +1-678-954-0670<br>
Web: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.evaristesys.com/">http://www.evaristesys.com/</a></div>
</div>
<br>
Antanas Masevicius <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:antanas.masevicius@ntt.lt"><antanas.masevicius@ntt.lt></a>
wrote:<br>
Hello,<br>
<br>
having trouble running LCR in kamailio 3.3 (head).<br>
<br>
Here is my DB excerpt which i use to reproduce the problem:<br>
INSERT INTO `lcr_rule` VALUES
(2617960,90,'118','.*',1,1,'.*');<br>
INSERT INTO `lcr_rule_target` VALUES
(7771454,90,2617960,1424,0,100);<br>
INSERT INTO `lcr_gw` VALUES<br>
(1424,90,'OP1','10.10.10.10','',5060,NULL,1,0,NULL,'11#',1,NULL,NULL);<br>
<br>
I stripped all other LCR data from my DB and only this rule
with<br>
from_uri and request_uri seems to bother me.<br>
<br>
Tried this version on debian lenny and debian squeeze. On
Lenny i am not<br>
able to load lcr tables at all, get a segfault.<br>
On squeeze, lcr tables loads up, but this rule gets marked as
disabled.<br>
Here is config part which i use to load a rule:<br>
if (load_gws(90, $rU, $fu)) {<br>
if (next_gw()) {<br>
t_on_failure("FAIL_GW");<br>
} else {<br>
route(NO_ROUTE);<br>
}<br>
<br>
On squeeze, if i add following code to lcr_mod.c:1249 :<br>
LM_INFO("LOADING lcr rule <%u> \n", rule_id);<br>
right after:<br>
rule_id = (unsigned int)VAL_INT(ROW_VALUES(row));<br>
<br>
rule_id is still printed, but i get segfault like this:<br>
<br>
Jul 24 10:17:43 sp1 kernel: [23482626.105865] kamailio[15136]:
segfault<br>
at a4 ip 00007fde15cb8802 sp 00007fff39d68320 error 4 in<br>
lcr.so[7fde15ca8000+23000]<br>
<br>
Not sure what i do terribly wrong. Setting from_uri and
request_uri to<br>
anythig but NULL makes the code to segfault with that print
line added.<br>
Without print line, kamailio starts, but never loads that
rule.<br>
<br>
Any help would be appreciated.<br>
<br>
best regards,<br>
<br>
Antanas Masevicius<br>
NTT<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Antanas Masevičius
Technikos direktorius
UAB "Nacionalinis telekomunikaciju tinklas"
Tel. +370 5 2056000
Tel. +370 700 00031 (tiesioginis)
Fax. +370 700 00034
el.p: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:antanas.masevicius@ntt.lt">antanas.masevicius@ntt.lt</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.ntt.lt">www.ntt.lt</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.spykas.com">www.spykas.com</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Antanas Masevičius
Technikos direktorius
UAB "Nacionalinis telekomunikaciju tinklas"
Tel. +370 5 2056000
Tel. +370 700 00031 (tiesioginis)
Fax. +370 700 00034
el.p: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:antanas.masevicius@ntt.lt">antanas.masevicius@ntt.lt</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.ntt.lt">www.ntt.lt</a>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.spykas.com">www.spykas.com</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Antanas Masevičius
Technikos direktorius
UAB "Nacionalinis telekomunikaciju tinklas"
Tel. +370 5 2056000
Tel. +370 700 00031 (tiesioginis)
Fax. +370 700 00034
el.p: <a class="moz-txt-link-abbreviated" href="mailto:antanas.masevicius@ntt.lt">antanas.masevicius@ntt.lt</a>
<a class="moz-txt-link-abbreviated" href="http://www.ntt.lt">www.ntt.lt</a>
<a class="moz-txt-link-abbreviated" href="http://www.spykas.com">www.spykas.com</a></pre>
</body>
</html>