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
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Some providers change the Contact header when replying the register.
The provider says 200 OK for register but I got this:
ERROR: uac [uac_reg.c:876]: uac_reg_tm_callback(): got sip response 200
while registering
I think the problem is at
https://github.com/kamailio/kamailio/blob/master/modules/uac/uac_reg.c#L744
In my case, the provider change the username part of Contact
in register request: Contact: <sip:DID_NUMBER@IP_ADDRESS:5060>
in reply: Contact: <sip:SiENC*DID_NUMBER**IP_ADDRESS*5060*@IP_ADDRESS>
So if username is different, I will never get ri->flags |= UAC_REG_ONLINE;
Module: kamailio
Branch: master
Commit: 910be93e5caebea5cef33335d0c48de636169ff5
URL: https://github.com/kamailio/kamailio/commit/910be93e5caebea5cef33335d0c48de…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-03-05T21:26:36+01:00
enum: updated the docs in regards to max len for enum number
- synced with the code, following on a report from Alex Balashov
---
Modified: modules/enum/README
Modified: modules/enum/doc/enum_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/910be93e5caebea5cef33335d0c48de…
Patch: https://github.com/kamailio/kamailio/commit/910be93e5caebea5cef33335d0c48de…
---
diff --git a/modules/enum/README b/modules/enum/README
index 2f10a2c..b1f0c00 100644
--- a/modules/enum/README
+++ b/modules/enum/README
@@ -72,7 +72,7 @@ Chapter 1. Admin Guide
based on the user part of the current Request-URI. 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. Out of this number enum_query forms a domain
+ at least 2 and at most 20. Out of this number 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
diff --git a/modules/enum/doc/enum_admin.xml b/modules/enum/doc/enum_admin.xml
index 939c5fc..d5d34d2 100644
--- a/modules/enum/doc/enum_admin.xml
+++ b/modules/enum/doc/enum_admin.xml
@@ -21,7 +21,7 @@
based on the user part of the current Request-URI. 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. Out of this number
+ least 2 and at most 20. Out of this number
<function moreinfo="none">enum_query</function> forms a domain name,
where the digits are in reverse order and separated by dots followed by
domain suffix that by default is <quote>e164.arpa.</quote>. For example,