23 1.3. Exported Parameters |
23 1.3. Exported Parameters |
24 |
24 |
25 1.3.1. domain_suffix (string) |
25 1.3.1. domain_suffix (string) |
26 1.3.2. tel_uri_params (string) |
26 1.3.2. tel_uri_params (string) |
27 1.3.3. i_enum_suffix (string) |
27 1.3.3. i_enum_suffix (string) |
28 1.3.4. branchlabel (string) |
28 1.3.4. isn_suffix (string) |
29 1.3.5. bl_algorithm (string) |
29 1.3.5. branchlabel (string) |
|
30 1.3.6. bl_algorithm (string) |
30 |
31 |
31 1.4. Exported Functions |
32 1.4. Exported Functions |
32 |
33 |
33 1.4.1. enum_query(["suffix"[,"service"]]) |
34 1.4.1. enum_query(["suffix"[,"service"]]) |
34 1.4.2. enum_pv_query("pvar"[,"suffix"[,"service"]]) |
35 1.4.2. enum_pv_query("pvar"[,"suffix"[,"service"]]) |
35 1.4.3. i_enum_query(["suffix"[,"service"]]) |
36 1.4.3. i_enum_query(["suffix"[,"service"]]) |
36 1.4.4. is_from_user_enum() |
37 1.4.4. isn_query(["suffix"[,"service"]]) |
|
38 1.4.5. is_from_user_enum() |
37 |
39 |
38 List of Examples |
40 List of Examples |
39 |
41 |
40 1.1. Setting domain_suffix module parameter |
42 1.1. Setting domain_suffix module parameter |
41 1.2. Setting tel_uri_params module parameter |
43 1.2. Setting tel_uri_params module parameter |
42 1.3. Setting i_enum_suffix module parameter |
44 1.3. Setting i_enum_suffix module parameter |
43 1.4. Setting brachlabel module parameter |
45 1.4. Setting isn_query usage module parameter |
44 1.5. Zone file example |
46 1.5. Setting branchlabel module parameter |
45 1.6. Zone file example |
47 1.6. Zone file example |
46 1.7. Setting the bl_algorithm module parameter |
48 1.7. Zone file example |
47 1.8. enum_query usage |
49 1.8. Setting the bl_algorithm module parameter |
48 1.9. enum_pv_query usage |
50 1.9. enum_query usage |
49 1.10. is_from_user_enum usage |
51 1.10. enum_pv_query usage |
|
52 1.11. isn_query usage |
|
53 1.12. is_from_user_enum usage |
50 |
54 |
51 Chapter 1. Admin Guide |
55 Chapter 1. Admin Guide |
52 |
56 |
53 1.1. Overview |
57 1.1. Overview |
54 |
58 |
111 |
115 |
112 Enum module also implements is_from_user_enum function. This |
116 Enum module also implements is_from_user_enum function. This |
113 function does an enum lookup on the from user and returns true |
117 function does an enum lookup on the from user and returns true |
114 if found, false otherwise. |
118 if found, false otherwise. |
115 |
119 |
|
120 In addition to standard ENUM, support for ISN (ITAD Subscriber |
|
121 Numbers) is provided as well. To allow ISN lookups to resolve, |
|
122 a different formatting algorithm is expected by the DNS server. |
|
123 Whereas a ENUM NAPTR record expects a DNS query of the form |
|
124 9.8.7.6.5.4.3.2.1.<suffix>, ISN method expects a DNS query of |
|
125 the form 6.5.1212.<suffix>. That is, a valid ISN number includes |
|
126 a prefix of '56' in the example. The rest of the number is a |
|
127 ITAD (Internet Telephony Administrative Domain) as defined |
|
128 in RFCs 3872 and 2871, and as allocated by the IANA in |
|
129 http://www.iana.org/assignments/trip-parameters. The ITAD is |
|
130 left intact and not refersed as ENUM requires. To learn more |
|
131 about ISN please refer to documents at www.freenum.org. |
|
132 |
|
133 To complete a ISN lookup on the user part of the Request-URI, |
|
134 isn_query() is used instead of enum_query(). |
|
135 |
116 1.2. Dependencies |
136 1.2. Dependencies |
117 |
137 |
118 The module depends on the following modules (in the other words |
138 The module depends on the following modules (in the other words |
119 the listed modules must be loaded before this module): |
139 the listed modules must be loaded before this module): |
120 * No dependencies. |
140 * No dependencies. |
156 Default value is "e164.arpa." |
176 Default value is "e164.arpa." |
157 |
177 |
158 Example 1.3. Setting i_enum_suffix module parameter |
178 Example 1.3. Setting i_enum_suffix module parameter |
159 modparam("enum", "i_enum_suffix", "e1234.arpa.") |
179 modparam("enum", "i_enum_suffix", "e1234.arpa.") |
160 |
180 |
161 1.3.4. branchlabel (string) |
181 1.3.4. isn_suffix (string) |
|
182 |
|
183 The domain suffix to be used for isn_query() lookups. Can be |
|
184 overridden by a parameter to isn_query. |
|
185 |
|
186 Default value is "freenum.org." |
|
187 |
|
188 Example 1.4. Setting isn_suffix module parameter |
|
189 modparam("enum", "isn_suffix", "freenum.org.") |
|
190 |
|
191 1.3.5. branchlabel (string) |
162 |
192 |
163 This parameter determines which label i_enum_query() will use |
193 This parameter determines which label i_enum_query() will use |
164 to branch off to the infrastructure ENUM tree. |
194 to branch off to the infrastructure ENUM tree. |
165 |
195 |
166 Default value is ""i"" |
196 Default value is ""i"" |
167 |
197 |
168 Example 1.4. Setting brachlabel module parameter |
198 Example 1.5. Setting branchlabel module parameter |
169 modparam("enum", "branchlabel", "i") |
199 modparam("enum", "branchlabel", "i") |
170 |
200 |
171 1.3.5. bl_algorithm (string) |
201 1.3.6. bl_algorithm (string) |
172 |
202 |
173 This parameter determines which algorithm i_enum_query() will |
203 This parameter determines which algorithm i_enum_query() will |
174 use to select the position in the DNS tree where the |
204 use to select the position in the DNS tree where the |
175 infrastructure tree branches off the user ENUM tree. |
205 infrastructure tree branches off the user ENUM tree. |
176 |
206 |
180 |
210 |
181 If set to "txt", i_enum_query() will look for a TXT record at |
211 If set to "txt", i_enum_query() will look for a TXT record at |
182 [branchlabel].[reverse-country-code].[i_enum_suffix] to |
212 [branchlabel].[reverse-country-code].[i_enum_suffix] to |
183 indicate after how many digits the label should in inserted. |
213 indicate after how many digits the label should in inserted. |
184 |
214 |
185 Example 1.5. Zone file example |
215 Example 1.6. Zone file example |
186 i.1.e164.arpa. IN TXT "4" |
216 i.1.e164.arpa. IN TXT "4" |
187 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for +1 234 5 |
217 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for +1 234 5 |
188 678 999" |
218 678 999" |
189 |
219 |
190 If set to "ebl", i_enum_query() will look for an EBL (ENUM |
220 If set to "ebl", i_enum_query() will look for an EBL (ENUM |
194 ation-record-00.txt for a description of that record and the |
224 ation-record-00.txt for a description of that record and the |
195 meaning of the fields. The RR type for the EBL has not been |
225 meaning of the fields. The RR type for the EBL has not been |
196 allocated yet. This version of the code uses 65300. See |
226 allocated yet. This version of the code uses 65300. See |
197 resolve.h. |
227 resolve.h. |
198 |
228 |
199 Example 1.6. Zone file example |
229 Example 1.7. Zone file example |
200 i.1.e164.arpa. TYPE65300 \# 14 ( |
230 i.1.e164.arpa. TYPE65300 \# 14 ( |
201 04 ; position |
231 04 ; position |
202 01 69 ; separator |
232 01 69 ; separator |
203 04 65 31 36 34 04 61 72 70 61 00 ; e164.ar |
233 04 65 31 36 34 04 61 72 70 61 00 ; e164.ar |
204 pa |
234 pa |
206 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for +1 234 5 |
236 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for +1 234 5 |
207 678 999" |
237 678 999" |
208 |
238 |
209 Default value is "cc" |
239 Default value is "cc" |
210 |
240 |
211 Example 1.7. Setting the bl_algorithm module parameter |
241 Example 1.8. Setting the bl_algorithm module parameter |
212 modparam("enum", "bl_algorithm", "txt") |
242 modparam("enum", "bl_algorithm", "txt") |
213 |
243 |
214 1.4. Exported Functions |
244 1.4. Exported Functions |
215 |
245 |
216 1.4.1. enum_query(["suffix"[,"service"]]) |
246 1.4.1. enum_query(["suffix"[,"service"]]) |
223 * suffix - Suffix to be appended to the domain name. |
253 * suffix - Suffix to be appended to the domain name. |
224 * service - Service string to be used in the service field. |
254 * service - Service string to be used in the service field. |
225 |
255 |
226 This function can be used from REQUEST_ROUTE. |
256 This function can be used from REQUEST_ROUTE. |
227 |
257 |
228 Example 1.8. enum_query usage |
258 Example 1.9. enum_query usage |
229 ... |
259 ... |
230 # search for "e2u+sip" in freenum.org |
260 # search for "e2u+sip" in freenum.org |
231 enum_query("freenum.org."); |
261 enum_query("freenum.org."); |
232 ... |
262 ... |
233 # search for "e2u+sip" in default tree (configured as parameter) |
263 # search for "e2u+sip" in default tree (configured as parameter) |
260 * suffix - Suffix to be appended to the domain name. |
290 * suffix - Suffix to be appended to the domain name. |
261 * service - Service string to be used in the service field. |
291 * service - Service string to be used in the service field. |
262 |
292 |
263 This function can be used from REQUEST_ROUTE. |
293 This function can be used from REQUEST_ROUTE. |
264 |
294 |
265 Example 1.9. enum_pv_query usage |
295 Example 1.10. enum_pv_query usage |
266 ... |
296 ... |
267 # search for "e2u+sip" in freenum.org |
297 # search for "e2u+sip" in freenum.org |
268 enum_pv_query("$avp(i:100)", "freenum.org."); |
298 enum_pv_query("$avp(i:100)", "freenum.org."); |
269 ... |
299 ... |
270 # search for "e2u+sip" in default tree (configured as parameter) |
300 # search for "e2u+sip" in default tree (configured as parameter) |
294 |
324 |
295 See |
325 See |
296 ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-haberle |
326 ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-haberle |
297 r-carrier-enum-01.txt for the rationale behind this function. |
327 r-carrier-enum-01.txt for the rationale behind this function. |
298 |
328 |
299 1.4.4. is_from_user_enum() |
329 1.4.4. isn_query(["suffix"[,"service"]]) |
|
330 |
|
331 The function performs a ISN query and rewrites the |
|
332 Request-URI with the result of the query. See Section 1.1, |
|
333 "Overview" for more information. |
|
334 |
|
335 Meaning of the parameters is as follows: |
|
336 * suffix - Suffix to be appended to the domain name. |
|
337 * service - Service string to be used in the service field. |
|
338 |
|
339 This function can be used from REQUEST_ROUTE. |
|
340 |
|
341 See ftp://www.ietf.org/rfc/rfc3872.txt and |
|
342 ftp://www.ietf.org/rfc/rfc2871.txt for information |
|
343 regarding the ITAD part of the ISN string. |
|
344 |
|
345 Example 1.11. isn_query usage |
|
346 ... |
|
347 # search for "e2u+sip" in freenum.org |
|
348 isn_query("freenum.org."); |
|
349 ... |
|
350 # search for "e2u+sip" in default tree (configured as parameter) |
|
351 enum_query(); |
|
352 ... |
|
353 # search for "e2u+voice:sip" in freenum.org |
|
354 enum_query("freenum.org.","voice"); |
|
355 ... |
|
356 |
|
357 1.4.5. is_from_user_enum() |
300 |
358 |
301 Checks if the user part of from URI is found in an enum lookup. |
359 Checks if the user part of from URI is found in an enum lookup. |
302 Returns 1 if yes and -1 if not. |
360 Returns 1 if yes and -1 if not. |
303 |
361 |
304 This function can be used from REQUEST_ROUTE. |
362 This function can be used from REQUEST_ROUTE. |
305 |
363 |
306 Example 1.10. is_from_user_enum usage |
364 Example 1.12. is_from_user_enum usage |
307 ... |
365 ... |
308 if (is_from_user_enum()) { |
366 if (is_from_user_enum()) { |
309 .... |
367 .... |
310 }; |
368 }; |
311 ... |
369 ... |