How to make Enum / DNS query from JSLEE?

81 views
Skip to first unread message

yulian_o

unread,
Jul 28, 2011, 7:04:38 AM7/28/11
to mobicents-public
Hello
How can i query Enum for some record from JSLEE?

Best regards
Yulian Oifa

Jean Deruelle

unread,
Jul 28, 2011, 7:59:08 AM7/28/11
to mobicent...@googlegroups.com
You need to bundle the latest jain sip ext snapshot 

        <groupId>org.mobicents.javax.sip</groupId>
<artifactId>mobicents-jain-sip-ext</artifactId>
<version>1.0-SNAPSHOT</version>

I added it there for Mobicents Sip Servlets support of RFC 3263 in the upcoming 1.6 release so that JAIN SLEE can use it as well.
Then create an instance of the DefaultDNSServerLocator (https://hudson.jboss.org/jenkins/view/Mobicents/job/Mobicents-Books/lastSuccessfulBuild/artifact/api-docs/jain-sip-ext/index.html?org/mobicents/ext/javax/sip/dns/package-summary.html) add to it the supported transports of your application or server, and the local host names, then do a getSipUri from the TelUrl or SipURI with user=phone param so that an ENUM query will be done

Let me know how it goes
BR
Jean

yulian_o

unread,
Jul 31, 2011, 2:47:20 PM7/31/11
to mobicents-public
Hello Jean
It does enum query but only supports single sip addresses without
regular expressions.
For example:

if you have the following query : 6.6.2.4.7.2.5.0.e164.arpa
and response : naptr = 10 100 "u" "E2U+sip" "!^(.*)$!sip:\
\1...@82.80.200.62!" .
DefaultDnsServiceLocator lookupSipUri function will translate it to
sip:\\1...@82.80.200.62 and will try to create SipURI from that
which of course is invalid.

Another example
===========================================================================
The regexp handling is extremely handy if you use DNS wildcards in
your
ENUM zone. Then one DNS record will match many different DNS queries
and
thus apply to many E.164 numbers. In order to have the resulting URI
reflect the initial E.164 number, you have to use a more complex
regexp.

Consider e.g. +43 1 5056416. That's our office phone number here
in Vienna. We're free to define extensions to that number, e.g.
+43 1 5056416 33 is my desk phone. Austria uses an open numbering
plan where the length of a number isn't fixed. We could thus
use two single ENUM entries to cover all our needs:

; main number
6.6.1.4.6.5.0.5.1.3.4.e164.arpa. NAPTR 10 10 "u"
"E2U+sip" "!^.*$!sip:office at enum.at!" .
; all extensions:
*.6.6.1.4.6.5.0.5.1.3.4.e164.arpa. NAPTR 10 10 "u"
"E2U+sip" "!^\\+4315056416(.*)$!sip:extension-\\1 at
enum.at!" .

This maps +43 1 5056416 XY to sip:extension-XY at enum.at

[The use of wildcards in the DNS is quite controversal, our experience
with open numbering plans tells us that you can't avoid them, though.]
=============================================================================

I will try tomorrow to resolve the issue , if i will success i will
post a code update

Best Regards
Yulian Oifa

Jean Deruelle

unread,
Aug 1, 2011, 6:18:06 AM8/1/11
to mobicent...@googlegroups.com
MSS 1.6 is in code freeze as we intend to deliver a release soon.
Can you open an issue wrt this at http://code.google.com/p/mobicents/issues/entry?template=Mobicents%20Sip%20Servlets%20Template so that it gets analyzed (especially the fact that it seems controversal as indicated below but it seems of value and makes sense to me as well) and where you can attach your patch.

Thanks
Jean

yulian_o

unread,
Aug 1, 2011, 7:58:14 AM8/1/11
to mobicents-public
Hello Jean
I have opened issue 2774

Best regards
Yulian Oifa

yulian_o

unread,
Aug 1, 2011, 9:49:25 AM8/1/11
to mobicents-public
Hello
I have updated the issue with suggested code
Best regards
Yulian Oifa

jean.d...@gmail.com

unread,
Aug 2, 2011, 5:15:40 AM8/2/11
to mobicents-public
Hey Yulian

I was looking at the regex issue for ENUM and it seemed a simple fix
so I tried it out so I added a non regression test for it based on the
example given above (DNSServerLocatorTest.testResolveENUMRegex) but
the test doesn't pass, it seems the regex is not matching somehow, can
you check it out and maybe join on IRC freenode channel #mobicents so
that we can chat about it ?

Thanks
Join
Reply all
Reply to author
Forward
0 new messages