Skip to main content

RFC 7065 - 3. Definitions of the turn and turns URI

3. Definitions of the "turn" and "turns" URI

3.1. URI Scheme Syntax

The "turn" and "turns" URIs have the following formal ABNF syntax [RFC5234]:

turnURI       = scheme ":" host [ ":" port ]
[ "?transport=" transport ]
scheme = "turn" / "turns"
transport = "udp" / "tcp" / transport-ext
transport-ext = 1*unreserved

<host> and <port> are specified in [RFC3986]. While these two ABNF productions are defined in [RFC3986] as components of the generic hierarchical URI, this does not imply that the "turn" and "turns" schemes are hierarchical URIs. Developers MUST NOT use a generic hierarchical URI parser to parse a "turn" or "turns" URI.

The <host>, <port>, and <transport> components are passed without modification to the [RFC5928] algorithm. <secure> is set to false if <scheme> is equal to "turn", and set to true if <scheme> is equal to "turns" and passed to the [RFC5928] algorithm with the other components.

3.2. URI Scheme Semantics

The "turn" and "turns" URI schemes are used to designate a TURN server (also known as a relay) on Internet hosts accessible using the TURN protocol. The TURN protocol supports sending messages over UDP, TCP, or TLS-over-TCP. The "turns" URI scheme MUST be used when TURN is run over TLS-over-TCP (or, in the future, DTLS-over-UDP), and the "turn" scheme MUST be used otherwise.

The required <host> part of the "turn" URI denotes the TURN server host.

As specified in [RFC5766] and [RFC5928], the <port> part, if present, denotes the port on which the TURN server is awaiting connection requests. If it is absent, the default port is 3478 for both UDP and TCP. The default port for TURN over TLS is 5349.