[SR-Users] [permissions] allow_source_address_group() always return -1

Iñaki Baz Castillo ibc at aliax.net
Fri Dec 4 14:38:28 CET 2015


Hi all,

Kamailio 4.3 (Debian Wheezy package) with db_mysql and permissions
modules enabled.

Once started, this is the cached content of the "address" table:

~# kamctl mi "address_dump"
 22 <20, 99.23.86.78, 0> [TEST SERVER]

Within the script:

-----------------------------
xlog("L_INFO", "request_route() [method:$rm, si:$si, sp:$sp]\n");

$var(group) = allow_source_address_group();
if ($var(group) != -1) {
  // ALWAYS HERE :(

  xlog("L_WARN", "invalid source IP [si:$si]\n");
}
-----------------------------

Then I send an INVITE from such an allowed IP, and got:

INFO: <script>: request_route() [method:INVITE, si:99.23.86.78, sp:7060]
WARNING: <script>: invalid source IP [si:99.23.86.78]


"version" table contains:

  table_name    table_version
  -------------------------------------
  address          6
  trusted            5


I've used code similar to the above in ~30 kamailios (however never in
4.X). Do I miss something?

Thanks a lot.



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



More information about the sr-users mailing list