NAME

        CL_RFC3403_4_NAPTR_reg_repl - Both REGEXP and REPLACEMENT fields exist.


VERIFICATION POINTS

        Verify a NUT process when NUT received message that includes multiple Naming Authority
        Pointer (NAPTR) Resource Records (RR) containing both REGEXP and REPLACEMENT.


TARGET

        Client (ADVANCED)


SYNOPSIS

	CL_RFC3403_4_NAPTR_reg_repl.seq [-tooloption ...]: KOI tool option
	See also DNSConfig.pm


INITIALIZATION


TEST PROCEDURE

        This test sequence is following.
    DNS Client1 (NUT)                               DNS Server1 (TN)
        |                                               |
        | Invoke some application                       |
        |    on NUT (Ex. SIP UA)                        |
        |                                               |
        |---------------------------------------------->|
        | 1. Send standard query                        |
        |    QNAME="1.0.0.0.1.1.1.1.0.9.1.8.e164.arpa." |
        |    QTYPE=NAPTR                                |
        |                                               |
        |<----------------------------------------------|
        | 2. Send standard response                     |
        |                                               |
        |---------------------------------------------->|
        | 3. Send standard query                        |
        |    QNAME="sip.example.com"                    |
        |    QTYPE=NAPTR                                |  
        |                                               |
        |<----------------------------------------------|
        | 4. Send standard query response               |
        |                                               |
        |---------------------------------------------->|
        | 5. Send standard query                        |
        |    QNAME="_sip._udp.sip.example.com"          |
        |    QTYPE=SRV                                  |  
        |                                               |
        v                                               v
        1. DNS Client1 (NUT) sends a standard query with QNAME = "1.0.0.0.1.1.1.1.0.9.1.8.e164.arpa." type = NAPTR 
        2. DNS Server1 (NUT) transmits a response to DNS Client1 (NUT) with:
           $ORIGIN 1.0.0.0.1.1.1.1.0.9.1.8.e164.arpa.
            ;;       order pref flags service    regexp                               replacement
            IN NAPTR 0     0    "u"   "E2U+sip"  "!^.*$!sip:info1@hoge.example.com!i" _sip._udp.hoge.example.com.
            IN NAPTR 0     0    "u"   "E2U+sip"  "!^.*$!sip:info1@sip.example.com!i"      .
        3. DNS Client1 (NUT) sends a standard query with QNAME = "sip.example.com." type = NAPTR. Judgment (Check *3)
        4. DNS Server1 (NUT) transmits a response to DNS Client1 (NUT) with:
           $ORIGIN sip.example.com.
            ;;       order pref flags service    regexp  replacement
            IN NAPTR 0     0    "s"   "SIP+D2U"  "!^.*$!sip:info1@hoge.example.com!i" _sip._udp.hoge.example.com.
            IN NAPTR 0     0    "s"   "SIP+D2U"  ""      _sip._udp.sip.example.com.
        5. DNS Client1 (NUT) sends a standard query with QNAME = "_sip._udp.sip.example.com." type = SRV. Judgment (Check *5)


JUDGMENT

        3. Received a query message that it includes QNAME=sip.example.com, TYPE=NAPTR.
        5. Received a query message that it includes QNAME=_sip._udp.sip.example.com, TYPE=SRV.


TERMINATION

        If NUT has cache function, clear the cache.


REFERENCE

	RFC3403 Dynamic Delegation Discovery System (DDDS)
                Part Three: The Domain Name System (DNS) Database
	        4. NAPTR RR Format 
	RFC3263 Session Initiation Protocol (SIP): Locating SIP Servers
	RFC3761 The E.164 to Uniform Resource Identifiers (URI)
	        Dynamic Delegation Discovery System (DDDS) Application (ENUM)
	RFC2782 A DNS RR for specifying the location of services (DNS SRV)