Module: kamailio Branch: master Commit: 7bf4c6d72774b521b4e9bbc5375c4e952a224676 URL: https://github.com/kamailio/kamailio/commit/7bf4c6d72774b521b4e9bbc5375c4e95...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2014-12-17T23:34:21+01:00
auth_db: more details for is_subscriber()
---
Modified: modules/auth_db/README Modified: modules/auth_db/doc/auth_db_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7bf4c6d72774b521b4e9bbc5375c4e95... Patch: https://github.com/kamailio/kamailio/commit/7bf4c6d72774b521b4e9bbc5375c4e95...
---
diff --git a/modules/auth_db/README b/modules/auth_db/README index 9e25b08..949878d 100644 --- a/modules/auth_db/README +++ b/modules/auth_db/README @@ -463,15 +463,17 @@ if (!auth_check("$fd", "subscriber", "1")) { (usually subscriber table). The string may contain pseudo variables. * flags - set of flags to control the behaviour of the function. If - it is 1, then the function will use the domain part of the URI to - perform the database table search. + 1st bit is set, then the function will use the domain part of the + URI to perform the database table search. If 2nd bit is set, then + the credentials are not loaded in variables (a simple check if + subscriber exists). The parameter may be a pseudo variable.
This function can be used from ANY_ROUTE.
Example 1.13. is_subscriber usage ... -if (!is_subscriber("$ru", "subscriber", "1")) { +if (!is_subscriber("$ru", "subscriber", "3")) { # callee is not a local subscriber ... } diff --git a/modules/auth_db/doc/auth_db_admin.xml b/modules/auth_db/doc/auth_db_admin.xml index 74d6d00..1b83296 100644 --- a/modules/auth_db/doc/auth_db_admin.xml +++ b/modules/auth_db/doc/auth_db_admin.xml @@ -585,8 +585,10 @@ if (!auth_check("$fd", "subscriber", "1")) { </listitem> <listitem> <para><emphasis>flags</emphasis> - set of flags to control the - behaviour of the function. If it is 1, then the function will + behaviour of the function. If 1st bit is set, then the function will use the domain part of the URI to perform the database table search. + If 2nd bit is set, then the credentials are not loaded in variables + (a simple check if subscriber exists). </para> <para> The parameter may be a pseudo variable. @@ -600,7 +602,7 @@ if (!auth_check("$fd", "subscriber", "1")) { <title>is_subscriber usage</title> <programlisting format="linespecific"> ... -if (!is_subscriber("$ru", "subscriber", "1")) { +if (!is_subscriber("$ru", "subscriber", "3")) { # callee is not a local subscriber ... }