opensips/modules/enum/README

changeset 13
b63f281afe6b
parent 12
a3ac912f2857
child 15
7ae8da2fe7c8
     1.1 --- a/opensips/modules/enum/README	Mon Jan 18 19:47:23 2010 +0100
     1.2 +++ b/opensips/modules/enum/README	Mon Jan 18 19:59:51 2010 +0100
     1.3 @@ -10,8 +10,8 @@
     1.4  
     1.5     Copyright © 2002, 2003 Juha Heinanen
     1.6     Revision History
     1.7 -   Revision $Revision: 5906 $ $Date: 2009-07-21 10:45:05 +0300
     1.8 -                              (Tue, 21 Jul 2009) $
     1.9 +   Revision $Revision: 5907 $ $Date: 2010-01-18 10:45:05 +0100
    1.10 +                              (Mon, 18 Jan 2010) $
    1.11       __________________________________________________________
    1.12  
    1.13     Table of Contents
    1.14 @@ -25,28 +25,32 @@
    1.15                1.3.1. domain_suffix (string)
    1.16                1.3.2. tel_uri_params (string)
    1.17                1.3.3. i_enum_suffix (string)
    1.18 -              1.3.4. branchlabel (string)
    1.19 -              1.3.5. bl_algorithm (string)
    1.20 +              1.3.4. isn_suffix (string)
    1.21 +              1.3.5. branchlabel (string)
    1.22 +              1.3.6. bl_algorithm (string)
    1.23  
    1.24          1.4. Exported Functions
    1.25  
    1.26                1.4.1. enum_query(["suffix"[,"service"]])
    1.27                1.4.2. enum_pv_query("pvar"[,"suffix"[,"service"]])
    1.28                1.4.3. i_enum_query(["suffix"[,"service"]])
    1.29 -              1.4.4. is_from_user_enum()
    1.30 +              1.4.4. isn_query(["suffix"[,"service"]])
    1.31 +              1.4.5. is_from_user_enum()
    1.32  
    1.33     List of Examples
    1.34  
    1.35     1.1. Setting domain_suffix module parameter
    1.36     1.2. Setting tel_uri_params module parameter
    1.37     1.3. Setting i_enum_suffix module parameter
    1.38 -   1.4. Setting brachlabel module parameter
    1.39 -   1.5. Zone file example
    1.40 +   1.4. Setting isn_query usage module parameter
    1.41 +   1.5. Setting branchlabel module parameter
    1.42     1.6. Zone file example
    1.43 -   1.7. Setting the bl_algorithm module parameter
    1.44 -   1.8. enum_query usage
    1.45 -   1.9. enum_pv_query usage
    1.46 -   1.10. is_from_user_enum usage
    1.47 +   1.7. Zone file example
    1.48 +   1.8. Setting the bl_algorithm module parameter
    1.49 +   1.9. enum_query usage
    1.50 +   1.10. enum_pv_query usage
    1.51 +   1.11. isn_query usage
    1.52 +   1.12. is_from_user_enum usage
    1.53  
    1.54  Chapter 1. Admin Guide
    1.55  
    1.56 @@ -113,6 +117,22 @@
    1.57     function does an enum lookup on the from user and returns true
    1.58     if found, false otherwise.
    1.59  
    1.60 +   In addition to standard ENUM, support for ISN (ITAD Subscriber
    1.61 +   Numbers) is provided as well. To allow ISN lookups to resolve,
    1.62 +   a different formatting algorithm is expected by the DNS server.
    1.63 +   Whereas a ENUM NAPTR record expects a DNS query of the form
    1.64 +   9.8.7.6.5.4.3.2.1.<suffix>, ISN method expects a DNS query of
    1.65 +   the form 6.5.1212.<suffix>. That is, a valid ISN number includes
    1.66 +   a prefix of '56' in the example. The rest of the number is a
    1.67 +   ITAD (Internet Telephony Administrative Domain) as defined
    1.68 +   in RFCs 3872 and 2871, and as allocated by the IANA in
    1.69 +   http://www.iana.org/assignments/trip-parameters. The ITAD is
    1.70 +   left intact and not refersed as ENUM requires. To learn more
    1.71 +   about ISN please refer to documents at www.freenum.org.
    1.72 +
    1.73 +   To complete a ISN lookup on the user part of the Request-URI,
    1.74 +   isn_query() is used instead of enum_query().
    1.75 +
    1.76  1.2. Dependencies
    1.77  
    1.78     The module depends on the following modules (in the other words
    1.79 @@ -158,17 +178,27 @@
    1.80     Example 1.3. Setting i_enum_suffix module parameter
    1.81  modparam("enum", "i_enum_suffix", "e1234.arpa.")
    1.82  
    1.83 -1.3.4. branchlabel (string)
    1.84 +1.3.4. isn_suffix (string)
    1.85 +
    1.86 +   The domain suffix to be used for isn_query() lookups. Can be
    1.87 +   overridden by a parameter to isn_query.
    1.88 +
    1.89 +   Default value is "freenum.org."
    1.90 +
    1.91 +   Example 1.4. Setting isn_suffix module parameter
    1.92 +modparam("enum", "isn_suffix", "freenum.org.")
    1.93 +
    1.94 +1.3.5. branchlabel (string)
    1.95  
    1.96     This parameter determines which label i_enum_query() will use
    1.97     to branch off to the infrastructure ENUM tree.
    1.98  
    1.99     Default value is ""i""
   1.100  
   1.101 -   Example 1.4. Setting brachlabel module parameter
   1.102 +   Example 1.5. Setting branchlabel module parameter
   1.103  modparam("enum", "branchlabel", "i")
   1.104  
   1.105 -1.3.5. bl_algorithm (string)
   1.106 +1.3.6. bl_algorithm (string)
   1.107  
   1.108     This parameter determines which algorithm i_enum_query() will
   1.109     use to select the position in the DNS tree where the
   1.110 @@ -182,7 +212,7 @@
   1.111     [branchlabel].[reverse-country-code].[i_enum_suffix] to
   1.112     indicate after how many digits the label should in inserted.
   1.113  
   1.114 -   Example 1.5. Zone file example
   1.115 +   Example 1.6. Zone file example
   1.116  i.1.e164.arpa.                     IN TXT   "4"
   1.117  9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for  +1 234 5
   1.118  678 999"
   1.119 @@ -196,7 +226,7 @@
   1.120     allocated yet. This version of the code uses 65300. See
   1.121     resolve.h.
   1.122  
   1.123 -   Example 1.6. Zone file example
   1.124 +   Example 1.7. Zone file example
   1.125  i.1.e164.arpa.     TYPE65300  \# 14 (
   1.126                                04    ; position
   1.127                                01 69 ; separator
   1.128 @@ -208,7 +238,7 @@
   1.129  
   1.130     Default value is "cc"
   1.131  
   1.132 -   Example 1.7. Setting the bl_algorithm module parameter
   1.133 +   Example 1.8. Setting the bl_algorithm module parameter
   1.134  modparam("enum", "bl_algorithm", "txt")
   1.135  
   1.136  1.4. Exported Functions
   1.137 @@ -225,7 +255,7 @@
   1.138  
   1.139     This function can be used from REQUEST_ROUTE.
   1.140  
   1.141 -   Example 1.8. enum_query usage
   1.142 +   Example 1.9. enum_query usage
   1.143  ...
   1.144  # search for "e2u+sip" in freenum.org
   1.145  enum_query("freenum.org.");
   1.146 @@ -262,7 +292,7 @@
   1.147  
   1.148     This function can be used from REQUEST_ROUTE.
   1.149  
   1.150 -   Example 1.9. enum_pv_query usage
   1.151 +   Example 1.10. enum_pv_query usage
   1.152  ...
   1.153  # search for "e2u+sip" in freenum.org
   1.154  enum_pv_query("$avp(i:100)", "freenum.org.");
   1.155 @@ -296,14 +326,42 @@
   1.156     ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-haberle
   1.157     r-carrier-enum-01.txt for the rationale behind this function.
   1.158  
   1.159 -1.4.4. is_from_user_enum()
   1.160 +1.4.4.  isn_query(["suffix"[,"service"]])
   1.161 +
   1.162 +   The function performs a ISN query and rewrites the
   1.163 +   Request-URI with the result of the query. See Section 1.1,
   1.164 +   "Overview" for more information.
   1.165 +
   1.166 +   Meaning of the parameters is as follows:
   1.167 +     * suffix - Suffix to be appended to the domain name.
   1.168 +     * service - Service string to be used in the service field.
   1.169 +
   1.170 +   This function can be used from REQUEST_ROUTE.
   1.171 +
   1.172 +   See ftp://www.ietf.org/rfc/rfc3872.txt and
   1.173 +   ftp://www.ietf.org/rfc/rfc2871.txt for information
   1.174 +   regarding the ITAD part of the ISN string.
   1.175 +
   1.176 +   Example 1.11. isn_query usage
   1.177 +...
   1.178 +# search for "e2u+sip" in freenum.org
   1.179 +isn_query("freenum.org.");
   1.180 +...
   1.181 +# search for "e2u+sip" in default tree (configured as parameter)
   1.182 +enum_query();
   1.183 +...
   1.184 +# search for "e2u+voice:sip" in freenum.org
   1.185 +enum_query("freenum.org.","voice");
   1.186 +...
   1.187 +
   1.188 +1.4.5. is_from_user_enum()
   1.189  
   1.190     Checks if the user part of from URI is found in an enum lookup.
   1.191     Returns 1 if yes and -1 if not.
   1.192  
   1.193     This function can be used from REQUEST_ROUTE.
   1.194  
   1.195 -   Example 1.10. is_from_user_enum usage
   1.196 +   Example 1.12. is_from_user_enum usage
   1.197  ...
   1.198  if (is_from_user_enum()) {
   1.199          ....

mercurial