When calling load_gws(), try putting $rU and $fu in double quotes, e.g. "$rU" rather than $rU bare. 




-- Alex

--
Sent from my Samsung mobile, and thus lacking in the refinement one might expect from a proper keyboard.

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/

Antanas Masevicius <antanas.masevicius@ntt.lt> wrote:
Hello,

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);
INSERT INTO `lcr_gw` VALUES
(1424,90,'OP1','10.10.10.10','',5060,NULL,1,0,NULL,'11#',1,NULL,NULL);

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()) {
                t_on_failure("FAIL_GW");
            } else {
                route(NO_ROUTE);
            }

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
lcr.so[7fde15ca8000+23000]

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
NTT


_______________________________________________
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