[sr-dev] [LCR] Bug in load_gws(pvar) in Kamailio 1.5

Iñaki Baz Castillo ibc at aliax.net
Tue Apr 20 17:49:10 CEST 2010


Hi, I set "from_uri = out" in "lcr" table. Then I call:

    $var(destination) = "out";
    load_gws("$var(destination)")

or:

    $var(destination) = "no-out";
    load_gws("$var(destination)")

or:

    $var(destination) = "no-out-lalala";
    load_gws("$var(destination)")


In any case LCR matches the rules of "lcr" table with "from_uri = out" !!!


If I set:

    $var(destination) = "nooooo";
    load_gws("$var(destination)")

then rules are not loaded (as expected).


So it seems that load_gws(pvar) does an internal match like:
  if table_from_uri =~ /PVAR_VALUE/

IMHO it should do:
  if table_from_uri =~ /^PVAR_VALUE$/


-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-dev mailing list