<div>Hi!</div><br><div>I'm trying to solve quite simple task and want to solve it as simple as possible.</div><div>Idea is to have restriction to allow register certain username/domain only from certain subnets.</div><br><div>So, I decided to use <strong>group</strong> and <strong>permissions </strong>modules.</div><br><div>But stuck on <strong>group</strong> one.</div><div>Code is fairly simple</div><br><div><font style="font-family:monospace">modparam("group", "db_url", DBURL)</font></div><div><font style="font-family:monospace">modparam("group", "use_domain", 1)</font></div><div><font style="font-family:monospace">...</font></div><div><font style="font-family:monospace">    if (get_user_group("From", "$avp(user_groups)")) {</font></div><div><font style="font-family:monospace">        xlog("$fu from $si:$sp is matched group $avp(user_groups)\n");</font></div><div><font style="font-family:monospace">        if     (allow_source_address("$avp(user_groups)")) {</font></div><div><font style="font-family:monospace">            ...allow furter</font></div><div><font style="font-family:monospace">        }</font></div><div><font style="font-family:monospace">    } else {</font></div><div><font style="font-family:monospace">        xlog("$fu from $si:$sp is not matched any groups\n");</font></div><div><font style="font-family:monospace">    }</font></div><br><div>grp table is looks like </div><div><font style="font-family:monospace">kamctl db exec 'select * from grp'</font></div><div><font style="font-family:monospace">+----+-------------+-------------------+-----+---------------------+</font></div><div><font style="font-family:monospace">| id | username    | domain            | grp | last_modified       |</font></div><div><font style="font-family:monospace">+----+-------------+-------------------+-----+---------------------+</font></div><div><font style="font-family:monospace">|  1 | 61388140395 | sip.localhost.net | 5   | 2000-01-01 00:00:01 |</font></div><div><font style="font-family:monospace">+----+-------------+-------------------+-----+---------------------+</font></div><br><div>But actual line of debug in logs saying this</div><br><div><font style="font-family:monospace">kamailio_1    | 10(18) exec: {1 1 REGISTER 4oQTNaaVlEWQC2VMK6YAKg..} *** cfgtrace:request_route=[PERMISSIONS] c=[/etc/kamailio/kamailio.cfg] l=720 a=26 n=get_user_group</font></div><div><font style="font-family:monospace">kamailio_1    | 10(18) DEBUG: {1 1 REGISTER 4oQTNaaVlEWQC2VMK6YAKg..} group [re_group.c:188]: get_user_group(): getting groups for <sip:61388140395@sip.localhost.net></font></div><div><font style="font-family:monospace">kamailio_1    | 10(18) exec: {1 1 REGISTER 4oQTNaaVlEWQC2VMK6YAKg..} *** cfgtrace:request_route=[PERMISSIONS] c=[/etc/kamailio/kamailio.cfg] l=727 a=25 n=xlog</font></div><div><font style="font-family:monospace">kamailio_1    | 10(18) ERROR: {1 1 REGISTER 4oQTNaaVlEWQC2VMK6YAKg..} <script>: sip:61388140395@sip.localhost.net;transport=UDP from 172.21.0.1:56787 is not matched any groups</font></div><br><div>What am I missing here? Or module is too old?</div><br><div>Thanks!</div><br><br>