ENUM & Bind9 wildcards?

Discussion in 'VOIP' started by Arnold Ligtvoet, Jul 25, 2005.

  1. 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.
     
    Arnold Ligtvoet, Jul 25, 2005
    #1
    1. Advertisements

  2. 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:\\!" .
    *.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, Jul 26, 2005
    #2
    1. Advertisements

  3. Hi Enzo,

    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.0.9.9.9.2.8.8.e164.org. 10M IN NAPTR 100 10 "u" "E2U+SIP" \
    "!^\\+8829990(.*)$!sip:\\!" .

    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?

    Thanks for your input.

    Arnol.d
     
    Arnold Ligtvoet, Jul 26, 2005
    #3
  4. Arnold Ligtvoet wrote:
    [...]
    This is actually a DNS issue, more than one specifically related to
    ENUM. According to
    http://tools.ietf.org/wg/dnsext/dra...larify/draft-ietf-dnsext-wcard-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 , leaving all
    the other +8829990... to . Would that meet your
    requirements?

    Enzo
     
    Enzo Michelangeli, Jul 26, 2005
    #4
  5. 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.
     
    Arnold Ligtvoet, Jul 26, 2005
    #5
  6. 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
     
    Enzo Michelangeli, Jul 28, 2005
    #6
  7. 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:\\!" .

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

    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.
     
    Arnold Ligtvoet, Jul 28, 2005
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.