The procedures indicated in this section are minimal and only show steps needed in the most basic scenarios (please refer to [RFC3263] for full procedures).
The TU layer performs the next hop discovery by using the URI it chose to be the next hop URI (see Section 12.12.5). The basic steps are as follows:
If the URI contains a transport parameter, then that transport is used.
If the URI contains a numeric IP address, but no transport parameter, then the response is sent using that IP address and the port indicated (or to the default port if no port is specified). The transport used is UDP for SIP URIs and TCP for SIPS URIs.
If the sent-by field contains a domain name and a port, then an A (IPv4) or AAAA (IPv6) query is made. The resulting IP address and the available port are used to send the response. The transport used is UDP for SIP URIs and TCP for SIPS URIs.
For URIs without numeric IP addresses or ports, a Domain Name System (DNS) server is queried for Naming Authority Pointer (NAPTR) records for the domain in the URI, which are then examined.
The TU chooses a transport protocol, if more than one record different transport protocol is available, depending on external factors (e.g., configuration).
Using the chosen transport protocol and the NAPTR records, the TU then queries the DNS server for service (SRV) records. The server may return one or more SRV records.
These records are then ...