OpenSER module enum

enum module implements functions that make ENUM query based on the user part of the current Request-URI. These functions assume that the user part consists of an international phone number of the form +decimal-digits, where the number of digits is at least 2 and at most 15. Out of this number, the enum_query() forms a domain name, where the digits are in reverse order and separated by dots followed by domain suffix that by default is "e164.arpa.". For example, if the user part is +35831234567, the domain name will be "7.6.5.4.3.2.1.3.8.5.3.e164.arpa.".

Since OpenSER 1.2.0, there is support for infrastructure ENUM (iENUM). i_enum_query() function operates in a similar fashion. The only difference is that it adds a label (default "i") to branch off from the default, user-ENUM tree to an infrastructure ENUM tree.

After forming the domain name, enum_query queries DNS for its NAPTR records. From the possible response enum_query chooses those records, whose flags field has string value "u", and whose services field has string value "e2u+[service:]sip" or "e2u+type[:subtype][+type[:subtype]...]" (case is ignored in both cases), and whose regexp field is of the form !pattern!replacement!.

Example doing ENUM query:

...
# search for "e2u+sip" in freenum.org 
enum_query("freenum.org.");
...
# search for "e2u+sip" in default tree (configured as parameter)
enum_query();
...
# search for "e2u+voice:sip" in e164.arpa
enum_query("e164.arpa.","voice");
...
# search for service type "sip" or "voice:sip" or "video:sip"
# note the '+' sign in front of the second parameter
enum_query("e164.arpa.","+sip+voice:sip+video:sip");
...
# quering for service sip and voice:sip
enum_query("e164.arpa.");
enum_query("e164.arpa.","voice");
# or use instead
enum_query("e164.arpa.","+sip+voice:sip");
...


Links to documentation of enum module:
enum module implements functions that make ENUM query based on the user part of the current Request-URI. These functions assume that the user part consists of an international phone number of the form +decimal-digits, where the number of digits is at least 2 and at most 15. Out of this number, the enum_query() forms a domain name, where the digits are in reverse order and separated by dots followed by domain suffix that by default is "e164.arpa.". For example, if the user part is +35831234567, the domain name will be "7.6.5.4.3.2.1.3.8.5.3.e164.arpa.".

Since OpenSER 1.2.0, there is support for infrastructure ENUM (iENUM). i_enum_query() function operates in a similar fashion. The only difference is that it adds a label (default "i") to branch off from the default, user-ENUM tree to an infrastructure ENUM tree.

After forming the domain name, enum_query queries DNS for its NAPTR records. From the possible response enum_query chooses those records, whose flags field has string value "u", and whose services field has string value "e2u+[service:]sip" or "e2u+type[:subtype][+type[:subtype]...]" (case is ignored in both cases), and whose regexp field is of the form !pattern!replacement!.

Example doing ENUM query:

...
# search for "e2u+sip" in freenum.org 
enum_query("freenum.org.");
...
# search for "e2u+sip" in default tree (configured as parameter)
enum_query();
...
# search for "e2u+voice:sip" in e164.arpa
enum_query("e164.arpa.","voice");
...
# search for service type "sip" or "voice:sip" or "video:sip"
# note the '+' sign in front of the second parameter
enum_query("e164.arpa.","+sip+voice:sip+video:sip");
...
# quering for service sip and voice:sip
enum_query("e164.arpa.");
enum_query("e164.arpa.","voice");
# or use instead
enum_query("e164.arpa.","+sip+voice:sip");
...


Links to documentation of enum module:
Created by: miconda, Last modification: Mon 04 of Jun, 2012 (07:50 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+