Skip to main content

5.8.1. Session-Level Parsing

5.8.1. Session-Level Parsing

First, the session-level lines are checked and parsed. These lines MUST occur in a specific order, and with a specific syntax, as defined in [RFC4566], Section 5. Note that while the specific line types (e.g., v=, c=) MUST occur in the defined order, lines of the same type (typically a=) can occur in any order.

The following non-attribute lines are not meaningful in the JSEP context and MAY be discarded once they have been checked.

  • The c= line MUST be checked for syntax, but its value is only used for ICE mismatch detection, as defined in [RFC8445], Section 5.4. Note that JSEP implementations should never encounter this condition because ICE is required for WebRTC.

  • The i=, u=, e=, p=, t=, r=, z=, and k= lines MUST be checked for syntax, but their values are not otherwise used.

The remaining non-attribute lines are processed as follows:

  • The v= line MUST have a version of 0, as specified in [RFC4566], Section 5.1.

  • The o= line MUST be parsed as specified in [RFC4566], Section 5.2.

  • The b= line, if present, MUST be parsed as specified in [RFC4566], Section 5.8, and the bwtype and bandwidth values stored.

Finally, the attribute lines are processed. Specific processing MUST be applied for the following session-level attribute (a=) lines:

  • Any a=group lines are parsed as specified in [RFC5888], Section 5, and the group's semantics and mids are stored.

  • If present, a single a=ice-lite line is parsed as specified in [RFC8839], Section 5.3, and a value indicating the presence of ice-lite is stored.

  • If present, a single a=ice-ufrag line is parsed as specified in [RFC8839], Section 5.4, and the ufrag value is stored.

  • If present, a single a=ice-pwd line is parsed as specified in [RFC8839], Section 5.4, and the password value is stored.

  • If present, a single a=ice-options line is parsed as specified in [RFC8839], Section 5.6, and the set of specified options is stored.

  • Any a=fingerprint lines are parsed as specified in [RFC8122], Section 5, and the set of fingerprint and algorithm values is stored.

  • If present, a single a=setup line is parsed as specified in [RFC4145], Section 4, and the setup value is stored.

  • If present, a single a=tls-id line is parsed as specified in [RFC8842], Section 5, and the attribute value is stored.

  • Any a=identity lines are parsed and the identity values stored for subsequent verification, as specified in [RFC8827], Section 5.

  • Any a=extmap lines are parsed as specified in [RFC5285], Section 5, and their values are stored.

Other attributes that are not relevant to JSEP may also be present, and implementations SHOULD process any that they recognize. As required by [RFC4566], Section 5.13, unknown attribute lines MUST be ignored.

Once all the session-level lines have been parsed, processing continues with the lines in m= sections.