[sr-dev] git:master: auth: documented realm_prefix parameter

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 5 10:52:27 CET 2012


Module: sip-router
Branch: master
Commit: 6f06566ab7f48162a01725e07c72649aeb4b5ecc
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6f06566ab7f48162a01725e07c72649aeb4b5ecc

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Jan  5 10:51:56 2012 +0100

auth: documented realm_prefix parameter

---

 modules/auth/README         |   27 +++++++++++++++++++++------
 modules/auth/doc/params.xml |   21 +++++++++++++++++++++
 2 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/modules/auth/README b/modules/auth/README
index a29bcf5..692c6d8 100644
--- a/modules/auth/README
+++ b/modules/auth/README
@@ -37,6 +37,7 @@ Daniel-Constantin Mierla
         1.3.11. nonce_expire (integer)
         1.3.12. nonce_auth_max_drift (integer)
         1.3.13. force_stateless_reply (boolean)
+        1.3.14. realm_prefix (string)
 
    1.4. Functions
 
@@ -496,6 +497,20 @@ modparam("auth", "nonce_auth_max_drift", 1)   # set max drift to 1 s
 modparam("auth", "force_stateless_reply", 1)
 ...
 
+1.3.14. realm_prefix (string)
+
+   Prefix to be automatically strip from realm. As an alternative to SRV
+   records (not all SIP clients support SRV lookup), a subdomain of the
+   master domain can be defined for SIP purposes (like sip.mydomain.net
+   pointing to same IP address as the SRV record for mydomain.net). By
+   ignoring the realm_prefix "sip.", at authentication, sip.mydomain.net
+   will be equivalent to mydomain.net .
+
+   Default value is empty string.
+
+   Example 14. realm_prefix parameter example
+modparam("auth", "realm_prefix", "sip.")
+
 1.4. Functions
 
 1.4.1. consume_credentials()
@@ -508,7 +523,7 @@ modparam("auth", "force_stateless_reply", 1)
    little bit shorter. The function must be called after www_authorize,
    proxy_authorize, www_authenticate or proxy_authenticate.
 
-   Example 14. consume_credentials example
+   Example 15. consume_credentials example
 ...
 if (www_authenticate("realm", "subscriber)) {
     consume_credentials();
@@ -544,7 +559,7 @@ if (www_authenticate("realm", "subscriber)) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 15. www_challenge usage
+   Example 16. www_challenge usage
 ...
 if (!www_authenticate("$td", "subscriber")) {
         www_challenge("$td", "1");
@@ -566,7 +581,7 @@ if (!www_authenticate("$td", "subscriber")) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 16. proxy_challenge usage
+   Example 17. proxy_challenge usage
 ...
 if (!proxy_authenticate("$fd", "subscriber")) {
         proxy_challenge("$fd", "1");
@@ -585,7 +600,7 @@ if (!proxy_authenticate("$fd", "subscriber")) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 17. proxy_challenge usage
+   Example 18. proxy_challenge usage
 ...
 if (!auth_check("$fd", "subscriber", "1")) {
         auth_challenge("$fd", "1");
@@ -636,7 +651,7 @@ if (!auth_check("$fd", "subscriber", "1")) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 18. pv_www_authenticate usage
+   Example 19. pv_www_authenticate usage
 ...
 if (!pv_www_authenticate("$td", "123abc", "0")) {
         www_challenge("$td", "1");
@@ -658,7 +673,7 @@ if (!pv_www_authenticate("$td", "123abc", "0")) {
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 19. pv_proxy_authenticate usage
+   Example 20. pv_proxy_authenticate usage
 ...
 $avp(password)="xyz";
 if (!pv_proxy_authenticate("$fd", "$avp(password)", "0")) {
diff --git a/modules/auth/doc/params.xml b/modules/auth/doc/params.xml
index 4e1dbbf..6494a4e 100644
--- a/modules/auth/doc/params.xml
+++ b/modules/auth/doc/params.xml
@@ -636,4 +636,25 @@ modparam("auth", "force_stateless_reply", 1)
 	    </programlisting>
 	</example>
 	</section>
+	<section id="realm_prefix">
+		<title><varname>realm_prefix</varname> (string)</title>
+		<para>
+			Prefix to be automatically strip from realm. As an alternative to
+			SRV records (not all SIP clients support SRV lookup), a subdomain
+			of the master domain can be defined for SIP purposes (like 
+			sip.mydomain.net pointing to same IP address as the SRV
+			record for mydomain.net). By ignoring the realm_prefix 
+			<quote>sip.</quote>, at authentication, sip.mydomain.net will be
+			equivalent to mydomain.net .
+		</para>
+		<para>
+		Default value is empty string.
+		</para>
+		<example>
+		<title>realm_prefix parameter example</title>
+		<programlisting format="linespecific">
+modparam("auth", "realm_prefix", "sip.")
+</programlisting>
+		</example>
+	</section>
 </section>




More information about the sr-dev mailing list