[SR-Users] Cant make from_uri, request_uri work for LCR module

Antanas Masevicius antanas.masevicius at ntt.lt
Tue Jul 24 09:49:47 CEST 2012


having trouble running LCR in kamailio 3.3 (head).

Here is my DB excerpt which i use to reproduce the problem:
INSERT INTO `lcr_rule` VALUES (2617960,90,'118','.*',1,1,'.*');
INSERT INTO `lcr_rule_target` VALUES (7771454,90,2617960,1424,0,100);

I stripped all other LCR data from my DB and only this rule with
from_uri and request_uri  seems to bother me.

Tried this version on debian lenny and debian squeeze. On Lenny i am not
able to load lcr tables at all, get a segfault.
On squeeze, lcr tables loads up, but this rule gets marked as disabled.
Here is config part which i use to load a rule:
        if (load_gws(90, $rU, $fu)) {
            if (next_gw()) {
            } else {

On squeeze, if i add following code to lcr_mod.c:1249 :
  LM_INFO("LOADING lcr rule <%u> \n", rule_id);
right after:
  rule_id = (unsigned int)VAL_INT(ROW_VALUES(row));

rule_id is still printed, but i get segfault like this:

Jul 24 10:17:43 sp1 kernel: [23482626.105865] kamailio[15136]: segfault
at a4 ip 00007fde15cb8802 sp 00007fff39d68320 error 4 in

Not sure what i do terribly wrong. Setting from_uri and request_uri to
anythig but NULL makes the code to segfault with that print line added.
Without print line, kamailio starts, but never loads that rule.

Any help would be appreciated.

best regards,

Antanas Masevicius

More information about the sr-users mailing list