[OpenSIPS-Users] Managing Origination Routes

Nick Khamis symack at gmail.com
Fri Mar 1 19:11:33 CET 2013


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.



More information about the Users mailing list