Expand description
RFC 3263: turning a SIP URI into an ordered list of places to try.
The RFC’s procedure is short to state and easy to get subtly wrong. What matters:
- An IP literal or an explicit port means no lookup at all. The URI has already answered.
- NAPTR chooses the transport; SRV chooses the host and port; A/AAAA chooses the address. Skipping a stage changes which deployments are reachable.
sips:restricts the candidates to TLS. Falling back to UDP because TLS was unavailable would silently downgrade a request the user asked to be secure.- The result is a list. One candidate failing is normal, and the request has not failed until the list is exhausted.
DNS itself is behind a trait: tests use a fixture and never touch a resolver.
Structs§
- Naptr
- A NAPTR record, reduced to what RFC 3263 uses.
- OsRng
- The thread RNG.
- Seeded
Rng - A deterministic RNG for tests: a linear congruential generator with a fixed seed.
- Srv
- An SRV record.
Traits§
- Resolver
- What a resolver must be able to answer.
- Rng
- A source of randomness for RFC 2782 weighted selection.
Functions§
- resolve
- Resolve a URI to an ordered list of candidates.