Hello,
Per the ENUM module documentation[1]:
These functions assume that the Request URI 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.
Two questions arise:
1. Why was this limit of 15 introduced? Is there some basis for it in the ENUM spec or in the way DNS works?
2. I need to feed considerably longer values to the ENUM server, and would like to use enum_pv_query() to do so. I don't see a check for len(s) > 15 in enum_pv_query_3().
Is it safe to increase the value of these constants to 50-100+?
#define MAX_DOMAIN_SIZE 256 #define MAX_NUM_LEN 22 #define MAX_COMPONENT_SIZE (MAX_NUM_LEN * 2) /* separator, apex, ... This simplifies checks */
Or will it have some unpredictable effects?
Thanks,
-- Alex
[1] http://kamailio.org/docs/modules/4.2.x/modules/enum.html#sec-overview
On 05/03/15 21:21, Juha Heinanen wrote:
Alex Balashov writes:
- Why was this limit of 15 introduced? Is there some basis for it in
the ENUM spec or in the way DNS works?
if i remember correctly, 15 is the max length of itu specified e.164 numbers that enum module is dealing with.
as I remembered changing some things related to the max length, I checked the history and indeed the internal size was increased from 17 to 22 (perhaps the 2 is overhead for + and ending 0 for char*).
The patch came from a German company, because Germany has variable length for phone numbers. Apparently 20 is the max size known so far.
I updated the docs to match the code.
Cheers, Daniel
On 03/05/2015 03:30 PM, Daniel-Constantin Mierla wrote:
The patch came from a German company, because Germany has variable length for phone numbers. Apparently 20 is the max size known so far.
That is true, and in fact I don't know of any national dialling plan, globally, where the digit length can surpass 20.
However, there are some niche applications of ENUM, i.e. for information queries for routing or other intelligent network features, where the subject of the query can be quite complex and contain more than just a dialling plan-compliant telephone number. For instance, it's not uncommon to have routing-related ENUM queries consisting of ANI+DNIS+<trunk group or whatever> concatenated.
In light of that, I would recommend that these limits be increased significantly.
-- Alex
On 05/03/15 21:41, Alex Balashov wrote:
On 03/05/2015 03:30 PM, Daniel-Constantin Mierla wrote:
The patch came from a German company, because Germany has variable length for phone numbers. Apparently 20 is the max size known so far.
That is true, and in fact I don't know of any national dialling plan, globally, where the digit length can surpass 20.
However, there are some niche applications of ENUM, i.e. for information queries for routing or other intelligent network features, where the subject of the query can be quite complex and contain more than just a dialling plan-compliant telephone number. For instance, it's not uncommon to have routing-related ENUM queries consisting of ANI+DNIS+<trunk group or whatever> concatenated.
In light of that, I would recommend that these limits be increased significantly.
It is ok for me to go for higher limit of the max size.
Cheers, Daniel