Voice Over IP - ENUM & Bind9 wildcards?

This is Interesting: Free IT Magazines  
Home > Archive > Voice Over IP > July 2005 > ENUM & Bind9 wildcards?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ENUM & Bind9 wildcards?
Arnold Ligtvoet

2005-07-25, 5:45 pm

Hi,

I'm trying to run an Enum server. Got the enum record matching to work.

Is there a way to use wildcards in DNS records. Say I want to make an
enum table for the UK and use the E.164 telephonenumber in the SIP URI.

*.4.4.e164.test. 15 IN NAPTR 100 10 "u" "E2U+sip"
"!^.*$!sip:[phone_numer_here]@44.test!"

Is there a possible way to get the wildcard data (matched by *) in the
[phone_number_here] using replacement in the BIND9 conf?

Thanks,
Arnold.
Enzo Michelangeli

2005-07-25, 8:45 pm

Arnold Ligtvoet wrote:
> Hi,
>
> I'm trying to run an Enum server. Got the enum record matching to work.
>
> Is there a way to use wildcards in DNS records. Say I want to make an
> enum table for the UK and use the E.164 telephonenumber in the SIP URI.
>
> *.4.4.e164.test. 15 IN NAPTR 100 10 "u" "E2U+sip"
> "!^.*$!sip:[phone_numer_here]@44.test!"
>
> Is there a possible way to get the wildcard data (matched by *) in the
> [phone_number_here] using replacement in the BIND9 conf?
>
> Thanks,
> Arnold.


Sure, with a properly escaped '\1' (after all, ENUM uses sed-compatible
expressions). Here, for example, dig shows the entry in e164.org that
allows FreeWorldDialup to control numbers starting by 8829990:

========================================
================
$ dig '*.0.9.9.9.2.8.8.e164.org' ANY

; <<>> DiG 8.3 <<>> *.0.9.9.9.2.8.8.e164.org ANY
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 7, ADDITIONAL: 3
;; QUERY SECTION:
;; *.0.9.9.9.2.8.8.e164.org, type = ANY, class = IN

;; ANSWER SECTION:
*.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
"!^\\+8829990(.*)$!sip:\\1@fwd.pulver.com!" .
*.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+HTTP" \
"!.*!HTTP://www.freeworlddialup.com!" .

;; AUTHORITY SECTION:
e164.org. 9m39s IN NS ns1.e164.org.
e164.org. 9m39s IN NS ns2.e164.org.
e164.org. 9m39s IN NS ns3.bcwireless.net.
e164.org. 9m39s IN NS apollo.bcwireless.net.
e164.org. 9m39s IN NS mutual.bcwireless.net.
e164.org. 9m39s IN NS alberta.bcwireless.net.
e164.org. 9m39s IN NS alberta-2.bcwireless.net.

;; ADDITIONAL SECTION:
mutual.bcwireless.net. 59m34s IN A 204.50.80.11
alberta.bcwireless.net. 59m34s IN A 209.115.243.234
alberta-2.bcwireless.net. 59m34s IN A 64.141.95.61

;; Total query time: 337 msec
;; FROM: em.no-ip.com to SERVER: default -- 192.168.0.1
;; WHEN: Tue Jul 26 07:22:52 2005
;; MSG SIZE sent: 42 rcvd: 377
========================================
================

Enzo

Enzo Michelangeli

2005-07-26, 5:45 pm

Arnold Ligtvoet wrote:
[...]
> thanks for that response. My regular expressions were wrong indeed.
> Fixed them and immediately ran into the next question. For the given
> sample all numbers starting 8829990 are controlled by FWD. Now one user
> wants to 'port' the telephonenumer to another operator, say Payed World
> Dialup. How would one set this up in ENUM?
>
> I've tried (ported numer is 88299901) to do this:
> *.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
> "!^\\+8829990(.*)$!sip:\\1@fwd.pulver.com!" .
> 1.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
> "!^\\+8829990(.*)$!sip:\\1@pwd.someotheroperator.com!" .
>
> This gives me the situation where the specific telephone number works,
> the wildcardmatching does not work. Is there any other way of setting
> this where ENUM allows you to use general wildcards with exeptions?


