Hi Nick,

if you manually detect the group from script, you need to do :
    do_routing("$var(dr_group_id)")

The dr_groups table never had RE support. Was simply string matching. If you want something dynamic, RE based, I suggest to use first the dialplan module in order to translate from a username/domain to a group ID and then drouting module to do the check.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/01/2013 08:11 PM, Nick Khamis wrote:
Hello Everyone,

When managing incoming calls, or "!do_routing" function is correctly
denying the route. Reason being it's not possible for us to add all
the users that could call into the "dr_groups" table.
To compensate for this we added the following script hard coding the
"group_id", for requests coming from our DID supplier:

# Access for DID
if($fd=="superdid.com") $var(dr_group_id) = 0;

avp_db_load("$ruri/username", "$avp(dr_group_id)");
if (!is_avp_set("$avp(dr_group_id)")) {
     $avp(dr_group_id) = $var(dr_group_id);
}

#---- Dynamic Route Handling ----#
if(!do_routing()) {
      xlog("Illlegal Route Attempt From: $fu\n");
      send_reply("503", "No rules found matching the URI prefix");
      exit;
}

The !do_routing() is rejecting the call even with the hard coded group_id.
Another question is, I understand that regex has been removed from
dr_groups however,
is there a better way to bring the list of possible domains (users
unkown), to the database.
I saw somewhere that we can use "db_aliases" for this, but would
really appreciate an
example.

Thanks in Advance,

Nick.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to