Skip to content

Commit

Permalink
auth_aaa, carrierroute: Align docs to latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Apr 22, 2019
1 parent 085dbc1 commit f1ba403
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 104 deletions.
54 changes: 24 additions & 30 deletions modules/auth_aaa/doc/auth_aaa_admin.xml
Expand Up @@ -180,7 +180,7 @@ modparam("auth_aaa", "use_ruri_flag", "USE_RURI_FLAG")
<section id="exported_functions" xreflabel="exported_functions">
<title>Exported Functions</title>
<section id="func_aaa_www_authorize" xreflabel="aaa_www_authorize()">
<title><function moreinfo="none">aaa_www_authorize(realm[, uri_user])</function></title>
<title><function moreinfo="none">aaa_www_authorize(realm, [uri_user])</function></title>
<para>
The function verifies credentials according to
<ulink url="http://www.ietf.org/rfc/rfc2617.txt">RFC2617</ulink>. If
Expand Down Expand Up @@ -214,7 +214,7 @@ modparam("auth_aaa", "use_ruri_flag", "USE_RURI_FLAG")
<para>Meaning of the parameter is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>realm</emphasis> - Realm is a opaque string that
<para><emphasis>realm (string)</emphasis> - Realm is a opaque string that
the user agent should present to the user so he can decide what
username and password to use. Usually this is domain of the host
the server is running on.
Expand All @@ -231,14 +231,11 @@ modparam("auth_aaa", "use_ruri_flag", "USE_RURI_FLAG")
</para>
</listitem>
<listitem>
<para><emphasis>uri_user</emphasis> - Uri_user is an
optional pseudo variable parameter whose value, if
present, will be given to Radius server as value of
SIP-URI-User check item.
If uri_user pseudo variable parameter is not
present, the server will generate
SIP-URI-User check item value from user part of
To URI.
<para><emphasis>uri_user (string, optional)</emphasis> -
value passed to the Radius server as value of the SIP-URI-User
check item. If this parameter is not present, the server will
generate the SIP-URI-User check item value from the username part
of the To header field URI.
</para>
</listitem>
</itemizedlist>
Expand All @@ -260,7 +257,7 @@ if (!aaa_www_authorize("siphub.net")) {
</section>

<section id="func_aaa_proxy_authorize" xreflabel="aaa_proxy_authorize()">
<title><function moreinfo="none">aaa_proxy_authorize(realm [, uri_user])</function></title>
<title><function moreinfo="none">aaa_proxy_authorize(realm, [uri_user])</function></title>
<para>
The function verifies credentials according to
<ulink url="http://www.ietf.org/rfc/rfc2617.txt">RFC2617</ulink>. If
Expand All @@ -280,7 +277,7 @@ if (!aaa_www_authorize("siphub.net")) {
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>realm</emphasis> - Realm is a opaque string that
<para><emphasis>realm (string)</emphasis> - Realm is a opaque string that
the user agent should present to the user so he can decide what
username and password to use. This is usually
one of the domains the proxy is responsible for.
Expand All @@ -292,14 +289,11 @@ if (!aaa_www_authorize("siphub.net")) {
</para>
</listitem>
<listitem>
<para><emphasis>uri_user</emphasis> - Uri_user is an
optional pseudo variable parameter whose value, if
present, will be given to Radius server as value of
SIP-URI-User check item.
If uri_user pseudo variable parameter is not
present, the server will generate
SIP-URI-User check item value from user part of
From URI.
<para><emphasis>uri_user (string, optional)</emphasis> -
value passed to the Radius server as value of the SIP-URI-User
check item. If this parameter is not present, the server will
generate the SIP-URI-User check item value from the username part
of the To header field URI.
</para>
</listitem>
</itemizedlist>
Expand All @@ -315,8 +309,8 @@ if (!aaa_proxy_authorize("")) { # Realm and URI user will be autogenerated
proxy_challenge("", "1");
};
...
if (!aaa_proxy_authorize("$pd", "$pU")) { # Realm and URI user are taken
proxy_challenge("$pd", "1"); # from P-Preferred-Identity
if (!aaa_proxy_authorize($pd, $pU)) { # Realm and URI user are taken
proxy_challenge($pd, "1"); # from P-Preferred-Identity
}; # header field
...

Expand All @@ -326,12 +320,12 @@ if (!aaa_proxy_authorize("$pd", "$pU")) { # Realm and URI user are taken

<section id="func_aaa_does_uri_exist" xreflabel="aaa_does_uri_exist()">
<title>
<function moreinfo="none">aaa_does_uri_exist([pvar])</function>
<function moreinfo="none">aaa_does_uri_exist([sip_uri])</function>
</title>
<para>
Checks from Radius if user@host in Request-&uri; or in
URI stored in pseudo variable argument belongs
to a local user. Can be used to decide if 404 or 480 should
Checks from Radius if the SIP URI stored in the "sip_uri" parameter
(or user@host part of the Request-&uri; if "sip_uri" is not given)
belongs to a local user. Can be used to decide if 404 or 480 should
be returned after lookup has failed. If yes, loads AVP
based on SIP-AVP reply items returned from Radius. Each
SIP-AVP reply item must have a string value of form:
Expand Down Expand Up @@ -371,13 +365,13 @@ if (aaa_does_uri_exist()) {

<section id="func_aaa_does_uri_user_exist" xreflabel="aaa_does_uri_user_exist()">
<title>
<function moreinfo="none">aaa_does_uri_user_exist([pvar])</function>
<function moreinfo="none">aaa_does_uri_user_exist([sip_uri])</function>
</title>
<para>
Similar to aaa_does_uri_exist, but check is done
based only on Request-URI user part or user stored in
pseudo variable argument. User should thus
be unique among all users, such as an E.164 number.
based only on Request-URI user part or user stored in "sip_uri".
The user should thus be unique among all users, such as an
E.164 number.
</para>
<para>
This function can be used from REQUEST_ROUTE.
Expand Down
134 changes: 60 additions & 74 deletions modules/carrierroute/doc/carrierroute_admin.xml
Expand Up @@ -889,34 +889,34 @@ modparam("carrierroute", "failure_comment_column", "description")

<programlisting format="linespecific">
cr_rewrite_uri(domain, hash_source)
-> cr_route("default", domain, "$rU", "$rU", hash_source)
-> cr_route("default", domain, $rU, $rU, hash_source)

cr_prime_balance_uri(domain, hash_source)
-> cr_prime_route("default", domain, "$rU", "$rU", hash_source)
-> cr_prime_route("default", domain, $rU, $rU, hash_source)

cr_rewrite_by_to(domain, hash_source)
-> cr_route("default", domain, "$tU", "$rU", hash_source)
-> cr_route("default", domain, $tU, $rU, hash_source)

cr_prime_balance_by_to(domain, hash_source)
-> cr_prime_route("default", domain, "$tU", "$rU", hash_source)
-> cr_prime_route("default", domain, $tU, $rU, hash_source)

cr_rewrite_by_from(domain, hash_source)
-> cr_route("default", domain, "$fU", "$rU", hash_source)
-> cr_route("default", domain, $fU, $rU, hash_source)

cr_prime_balance_by_from(domain, hash_source)
-> cr_prime_route("default", domain, "$fU", "$rU", hash_source)
-> cr_prime_route("default", domain, $fU, $rU, hash_source)

cr_user_rewrite_uri(uri, domain)
-> cr_user_carrier(user, domain, "$avp(tree_avp)")
-> cr_route("$avp(tree_avp)", domain, "$rU", "$rU", "call_id")
-> cr_user_carrier(user, domain, $avp(tree_avp))
-> cr_route($avp(tree_avp), domain, $rU, $rU, "call_id")

cr_tree_rewrite_uri(tree, domain)
-> cr_route(tree, domain, "$rU", "$rU", "call_id")
-> cr_route(tree, domain, $rU, $rU, "call_id")
</programlisting>

<section id="func_cr_user_carrier" xreflabel="cr_user_carrier()">
<title>
<function moreinfo="none">cr_user_carrier(user, domain, dstavp)</function>
<function moreinfo="none">cr_user_carrier(user, domain, dst_avp)</function>
</title>
<para>
This function loads the carrier and stores it in an AVP.
Expand All @@ -927,29 +927,28 @@ cr_tree_rewrite_uri(tree, domain)
This data is not cached in memory, that means for every execution of this
function a database query will be done.
</para>
<para>Meaning of the parameters is as follows:</para>
<para>Parameters:</para>
<itemizedlist>
<listitem>
<para><emphasis>user</emphasis> - Name of the user for the carrier tree lookup.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>user (string)</emphasis> - Name of the user for the
carrier tree lookup
</para>
</listitem>
<listitem>
<para><emphasis>domain</emphasis> - Name of the routing domain to be used.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>domain (string)</emphasis> - Name of the routing
domain to be used
</para>
</listitem>
<listitem>
<para><emphasis>dstavp</emphasis> - Name of the AVP where to store the carrier id.
<para><emphasis>dst_avp (var)</emphasis> - Name of an AVP where to
store the carrier id
</para>
</listitem>
</itemizedlist>
</section>
<section id="func_cr_route" xreflabel="cr_route()">
<title>
<function moreinfo="none">cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source, dstavp)</function>
<function moreinfo="none">cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source, [dst_avp])</function>
</title>
<para>
This function searches for the longest match for the user given
Expand All @@ -963,51 +962,47 @@ cr_tree_rewrite_uri(tree, domain)
containing a valid numerical only string. It uses the standard crc32 algorithm
to calculate the hash values.
</para>
<para>Meaning of the parameters is as follows:</para>
<para>Parameters:</para>
<itemizedlist>
<listitem>
<para><emphasis>carrier</emphasis> - The routing tree to be used. Additional to a string
any pseudo-variable could be used as input.
<para><emphasis>carrier (string)</emphasis> - The routing tree to
be used
</para>
</listitem>
<listitem>
<para><emphasis>domain</emphasis> - Name of the routing domain to be used.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>domain (string)</emphasis> - Name of the routing
domain to be used
</para>
</listitem>
<listitem>
<para><emphasis>prefix_matching</emphasis> - User name to be used for prefix matching
in the routing tree.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>prefix_matching (string)</emphasis> - User name
to be used for prefix matching in the routing tree
</para>
</listitem>
<listitem>
<para><emphasis>rewrite_user</emphasis> - The user name to be used for applying the
rewriting rule. Usually this is the user part of the request
URI. Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>rewrite_user (string)</emphasis> - The user name
to be used for applying the rewriting rule. Usually, this is
the user part of the request URI
</para>
</listitem>
<listitem>
<para><emphasis>hash_source</emphasis> - The hash values of the destination set must
be a contiguous range starting at 1, limited by the
configuration parameter max_targets. Possible values for
hash_source are: call_id, from_uri, from_user, to_uri
and to_user.
<para><emphasis>hash_source (string)</emphasis> - The hash values
of the destination set must be a contiguous range starting at 1,
limited by the configuration parameter max_targets. Possible
values for hash_source are: call_id, from_uri, from_user, to_uri
and to_user.
</para>
</listitem>
<listitem>
<para><emphasis>dstavp</emphasis> - Name of the AVP where to store the rewritten host.
This parameter is optional.
<para><emphasis>dst_avp (var, optional)</emphasis> - Optional AVP
where to store the rewritten host
</para>
</listitem>
</itemizedlist>
</section>
<section id="func_cr_prime_route" xreflabel="cr_prime_route()">
<title>
<function moreinfo="none">cr_prime_route(carrier, domain, prefix_matching, rewrite_user, hash_source, dstavp)</function>
<function moreinfo="none">cr_prime_route(carrier, domain, prefix_matching, rewrite_user, hash_source, [dst_avp])</function>
</title>
<para>
This function searches for the longest match for the user given
Expand All @@ -1024,49 +1019,46 @@ cr_tree_rewrite_uri(tree, domain)
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>carrier</emphasis> - The routing tree to be used. Additional to a string
any pseudo-variable could be used as input.
<para><emphasis>carrier (string)</emphasis> - The routing tree to
be used
</para>
</listitem>
<listitem>
<para><emphasis>domain</emphasis> - Name of the routing domain to be used.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>domain (string)</emphasis> - Name of the routing
domain to be used
</para>
</listitem>
<listitem>
<para><emphasis>prefix_matching</emphasis> - User name to be used for prefix matching
in the routing tree.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>prefix_matching (string)</emphasis> - User name
to be used for prefix matching in the routing tree
</para>
</listitem>
<listitem>
<para><emphasis>rewrite_user</emphasis> - The user name to be used for applying the
rewriting rule. Usually this is the user part of the request
URI. Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>rewrite_user (string)</emphasis> - The user name
to be used for applying the rewriting rule. Usually, this is
the user part of the request URI
</para>
</listitem>
<listitem>
<para><emphasis>hash_source</emphasis> - The hash values of the destination set must
<para><emphasis>hash_source (string)</emphasis> - The hash values
of the destination set must
be a contiguous range starting at 1, limited by the
configuration parameter max_targets. Possible values for
hash_source are: call_id, from_uri, from_user, to_uri
and to_user.
</para>
</listitem>
<listitem>
<para><emphasis>dstavp</emphasis> - Name of the AVP where to store the rewritten host.
This parameter is optional.
<para><emphasis>dst_avp (var, optional)</emphasis> - Optional AVP
where to store the rewritten host
</para>
</listitem>
</itemizedlist>
</section>

<section id="func_cr_next_domain" xreflabel="cr_next_domain()">
<title>
<function moreinfo="none">cr_next_domain(carrier, domain, prefix_matching, host, reply_code, dstavp)</function>
<function moreinfo="none">cr_next_domain(carrier, domain, prefix_matching, host, reply_code, dst_avp)</function>
</title>
<para>
This function searches for the longest match for the user given
Expand All @@ -1084,38 +1076,32 @@ cr_tree_rewrite_uri(tree, domain)
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>carrier</emphasis> - The routing tree to be used. Additional to a string
<para><emphasis>carrier (string)</emphasis> - The routing tree to be used
any pseudo-variable could be used as input.
</para>
</listitem>
<listitem>
<para><emphasis>domain</emphasis> - Name of the routing domain to be used.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>domain (string)</emphasis> - Name of the routing domain to be used
</para>
</listitem>
<listitem>
<para><emphasis>prefix_matching</emphasis> - User name to be used for prefix matching
in the routing tree.
Additional to a string any pseudo-variable could
be used as input.
<para><emphasis>prefix_matching (string)</emphasis> - User name to be used for prefix matching
in the routing tree
</para>
</listitem>
<listitem>
<para><emphasis>host</emphasis> - The host name to be used for failure route rule
matching. Usually this is the last tried routing destination
stored in an avp by cr_route. Additional to a string any
pseudo-variable could be used as input.
<para><emphasis>host (string)</emphasis> - The host name to be used for failure route rule
matching. Usually, this is the last tried routing destination
stored in an avp by cr_route
</para>
</listitem>
<listitem>
<para><emphasis>reply_code</emphasis> - The reply code to be used for failure route rule
matching. Additional to a string any pseudo-variable
could be used as input.
<para><emphasis>reply_code (string)</emphasis> - The reply code to be used for failure route rule
matching
</para>
</listitem>
<listitem>
<para><emphasis>dstavp</emphasis> - Name of the AVP where to store the next routing domain.
<para><emphasis>dst_avp (var)</emphasis> - AVP where to store the next routing domain.
</para>
</listitem>
</itemizedlist>
Expand Down

0 comments on commit f1ba403

Please sign in to comment.