This is actually a DNS issue, more than one specifically related to
ENUM. According to
http://tools.ietf.org/wg/dnsext/dra...-clarify-08.txt
and also RFC1034, a wildcard domain name only results in a
"synthesized" RR in the absence of a more specific domain name
pre-empting it. So yes, I would expect the configuration you mention to
divert the number +88299901 to 1@pwd.someotheroperator.com, leaving all
the other +8829990... to ...@fwd.pulver.com . Would that meet your
requirements?

Enzo

Arnold Ligtvoet

2005-07-26, 5:45 pm

Enzo Michelangeli wrote:
>
> This is actually a DNS issue, more than one specifically related to
> ENUM. According to
> http://tools.ietf.org/wg/dnsext/dra...-clarify-08.txt
> and also RFC1034, a wildcard domain name only results in a
> "synthesized" RR in the absence of a more specific domain name
> pre-empting it. So yes, I would expect the configuration you mention to
> divert the number +88299901 to 1@pwd.someotheroperator.com, leaving all
> the other +8829990... to ...@fwd.pulver.com . Would that meet your
> requirements?


Yep, that would. However the problem is that this does not work. As soon
as I enter the RR for the direct phonenumber, wildcardmatching does not
work for all other numbers. As soon as I comment out the RR with the
direct phonenumber, wildcardmatching works again.

It almost seems like the direct RR is blocking the wilcard match and if
I understand you and the RFC correctly it should not?

Should the above config work?

Arnold.
Enzo Michelangeli

2005-07-27, 8:45 pm

Arnold Ligtvoet wrote:
> Enzo Michelangeli wrote:
>
> Yep, that would. However the problem is that this does not work. As soon
> as I enter the RR for the direct phonenumber, wildcardmatching does not
> work for all other numbers. As soon as I comment out the RR with the
> direct phonenumber, wildcardmatching works again.
>
> It almost seems like the direct RR is blocking the wilcard match and if
> I understand you and the RFC correctly it should not?
>
> Should the above config work?


I'd say it should, but I'm not an expert in BIND or DNS in general.
Perhaps you could find better advice on some DNS-related group, such as
comp.protocols.dns.bind , especially if you reformulate your question
as "why this wildcard-with-exception configuration doesn't work the way
I think it should".

Enzo

Arnold Ligtvoet

2005-07-28, 5:45 pm

Enzo Michelangeli wrote:
> Arnold Ligtvoet wrote:
>
[vbcol=seagreen]
> I'd say it should, but I'm not an expert in BIND or DNS in general.
> Perhaps you could find better advice on some DNS-related group, such as
> comp.protocols.dns.bind , especially if you reformulate your question
> as "why this wildcard-with-exception configuration doesn't work the way
> I think it should".


I'll do some more investigating over there. What I did find is that if I
do wild card matching on full e164 blocks and have specific numbers I
need different wild-cards:
Normal declaration (works, matches all number in given area code):
*.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
"!^\\+8829990(.*)$!sip:\\1@fwd.pulver.com!" .

Declaration with ported number (works as well):
*.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
"!^\\+8829990(.*)$!sip:\\1@fwd.pulver.com!" .
*.0.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
"!^\\+8829990(.*)$!sip:\\1@fwd.pulver.com!" .
1.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
"!^\\+8829990(.*)$!sip:\\1@pwd.someotheroperator.com!" .

Notice the new 2nd and 3rd NAPTR record. The second matches one level
down and the 3rd the complete number.

In the second case the wildcards work and the specific number is found
as well. I'm not certain as to the logic behind needing to have a
wildcard one level down, however everything seems to work if I do it
like this.

Thanks for your help!

Arnold.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com