Ok I figure out
route[HANDLE_REGISTER] {
# authenticate the REGISTER requests
if(!www_authorize($rd, "subscriber")) {
www_challenge($rd, "auth");
exit;
}
if(!db_is_to_authorized("uri")) {
send_reply(403,"Forbidden auth ID");
exit;
}
if (!save("location"))
sl_reply_error();
exit;
}
Hello Everyone,
Some documentation is mismatching in auth and_db modules, can figure out what correct way
[root@dev1-msg scripts]# opensips -c -f /etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] Traceback (last included file at the bottom):
Mar 20 14:12:44 [25882] 0. /etc/opensips/opensips.cfg
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in /etc/opensips/opensips.cfg:417:2-4: syntax error
Mar 20 14:12:44 [25882] }
Mar 20 14:12:44 [25882]
Mar 20 14:12:44 [25882] if(!db_is_to_authorized("uri")) {
Mar 20 14:12:44 [25882] ^~~
Mar 20 14:12:44 [25882] send_reply("403","Forbidden auth ID");
Mar 20 14:12:44 [25882] exit;
Mar 20 14:12:44 [25882] CRITICAL:core:yyerror: parse error in /etc/opensips/opensips.cfg:417:2-4:
Mar 20 14:12:44 [25882] ERROR:core:parse_opensips_cfg: bad config file (2 errors)
Mar 20 14:12:44 [25882] ERROR:core:main: failed to parse config file /etc/opensips/opensips.cfg
route[HANDLE_REGISTER] {
# authenticate the REGISTER requests
if(!www_authorize("$rd", "subscriber"))
www_challenge("$rd", "auth");
exit;
}
if(!db_is_to_authorized("uri")) {
send_reply("403","Forbidden auth ID");
exit;
}
if(!save("location"))
sl_reply_error();
exit;
}
volga629
On 3/20/20 9:11 AM, volga629 via Users wrote:
Hello Everyone,
I am trying migrate to 3.0 and I want keep db_is_from_authorized("uri");, but can't understand where need set use_uri_table
based on migration doc
function db_check_from() was replaced by the AUTH_DB module with:
- if use_uri_table was set, use db_is_from_authorized("uri")
volga629
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users