opensips/enum-isn.diff

Wed, 10 Feb 2010 21:25:01 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 10 Feb 2010 21:25:01 +0100
changeset 18
8ec65b8f6e2c
permissions
-rw-r--r--

Extend uac_auth() of the UAC module to workaround CSEQ problems.
This logic is meant to complement that of changeset 17, which
added rich authentication credentials to the gw table and its
associated logic in the LCR module.

michael@13 1 Index: modules/enum/enum_mod.h
michael@13 2 diff -Nau modules/enum/enum_mod.h.orig modules/enum/enum_mod.h
michael@13 3 --- modules/enum/enum_mod.h.orig 2010-01-18 15:54:52.842465412 +0100
michael@13 4 +++ modules/enum/enum_mod.h 2010-01-18 15:55:20.812190874 +0100
michael@13 5 @@ -41,5 +41,7 @@
michael@13 6 extern str i_branchlabel; /* the label branching off the infrastructure tree */
michael@13 7 extern str i_bl_alg; /* how to know where to branch off */
michael@13 8
michael@13 9 +extern str isnsuffix; /* str version of isn_suffix */
michael@13 10 +
michael@13 11
michael@13 12 #endif /* ENUM_MOD_H */
michael@13 13 Index: modules/enum/enum_mod.c
michael@13 14 diff -Nau modules/enum/enum_mod.c.orig modules/enum/enum_mod.c
michael@13 15 --- modules/enum/enum_mod.c.orig 2010-01-18 15:52:57.316263519 +0100
michael@13 16 +++ modules/enum/enum_mod.c 2010-01-18 15:52:42.844229824 +0100
michael@13 17 @@ -55,6 +55,8 @@
michael@13 18 char* i_enum_suffix = "e164.arpa.";
michael@13 19 char* bl_algorithm = "cc";
michael@13 20
michael@13 21 +char* isn_suffix = "freenum.org.";
michael@13 22 +
michael@13 23
michael@13 24 /*
michael@13 25 * Internal module variables
michael@13 26 @@ -67,6 +69,8 @@
michael@13 27 str i_branchlabel;
michael@13 28 str i_bl_alg;
michael@13 29
michael@13 30 +str isnsuffix;
michael@13 31 +
michael@13 32
michael@13 33 /*
michael@13 34 * Exported functions
michael@13 35 @@ -94,6 +98,11 @@
michael@13 36 REQUEST_ROUTE},
michael@13 37 {"i_enum_query", (cmd_function)i_enum_query_2, 2, fixup_str_str, 0,
michael@13 38 REQUEST_ROUTE},
michael@13 39 + {"isn_query", (cmd_function)isn_query_0, 0, 0, 0, REQUEST_ROUTE},
michael@13 40 + {"isn_query", (cmd_function)isn_query_1, 1, fixup_str_null,
michael@13 41 + fixup_free_str_null, REQUEST_ROUTE},
michael@13 42 + {"isn_query", (cmd_function)isn_query_2, 2, fixup_str_str,
michael@13 43 + fixup_free_str_str, REQUEST_ROUTE},
michael@13 44 {0, 0, 0, 0, 0, 0}
michael@13 45 };
michael@13 46
michael@13 47 @@ -107,6 +116,7 @@
michael@13 48 {"branchlabel", STR_PARAM, &branchlabel},
michael@13 49 {"i_enum_suffix", STR_PARAM, &i_enum_suffix},
michael@13 50 {"bl_algorithm", STR_PARAM, &bl_algorithm},
michael@13 51 + {"isn_suffix", STR_PARAM, &isn_suffix},
michael@13 52 {0, 0, 0}
michael@13 53 };
michael@13 54
michael@13 55 @@ -152,6 +162,9 @@
michael@13 56 i_bl_alg.s = bl_algorithm;
michael@13 57 i_bl_alg.len = strlen(bl_algorithm);
michael@13 58
michael@13 59 + isnsuffix.s = isn_suffix;
michael@13 60 + isnsuffix.len = strlen(isn_suffix.s);
michael@13 61 +
michael@13 62 return 0;
michael@13 63 }
michael@13 64
michael@13 65 Index: modules/enum/enum.h
michael@13 66 diff -Nau modules/enum/enum.h.orig modules/enum/enum.h
michael@13 67 --- modules/enum/enum.h.orig 2010-01-18 15:54:40.361624448 +0100
michael@13 68 +++ modules/enum/enum.h 2010-01-18 15:54:43.090330399 +0100
michael@13 69 @@ -66,5 +66,13 @@
michael@13 70 int i_enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
michael@13 71 int i_enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
michael@13 72
michael@13 73 +/*
michael@13 74 + * Make ISN query and if query succeeds, replace current uri with the
michael@13 75 + * result of the query
michael@13 76 + */
michael@13 77 +int isn_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
michael@13 78 +int isn_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
michael@13 79 +int isn_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
michael@13 80 +
michael@13 81
michael@13 82 #endif /* ENUM_H */
michael@13 83 Index: modules/enum/enum.c
michael@13 84 diff -Nau modules/enum/enum.c.orig modules/enum/enum.c
michael@13 85 --- modules/enum/enum.c.orig 2010-01-18 15:57:10.995902181 +0100
michael@13 86 +++ modules/enum/enum.c 2010-01-18 15:46:19.642209178 +0100
michael@13 87 @@ -736,6 +736,84 @@
michael@13 88 }
michael@13 89
michael@13 90
michael@13 91 +/*
michael@13 92 + * Call isn_query_2 with module parameter suffix and default service.
michael@13 93 + */
michael@13 94 +int isn_query_0(struct sip_msg* _msg, char* _str1, char* _str2)
michael@13 95 +{
michael@13 96 + return isn_query_2(_msg, (char *)(&isnsuffix), (char *)(&service));
michael@13 97 +}
michael@13 98 +
michael@13 99 +
michael@13 100 +/*
michael@13 101 + * Call isn_query_2 with given suffix and default service.
michael@13 102 + */
michael@13 103 +int isn_query_1(struct sip_msg* _msg, char* _suffix, char* _str2)
michael@13 104 +{
michael@13 105 + return isn_query_2(_msg, _suffix, (char *)(&service));
michael@13 106 +}
michael@13 107 +
michael@13 108 +
michael@13 109 +/*
michael@13 110 + * See documentation in README file.
michael@13 111 + */
michael@13 112 +int isn_query_2(struct sip_msg* _msg, char* _suffix, char* _service)
michael@13 113 +{
michael@13 114 + char *user_s = NULL;
michael@13 115 + int user_len, i, j;
michael@13 116 + char name[MAX_DOMAIN_SIZE] = {0};
michael@13 117 + char string[17] = {0};
michael@13 118 + char szItad[17] = {0};
michael@13 119 + size_t nItlen = 0;
michael@13 120 +
michael@13 121 + str *suffix, *service;
michael@13 122 +
michael@13 123 + suffix = (str*)_suffix;
michael@13 124 + service = (str*)_service;
michael@13 125 +
michael@13 126 + if (parse_sip_msg_uri(_msg) < 0) {
michael@13 127 + LM_ERR("Parsing of R-URI failed\n");
michael@13 128 + return -1;
michael@13 129 + }
michael@13 130 +
michael@13 131 + user_s = _msg->parsed_uri.user.s;
michael@13 132 + user_len = _msg->parsed_uri.user.len;
michael@13 133 +
michael@13 134 + memcpy(&(string[0]), user_s, user_len);
michael@13 135 + string[user_len] = (char)0;
michael@13 136 +
michael@13 137 + /* Do primitive test for correct ISN format, */
michael@13 138 + /* and set szItad to the ISN ITAD (RFC 3872/2871). */
michael@13 139 + /* Correct ISN format guessed from freenum.org and IANA */
michael@13 140 + /* doc http://www.iana.org/assignments/trip-parameters/ */
michael@13 141 + {
michael@13 142 + char *pAster = strchr(string, '*');
michael@13 143 + if (pAster && (nItlen = strspn(pAster + sizeof(char), "0123456789")))
michael@13 144 + strncpy(szItad, pAster + sizeof(char), nItlen);
michael@13 145 + else {
michael@13 146 + LM_ERR("R-URI user does not contain a valid ISN\n");
michael@13 147 + return -1;
michael@13 148 + }
michael@13 149 + }
michael@13 150 +
michael@13 151 + /* Ammend the original ENUM E.164 string logic to process */
michael@13 152 + /* ISN numbers instead, which include a nonreversed ITAD. */
michael@13 153 + i = user_len - nItlen - sizeof(char); /* Ex: *1212 */
michael@13 154 + j = 0;
michael@13 155 + while (i--) {
michael@13 156 + name[j] = user_s[i];
michael@13 157 + name[j + 1] = '.';
michael@13 158 + j = j + 2;
michael@13 159 + }
michael@13 160 +
michael@13 161 + strcat(name + j, szItad); /* Copy the unreversed ITAD, */
michael@13 162 + name[j + nItlen] = '.'; /* and append a trailing dot. */
michael@13 163 + memcpy(name + j + nItlen + sizeof(char), suffix->s, suffix->len + 1);
michael@13 164 +
michael@13 165 + return do_query(_msg, string, name, service);
michael@13 166 +}
michael@13 167 +
michael@13 168 +
michael@13 169 /*********** INFRASTRUCTURE ENUM ***************/
michael@13 170
michael@13 171 /*
michael@13 172 Index: modules/enum/README
michael@13 173 diff -Nau modules/enum/README.orig modules/enum/README
michael@13 174 --- modules/enum/README.orig 2010-01-18 17:59:52.034172367 +0100
michael@13 175 +++ modules/enum/README 2010-01-18 18:01:30.730633377 +0100
michael@13 176 @@ -10,8 +10,8 @@
michael@13 177
michael@13 178 Copyright © 2002, 2003 Juha Heinanen
michael@13 179 Revision History
michael@13 180 - Revision $Revision: 5906 $ $Date: 2009-07-21 10:45:05 +0300
michael@13 181 - (Tue, 21 Jul 2009) $
michael@13 182 + Revision $Revision: 5907 $ $Date: 2010-01-18 10:45:05 +0100
michael@13 183 + (Mon, 18 Jan 2010) $
michael@13 184 __________________________________________________________
michael@13 185
michael@13 186 Table of Contents
michael@13 187 @@ -25,28 +25,32 @@
michael@13 188 1.3.1. domain_suffix (string)
michael@13 189 1.3.2. tel_uri_params (string)
michael@13 190 1.3.3. i_enum_suffix (string)
michael@13 191 - 1.3.4. branchlabel (string)
michael@13 192 - 1.3.5. bl_algorithm (string)
michael@13 193 + 1.3.4. isn_suffix (string)
michael@13 194 + 1.3.5. branchlabel (string)
michael@13 195 + 1.3.6. bl_algorithm (string)
michael@13 196
michael@13 197 1.4. Exported Functions
michael@13 198
michael@13 199 1.4.1. enum_query(["suffix"[,"service"]])
michael@13 200 1.4.2. enum_pv_query("pvar"[,"suffix"[,"service"]])
michael@13 201 1.4.3. i_enum_query(["suffix"[,"service"]])
michael@13 202 - 1.4.4. is_from_user_enum()
michael@13 203 + 1.4.4. isn_query(["suffix"[,"service"]])
michael@13 204 + 1.4.5. is_from_user_enum()
michael@13 205
michael@13 206 List of Examples
michael@13 207
michael@13 208 1.1. Setting domain_suffix module parameter
michael@13 209 1.2. Setting tel_uri_params module parameter
michael@13 210 1.3. Setting i_enum_suffix module parameter
michael@13 211 - 1.4. Setting brachlabel module parameter
michael@13 212 - 1.5. Zone file example
michael@13 213 + 1.4. Setting isn_query usage module parameter
michael@13 214 + 1.5. Setting branchlabel module parameter
michael@13 215 1.6. Zone file example
michael@13 216 - 1.7. Setting the bl_algorithm module parameter
michael@13 217 - 1.8. enum_query usage
michael@13 218 - 1.9. enum_pv_query usage
michael@13 219 - 1.10. is_from_user_enum usage
michael@13 220 + 1.7. Zone file example
michael@13 221 + 1.8. Setting the bl_algorithm module parameter
michael@13 222 + 1.9. enum_query usage
michael@13 223 + 1.10. enum_pv_query usage
michael@13 224 + 1.11. isn_query usage
michael@13 225 + 1.12. is_from_user_enum usage
michael@13 226
michael@13 227 Chapter 1. Admin Guide
michael@13 228
michael@13 229 @@ -113,6 +117,22 @@
michael@13 230 function does an enum lookup on the from user and returns true
michael@13 231 if found, false otherwise.
michael@13 232
michael@13 233 + In addition to standard ENUM, support for ISN (ITAD Subscriber
michael@13 234 + Numbers) is provided as well. To allow ISN lookups to resolve,
michael@13 235 + a different formatting algorithm is expected by the DNS server.
michael@13 236 + Whereas a ENUM NAPTR record expects a DNS query of the form
michael@13 237 + 9.8.7.6.5.4.3.2.1.<suffix>, ISN method expects a DNS query of
michael@13 238 + the form 6.5.1212.<suffix>. That is, a valid ISN number includes
michael@13 239 + a prefix of '56' in the example. The rest of the number is a
michael@13 240 + ITAD (Internet Telephony Administrative Domain) as defined
michael@13 241 + in RFCs 3872 and 2871, and as allocated by the IANA in
michael@13 242 + http://www.iana.org/assignments/trip-parameters. The ITAD is
michael@13 243 + left intact and not refersed as ENUM requires. To learn more
michael@13 244 + about ISN please refer to documents at www.freenum.org.
michael@13 245 +
michael@13 246 + To complete a ISN lookup on the user part of the Request-URI,
michael@13 247 + isn_query() is used instead of enum_query().
michael@13 248 +
michael@13 249 1.2. Dependencies
michael@13 250
michael@13 251 The module depends on the following modules (in the other words
michael@13 252 @@ -158,17 +178,27 @@
michael@13 253 Example 1.3. Setting i_enum_suffix module parameter
michael@13 254 modparam("enum", "i_enum_suffix", "e1234.arpa.")
michael@13 255
michael@13 256 -1.3.4. branchlabel (string)
michael@13 257 +1.3.4. isn_suffix (string)
michael@13 258 +
michael@13 259 + The domain suffix to be used for isn_query() lookups. Can be
michael@13 260 + overridden by a parameter to isn_query.
michael@13 261 +
michael@13 262 + Default value is "freenum.org."
michael@13 263 +
michael@13 264 + Example 1.4. Setting isn_suffix module parameter
michael@13 265 +modparam("enum", "isn_suffix", "freenum.org.")
michael@13 266 +
michael@13 267 +1.3.5. branchlabel (string)
michael@13 268
michael@13 269 This parameter determines which label i_enum_query() will use
michael@13 270 to branch off to the infrastructure ENUM tree.
michael@13 271
michael@13 272 Default value is ""i""
michael@13 273
michael@13 274 - Example 1.4. Setting brachlabel module parameter
michael@13 275 + Example 1.5. Setting branchlabel module parameter
michael@13 276 modparam("enum", "branchlabel", "i")
michael@13 277
michael@13 278 -1.3.5. bl_algorithm (string)
michael@13 279 +1.3.6. bl_algorithm (string)
michael@13 280
michael@13 281 This parameter determines which algorithm i_enum_query() will
michael@13 282 use to select the position in the DNS tree where the
michael@13 283 @@ -182,7 +212,7 @@
michael@13 284 [branchlabel].[reverse-country-code].[i_enum_suffix] to
michael@13 285 indicate after how many digits the label should in inserted.
michael@13 286
michael@13 287 - Example 1.5. Zone file example
michael@13 288 + Example 1.6. Zone file example
michael@13 289 i.1.e164.arpa. IN TXT "4"
michael@13 290 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for +1 234 5
michael@13 291 678 999"
michael@13 292 @@ -196,7 +226,7 @@
michael@13 293 allocated yet. This version of the code uses 65300. See
michael@13 294 resolve.h.
michael@13 295
michael@13 296 - Example 1.6. Zone file example
michael@13 297 + Example 1.7. Zone file example
michael@13 298 i.1.e164.arpa. TYPE65300 \# 14 (
michael@13 299 04 ; position
michael@13 300 01 69 ; separator
michael@13 301 @@ -208,7 +238,7 @@
michael@13 302
michael@13 303 Default value is "cc"
michael@13 304
michael@13 305 - Example 1.7. Setting the bl_algorithm module parameter
michael@13 306 + Example 1.8. Setting the bl_algorithm module parameter
michael@13 307 modparam("enum", "bl_algorithm", "txt")
michael@13 308
michael@13 309 1.4. Exported Functions
michael@13 310 @@ -225,7 +255,7 @@
michael@13 311
michael@13 312 This function can be used from REQUEST_ROUTE.
michael@13 313
michael@13 314 - Example 1.8. enum_query usage
michael@13 315 + Example 1.9. enum_query usage
michael@13 316 ...
michael@13 317 # search for "e2u+sip" in freenum.org
michael@13 318 enum_query("freenum.org.");
michael@13 319 @@ -262,7 +292,7 @@
michael@13 320
michael@13 321 This function can be used from REQUEST_ROUTE.
michael@13 322
michael@13 323 - Example 1.9. enum_pv_query usage
michael@13 324 + Example 1.10. enum_pv_query usage
michael@13 325 ...
michael@13 326 # search for "e2u+sip" in freenum.org
michael@13 327 enum_pv_query("$avp(i:100)", "freenum.org.");
michael@13 328 @@ -296,14 +326,42 @@
michael@13 329 ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-haberle
michael@13 330 r-carrier-enum-01.txt for the rationale behind this function.
michael@13 331
michael@13 332 -1.4.4. is_from_user_enum()
michael@13 333 +1.4.4. isn_query(["suffix"[,"service"]])
michael@13 334 +
michael@13 335 + The function performs a ISN query and rewrites the
michael@13 336 + Request-URI with the result of the query. See Section 1.1,
michael@13 337 + "Overview" for more information.
michael@13 338 +
michael@13 339 + Meaning of the parameters is as follows:
michael@13 340 + * suffix - Suffix to be appended to the domain name.
michael@13 341 + * service - Service string to be used in the service field.
michael@13 342 +
michael@13 343 + This function can be used from REQUEST_ROUTE.
michael@13 344 +
michael@13 345 + See ftp://www.ietf.org/rfc/rfc3872.txt and
michael@13 346 + ftp://www.ietf.org/rfc/rfc2871.txt for information
michael@13 347 + regarding the ITAD part of the ISN string.
michael@13 348 +
michael@13 349 + Example 1.11. isn_query usage
michael@13 350 +...
michael@13 351 +# search for "e2u+sip" in freenum.org
michael@13 352 +isn_query("freenum.org.");
michael@13 353 +...
michael@13 354 +# search for "e2u+sip" in default tree (configured as parameter)
michael@13 355 +enum_query();
michael@13 356 +...
michael@13 357 +# search for "e2u+voice:sip" in freenum.org
michael@13 358 +enum_query("freenum.org.","voice");
michael@13 359 +...
michael@13 360 +
michael@13 361 +1.4.5. is_from_user_enum()
michael@13 362
michael@13 363 Checks if the user part of from URI is found in an enum lookup.
michael@13 364 Returns 1 if yes and -1 if not.
michael@13 365
michael@13 366 This function can be used from REQUEST_ROUTE.
michael@13 367
michael@13 368 - Example 1.10. is_from_user_enum usage
michael@13 369 + Example 1.12. is_from_user_enum usage
michael@13 370 ...
michael@13 371 if (is_from_user_enum()) {
michael@13 372 ....
michael@13 373 Index: modules/enum/doc/enum.xml
michael@13 374 diff -Nau modules/enum/doc/enum.xml.orig modules/enum/doc/enum.xml
michael@13 375 --- modules/enum/doc/enum.xml.orig 2009-10-16 02:31:52.000000000 +0200
michael@13 376 +++ modules/enum/doc/enum.xml 2010-01-18 18:01:15.954172402 +0100
michael@13 377 @@ -33,8 +33,8 @@
michael@13 378 </copyright>
michael@13 379 <revhistory>
michael@13 380 <revision>
michael@13 381 - <revnumber>$Revision: 5901 $</revnumber>
michael@13 382 - <date>$Date: 2009-07-21 10:45:05 +0300 (Tue, 21 Jul 2009) $</date>
michael@13 383 + <revnumber>$Revision: 5907 $</revnumber>
michael@13 384 + <date>$Date: 2010-01-18 10:45:05 +0100 (Mon, 18 Jan 2010) $</date>
michael@13 385 </revision>
michael@13 386 </revhistory>
michael@13 387 </bookinfo>
michael@13 388 Index: modules/enum/doc/enum_admin.xml
michael@13 389 diff -Nau modules/enum/doc/enum_admin.xml.orig modules/enum/doc/enum_admin.xml
michael@13 390 --- modules/enum/doc/enum_admin.xml.orig 2010-01-18 12:33:30.053644000 +0100
michael@13 391 +++ modules/enum/doc/enum_admin.xml 2010-01-18 18:14:59.583157910 +0100
michael@13 392 @@ -75,6 +75,24 @@
michael@13 393 and -1 if not.
michael@13 394 </para>
michael@13 395 <para>
michael@13 396 + In addition to standard ENUM, support for ISN (ITAD Subscriber
michael@13 397 + Numbers) is provided as well. To allow ISN lookups to resolve,
michael@13 398 + a different formatting algorithm is expected by the DNS server.
michael@13 399 + Whereas a ENUM NAPTR record expects a DNS query of the form
michael@13 400 + 9.8.7.6.5.4.3.2.1.<suffix>, ISN method expects a DNS query of
michael@13 401 + the form 6.5.1212.<suffix>. That is, a valid ISN number includes
michael@13 402 + a prefix of '56' in the example. The rest of the number is a
michael@13 403 + ITAD (Internet Telephony Administrative Domain) as defined
michael@13 404 + in RFCs 3872 and 2871, and as allocated by the IANA in
michael@13 405 + http://www.iana.org/assignments/trip-parameters. The ITAD is
michael@13 406 + left intact and not refersed as ENUM requires. To learn more
michael@13 407 + about ISN please refer to documents at www.freenum.org.
michael@13 408 + </para>
michael@13 409 + <para>
michael@13 410 + To complete a ISN lookup on the user part of the Request-URI,
michael@13 411 + isn_query() is used instead of enum_query().
michael@13 412 + </para>
michael@13 413 + <para>
michael@13 414 Enum module also implements is_from_user_enum function.
michael@13 415 This function does an enum lookup on the from user and
michael@13 416 returns true if found, false otherwise.
michael@13 417 @@ -153,6 +171,22 @@
michael@13 418 </example>
michael@13 419 </section>
michael@13 420 <section>
michael@13 421 + <title><varname>isn_suffix</varname> (string)</title>
michael@13 422 + <para>
michael@13 423 + The domain suffix to be used for isn_query() lookups. Can
michael@13 424 + be overridden by a parameter to isn_query.
michael@13 425 + </para>
michael@13 426 + <para>
michael@13 427 + Default value is <quote>freenum.org.</quote>
michael@13 428 + </para>
michael@13 429 + <example>
michael@13 430 + <title>Setting isn_suffix module parameter</title>
michael@13 431 + <programlisting format="linespecific">
michael@13 432 +modparam("enum", "isn_suffix", "freenum.org.")
michael@13 433 +</programlisting>
michael@13 434 + </example>
michael@13 435 + </section>
michael@13 436 + <section>
michael@13 437 <title><varname>branchlabel</varname> (string)</title>
michael@13 438 <para>
michael@13 439 This parameter determines which label i_enum_query() will use
michael@13 440 @@ -162,7 +196,7 @@
michael@13 441 Default value is <quote>"i"</quote>
michael@13 442 </para>
michael@13 443 <example>
michael@13 444 - <title>Setting brachlabel module parameter</title>
michael@13 445 + <title>Setting branchlabel module parameter</title>
michael@13 446 <programlisting format="linespecific">
michael@13 447 modparam("enum", "branchlabel", "i")
michael@13 448 </programlisting>
michael@13 449 @@ -353,6 +387,53 @@
michael@13 450 </section>
michael@13 451
michael@13 452 <section>
michael@13 453 + <title>
michael@13 454 + <function moreinfo="none">isn_query(["suffix"[,"service"]])</function>
michael@13 455 + </title>
michael@13 456 + <para>
michael@13 457 + The function performs a ISN query and rewrites the Request-URI with
michael@13 458 + the result of the query. See <xref linkend="sec-overview"/> for more
michael@13 459 + information.
michael@13 460 + </para>
michael@13 461 + <para>Meaning of the parameters is as follows:</para>
michael@13 462 + <itemizedlist>
michael@13 463 + <listitem>
michael@13 464 + <para><emphasis>suffix</emphasis> - Suffix to be appended to the
michael@13 465 + domain name.
michael@13 466 + </para>
michael@13 467 + </listitem>
michael@13 468 + <listitem>
michael@13 469 + <para><emphasis>service</emphasis> - Service string to be used in
michael@13 470 + the service field.
michael@13 471 + </para>
michael@13 472 + </listitem>
michael@13 473 + </itemizedlist>
michael@13 474 + <para>
michael@13 475 + This function can be used from REQUEST_ROUTE.
michael@13 476 + </para>
michael@13 477 + <para>
michael@13 478 + See ftp://www.ietf.org/rfc/rfc3872.txt and
michael@13 479 + ftp://www.ietf.org/rfc/rfc2871.txt for information
michael@13 480 + regarding the ITAD part of the ISN string.
michael@13 481 + </para>
michael@13 482 + <example>
michael@13 483 + <title><function moreinfo="none">isn_query</function> usage</title>
michael@13 484 + <programlisting format="linespecific">
michael@13 485 +...
michael@13 486 +# search for "e2u+sip" in freenum.org
michael@13 487 +isn_query("freenum.org.");
michael@13 488 +...
michael@13 489 +# search for "e2u+sip" in default tree (configured as parameter)
michael@13 490 +isn_query();
michael@13 491 +...
michael@13 492 +# search for "e2u+voice:sip" in freenum.org
michael@13 493 +isn_query("freenum.org.","voice");
michael@13 494 +...
michael@13 495 +</programlisting>
michael@13 496 + </example>
michael@13 497 + </section>
michael@13 498 +
michael@13 499 + <section>
michael@13 500 <title><function moreinfo="none">is_from_user_enum()</function></title>
michael@13 501 <para>
michael@13 502 Checks if the user part of from <abbrev>URI</abbrev>

mercurial