NAT bindings also need to be kept alive for media.
RFC 8445 provides requirements for STUN based keepalive mechanisms. UEs that do not implement the ICE procedures as defined in
RFC 8445 should implement the keepalive procedures defined in
RFC 8445. In the case where keepalives are required and the other end does not support ICE (such that STUN cannot be used for a keepalive) or the UE can not discover STUN or TURN servers to gather candidates, the UE shall send an empty (no payload) RTP packet with a payload type of 20 as a keepalive as long as the other end has not negotiated the use of this value. If this value has already been negotiated, then some other unused static payload type from table 5 of
RFC 3551 shall be used. When sending an empty RTP packet, the UE shall continue using the sequence number (SSRC) and timestamp as the negotiated RTP steam.
The UE should support the agent requirements for ICE as defined by
RFC 8445 when sending the initial INVITE request.
RFC 8445 and
RFC 8839 provide procedures for:
-
Gathering candidate addresses for RTP and RTCP prior to sending the INVITE;
-
Encoding the candidate addresses in the SDP that is included with the INVITE;
-
Acting as a STUN server to receive binding requests from the remote client when it does connectivity checks;
-
Performing connectivity checks on received candidate addresses for RTP and RTCP;
-
Determining and possibly selecting a better active address based on the requirements in RFC 8445 and RFC 8839;
-
Subsequent offer/answer exchanges; and
-
Sending media.
When supporting the ICE procedures, the UE shall also support the STUN agent requirements as described in
RFC 8489 in order to gather STUN addresses, the TURN client requirements as described in
RFC 8656 in order to gather TURN Server addresses and the STUN Server requirements defined in
RFC 8445 as well as the requirements for STUN Servers defined in
RFC 8489 for responding to connectivity checks.
RFC 8445 provides an algorithm for determining the priority of a particular candidate. The following additional requirements are provided to the UE:
-
The type preference assigned for each type of candidate from least to highest should be: Relayed Transport Address, STUN address, local address; and
-
If the UE has a dual IPv4/IPv6 stack, IPv6 addresses may be assigned a higher local preference than IPv4 addresses based on the operator's policy.
RFC 8445 provides guidance on choosing the in-use candidate and recommends that a UE choose relayed candidates as the in-use address. The following additional requirements are provided to the UE:
-
If a TURN server is available, the Relayed Transport Address should be used as the initial active transport address (i.e. as advertised in the m/c lines of the SDP); and
-
If a TURN server is not available, an address obtained via STUN should be used as the initial active transport address.
Regardless of whether the UE supports the above procedures, the UE shall, upon receipt of an SDP answer with candidate addresses, perform connectivity checks on the candidate addresses as described in
RFC 8445 and
RFC 8839. In order to perform connectivity checks, the UE shall act as a STUN client as defined in
RFC 8489. Further, the UE shall also follow the procedures in
RFC 8445 and
RFC 8839 when sending media.
The UE should support agent requirements for ICE as defined by
RFC 8445 when receiving an initial INVITE request.
RFC 8445 and
RFC 8839 provide procedures for:
-
Gathering candidate addresses for RTP and RTCP prior to sending the answer as described in RFC 8445;
-
Encoding the candidate addresses in the SDP answer as described in RFC 8839;
-
Acting as a STUN server to receive binding requests from the remote client when it does connectivity checks;
-
Performing connectivity checks on received candidate addresses for RTP and RTCP;
-
Determining and possibly selecting a better active address based on the requirements in RFC 8445 and RFC 8839;
-
Subsequent offer/answer exchanges; and
-
Sending media.
When supporting the ICE procedures, the UE shall also support the STUN agent requirements as described in
RFC 8489 in order to gather STUN addresses, the TURN client requirements as described in
RFC 8656 in order to gather TURN Server addresses and the STUN Server requirements defined in
RFC 8445 as well as the requirements for STUN Servers defined in
RFC 8489 for responding to connectivity checks.
RFC 8445 provides an algorithm for determining the priority of a given candidate. The additional requirements for the UE:
-
The priority of candidate addresses from least to highest should be: Relayed Transport Address, STUN address, local address; and
-
If the UE has a dual IPv4/IPv6 stack, IPv6 addresses MAY be placed at a higher priority than IPV4 addresses based on the operator's policy.
RFC 8445 provides guidance on choosing the in-use candidate and recommends that a UE choose relayed candidates as the in-use address. The following additional requirements are provided to the UE:
-
If a TURN server is available, the Relayed Transport Address should be used as the initial active transport address (i.e. as advertised in the m/c lines of the SDP); and
-
If a TURN server is not available, an address obtained via STUN should be used as the initial active transport address.
Regardless of whether the UE supports the above procedures, the UE shall, upon receipt of an SDP offer with candidate addresses, perform connectivity checks on the candidate addresses as described in
RFC 8445 and
RFC 8839. In order to perform connectivity checks, the UE shall act as a STUN client as defined in
RFC 8489. Further, the UE shall also follow the procedures in
RFC 8445 and
RFC 8839 when sending media.
When receiving an SDP offer which does not indicate support for ICE, the UE aborts the ICE procedures and reverts to
RFC 3264 offer/answer procedures; per
RFC 8445 and
RFC 8839. However, if the terminating UE is behind a NA(P)T device this may result in the inability to pass media for the session as the terminating UE will respond with its locally assigned IP address which is unreachable. In order to ensure successful media exchange, the terminating UE shall provide either a STUN derived IP address and port or a TURN provided IP address and port in the m/c lines of the SDP answer. If the provided address and port is a TURN address and port, the policy charging and control framework will be unable to establish proper filter criteria as the address is that of the TURN server and not that of the UE or NAT in front of the UE; see
Section B.3 of RFC 8445 for further details. To rectify this issue, the terminating UE shall also include a candidate attribute as described in
RFC 8445 and
RFC 8839 identifying the server reflexive IP address and port (i.e. the IP address and port on the public side of the NAT) used when a TURN provided address and port is provided in the m/c line of the SDP answer.