<?xmlversion="1.0" encoding="us-ascii"?> <!DOCTYPE rfc SYSTEM "rfc2629.dtd"> <?rfc toc="yes" ?> <?rfc symrefs="yes" ?> <?rfc iprnotified="no" ?> <?rfc strict="yes" ?> <?rfc compact="yes" ?> <?rfc sortrefs="yes" ?> <?rfc colonspace="yes" ?> <?rfc rfcedstyle="no" ?> <?rfc docmapping="yes" ?> <?rfc tocdepth="4"?>version='1.0' encoding='utf-8'?> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-rtcweb-jsep-26"ipr="trust200902">indexInclude="true" ipr="trust200902" number="8829" prepTime="2021-01-19T20:18:44" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en"> <link href="https://datatracker.ietf.org/doc/draft-ietf-rtcweb-jsep-26" rel="prev"/> <link href="https://dx.doi.org/10.17487/rfc8829" rel="alternate"/> <link href="urn:issn:2070-1721" rel="alternate"/> <front> <title abbrev="JSEP">JavaScript Session EstablishmentProtocol</title>Protocol (JSEP)</title> <seriesInfo name="RFC" value="8829" stream="IETF"/> <author fullname="Justin Uberti" initials="J." surname="Uberti"><organization>Google</organization><organization showOnFrontPage="true">Google</organization> <address> <postal> <street>747 6thSt S</street>Street South</street> <city>Kirkland</city> <region>WA</region> <code>98033</code><country>USA</country><country>United States of America</country> </postal> <email>justin@uberti.name</email> </address> </author> <author fullname="Cullen Jennings" initials="C." surname="Jennings"><organization>Cisco</organization><organization showOnFrontPage="true">Cisco</organization> <address> <postal> <street>400 3rd Avenue SW</street> <city>Calgary</city> <region>AB</region> <code>T2P 4H2</code> <country>Canada</country> </postal> <email>fluffy@iii.ca</email> </address> </author> <author fullname="Eric Rescorla"initials="E.K."initials="E." surname="Rescorla" role="editor"><organization>Mozilla</organization><organization showOnFrontPage="true">Mozilla</organization> <address><postal> <street>331 Evelyn Ave</street> <city>Mountain View</city> <region>CA</region> <code>94041</code> <country>USA</country> </postal><email>ekr@rtfm.com</email> </address> </author> <date/> <area>RAI</area> <abstract> <t>Thismonth="01" year="2021"/> <keyword>webrtc</keyword> <keyword>sdp</keyword> <keyword>negotiation</keyword> <keyword>signaling</keyword> <keyword>peerconnection</keyword> <keyword>api</keyword> <keyword>ice</keyword> <keyword>rtp</keyword> <keyword>offer</keyword> <keyword>answer</keyword> <abstract pn="section-abstract"> <t indent="0" pn="section-abstract-1">This document describes the mechanisms for allowing a JavaScript application to control the signaling plane of a multimedia session via the interface specified in the W3C RTCPeerConnectionAPI,API and discusses how this relates to existing signaling protocols.</t> </abstract></front> <middle><boilerplate> <sectiontitle="Introduction" anchor="sec.introduction"> <t>Thisanchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1"> <name slugifiedName="name-status-of-this-memo">Status of This Memo</name> <t indent="0" pn="section-boilerplate.1-1"> This is an Internet Standards Track document. </t> <t indent="0" pn="section-boilerplate.1-2"> This documentdescribes how the W3C WEBRTC RTCPeerConnection interface <xref target="W3C.webrtc"></xref>isused to control the setup, management and teardown ofamultimedia session.</t> <section title="General Designproduct ofJSEP" anchor="sec.general-design-of-jsep"> <t>WebRTC call setupthe Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has beendesigned to focusapproved for publication by the Internet Engineering Steering Group (IESG). Further information oncontrollingInternet Standards is available in Section 2 of RFC 7841. </t> <t indent="0" pn="section-boilerplate.1-3"> Information about themedia plane, leaving signaling plane behavior upcurrent status of this document, any errata, and how to provide feedback on it may be obtained at <eref target="https://www.rfc-editor.org/info/rfc8829" brackets="none"/>. </t> </section> <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2"> <name slugifiedName="name-copyright-notice">Copyright Notice</name> <t indent="0" pn="section-boilerplate.2-1"> Copyright (c) 2021 IETF Trust and theapplication as muchpersons identified aspossible. The rationalethe document authors. All rights reserved. </t> <t indent="0" pn="section-boilerplate.2-2"> This document isthat different applications may prefersubject touse different protocols, such asBCP 78 and theexisting SIP call signaling protocol, or something customIETF Trust's Legal Provisions Relating to IETF Documents (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on theparticular application, perhaps for a novel use case. Indate of publication of thisapproach, the key information that needs to be exchanged is the multimedia session description, which specifies the necessary transportdocument. Please review these documents carefully, as they describe your rights andmedia configuration information necessaryrestrictions with respect toestablish the media plane.</t> <t>With these considerations in mind,this document. Code Components extracted from this documentdescribes the JavaScript Session Establishment Protocol (JSEP) that allows for full controlmust include Simplified BSD License text as described in Section 4.e of thesignaling state machine from JavaScript. AsTrust Legal Provisions and are provided without warranty as describedabove, JSEP assumes a modelinwhich a JavaScript application executes inside a runtime containing WebRTC APIs (the "JSEP implementation"). The JSEP implementation is almost entirely divorced fromthecore signaling flow, which is instead handled by the JavaScript making useSimplified BSD License. </t> </section> </boilerplate> <toc> <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1"> <name slugifiedName="name-table-of-contents">Table of Contents</name> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1"> <li pn="section-toc.1-1.1"> <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2"> <li pn="section-toc.1-1.1.2.1"> <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-general-design-of-jsep">General Design oftwo interfaces: (1) passing in localJSEP</xref></t> </li> <li pn="section-toc.1-1.1.2.2"> <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-other-approaches-considered">Other Approaches Considered</xref></t> </li> <li pn="section-toc.1-1.1.2.3"> <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-contradiction-regarding-bun">Contradiction regarding bundle-only "m=" sections</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.2"> <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t> </li> <li pn="section-toc.1-1.3"> <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-semantics-and-syntax">Semantics and Syntax</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2"> <li pn="section-toc.1-1.3.2.1"> <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-signaling-model">Signaling Model</xref></t> </li> <li pn="section-toc.1-1.3.2.2"> <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-session-descriptions-and-st">Session Descriptions andremote session descriptionsState Machine</xref></t> </li> <li pn="section-toc.1-1.3.2.3"> <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-session-description-format">Session Description Format</xref></t> </li> <li pn="section-toc.1-1.3.2.4"> <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-session-description-control">Session Description Control</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.4.2"> <li pn="section-toc.1-1.3.2.4.2.1"> <t indent="0" pn="section-toc.1-1.3.2.4.2.1.1"><xref derivedContent="3.4.1" format="counter" sectionFormat="of" target="section-3.4.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-rtptransceivers">RtpTransceivers</xref></t> </li> <li pn="section-toc.1-1.3.2.4.2.2"> <t indent="0" pn="section-toc.1-1.3.2.4.2.2.1"><xref derivedContent="3.4.2" format="counter" sectionFormat="of" target="section-3.4.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-rtpsenders">RtpSenders</xref></t> </li> <li pn="section-toc.1-1.3.2.4.2.3"> <t indent="0" pn="section-toc.1-1.3.2.4.2.3.1"><xref derivedContent="3.4.3" format="counter" sectionFormat="of" target="section-3.4.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-rtpreceivers">RtpReceivers</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.3.2.5"> <t indent="0" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice">ICE</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.5.2"> <li pn="section-toc.1-1.3.2.5.2.1"> <t indent="0" pn="section-toc.1-1.3.2.5.2.1.1"><xref derivedContent="3.5.1" format="counter" sectionFormat="of" target="section-3.5.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-gathering-overview">ICE Gathering Overview</xref></t> </li> <li pn="section-toc.1-1.3.2.5.2.2"> <t indent="0" pn="section-toc.1-1.3.2.5.2.2.1"><xref derivedContent="3.5.2" format="counter" sectionFormat="of" target="section-3.5.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-candidate-trickling">ICE Candidate Trickling</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.5.2.2.2"> <li pn="section-toc.1-1.3.2.5.2.2.2.1"> <t indent="0" pn="section-toc.1-1.3.2.5.2.2.2.1.1"><xref derivedContent="3.5.2.1" format="counter" sectionFormat="of" target="section-3.5.2.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-candidate-format">ICE Candidate Format</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.3.2.5.2.3"> <t indent="0" pn="section-toc.1-1.3.2.5.2.3.1"><xref derivedContent="3.5.3" format="counter" sectionFormat="of" target="section-3.5.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-candidate-policy">ICE Candidate Policy</xref></t> </li> <li pn="section-toc.1-1.3.2.5.2.4"> <t indent="0" pn="section-toc.1-1.3.2.5.2.4.1"><xref derivedContent="3.5.4" format="counter" sectionFormat="of" target="section-3.5.4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-candidate-pool">ICE Candidate Pool</xref></t> </li> <li pn="section-toc.1-1.3.2.5.2.5"> <t indent="0" pn="section-toc.1-1.3.2.5.2.5.1"><xref derivedContent="3.5.5" format="counter" sectionFormat="of" target="section-3.5.5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ice-versions">ICE Versions</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.3.2.6"> <t indent="0" pn="section-toc.1-1.3.2.6.1"><xref derivedContent="3.6" format="counter" sectionFormat="of" target="section-3.6"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-video-size-negotiation">Video Size Negotiation</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.6.2"> <li pn="section-toc.1-1.3.2.6.2.1"> <t indent="0" pn="section-toc.1-1.3.2.6.2.1.1"><xref derivedContent="3.6.1" format="counter" sectionFormat="of" target="section-3.6.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-creating-an-imageattr-attri">Creating an imageattr Attribute</xref></t> </li> <li pn="section-toc.1-1.3.2.6.2.2"> <t indent="0" pn="section-toc.1-1.3.2.6.2.2.1"><xref derivedContent="3.6.2" format="counter" sectionFormat="of" target="section-3.6.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interpreting-imageattr-attr">Interpreting imageattr Attributes</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.3.2.7"> <t indent="0" pn="section-toc.1-1.3.2.7.1"><xref derivedContent="3.7" format="counter" sectionFormat="of" target="section-3.7"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-simulcast">Simulcast</xref></t> </li> <li pn="section-toc.1-1.3.2.8"> <t indent="0" pn="section-toc.1-1.3.2.8.1"><xref derivedContent="3.8" format="counter" sectionFormat="of" target="section-3.8"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interactions-with-forking">Interactions with Forking</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.8.2"> <li pn="section-toc.1-1.3.2.8.2.1"> <t indent="0" pn="section-toc.1-1.3.2.8.2.1.1"><xref derivedContent="3.8.1" format="counter" sectionFormat="of" target="section-3.8.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-sequential-forking">Sequential Forking</xref></t> </li> <li pn="section-toc.1-1.3.2.8.2.2"> <t indent="0" pn="section-toc.1-1.3.2.8.2.2.1"><xref derivedContent="3.8.2" format="counter" sectionFormat="of" target="section-3.8.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-parallel-forking">Parallel Forking</xref></t> </li> </ul> </li> </ul> </li> <li pn="section-toc.1-1.4"> <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interface">Interface</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2"> <li pn="section-toc.1-1.4.2.1"> <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-peerconnection">PeerConnection</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2"> <li pn="section-toc.1-1.4.2.1.2.1"> <t indent="0" pn="section-toc.1-1.4.2.1.2.1.1"><xref derivedContent="4.1.1" format="counter" sectionFormat="of" target="section-4.1.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-constructor">Constructor</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.2"> <t indent="0" pn="section-toc.1-1.4.2.1.2.2.1"><xref derivedContent="4.1.2" format="counter" sectionFormat="of" target="section-4.1.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-addtrack">addTrack</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.3"> <t indent="0" pn="section-toc.1-1.4.2.1.2.3.1"><xref derivedContent="4.1.3" format="counter" sectionFormat="of" target="section-4.1.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-removetrack">removeTrack</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.4"> <t indent="0" pn="section-toc.1-1.4.2.1.2.4.1"><xref derivedContent="4.1.4" format="counter" sectionFormat="of" target="section-4.1.4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-addtransceiver">addTransceiver</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.5"> <t indent="0" pn="section-toc.1-1.4.2.1.2.5.1"><xref derivedContent="4.1.5" format="counter" sectionFormat="of" target="section-4.1.5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-onaddtrack-event">onaddtrack Event</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.6"> <t indent="0" pn="section-toc.1-1.4.2.1.2.6.1"><xref derivedContent="4.1.6" format="counter" sectionFormat="of" target="section-4.1.6"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-createdatachannel">createDataChannel</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.7"> <t indent="0" pn="section-toc.1-1.4.2.1.2.7.1"><xref derivedContent="4.1.7" format="counter" sectionFormat="of" target="section-4.1.7"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-ondatachannel-event">ondatachannel Event</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.8"> <t indent="0" pn="section-toc.1-1.4.2.1.2.8.1"><xref derivedContent="4.1.8" format="counter" sectionFormat="of" target="section-4.1.8"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-createoffer">createOffer</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.9"> <t indent="0" pn="section-toc.1-1.4.2.1.2.9.1"><xref derivedContent="4.1.9" format="counter" sectionFormat="of" target="section-4.1.9"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-createanswer">createAnswer</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.10"> <t indent="0" pn="section-toc.1-1.4.2.1.2.10.1"><xref derivedContent="4.1.10" format="counter" sectionFormat="of" target="section-4.1.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-sessiondescriptiontype">SessionDescriptionType</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2.10.2"> <li pn="section-toc.1-1.4.2.1.2.10.2.1"> <t indent="0" pn="section-toc.1-1.4.2.1.2.10.2.1.1"><xref derivedContent="4.1.10.1" format="counter" sectionFormat="of" target="section-4.1.10.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-use-of-provisional-answers">Use of Provisional Answers</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.10.2.2"> <t indent="0" pn="section-toc.1-1.4.2.1.2.10.2.2.1"><xref derivedContent="4.1.10.2" format="counter" sectionFormat="of" target="section-4.1.10.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-rollback">Rollback</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.4.2.1.2.11"> <t indent="0" pn="section-toc.1-1.4.2.1.2.11.1"><xref derivedContent="4.1.11" format="counter" sectionFormat="of" target="section-4.1.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-setlocaldescription">setLocalDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.12"> <t indent="0" pn="section-toc.1-1.4.2.1.2.12.1"><xref derivedContent="4.1.12" format="counter" sectionFormat="of" target="section-4.1.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-setremotedescription">setRemoteDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.13"> <t indent="0" pn="section-toc.1-1.4.2.1.2.13.1"><xref derivedContent="4.1.13" format="counter" sectionFormat="of" target="section-4.1.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-currentlocaldescription">currentLocalDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.14"> <t indent="0" pn="section-toc.1-1.4.2.1.2.14.1"><xref derivedContent="4.1.14" format="counter" sectionFormat="of" target="section-4.1.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-pendinglocaldescription">pendingLocalDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.15"> <t indent="0" pn="section-toc.1-1.4.2.1.2.15.1"><xref derivedContent="4.1.15" format="counter" sectionFormat="of" target="section-4.1.15"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-currentremotedescription">currentRemoteDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.16"> <t indent="0" pn="section-toc.1-1.4.2.1.2.16.1"><xref derivedContent="4.1.16" format="counter" sectionFormat="of" target="section-4.1.16"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-pendingremotedescription">pendingRemoteDescription</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.17"> <t indent="0" pn="section-toc.1-1.4.2.1.2.17.1"><xref derivedContent="4.1.17" format="counter" sectionFormat="of" target="section-4.1.17"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-cantrickleicecandidates">canTrickleIceCandidates</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.18"> <t indent="0" pn="section-toc.1-1.4.2.1.2.18.1"><xref derivedContent="4.1.18" format="counter" sectionFormat="of" target="section-4.1.18"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-setconfiguration">setConfiguration</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.19"> <t indent="0" pn="section-toc.1-1.4.2.1.2.19.1"><xref derivedContent="4.1.19" format="counter" sectionFormat="of" target="section-4.1.19"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-addicecandidate">addIceCandidate</xref></t> </li> <li pn="section-toc.1-1.4.2.1.2.20"> <t indent="0" pn="section-toc.1-1.4.2.1.2.20.1"><xref derivedContent="4.1.20" format="counter" sectionFormat="of" target="section-4.1.20"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-onicecandidate-event">onicecandidate Event</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.4.2.2"> <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-rtptransceiver">RtpTransceiver</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2"> <li pn="section-toc.1-1.4.2.2.2.1"> <t indent="0" pn="section-toc.1-1.4.2.2.2.1.1"><xref derivedContent="4.2.1" format="counter" sectionFormat="of" target="section-4.2.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stop">stop</xref></t> </li> <li pn="section-toc.1-1.4.2.2.2.2"> <t indent="0" pn="section-toc.1-1.4.2.2.2.2.1"><xref derivedContent="4.2.2" format="counter" sectionFormat="of" target="section-4.2.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stopped">stopped</xref></t> </li> <li pn="section-toc.1-1.4.2.2.2.3"> <t indent="0" pn="section-toc.1-1.4.2.2.2.3.1"><xref derivedContent="4.2.3" format="counter" sectionFormat="of" target="section-4.2.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-setdirection">setDirection</xref></t> </li> <li pn="section-toc.1-1.4.2.2.2.4"> <t indent="0" pn="section-toc.1-1.4.2.2.2.4.1"><xref derivedContent="4.2.4" format="counter" sectionFormat="of" target="section-4.2.4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-direction">direction</xref></t> </li> <li pn="section-toc.1-1.4.2.2.2.5"> <t indent="0" pn="section-toc.1-1.4.2.2.2.5.1"><xref derivedContent="4.2.5" format="counter" sectionFormat="of" target="section-4.2.5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-currentdirection">currentDirection</xref></t> </li> <li pn="section-toc.1-1.4.2.2.2.6"> <t indent="0" pn="section-toc.1-1.4.2.2.2.6.1"><xref derivedContent="4.2.6" format="counter" sectionFormat="of" target="section-4.2.6"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-setcodecpreferences">setCodecPreferences</xref></t> </li> </ul> </li> </ul> </li> <li pn="section-toc.1-1.5"> <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-sdp-interaction-procedures">SDP Interaction Procedures</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2"> <li pn="section-toc.1-1.5.2.1"> <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-overview">Requirements Overview</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.1.2"> <li pn="section-toc.1-1.5.2.1.2.1"> <t indent="0" pn="section-toc.1-1.5.2.1.2.1.1"><xref derivedContent="5.1.1" format="counter" sectionFormat="of" target="section-5.1.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-usage-requirements">Usage Requirements</xref></t> </li> <li pn="section-toc.1-1.5.2.1.2.2"> <t indent="0" pn="section-toc.1-1.5.2.1.2.2.1"><xref derivedContent="5.1.2" format="counter" sectionFormat="of" target="section-5.1.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-profile-names-and-interoper">Profile Names and(2) interacting withInteroperability</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.5.2.2"> <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-constructing-an-offer">Constructing an Offer</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.2.2"> <li pn="section-toc.1-1.5.2.2.2.1"> <t indent="0" pn="section-toc.1-1.5.2.2.2.1.1"><xref derivedContent="5.2.1" format="counter" sectionFormat="of" target="section-5.2.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-offers">Initial Offers</xref></t> </li> <li pn="section-toc.1-1.5.2.2.2.2"> <t indent="0" pn="section-toc.1-1.5.2.2.2.2.1"><xref derivedContent="5.2.2" format="counter" sectionFormat="of" target="section-5.2.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-subsequent-offers">Subsequent Offers</xref></t> </li> <li pn="section-toc.1-1.5.2.2.2.3"> <t indent="0" pn="section-toc.1-1.5.2.2.2.3.1"><xref derivedContent="5.2.3" format="counter" sectionFormat="of" target="section-5.2.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-options-handling">Options Handling</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.2.2.3.2"> <li pn="section-toc.1-1.5.2.2.2.3.2.1"> <t indent="0" pn="section-toc.1-1.5.2.2.2.3.2.1.1"><xref derivedContent="5.2.3.1" format="counter" sectionFormat="of" target="section-5.2.3.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-icerestart">IceRestart</xref></t> </li> <li pn="section-toc.1-1.5.2.2.2.3.2.2"> <t indent="0" pn="section-toc.1-1.5.2.2.2.3.2.2.1"><xref derivedContent="5.2.3.2" format="counter" sectionFormat="of" target="section-5.2.3.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-voiceactivitydetection">VoiceActivityDetection</xref></t> </li> </ul> </li> </ul> </li> <li pn="section-toc.1-1.5.2.3"> <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-generating-an-answer">Generating an Answer</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.3.2"> <li pn="section-toc.1-1.5.2.3.2.1"> <t indent="0" pn="section-toc.1-1.5.2.3.2.1.1"><xref derivedContent="5.3.1" format="counter" sectionFormat="of" target="section-5.3.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-answers">Initial Answers</xref></t> </li> <li pn="section-toc.1-1.5.2.3.2.2"> <t indent="0" pn="section-toc.1-1.5.2.3.2.2.1"><xref derivedContent="5.3.2" format="counter" sectionFormat="of" target="section-5.3.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-subsequent-answers">Subsequent Answers</xref></t> </li> <li pn="section-toc.1-1.5.2.3.2.3"> <t indent="0" pn="section-toc.1-1.5.2.3.2.3.1"><xref derivedContent="5.3.3" format="counter" sectionFormat="of" target="section-5.3.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-options-handling-2">Options Handling</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.3.2.3.2"> <li pn="section-toc.1-1.5.2.3.2.3.2.1"> <t indent="0" pn="section-toc.1-1.5.2.3.2.3.2.1.1"><xref derivedContent="5.3.3.1" format="counter" sectionFormat="of" target="section-5.3.3.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-voiceactivitydetection-2">VoiceActivityDetection</xref></t> </li> </ul> </li> </ul> </li> <li pn="section-toc.1-1.5.2.4"> <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-modifying-an-offer-or-answe">Modifying an Offer or Answer</xref></t> </li> <li pn="section-toc.1-1.5.2.5"> <t indent="0" pn="section-toc.1-1.5.2.5.1"><xref derivedContent="5.5" format="counter" sectionFormat="of" target="section-5.5"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-a-local-descript">Processing a Local Description</xref></t> </li> <li pn="section-toc.1-1.5.2.6"> <t indent="0" pn="section-toc.1-1.5.2.6.1"><xref derivedContent="5.6" format="counter" sectionFormat="of" target="section-5.6"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-a-remote-descrip">Processing a Remote Description</xref></t> </li> <li pn="section-toc.1-1.5.2.7"> <t indent="0" pn="section-toc.1-1.5.2.7.1"><xref derivedContent="5.7" format="counter" sectionFormat="of" target="section-5.7"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-a-rollback">Processing a Rollback</xref></t> </li> <li pn="section-toc.1-1.5.2.8"> <t indent="0" pn="section-toc.1-1.5.2.8.1"><xref derivedContent="5.8" format="counter" sectionFormat="of" target="section-5.8"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-parsing-a-session-descripti">Parsing a Session Description</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.8.2"> <li pn="section-toc.1-1.5.2.8.2.1"> <t indent="0" pn="section-toc.1-1.5.2.8.2.1.1"><xref derivedContent="5.8.1" format="counter" sectionFormat="of" target="section-5.8.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-session-level-parsing">Session-Level Parsing</xref></t> </li> <li pn="section-toc.1-1.5.2.8.2.2"> <t indent="0" pn="section-toc.1-1.5.2.8.2.2.1"><xref derivedContent="5.8.2" format="counter" sectionFormat="of" target="section-5.8.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-media-section-parsing">Media Section Parsing</xref></t> </li> <li pn="section-toc.1-1.5.2.8.2.3"> <t indent="0" pn="section-toc.1-1.5.2.8.2.3.1"><xref derivedContent="5.8.3" format="counter" sectionFormat="of" target="section-5.8.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-semantics-verification">Semantics Verification</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.5.2.9"> <t indent="0" pn="section-toc.1-1.5.2.9.1"><xref derivedContent="5.9" format="counter" sectionFormat="of" target="section-5.9"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-applying-a-local-descriptio">Applying a Local Description</xref></t> </li> <li pn="section-toc.1-1.5.2.10"> <t indent="0" pn="section-toc.1-1.5.2.10.1"><xref derivedContent="5.10" format="counter" sectionFormat="of" target="section-5.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-applying-a-remote-descripti">Applying a Remote Description</xref></t> </li> <li pn="section-toc.1-1.5.2.11"> <t indent="0" pn="section-toc.1-1.5.2.11.1"><xref derivedContent="5.11" format="counter" sectionFormat="of" target="section-5.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-applying-an-answer">Applying an Answer</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.6"> <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-rtp-rtcp">Processing RTP/RTCP</xref></t> </li> <li pn="section-toc.1-1.7"> <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-examples">Examples</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2"> <li pn="section-toc.1-1.7.2.1"> <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-simple-example">Simple Example</xref></t> </li> <li pn="section-toc.1-1.7.2.2"> <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-detailed-example">Detailed Example</xref></t> </li> <li pn="section-toc.1-1.7.2.3"> <t indent="0" pn="section-toc.1-1.7.2.3.1"><xref derivedContent="7.3" format="counter" sectionFormat="of" target="section-7.3"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-early-transport-warmup-exam">Early Transport Warmup Example</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.8"> <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t> </li> <li pn="section-toc.1-1.9"> <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t> </li> <li pn="section-toc.1-1.10"> <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t> <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2"> <li pn="section-toc.1-1.10.2.1"> <t indent="0" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="10.1" format="counter" sectionFormat="of" target="section-10.1"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t> </li> <li pn="section-toc.1-1.10.2.2"> <t indent="0" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="10.2" format="counter" sectionFormat="of" target="section-10.2"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t> </li> </ul> </li> <li pn="section-toc.1-1.11"> <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-sdp-abnf-syntax">SDP ABNF Syntax</xref></t> </li> <li pn="section-toc.1-1.12"> <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t> </li> <li pn="section-toc.1-1.13"> <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t> </li> </ul> </section> </toc> </front> <middle> <section anchor="sec.introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1"> <name slugifiedName="name-introduction">Introduction</name> <t indent="0" pn="section-1-1">This document describes how theICE state machine. The combination ofW3C Web Real-Time Communication (WebRTC) RTCPeerConnection interface <xref target="W3C.webrtc" format="default" sectionFormat="of" derivedContent="W3C.webrtc"/> is used to control theJSEP implementationsetup, management, and teardown of a multimedia session.</t> <section anchor="sec.general-design-of-jsep" numbered="true" toc="include" removeInRFC="false" pn="section-1.1"> <name slugifiedName="name-general-design-of-jsep">General Design of JSEP</name> <t indent="0" pn="section-1.1-1">WebRTC call setup has been designed to focus on controlling the media plane, leaving signaling-plane behavior up to theJavaScriptapplication as much as possible. The rationale isreferredthat different applications may prefer tothroughout this documentuse different protocols, such as the existing SIP call signaling protocol, or something custom to the particular application, perhaps for a"JSEP endpoint".</t> <t>Innovel use case. In thisdocument,approach, theuse ofkey information that needs to be exchanged is the multimedia session description, which specifies the transport and media configuration information necessary to establish the media plane.</t> <t indent="0" pn="section-1.1-2">With these considerations in mind, this document describes the JavaScript Session Establishment Protocol (JSEP), which allows for full control of the signaling state machine from JavaScript. As described above, JSEP assumes a model in which a JavaScript application executes inside a runtime containing WebRTC APIs (the "JSEP implementation"). The JSEP implementation is almost entirely divorced from the core signaling flow, which is instead handled by the JavaScript making use of two interfaces: (1) passing in local and remote session descriptions and (2) interacting with the Interactive Connectivity Establishment (ICE) state machine <xref target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>. The combination of the JSEP implementation and the JavaScript application is referred to throughout this document as a "JSEP endpoint".</t> <t indent="0" pn="section-1.1-3">In this document, the use of JSEP is described as if it always occurs between two JSEP endpoints.Note thoughNote, though, that in many cases it will actually be between a JSEP endpoint and some kind of server, such as a gateway orMCU.Multipoint Control Unit (MCU). This distinction is invisible to the JSEP endpoint; it just follows the instructions it is given via the API.</t><t>JSEP's<t indent="0" pn="section-1.1-4">JSEP's handling of session descriptions is simple and straightforward. Whenever an offer/answer exchange is needed, the initiating side creates an offer by calling acreateOffer()createOffer API. The application then uses that offer to set up its localconfigconfiguration via thesetLocalDescription()setLocalDescription API. The offer is finally sent off to the remote side over its preferred signaling mechanism (e.g., WebSockets); upon receipt of that offer, the remote party installs it using thesetRemoteDescription()setRemoteDescription API.</t><t>To<t indent="0" pn="section-1.1-5">To complete the offer/answer exchange, the remote party uses thecreateAnswer()createAnswer API to generate an appropriate answer, applies it using thesetLocalDescription()setLocalDescription API, and sends the answer back to the initiator over the signaling channel. When the initiator gets that answer, it installs it using thesetRemoteDescription()setRemoteDescription API, and initial setup is complete. This process can be repeated for additional offer/answer exchanges.</t><t>Regarding<t indent="0" pn="section-1.1-6">Regarding ICE <xreftarget="RFC8445"></xref>,target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>, JSEP decouples the ICE state machine from the overall signaling statemachine, as themachine. The ICE state machine must remain in the JSEPimplementation,implementation because only the implementation has the necessary knowledge of candidates and other transport information. Performing this separation provides additional flexibility in protocols that decouple session descriptions from transport. For instance, in traditional SIP, each offer or answer is self-contained, including both the session descriptions and the transport information. However, <xreftarget="I-D.ietf-mmusic-trickle-ice-sip" />target="RFC8840" format="default" sectionFormat="of" derivedContent="RFC8840"/> allows SIP to be used withtrickleTrickle ICE <xreftarget="I-D.ietf-ice-trickle" />,target="RFC8838" format="default" sectionFormat="of" derivedContent="RFC8838"/>, in which the session description can be sent immediately and the transport information can be sent when available. Sending transport information separately can allow for faster ICE and DTLS startup, since ICE checks can start as soon as any transport information is available rather than waiting for all of it. JSEP's decoupling of the ICE and signaling state machines allows it to accommodate either model.</t><t>Through its abstraction of<t indent="0" pn="section-1.1-7">Although it abstracts signaling, the JSEP approachdoes requirerequires that the applicationtobe aware of the signaling process. While the application does not need to understand the contents of session descriptions to set up a call, the application must call the right APIs at the right times, convert the session descriptions and ICE information into the defined messages of its chosen signaling protocol, and perform the reverse conversion on the messages it receives from the other side.</t><t>One<t indent="0" pn="section-1.1-8">One way to make life easier for the application is to provide a JavaScript library that hides this complexity from the developer; said library would implement a given signaling protocol along with its state machine and serialization code, presenting ahigher levelhigher-level call-oriented interface to the application developer. For example, libraries exist toadaptprovide implementations of theJSEP API into an API suitable for aSIPor XMPP.<xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/> and Extensible Messaging and Presence Protocol (XMPP) <xref target="RFC6120" format="default" sectionFormat="of" derivedContent="RFC6120"/> signaling protocols atop the JSEP API. Thus, JSEP provides greater control for the experienced developer without forcing any additional complexity on the novice developer.</t> </section> <sectiontitle="Otheranchor="sec.other-approaches-consider" numbered="true" toc="include" removeInRFC="false" pn="section-1.2"> <name slugifiedName="name-other-approaches-considered">Other ApproachesConsidered" anchor="sec.other-approaches-consider"> <t>OneConsidered</name> <t indent="0" pn="section-1.2-1">One approach that was considered instead of JSEP was to include a lightweight signaling protocol. Instead of providing session descriptions to the API, the API would produce and consume messages from this protocol. While providing a more high-level API, this put more control of signaling within the JSEP implementation, forcing it to have to understand and handle concepts like signaling glare (see <xref target="RFC3264"/>, Section 4).</t> <t>AsectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-4" derivedContent="RFC3264"/>).</t> <t indent="0" pn="section-1.2-2">A second approach that was considered but not chosen was to decouple the management of the media control objects from session descriptions, instead offering APIs that would control each component directly. This was rejected based on the argument that requiring exposure of this level of complexity to the application programmer would not be beneficial; it would (1) result in an API where even a simple example would require a significant amount of code to orchestrate all the neededinteractions, as well as creatinginteractions and (2) create a large API surface thatneededwould need to be agreed upon and documented. In addition, these API points could be called in any order, resulting in a more complex set of interactions with the media subsystem than the JSEP approach, which specifies how session descriptions are to be evaluated and applied.</t><t>One<t indent="0" pn="section-1.2-3">One variation on JSEP that was considered was to keep the basicsession description-oriented API,session-description-oriented API but to move the mechanism for generating offers and answers out of the JSEP implementation. Instead of providing createOffer/createAnswer methods within the implementation, this approach would instead expose a getCapabilitiesAPIAPI, which would provide the application with the information it needed in order to generate its own session descriptions. This increases the amount of work that the application needs to do; it needs to know how to generate session descriptions from capabilities, and especially how to generate the correct answer from an arbitrary offer and the supported capabilities. While this could certainly be addressed by using a library like the one mentioned above, it basically forces the use of said library even for a simple example. Providing createOffer/createAnswer avoids this problem.</t> </section></section><sectiontitle="Terminology" anchor="sec.terminology"> <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",numbered="true" removeInRFC="false" toc="include" pn="section-1.3"> <name slugifiedName="name-contradiction-regarding-bun">Contradiction regarding bundle-only "m=" sections</name> <t indent="0" pn="section-1.3-1">Since the approval of the WebRTC specification documents, the IETF has become aware of an inconsistency between the document specifying JSEP and"OPTIONAL" in thisthe documentare to be interpreted as described inspecifying BUNDLE (this RFC and <xreftarget="RFC2119"></xref>.</t>target="RFC8843" format="default" sectionFormat="of" derivedContent="RFC8843"/>, respectively). Rather than delaying publication further to come to a resolution, the documents are being published as they were originally approved. The IETF intends to restart work on these technologies, and revised versions of these documents will be published as soon as a resolution becomes available.</t> <t indent="0" pn="section-1.3-2">The specific issue involves the handling of "m=" sections that are designated as bundle-only, as discussed in <xref target="sec.pc-constructor" format="default" sectionFormat="of" derivedContent="Section 4.1.1"/> of this RFC. Currently, there is divergence between JSEP and BUNDLE, as well as between these specifications and existing browser implementations:</t> <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-1.3-3"> <li pn="section-1.3-3.1">JSEP prescribes that said "m=" sections should use port zero and add an "a=bundle-only" attribute in initial offers, but not in answers or subsequent offers.</li> <li pn="section-1.3-3.2">BUNDLE prescribes that these "m=" sections should be marked as described in the previous point, but in all offers and answers.</li> <li pn="section-1.3-3.3">Most current browsers do not mark any "m=" sections with port zero and instead use the same port for all bundled "m=" sections; one follows the JSEP behavior.</li> </ul> </section> </section> <sectiontitle="Semanticsanchor="sec.terminology" numbered="true" toc="include" removeInRFC="false" pn="section-2"> <name slugifiedName="name-terminology">Terminology</name> <t indent="0" pn="section-2-1">The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, andSyntax" anchor="sec.semantics-and-syntax">only when, they appear in all capitals, as shown here.</t> </section> <sectiontitle="Signaling Model" anchor="sec.signaling-model"> <t>JSEPanchor="sec.semantics-and-syntax" numbered="true" toc="include" removeInRFC="false" pn="section-3"> <name slugifiedName="name-semantics-and-syntax">Semantics and Syntax</name> <section anchor="sec.signaling-model" numbered="true" toc="include" removeInRFC="false" pn="section-3.1"> <name slugifiedName="name-signaling-model">Signaling Model</name> <t indent="0" pn="section-3.1-1">JSEP does not specify a particular signaling model or state machine, other than the generic need to exchange session descriptions in the fashion described by <xreftarget="RFC3264"></xref>target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/> (offer/answer) in order for both sides of the session to know how to conduct the session. JSEP provides mechanisms to create offers and answers, as well as to apply them to a session. However, the JSEP implementation is totally decoupled from the actual mechanism by which these offers and answers are communicated to the remote side, including addressing, retransmission, forking, and glare handling. These issues are left entirely up to the application; the application has complete control over which offers and answers get handed to the implementation, and when.</t> <figure anchor="fig-sigModel"title="JSEPalign="left" suppress-title="false" pn="figure-1"> <name slugifiedName="name-jsep-signaling-model">JSEP SignalingModel"> <artwork> <![CDATA[Model</name> <artwork name="" type="ascii-art" align="left" alt="" pn="section-3.1-2.1"> +-----------+ +-----------+ | Web App|<---|<--- App-Specific Signaling-->|-->| Web App | +-----------+ +-----------+ ^ ^ | SDP | SDP V V +-----------+ +-----------+ | JSEP|<-----------|<----------- Media------------>|------------>| JSEP | | Impl. | | Impl. | +-----------+ +-----------+]]></artwork> </figure> </section> <sectiontitle="Sessionanchor="sec.session-descriptions-and-state-machine" numbered="true" toc="include" removeInRFC="false" pn="section-3.2"> <name slugifiedName="name-session-descriptions-and-st">Session Descriptions and StateMachine" anchor="sec.session-descriptions-and-state-machine"> <t>InMachine</name> <t indent="0" pn="section-3.2-1">In order to establish the media plane, the JSEP implementation needs specific parameters to indicate what to transmit to the remote side, as well as how to handle the media that is received. These parameters are determined by the exchange of session descriptions in offers and answers, and there are certain details to this process that must be handled in the JSEP APIs.</t><t>Whether<t indent="0" pn="section-3.2-2">Whether a session description applies to the local side or the remote side affects the meaning of that description. For example, the list of codecs sent to a remote party indicates what the local side is willing to receive, which, when intersected with the set of codecs the remote side supports, specifies what the remote side should send. However, not all parameters follow this rule; some parameters aredeclarativedeclarative, and the remote sideMUSTmust either accept them or reject them altogether. An example of such a parameter is theDTLSTLS fingerprints <xreftarget="RFC8122"></xref>, whichtarget="RFC8122" format="default" sectionFormat="of" derivedContent="RFC8122"/> as used in the context of DTLS <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/>; these fingerprints are calculated based on the local certificate(s)offered,offered and are not subject tonegotiation.</t> <t>Innegotiation. </t> <t indent="0" pn="section-3.2-3">In addition, various RFCs put different conditions on the format of offers versus answers. For example, an offer may propose an arbitrary number ofm="m=" sections (i.e., media descriptions as described in <xref target="RFC4566"/>, Section 5.14),sectionFormat="comma" section="5.14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.14" derivedContent="RFC4566"/>), but an answer must contain the exact same number as the offer.</t><t>Lastly,<t indent="0" pn="section-3.2-4">Lastly, while the exact media parameters areonlyknown only after an offer and an answer have been exchanged, the offerer may receive ICE checks, and possibly media (e.g., in the case of a re-offer after a connection has been established) before it receives an answer. To properly process incoming media in this case, the offerer's media handler must be aware of the details of the offer before the answer arrives.</t><t>Therefore,<t indent="0" pn="section-3.2-5">Therefore, in order to handle session descriptions properly, the JSEP implementation needs:<list style="numbers"> <t>To</t> <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-3.2-6"> <li pn="section-3.2-6.1" derivedCounter="1.">To know if a session description pertains to the local or remoteside.</t> <t>Toside.</li> <li pn="section-3.2-6.2" derivedCounter="2.">To know if a session description is an offer or ananswer.</t> <t>Toanswer.</li> <li pn="section-3.2-6.3" derivedCounter="3.">To allow the offer to be specified independently of theanswer.</t> </list>JSEPanswer.</li> </ol> <t indent="0" pn="section-3.2-7">JSEP addresses this by adding both setLocalDescription and setRemoteDescription methods and having session description objects contain a type field indicating the type of session description being supplied. This satisfies the requirements listed above for both the offerer, who first calls setLocalDescription(sdp [offer]) and then later setRemoteDescription(sdp [answer]),as well as forand the answerer, who first calls setRemoteDescription(sdp [offer]) and then later setLocalDescription(sdp [answer]).</t><t>During<t indent="0" pn="section-3.2-8">During the offer/answer exchange, the outstanding offer is considered to be "pending" at the offerer and the answerer, as it mayeitherbe either accepted or rejected. If this is a re-offer, each side will also have "current" local and remote descriptions, which reflect the result of the last offer/answer exchange. Sections <xref target="sec.pendinglocaldescription"/>,format="counter" sectionFormat="of" derivedContent="4.1.14"/>, <xref target="sec.pendingremotedescription"/>,format="counter" sectionFormat="of" derivedContent="4.1.16"/>, <xref target="sec.currentlocaldescription"/>,format="counter" sectionFormat="of" derivedContent="4.1.13"/>, and <xref target="sec.currentremotedescription"/>,format="counter" sectionFormat="of" derivedContent="4.1.15"/> provide more detail on pending and current descriptions.</t><t>JSEP<t indent="0" pn="section-3.2-9">JSEP also allows for an answer to be treated as provisional by the application. Provisional answers provide a way for an answerer to communicate initial session parameters back to the offerer, in order to allow the session to begin, while allowing a final answer to be specified later. This concept of a final answer is important to the offer/answer model; when such an answer is received, any extra resources allocated by the caller can be released, now that the exact session configuration is known. These "resources" can include things like extra ICE components,TURNTraversal Using Relays around NAT (TURN) candidates, or video decoders. Provisional answers, on the other hand, do no such deallocation; as a result, multiple dissimilar provisional answers, with their own codec choices, transport parameters, etc., can be received and applied during call setup. Note that the final answer itself may be different than any received provisional answers.</t><t>In<t indent="0" pn="section-3.2-10">In <xreftarget="RFC3264"></xref>,target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/>, the constraint at the signaling level is that only one offer can be outstanding for a given session, but at themedia stackJSEP level, a new offer can be generated at any point. For example, when using SIP for signaling, if one offer issent,sent and is thencancelledcanceled using a SIP CANCEL, another offer can be generated even though no answer was received for the first offer. To support this, the JSEP media layer can provide an offer via thecreateOffer()createOffer method whenever the JavaScript application needs one for the signaling. The answerer can send back zero or more provisionalanswers,answers and then finally end theoffer-answeroffer/answer exchange by sending a final answer. The state machine for this is as follows:</t><t><figure anchor="fig-state-machine"title="JSEPalign="left" suppress-title="false" pn="figure-2"> <name slugifiedName="name-jsep-state-machine">JSEP StateMachine"> <artwork> <![CDATA[Machine</name> <artwork name="" type="ascii-art" align="left" alt="" pn="section-3.2-11.1"> setRemote(OFFER) setLocal(PRANSWER) /-----\ /-----\ | | | | v | v | +---------------+ | +---------------+ | | |----/ | |----/ | have- | setLocal(PRANSWER) | have- | | remote-offer |------------------->|>| local-pranswer| | | | | | | | | +---------------+ +---------------+ ^ | | | | setLocal(ANSWER) | setRemote(OFFER) | | | V setLocal(ANSWER) | +---------------+ | | | | ||<---------------------------+|<---------------------------+ | stable | ||<---------------------------+|<---------------------------+ | | | +---------------+ setRemote(ANSWER) | ^ | | | | setLocal(OFFER) | setRemote(ANSWER) | | | V | +---------------+ +---------------+ | | | | | have- | setRemote(PRANSWER) |have- | | local-offer |------------------->|remote-pranswer|>|remote-pranswer| | | | | | |----\ | |----\ +---------------+ | +---------------+ | ^ | ^ | | | | | \-----/ \-----/ setLocal(OFFER) setRemote(PRANSWER)]]></artwork> </figure></t> <t>Aside<t indent="0" pn="section-3.2-12">Aside from these statetransitionstransitions, there is no other difference between the handling of provisional ("pranswer") and final ("answer") answers.</t> </section> <sectiontitle="Sessionanchor="sec.session-description-forma" numbered="true" toc="include" removeInRFC="false" pn="section-3.3"> <name slugifiedName="name-session-description-format">Session DescriptionFormat" anchor="sec.session-description-forma"> <t>JSEP'sFormat</name> <t indent="0" pn="section-3.3-1">JSEP's session descriptions useSDPSession Description Protocol (SDP) syntax for their internal representation. While this format is not optimal for manipulation from JavaScript, it is widelyaccepted,accepted and is frequently updated with new features; any alternate encoding of session descriptions would have to keep pace with the changes to SDP, at least until the time that this new encoding eclipsed SDP in popularity.</t><t>However,<t indent="0" pn="section-3.3-2">However, to provide for future flexibility, the SDP syntax is encapsulated within a SessionDescription object, which can be constructed fromSDP,SDP and be serialized out to SDP. If future specifications agree on a JSON format for session descriptions, we could easily enable this object to generate and consume that JSON.</t><t>As<t indent="0" pn="section-3.3-3">As detailed below, most applications should be able to treat the SessionDescriptions produced and consumed by these various API calls as opaque blobs; that is, the application will not need to read or change them.</t> </section> <sectiontitle="Sessionanchor="sec.session-description-ctrl" numbered="true" toc="include" removeInRFC="false" pn="section-3.4"> <name slugifiedName="name-session-description-control">Session DescriptionControl" anchor="sec.session-description-ctrl"> <t>InControl</name> <t indent="0" pn="section-3.4-1">In order to give the application control over various common session parameters, JSEP provides control surfaceswhichthat tell the JSEP implementation how to generate session descriptions. This avoids the need for JavaScript to modify session descriptions in most cases.</t><t>Changes<t indent="0" pn="section-3.4-2">Changes to these objects result in changes to the session descriptions generated by subsequentcreateOffer/AnswercreateOffer/createAnswer calls.</t> <sectiontitle="RtpTransceivers" anchor="sec.rtptransceivers"> <t>RtpTransceiversanchor="sec.rtptransceivers" numbered="true" toc="include" removeInRFC="false" pn="section-3.4.1"> <name slugifiedName="name-rtptransceivers">RtpTransceivers</name> <t indent="0" pn="section-3.4.1-1">RtpTransceivers allow the application to control the RTP media associated with onem="m=" section. Each RtpTransceiver has an RtpSender and an RtpReceiver, which an application can use to control the sending and receiving of RTP media. The application may also modify the RtpTransceiver directly, for instance, by stopping it.</t><t>RtpTransceivers<t indent="0" pn="section-3.4.1-2">RtpTransceivers generally have a 1:1 mapping withm="m=" sections, although there may be more RtpTransceivers thanm="m=" sections when RtpTransceivers are created but not yet associated witha m=an "m=" section, or if RtpTransceivers have been stopped and disassociated fromm="m=" sections. An RtpTransceiver is said to be associated with anm="m=" section if itsmidmedia identification (mid) property is non-null;otherwiseotherwise, it is said to be disassociated. The associatedm="m=" section is determined using a mapping between transceivers andm="m=" section indices, formed when creating an offer or applying a remote offer.</t><t>An<t indent="0" pn="section-3.4.1-3">An RtpTransceiver is never associated with more than onem="m=" section, and once a session description is applied,a m=an "m=" section is always associated with exactly one RtpTransceiver. However, in certain cases wherea m=an "m=" section has been rejected, as discussed in <xref target="sec.subsequent-offers"/>format="default" sectionFormat="of" derivedContent="Section 5.2.2"/> below, thatm="m=" section will be "recycled" and associated with a new RtpTransceiver with a newmidMID value.</t><t>RtpTransceivers<t indent="0" pn="section-3.4.1-4">RtpTransceivers can be created explicitly by the application or implicitly by calling setRemoteDescription with an offer that adds newm="m=" sections.</t> </section> <sectiontitle="RtpSenders" anchor="sec.rtpsenders"> <t>RtpSendersanchor="sec.rtpsenders" numbered="true" toc="include" removeInRFC="false" pn="section-3.4.2"> <name slugifiedName="name-rtpsenders">RtpSenders</name> <t indent="0" pn="section-3.4.2-1">RtpSenders allow the application to control how RTP media is sent. An RtpSender is conceptually responsible for the outgoing RTP stream(s) described by anm="m=" section. This includes encoding the attached MediaStreamTrack, sending RTP media packets, and generating/processingRTCPthe RTP Control Protocol (RTCP) for the outgoing RTP streams(s).</t> </section> <sectiontitle="RtpReceivers" anchor="sec.rtpreceivers"> <t>RtpReceiversanchor="sec.rtpreceivers" numbered="true" toc="include" removeInRFC="false" pn="section-3.4.3"> <name slugifiedName="name-rtpreceivers">RtpReceivers</name> <t indent="0" pn="section-3.4.3-1">RtpReceivers allow the application to inspect how RTP media is received. An RtpReceiver is conceptually responsible for the incoming RTP stream(s) described by anm="m=" section. This includes processing received RTP media packets, decoding the incoming stream(s) to produce a remote MediaStreamTrack, and generating/processing RTCP for the incoming RTP stream(s).</t> </section> </section> <sectiontitle="ICE" anchor="sec.ice"> <section title="ICEanchor="sec.ice" numbered="true" toc="include" removeInRFC="false" pn="section-3.5"> <name slugifiedName="name-ice">ICE</name> <section anchor="sec.ice-gather-overview" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.1"> <name slugifiedName="name-ice-gathering-overview">ICE GatheringOverview" anchor="sec.ice-gather-overview"> <t>JSEPOverview</name> <t indent="0" pn="section-3.5.1-1">JSEP gathers ICE candidates as needed by the application. Collection of ICE candidates is referred to as a gathering phase, and this is triggered either by the addition of a new or recycledm="m=" section to the local sessiondescription,description or by new ICE credentials in the description, indicating an ICE restart. Use of new ICE credentials can be triggered explicitly by theapplication,application or implicitly by the JSEP implementation in response to changes in the ICE configuration.</t><t>When<t indent="0" pn="section-3.5.1-2">When the ICE configuration changes in a way that requires a new gathering phase, a 'needs-ice-restart' bit is set. When this bit is set, calls to the createOffer API will generate new ICE credentials. This bit is cleared by a call to the setLocalDescription API with new ICE credentials from either an offer or an answer, i.e., from either alocal-locally orremote-initiatedremotely initiated ICE restart.</t><t>When<t indent="0" pn="section-3.5.1-3">When a new gathering phase starts, the ICE agent will notify the application that gathering is occurring throughana state change event. Then, when each new ICE candidate becomes available, the ICE agent will supply it to the application via anadditionalonicecandidate event; these candidates will also automatically be added to the current and/or pending local session description. Finally, when all candidates have been gathered,ana final onicecandidate event will be dispatched to signal that the gathering process is complete.</t><t>Note<t indent="0" pn="section-3.5.1-4">Note that gathering phases only gather the candidates needed by new/recycled/restartingm="m=" sections; otherm="m=" sections continue to use their existing candidates. Also, if anm="m=" section is bundled (either by a successful bundle negotiation or by being marked as bundle-only), then candidates will be gathered and exchanged for thatm="m=" section if and only if its MID item is a BUNDLE-tag, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />.</t>target="RFC8843" format="default" sectionFormat="of" derivedContent="RFC8843"/>.</t> </section> <sectiontitle="ICEanchor="sec.ice-candidate-trickling" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.2"> <name slugifiedName="name-ice-candidate-trickling">ICE CandidateTrickling" anchor="sec.ice-candidate-trickling"> <t>CandidateTrickling</name> <t indent="0" pn="section-3.5.2-1">Candidate trickling is a technique through which a caller may incrementally provide candidates to the callee after the initial offer has been dispatched; the semantics of "Trickle ICE" are defined in <xreftarget="I-D.ietf-ice-trickle"></xref>.target="RFC8838" format="default" sectionFormat="of" derivedContent="RFC8838"/>. This process allows the callee to begin acting upon the call and setting up the ICE (and perhaps DTLS) connections immediately, without having to wait for the caller to gather all possible candidates. This results in faster media setup in cases where gathering is not performed prior to initiating the call.</t><t>JSEP<t indent="0" pn="section-3.5.2-2">JSEP supports optional candidate trickling by providing APIs, as described above, that provide control and feedback on the ICE candidate gathering process. Applications that support candidate trickling can send the initial offer immediately and send individual candidates when they getthenotified of a new candidate; applications that do not support this feature can simply wait for the indication that gathering is complete, and then create and send their offer, with all the candidates, atthisthat time.</t><t>Upon<t indent="0" pn="section-3.5.2-3">Upon receipt of trickled candidates, the receiving application will supply them to its ICE agent. This triggers the ICE agent to start using the new remote candidates for connectivity checks.</t> <sectiontitle="ICEanchor="sec.ice-candidate-format" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.2.1"> <name slugifiedName="name-ice-candidate-format">ICE CandidateFormat" anchor="sec.ice-candidate-format"> <t>InFormat</name> <t indent="0" pn="section-3.5.2.1-1">In JSEP, ICE candidates are abstracted by an IceCandidate object, and as with session descriptions, SDP syntax is used for the internal representation.</t><t>The<t indent="0" pn="section-3.5.2.1-2">The candidate details are specified in an IceCandidate field, using the same SDP syntax as the "candidate-attribute" field defined in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.1.target="RFC8839" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.1" derivedContent="RFC8839"/>. Note that this field does not contain an "a=" prefix, as indicated in the following example:</t><figure> <artwork> <![CDATA[<sourcecode name="" type="sdp" markers="false" pn="section-3.5.2.1-3"> candidate:1 1 UDP 1694498815 192.0.2.33 10000 typhost ]]> </artwork> </figure> <t>Thehost</sourcecode> <t indent="0" pn="section-3.5.2.1-4">The IceCandidate object contains a field to indicate which ICEufragusername fragment (ufrag) it is associated with, as defined in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4.target="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>. This value is used to determine which session description (and thereby which gathering phase) this IceCandidate belongs to, which helps resolve ambiguities during ICE restarts. If this field is absent in a received IceCandidate (perhaps when communicating with a non-JSEP endpoint), the most recently received session description is assumed.</t><t>The<t indent="0" pn="section-3.5.2.1-5">The IceCandidate object also contains fields to indicate whichm="m=" section it is associated with, which can be identified in one of twoways,ways: either bya m=an "m=" sectionindex,index or by a MID. Them="m=" section index is a zero-based index, with index N referring to the N+1thm="m=" section in the session description referenced by this IceCandidate. The MID is a "media stream identification" value, as defined in <xreftarget="RFC5888"></xref>, Section 4,target="RFC5888" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-4" derivedContent="RFC5888"/>, which provides a more robust way to identify them="m=" section in the session description, using the MID of the associated RtpTransceiver object (which may have been locally generated by the answerer when interacting with a non-JSEP endpoint that does not support the MID attribute, as discussed in <xref target="sec.applying-a-remote-desc"/>format="default" sectionFormat="of" derivedContent="Section 5.10"/> below). If the MID field is present in a received IceCandidate, itMUST<bcp14>MUST</bcp14> be used for identification; otherwise, them="m=" section index is used instead.</t><t>When creating an IceCandidate object, JSEP implementations MUST populate each of the candidate, ufrag, m= section index, and MID fields. Implementations MUST also<t indent="0" pn="section-3.5.2.1-6">Implementations <bcp14>MUST</bcp14> be prepared to receive objects with some fields missing, as mentioned above.</t> </section> </section> <sectiontitle="ICEanchor="sec.ice-candidate-policy" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.3"> <name slugifiedName="name-ice-candidate-policy">ICE CandidatePolicy" anchor="sec.ice-candidate-policy"> <t>Typically,Policy</name> <t indent="0" pn="section-3.5.3-1">Typically, when gathering ICE candidates, the JSEP implementation will gather all possible forms of initial candidates--- host,server reflexive,server-reflexive, and relay. However, in certain cases, applications may want to have more specific control over the gathering process, due to privacy or related concerns. For example, one may want to only use relay candidates, to leak as little location information as possible (keeping in mind that this choice comes with corresponding operational costs). To accomplish this, JSEP allows the application to restrict which ICE candidates are used in a session. Note that this filtering is applied on top of any restrictions the implementation chooses to enforce regarding which IP addresses are permitted for the application, as discussed in <xreftarget="I-D.ietf-rtcweb-ip-handling" />.</t> <t>Theretarget="RFC8828" format="default" sectionFormat="of" derivedContent="RFC8828"/>.</t> <t indent="0" pn="section-3.5.3-2">There may also be cases where the application wants to change which types of candidates are used while the session is active. A prime example is where a callee may initially want to use only relay candidates, to avoid leaking location information to an arbitrary caller, but then change to use all candidates (for lower operational cost) once the user has indicated that they want to take the call. For this scenario, the JSEP implementationMUST<bcp14>MUST</bcp14> allow the candidate policy to be changed in mid-session, subject to the aforementioned interactions with local policy.</t><t>To<t indent="0" pn="section-3.5.3-3">To administer the ICE candidate policy, the JSEP implementation will determine the current setting at the start of each gathering phase. Then, during the gathering phase, the implementationMUST NOT<bcp14>MUST NOT</bcp14> expose candidates disallowed by the current policy to the application, use them as the source of connectivity checks, or indirectly expose them via other fields, such as the raddr/rport attributes for other ICE candidates. Later, if a different policy is specified by the application, the application can apply it by kicking off a new gathering phase via an ICE restart.</t> </section> <sectiontitle="ICEanchor="sec.ice-candidate-pool" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.4"> <name slugifiedName="name-ice-candidate-pool">ICE CandidatePool" anchor="sec.ice-candidate-pool"> <t>JSEPPool</name> <t indent="0" pn="section-3.5.4-1">JSEP applications typically inform the JSEP implementation to begin ICE gathering via the information supplied to setLocalDescription, as the local description indicates the number of ICE componentswhichthat will be needed and for which candidates must be gathered. However, to accelerate cases where the application knows the number of ICE components to use ahead of time, it may ask the implementation to gather a pool of potential ICE candidates to help ensure rapid media setup.</t><t>When<t indent="0" pn="section-3.5.4-2">When setLocalDescription is eventuallycalled,called and the JSEP implementationgoesprepares to gather the needed ICE candidates, itSHOULD<bcp14>SHOULD</bcp14> start by checking if any candidates are available in the pool. If there are candidates in the pool, theySHOULD<bcp14>SHOULD</bcp14> be handed to the application immediately via the ICE candidate event. If the pool becomes depleted, either because a larger-than-expected number of ICE componentsis used,are used or because the pool has not had enough time to gather candidates, the remaining candidates are gathered as usual. This only occurs for the first offer/answer exchange, after which the candidate pool is emptied and no longer used.</t><t>One<t indent="0" pn="section-3.5.4-3">One example of where this concept is useful is an application that expects an incoming call at some point in the future, and wants to minimize the time it takes to establish connectivity, to avoid clipping of initial media. By pre-gathering candidates into the pool, it can exchange and start sending connectivity checks from these candidates almost immediately upon receipt of a call.Note thoughNote, though, that by holding on to these pre-gathered candidates, which will be kept alive as long as they may be needed, the application will consume resources on the STUN/TURN servers it isusing.</t> </section> <section title="ICE Versions"> <t>Whileusing. ("STUN" stands for "Session Traversal Utilities for NAT".)</t> </section> <section numbered="true" toc="include" removeInRFC="false" pn="section-3.5.5"> <name slugifiedName="name-ice-versions">ICE Versions</name> <t indent="0" pn="section-3.5.5-1">While this specification formally relies on <xreftarget="RFC8445"></xref>,target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>, at the time of its publication, the majority of WebRTC implementations support the version of ICE described in <xreftarget="RFC5245"></xref>.target="RFC5245" format="default" sectionFormat="of" derivedContent="RFC5245"/>. Theuse of the"ice2" attribute defined in <xreftarget="RFC8445"></xref>target="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/> can be used to detect the version in use by a remote endpoint and to provide a smooth transition from the older specification to the newer one. ImplementationsMUST<bcp14>MUST</bcp14> be able to accept remote descriptions that do not have the "ice2" attribute.</t> </section> </section> <section anchor="sec.imageattr"title="Videonumbered="true" toc="include" removeInRFC="false" pn="section-3.6"> <name slugifiedName="name-video-size-negotiation">Video SizeNegotiation"> <t>VideoNegotiation</name> <t indent="0" pn="section-3.6-1">Video size negotiation is the process through which a receiver can use the "a=imageattr" SDP attribute <xref target="RFC6236"/>format="default" sectionFormat="of" derivedContent="RFC6236"/> to indicate what video frame sizes it is capable of receiving. A receiver may have hard limits on what its video decoder can process, or it may have some maximum set by policy. By specifying these limits in an "a=imageattr" attribute, JSEP endpoints can attempt to ensure that the remote sender transmits video at an acceptable resolution. However, when communicating with a non-JSEP endpoint that does not understand this attribute, any signaled limits may be exceeded, and the JSEP implementationMUST<bcp14>MUST</bcp14> handle this gracefully, e.g., by discarding the video.</t><t>Note<t indent="0" pn="section-3.6-2">Note that certain codecs support transmission of samples with aspect ratios other than 1.0 (i.e., non-square pixels). JSEP implementations will not transmit non-squarepixels,pixels butSHOULD<bcp14>SHOULD</bcp14> receive and render such video with the correct aspect ratio. However, sample aspect ratio has no impact on the size negotiation described below; all dimensions are measured in pixels, whether square or not.</t> <section anchor="sec.creating-imageattr"title="Creatingnumbered="true" toc="include" removeInRFC="false" pn="section-3.6.1"> <name slugifiedName="name-creating-an-imageattr-attri">Creating an imageattrAttribute"> <t>TheAttribute</name> <t indent="0" pn="section-3.6.1-1">The receiver will firstintersectcombine any known local limits (e.g., hardware decodercapababilities,capabilities or local policy) to determine the absolute minimum and maximum sizes it can receive. If there are no known local limits, the "a=imageattr" attributeSHOULD<bcp14>SHOULD</bcp14> be omitted. If these local limits preclude receiving any video, i.e., the degenerate case of no permitted resolutions, the "a=imageattr" attributeMUST<bcp14>MUST</bcp14> be omitted, and them="m=" sectionMUST<bcp14>MUST</bcp14> be marked as sendonly/inactive, as appropriate.</t><t>Otherwise,<t indent="0" pn="section-3.6.1-2">Otherwise, an "a=imageattr" attribute is created with a "recv" direction, and the resulting resolution space formed from the aforementioned intersection is used to specify its minimum and maximumx="x=" andy="y=" values.</t><t>The<t indent="0" pn="section-3.6.1-3">The rules here express a single set of preferences, and therefore, the "a=imageattr"q="q=" value is not important. ItSHOULD<bcp14>SHOULD</bcp14> be set to1.0.</t> <t>The"1.0".</t> <t indent="0" pn="section-3.6.1-4">The "a=imageattr" field is payload type specific. When all video codecs supported have the same capabilities, use of a single attribute, with the wildcard payload type (*), isRECOMMENDED.<bcp14>RECOMMENDED</bcp14>. However, when the supported video codecs have different limitations, specific "a=imageattr" attributesMUST<bcp14>MUST</bcp14> be inserted for each payload type.</t><t>As<t indent="0" pn="section-3.6.1-5">As an example, consider a system with a multiformat video decoder, which is capable of decoding any resolution from 48x48 to720p,720p. In this case, the implementation would generate this attribute:</t><t>a=imageattr:*<sourcecode type="sdp" markers="false" pn="section-3.6.1-6"> a=imageattr:* recv[x=[48:1280],y=[48:720],q=1.0]</t> <t>This[x=[48:1280],y=[48:720],q=1.0] </sourcecode> <t indent="0" pn="section-3.6.1-7">This declaration indicates that the receiver is capable of decoding any image resolution from 48x48 up to 1280x720 pixels.</t> </section> <section anchor="sec.interpreting-imageattr"title="Interpretingnumbered="true" toc="include" removeInRFC="false" pn="section-3.6.2"> <name slugifiedName="name-interpreting-imageattr-attr">Interpreting imageattrAttributes"> <t>Attributes</name> <t indent="0" pn="section-3.6.2-1"> <xref target="RFC6236"/>format="default" sectionFormat="of" derivedContent="RFC6236"/> defines "a=imageattr" to be an advisory field. This means that it does not absolutely constrain the video formats that the sender canuse,use but gives an indication of the preferred values.</t><t>This<t indent="0" pn="section-3.6.2-2">This specification prescribes behavior that is morespecific behavior.specific. When a MediaStreamTrack, which is producing video of a certain resolution (the "track resolution"), is attached toaan RtpSender, which is encoding the track video at the same or lower resolution(s) (the "encoder resolutions"), and a remote description is applied that references the sender and contains valid "a=imageattr recv" attributes, itMUST<bcp14>MUST</bcp14> follow the rules below to ensure that the sender does not transmit a resolution that would exceed the size criteria specified in the attributes. These rulesMUST<bcp14>MUST</bcp14> be followed as long as the attributes remain present in the remote description, including cases in which the track changes itsresolution,resolution or is replaced with a different track.</t><t>Depending<t indent="0" pn="section-3.6.2-3">Depending on how the RtpSender is configured, it may be producing a single encoding at a certainresolution,resolution or, if simulcast<xref(<xref target="sec.simulcast"/>format="default" sectionFormat="of" derivedContent="Section 3.7"/>) has been negotiated, multiple encodings, each at their own specific resolution. In addition, depending on the configuration, each encoding may have the flexibility to reduce resolution whenneeded,needed or may be locked to a specific output resolution.</t><t>For<t indent="0" pn="section-3.6.2-4">For each encoding being produced by the RtpSender, the set of "a=imageattr recv" attributes in the correspondingm="m=" section of the remote description is processed to determine what should be transmitted. Only attributes that reference the media format selected for the encoding are considered; each such attribute is evaluated individually, starting with the attribute with the highest "q=" value. If multiple attributes have the same "q=" value, they are evaluated in the order they appear in their containingm="m=" section. Note that while JSEP endpoints will include at most one "a=imageattr recv" attribute per media format, JSEP endpoints may receive session descriptions from non-JSEP endpoints withm="m=" sections that contain multiple such attributes.</t><t>For<t indent="0" pn="section-3.6.2-5">For each "a=imageattr recv" attribute, the following rules are applied. If this processing is successful, the encoding is transmitted accordingly, and no further attributes are considered for that encoding. Otherwise, the next attribute is evaluated, in the aforementioned order. If none of the supplied attributes can be processed successfully, the encodingMUST NOT<bcp14>MUST NOT</bcp14> be transmitted, and an errorSHOULD<bcp14>SHOULD</bcp14> be raised to the application.<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.6.2-6"> <li pn="section-3.6.2-6.1">The limits from the attribute are compared to the encoder resolution. Only the specific limits mentioned below are considered; any other values, such as picture aspect ratio,MUST<bcp14>MUST</bcp14> be ignored. When considering a MediaStreamTrack that is producing rotated video, the unrotated resolutionMUST<bcp14>MUST</bcp14> be used for the checks. This is required regardless of whether the receiver supports performing receive-side rotation (e.g., throughCVOCoordination of Video Orientation (CVO) <xref target="TS26.114"/>),format="default" sectionFormat="of" derivedContent="TS26.114"/>), as it significantly simplifies the matchinglogic.</t> <t>Iflogic.</li> <li pn="section-3.6.2-6.2">If the attribute includes a "sar=" (sample aspect ratio) value set to something other than "1.0", indicating that the receiver wants to receive non-square pixels, this cannot be satisfied and the attributeMUST NOT<bcp14>MUST NOT</bcp14> beused.</t> <t>Ifused.</li> <li pn="section-3.6.2-6.3">If the encoder resolution exceeds the maximum size permitted by theattribute,attribute and the encoder is allowed to adjust its resolution, the encoderSHOULD<bcp14>SHOULD</bcp14> apply downscaling in order to satisfy the limits. DownscalingMUST NOT<bcp14>MUST NOT</bcp14> change the picture aspect ratio of the encoding, ignoring any trivial differences due to rounding. For example, if the encoder resolution is1280x720,1280x720 and the attribute specified a maximum of 640x480, the expected output resolution would be 640x360. If downscaling cannot be applied, the attributeMUST NOT<bcp14>MUST NOT</bcp14> beused.</t> <t>Ifused.</li> <li pn="section-3.6.2-6.4">If the encoder resolution is less than the minimum size permitted by the attribute, the attributeMUST NOT<bcp14>MUST NOT</bcp14> be used; the encoderMUST NOT<bcp14>MUST NOT</bcp14> apply upscaling. JSEP implementationsSHOULD<bcp14>SHOULD</bcp14> avoid this situation by allowing receipt of arbitrarily small resolutions, perhaps via fallback to a softwaredecoder.</t> <t>Ifdecoder.</li> <li pn="section-3.6.2-6.5">If the encoder resolution is within the maximum and minimum sizes, no action isneeded.</t> </list></t>needed.</li> </ul> </section> </section> <sectiontitle="Simulcast" anchor="sec.simulcast"> <t>JSEPanchor="sec.simulcast" numbered="true" toc="include" removeInRFC="false" pn="section-3.7"> <name slugifiedName="name-simulcast">Simulcast</name> <t indent="0" pn="section-3.7-1">JSEP supports simulcast transmission of a MediaStreamTrack, where multiple encodings of the source media can be transmitted within the context of a singlem="m=" section. The current JSEP API is designed to allow applications to send simulcasted media but only to receive a single encoding. This allows for multi-user scenarios where each sending client sends multiple encodings to a server, which then, for each receiving client, chooses the appropriate encoding to forward.</t><t>Applications<t indent="0" pn="section-3.7-2">Applications request support for simulcast by configuring multiple encodings on an RtpSender. Upon generation of an offer or answer, these encodings are indicated via SDP markings on the correspondingm="m=" section, as described below. Receivers that understand simulcast and are willing to receive it will also include SDP markings to indicate their support, and JSEP endpoints will use these markings to determine whether simulcast is permitted for a given RtpSender. If simulcast support is not negotiated, the RtpSender will only use the first configured encoding.</t><t>Note<t indent="0" pn="section-3.7-3">Note that the exact simulcast parameters are up to the sending application. While the aforementioned SDP markings are provided to ensure that the remote side can receive and demux multiple simulcast encodings, the specific resolutions and bitrates to be used for each encoding are purely a send-side decision in JSEP.</t><t>JSEP<t indent="0" pn="section-3.7-4">JSEP currently does not provide a mechanism to configure receipt of simulcast. This means that if simulcast is offered by the remote endpoint, the answer generated by a JSEP endpoint will not indicate support for receipt of simulcast, and as such the remote endpoint will only send a single encoding perm="m=" section.</t><t>In<t indent="0" pn="section-3.7-5">In addition, JSEP does not provide a mechanism to handle an incoming offer requesting simulcast from the JSEP endpoint. This means that setting up simulcast in the case where the JSEP endpoint receives the initial offer requires out-of-band signaling or SDP inspection. However, in the case where the JSEP endpoint sets up simulcast in itsininitial offer, any established simulcast streams will continue to work upon receipt of an incoming re-offer. Future versions of this specification may add additional APIs to handle the incoming initial offer scenario.</t><t>When<t indent="0" pn="section-3.7-6">When using JSEP to transmit multiple encodings fromaan RtpSender, the techniques from <xreftarget="I-D.ietf-mmusic-sdp-simulcast" />target="RFC8853" format="default" sectionFormat="of" derivedContent="RFC8853"/> and <xreftarget="I-D.ietf-mmusic-rid" />target="RFC8851" format="default" sectionFormat="of" derivedContent="RFC8851"/> are used. Specifically, when multiple encodings have been configured foraan RtpSender, them="m=" section for the RtpSender will include an "a=simulcast" attribute, as defined in <xreftarget="I-D.ietf-mmusic-sdp-simulcast" />, Section 6.2,target="RFC8853" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8853#section-5.1" derivedContent="RFC8853"/>, with a "send" simulcast stream description that lists each desired encoding, and no "recv" simulcast stream description. Them="m=" section will also include an "a=rid" attribute for each encoding, as specified in <xreftarget="I-D.ietf-mmusic-rid" />, Section 4;target="RFC8851" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8851#section-4" derivedContent="RFC8851"/>; the use ofRID identifiersRestriction Identifiers (RIDs, also called rid-ids or RtpStreamIds) allows the individual encodings to be disambiguated even though they are all part of the samem="m=" section.</t> </section> <sectiontitle="Interactions With Forking" anchor="sec.interactions-with-forking"> <t>Someanchor="sec.interactions-with-forking" numbered="true" toc="include" removeInRFC="false" pn="section-3.8"> <name slugifiedName="name-interactions-with-forking">Interactions with Forking</name> <t indent="0" pn="section-3.8-1">Some call signaling systems allow various types of forking where an SDP Offer may be provided to more than one device. For example, SIP <xreftarget="RFC3261"></xref>target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/> defines both a"Parallel Search""parallel search" and"Sequential Search"."sequential search". Although these are primarilysignaling levelsignaling-level issues that are outside the scope of JSEP, they do have some impact on the configuration of the media plane that is relevant. When forking happens at the signaling layer, the JavaScript application responsible for the signaling needs to make the decisions about what media should be sent or received at any pointofin time, as well as which remote endpoint it should communicate with; JSEP is used to make sure the media engine can make the RTP and media perform as required by the application. The basic operations that the applications can have the media engine doare: <list style="symbols"> <t>Startare as follows: </t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.8-2"> <li pn="section-3.8-2.1">Start exchanging media with a given remote peer, but keep all the resources reserved in theoffer.</t> <t>Startoffer.</li> <li pn="section-3.8-2.2">Start exchanging media with a given remote peer, and free any resources in the offer that are not beingused.</t> </list></t>used.</li> </ul> <sectiontitle="Sequential Forking" anchor="sec.sequential-forking"> <t>Sequentialanchor="sec.sequential-forking" numbered="true" toc="include" removeInRFC="false" pn="section-3.8.1"> <name slugifiedName="name-sequential-forking">Sequential Forking</name> <t indent="0" pn="section-3.8.1-1">Sequential forking involves a call being dispatched to multiple remote callees, where each callee can accept the call, but only one active session ever exists at a time; no mixing of received media is performed.</t><t>JSEP<t indent="0" pn="section-3.8.1-2">JSEP handles sequential forking well, allowing the application to easily control the policy for selecting the desired remote endpoint. When an answer arrives from one of the callees, the application can choose to apply iteitherasaeither (1) a provisional answer, leaving open the possibility of using a different answer in thefuture,future orapply it as a(2) a final answer, ending the setup flow.</t><t>In<t indent="0" pn="section-3.8.1-3">In a "first-one-wins" situation, the first answer will be applied as a final answer, and the application will reject any subsequent answers. In SIP parlance, this would be ACK + BYE.</t><t>In<t indent="0" pn="section-3.8.1-4">In a "last-one-wins" situation, all answers would be applied as provisional answers, and any previous call leg will be terminated. At some point, the application will end the setup process, perhaps with a timer; at this point, the application could reapply the pending remote description as a final answer.</t> </section> <sectiontitle="Parallel Forking" anchor="sec.parallel-forking"> <t>Parallelanchor="sec.parallel-forking" numbered="true" toc="include" removeInRFC="false" pn="section-3.8.2"> <name slugifiedName="name-parallel-forking">Parallel Forking</name> <t indent="0" pn="section-3.8.2-1">Parallel forking involves a call being dispatched to multiple remote callees, where each callee can accept thecall,call and multiple simultaneous active signaling sessions can be established as a result. If multiple callees send media at the same time, the possibilities for handling this are described in <xreftarget="RFC3960"></xref>, Section 3.1.target="RFC3960" sectionFormat="comma" section="3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3960#section-3.1" derivedContent="RFC3960"/>. Most SIP devices today only support exchanging media with a single device at atime,time and do not try to mix multiple early media audio sources, as that could result in a confusing situation. For example, consider having a European ringback tone mixed together with the North American ringback tone--- the resulting sound would not be like eithertone,tone and would confuse the user. If the signaling application wishes to only exchange media with one of the remote endpoints at a time, then from a media engine point of view, this is exactly like the sequential forking case.</t><t>In<t indent="0" pn="section-3.8.2-2">In the parallel forking case where the JavaScript application wishes to simultaneously exchange media with multiple peers, the flow is slightly more complex, but the JavaScript application can follow the strategy that <xreftarget="RFC3960"></xref> describestarget="RFC3960" format="default" sectionFormat="of" derivedContent="RFC3960"/> describes, using UPDATE. The UPDATE approach allows the signaling to set up a separate media flow for each peer that it wishes to exchange media with. In JSEP, this offer used in the UPDATE would be formed by simply creating a new PeerConnection (see <xref target="sec.peerconnection"/>)format="default" sectionFormat="of" derivedContent="Section 4.1"/>) and making sure that the same local media streams have been added into this new PeerConnection. Then the new PeerConnection object would produceaan SDP offer that could be used by the signaling to perform the UPDATE strategy discussed in <xreftarget="RFC3960"></xref>.</t> <t>Astarget="RFC3960" format="default" sectionFormat="of" derivedContent="RFC3960"/>.</t> <t indent="0" pn="section-3.8.2-3">As a result of sharing the media streams, the application will end up with N parallel PeerConnection sessions, each with a local and remote description and their own local and remote addresses. The media flow from these sessions can be managed using setDirection (see <xref target="sec.transceiver-set-direction"/>),format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>), or the application can choose to play out the media from all sessions mixed together. Of course, if the application wants to only keep a single session, it can simply terminate the sessions that it no longer needs.</t> </section> </section> </section> <sectiontitle="Interface" anchor="sec.interface"> <t>Thisanchor="sec.interface" numbered="true" toc="include" removeInRFC="false" pn="section-4"> <name slugifiedName="name-interface">Interface</name> <t indent="0" pn="section-4-1">This section details the basic operations that must be present to implement JSEP functionality. The actual API exposed in the W3C API may have somewhat differentsyntax,syntax but should map easily to theseconcepts.</t> <section title="PeerConnection" anchor="sec.peerconnection">concepts. </t> <sectiontitle="Constructor" anchor="sec.pc-constructor"> <t>Theanchor="sec.peerconnection" numbered="true" toc="include" removeInRFC="false" pn="section-4.1"> <name slugifiedName="name-peerconnection">PeerConnection</name> <section anchor="sec.pc-constructor" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.1"> <name slugifiedName="name-constructor">Constructor</name> <t indent="0" pn="section-4.1.1-1">The PeerConnection constructor allows the application to specify global parameters for the media session, such as the STUN/TURN servers and credentials to use when gathering candidates, as well as the initial ICE candidate policy and pool size, and also the bundle policy to use.</t><t>If<t indent="0" pn="section-4.1.1-2">If an ICE candidate policy is specified, it functions as described in <xref target="sec.ice-candidate-policy"/>,format="default" sectionFormat="of" derivedContent="Section 3.5.3"/>, causing the JSEP implementation to only surface the permitted candidates (including any implementation-internal filtering) to theapplication,application and only use those candidates for connectivity checks. The set of available policies is as follows:<list style="hanging"> <t hangText="all:">All</t> <dl newline="false" spacing="normal" indent="3" pn="section-4.1.1-3"> <dt pn="section-4.1.1-3.1">all:</dt> <dd pn="section-4.1.1-3.2">All candidates permitted by implementation policy will be gathered andused.</t> <t></t> <t hangText="relay:">Allused.</dd> <dt pn="section-4.1.1-3.3">relay:</dt> <dd pn="section-4.1.1-3.4">All candidates except relay candidates will be filtered out. This obfuscates the location information that might be ascertained by the remote peer from the received candidates. Depending on how the application deploys and chooses relay servers, this could obfuscate location to a metro or possibly even globallevel.</t> </list></t> <t>Thelevel.</dd> </dl> <t indent="0" pn="section-4.1.1-4">The default ICE candidate policyMUST<bcp14>MUST</bcp14> be set to"all""all", as this is generally the desiredpolicy,policy and also typically reduces the use of application TURN server resources significantly.</t><t>If<t indent="0" pn="section-4.1.1-5">If a size is specified for the ICE candidate pool, this indicates the number of ICE components to pre-gather candidates for. Becausepre-gatheringpre‑gathering results in utilizing STUN/TURN server resources for potentially long periods of time, thismust<bcp14>MUST</bcp14> only occur upon application request, and therefore the default candidate pool sizeMUST<bcp14>MUST</bcp14> be zero.</t><t>The<t indent="0" pn="section-4.1.1-6">The application can specify its preferred policy regarding use of bundle, the multiplexing mechanism defined in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation">target="RFC8843" format="default" sectionFormat="of" derivedContent="RFC8843"> </xref>. Regardless of policy, the application will always try to negotiate bundle onto a singletransport,transport and will offer a single bundle group across allm="m=" sections; use of this single transport is contingent upon the answerer accepting bundle. However, by specifying a policy from the list below, the application can control exactly how aggressively it will try to bundle media streams together, which affects how it will interoperate with a non-bundle-aware endpoint. When negotiating with a non-bundle-aware endpoint, only the streams not marked as bundle-only streams will be established.</t><t>The<t indent="0" pn="section-4.1.1-7">The set of available policies is as follows:<list style="hanging"> <t hangText="balanced:">The</t> <dl newline="false" spacing="normal" indent="3" pn="section-4.1.1-8"> <dt pn="section-4.1.1-8.1">balanced:</dt> <dd pn="section-4.1.1-8.2">The firstm="m=" section of each type (audio, video, or application) will contain transport parameters, which will allow an answerer to unbundle that section. The second and any subsequentm= section"m=" sections of each type will be marked bundle-only. The result is that if there are N distinct media types, then candidates will be gathered forforN media streams. This policy balances desire to multiplex with the need to ensure that basic audio and video can still be negotiated in legacy cases. When acting as answerer, if there is no bundle group in the offer, the implementation will reject all but the firstm="m=" section of eachtype.</t> <t></t> <t hangText="max-compat:">All m=type.</dd> <dt pn="section-4.1.1-8.3">max-compat:</dt> <dd pn="section-4.1.1-8.4">All "m=" sections will contain transport parameters; none will be marked as bundle-only. This policy will allow all streams to be received by non-bundle-awareendpoints,endpoints but will require separate candidates to be gathered for each mediastream.</t> <t></t> <t hangText="max-bundle:">Onlystream.</dd> <dt pn="section-4.1.1-8.5">max-bundle:</dt> <dd pn="section-4.1.1-8.6">Only the firstm="m=" section will contain transport parameters; all streams other than the first will be marked as bundle-only. This policy aims to minimize candidate gathering and maximize multiplexing, at the cost of less compatibility with legacy endpoints. When acting as answerer, the implementation will reject anym="m=" sections other than the firstm="m=" section, unless they are in the same bundle group as thatm= section.</t> </list></t> <t>As"m=" section.</dd> </dl> <t indent="0" pn="section-4.1.1-9">As it provides the besttradeofftrade-off between performance and compatibility with legacy endpoints, the default bundle policyMUST<bcp14>MUST</bcp14> be set to "balanced".</t><t>The<t indent="0" pn="section-4.1.1-10">The application can specify its preferred policy regarding use of RTP/RTCP multiplexing <xreftarget="RFC5761"></xref>target="RFC5761" format="default" sectionFormat="of" derivedContent="RFC5761"/> using one of the following policies:<list style="hanging"> <t hangText="negotiate:">The</t> <dl newline="false" spacing="normal" indent="3" pn="section-4.1.1-11"> <dt pn="section-4.1.1-11.1">negotiate:</dt> <dd pn="section-4.1.1-11.2">The JSEP implementation will gather both RTP and RTCP candidates but also will offer "a=rtcp-mux", thus allowing for compatibility with either multiplexing or non-multiplexingendpoints.</t> <t hangText="require:">Theendpoints.</dd> <dt pn="section-4.1.1-11.3">require:</dt> <dd pn="section-4.1.1-11.4">The JSEP implementation will only gather RTP candidates and will insert an "a=rtcp-mux-only" indication into any newm="m=" sections in offers it generates. This halves the number of candidates that the offerer needs to gather. Applying a description with anm="m=" section that does not contain an "a=rtcp-mux" attribute will cause an error to bereturned.</t> </list></t> <t>Thereturned.</dd> </dl> <t indent="0" pn="section-4.1.1-12">The default multiplexing policyMUST<bcp14>MUST</bcp14> be set to "require". ImplementationsMAY<bcp14>MAY</bcp14> choose to reject attempts by the application to set the multiplexing policy to "negotiate".</t> </section> <sectiontitle="addTrack" anchor="sec.addTrack"> <t>Theanchor="sec.addTrack" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.2"> <name slugifiedName="name-addtrack">addTrack</name> <t indent="0" pn="section-4.1.2-1">The addTrack method adds a MediaStreamTrack to the PeerConnection, using the MediaStream argument to associate the track with other tracks in the same MediaStream, so that they can be added to the same "LS" (Lip Synchronization) group when creating an offer or answer. Adding tracks to the same "LS" group indicates that the playback of these tracks should be synchronized for proper lip sync, as described in <xreftarget="RFC5888"></xref>, Section 7. addTracktarget="RFC5888" sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-7" derivedContent="RFC5888"/>. addTrack attempts to minimize the number of transceivers as follows:Ifif the PeerConnection is in the"have-remote-offer""have‑remote-offer" state, the track will be attached to the first compatible transceiver that was created by the most recent call tosetRemoteDescription()setRemoteDescription and does not have a local track. Otherwise, a new transceiver will be created, as described in <xref target="sec.addTransceiver"/>.</t>format="default" sectionFormat="of" derivedContent="Section 4.1.4"/>.</t> </section> <sectiontitle="removeTrack" anchor="sec.removeTrack"> <t>Theanchor="sec.removeTrack" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.3"> <name slugifiedName="name-removetrack">removeTrack</name> <t indent="0" pn="section-4.1.3-1">The removeTrack method removes a MediaStreamTrack from the PeerConnection, using the RtpSender argument to indicate which sender should have its track removed. The sender's track is cleared, and the sender stops sending. Future calls to createOffer will mark them="m=" section associated with the sender as recvonly (if transceiver.direction is sendrecv) or as inactive (if transceiver.direction is sendonly).</t> </section> <sectiontitle="addTransceiver" anchor="sec.addTransceiver"> <t>Theanchor="sec.addTransceiver" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.4"> <name slugifiedName="name-addtransceiver">addTransceiver</name> <t indent="0" pn="section-4.1.4-1">The addTransceiver method adds a new RtpTransceiver to the PeerConnection. If a MediaStreamTrack argument is provided, then the transceiver will be configured with that media type and the track will be attached to the transceiver. Otherwise, the applicationMUST<bcp14>MUST</bcp14> explicitly specify the type; this mode is useful for creating recvonly transceivers as well as for creating transceivers to which a track can be attached at some later point.</t><t>At<t indent="0" pn="section-4.1.4-2">At the time of creation, the application can also specify a transceiver direction attribute, a set of MediaStreamswhichthat the transceiver is associated with (allowingLS"LS" group assignments), and a set of encodings for the media (used for simulcast as described in <xref target="sec.simulcast"/>).</t>format="default" sectionFormat="of" derivedContent="Section 3.7"/>).</t> </section> <section anchor="sec.onaddtrack" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.5"> <name slugifiedName="name-onaddtrack-event">onaddtrack Event</name> <t indent="0" pn="section-4.1.5-1">The onaddtrack event is dispatched to the application when a new remote track has been signaled as a result of a setRemoteDescription call. The new track is supplied as a MediaStreamTrack object in the event, along with the MediaStream(s) the track is part of. </t> </section> <sectiontitle="createDataChannel" anchor="sec.createDataChannel"> <t>Theanchor="sec.createDataChannel" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.6"> <name slugifiedName="name-createdatachannel">createDataChannel</name> <t indent="0" pn="section-4.1.6-1">The createDataChannel method creates a new data channel and attaches it to the PeerConnection. If no data channel currently exists for this PeerConnection, then a new offer/answer exchange is required. All data channels on a given PeerConnection share the same SCTP/DTLS association ("SCTP" stands for "Stream Control Transmission Protocol") and therefore the samem="m=" section, so subsequent creation of data channels does not have any impact on the JSEP state.</t><t>The<t indent="0" pn="section-4.1.6-2">The createDataChannel method also includes a number of argumentswhichthat are used by the PeerConnection (e.g., maxPacketLifetime) but are not reflected in the SDP and do not affect the JSEP state.</t> </section> <sectiontitle="createOffer" anchor="sec.createoffer"> <t>Theanchor="sec.ondatachannel" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.7"> <name slugifiedName="name-ondatachannel-event">ondatachannel Event</name> <t indent="0" pn="section-4.1.7-1">The ondatachannel event is dispatched to the application when a new data channel has been negotiated by the remote side, which can occur at any time after the underlying SCTP/DTLS association has been established. The new data channel object is supplied in the event. </t> </section> <section anchor="sec.createoffer" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.8"> <name slugifiedName="name-createoffer">createOffer</name> <t indent="0" pn="section-4.1.8-1">The createOffer method generates a blob of SDP that containsa <xref target="RFC3264"></xref>an offer per <xref target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/> with the supported configurations for the session, including descriptions of the media added to this PeerConnection, thecodec/RTP/RTCPcodec, RTP, and RTCP options supported by this implementation, and any candidates that have been gathered by the ICE agent. An options parameter may be supplied to provide additional control over the generated offer. This options parameter allows an application to trigger an ICE restart, for the purpose of reestablishing connectivity.</t><t>In<t indent="0" pn="section-4.1.8-2">In the initial offer, the generated SDP will contain all desired functionality for the session (functionality that is supported but not desired by default may be omitted); for each SDP line, the generation of the SDP will follow the process defined for generating an initial offer from thedocumentspecification thatspecifiesdefines the given SDP line. The exact handling of initial offer generation is detailed in <xref target="sec.initial-offers"/>format="default" sectionFormat="of" derivedContent="Section 5.2.1"/> below.</t><t>In<t indent="0" pn="section-4.1.8-3">In the event createOffer is called after the session is established, createOffer will generate an offer to modify the current session based on any changes that have been made to the session, e.g., adding or stopping RtpTransceivers, or requesting an ICE restart. For each existing stream, the generation of each SDP linemust<bcp14>MUST</bcp14> follow the process defined for generating an updated offer from the RFC that specifies the given SDP line. For each new stream, the generation of the SDPmust<bcp14>MUST</bcp14> follow the process of generating an initial offer, as mentioned above. If no changes have been made, or for SDP lines that are unaffected by the requested changes, the offer will only contain the parameters negotiated by the lastoffer-answeroffer/answer exchange. The exact handling of subsequent offer generation is detailed in <xref target="sec.subsequent-offers"/>.format="default" sectionFormat="of" derivedContent="Section 5.2.2"/> below.</t><t>Session<t indent="0" pn="section-4.1.8-4">Session descriptions generated by createOffermust<bcp14>MUST</bcp14> be immediately usable by setLocalDescription; if a system has limited resources(e.g.(e.g., a finite number of decoders), createOffershould<bcp14>SHOULD</bcp14> return an offer that reflects the current state of the system, so that setLocalDescription will succeed when it attempts to acquire those resources.</t><t>Calling<t indent="0" pn="section-4.1.8-5">Calling this method may do things such as generating new ICE credentials, but it does not change the PeerConnection state, trigger candidate gathering, or cause media to start or stop flowing. Specifically, the offer is not applied, and does not become the pending local description, until setLocalDescription is called.</t> </section> <sectiontitle="createAnswer" anchor="sec.createanswer"> <t>Theanchor="sec.createanswer" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.9"> <name slugifiedName="name-createanswer">createAnswer</name> <t indent="0" pn="section-4.1.9-1">The createAnswer method generates a blob of SDP that containsa <xref target="RFC3264"></xref>an SDP answer per <xref target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/> with the supported configuration for the session that is compatible with the parameters supplied in the most recent call tosetRemoteDescription, which MUSTsetRemoteDescription; setRemoteDescription <bcp14>MUST</bcp14> have been called prior to calling createAnswer. Like createOffer, the returned blob contains descriptions of the media added to this PeerConnection, the codec/RTP/RTCP options negotiated for this session, and any candidates that have been gathered by the ICE agent. An options parameter may be supplied to provide additional control over the generated answer.</t><t>As<t indent="0" pn="section-4.1.9-2">As an answer, the generated SDP will contain a specific configuration that specifies how the media plane should be established; for each SDP line, the generation of the SDPmust<bcp14>MUST</bcp14> follow the process defined for generating an answer from thedocumentspecification thatspecifiesdefines the given SDP line. The exact handling of answer generation is detailed in <xref target="sec.generating-an-answer"/>.format="default" sectionFormat="of" derivedContent="Section 5.3"/> below.</t><t>Session<t indent="0" pn="section-4.1.9-3">Session descriptions generated by createAnswermust<bcp14>MUST</bcp14> be immediately usable by setLocalDescription; like createOffer, the returned descriptionshould<bcp14>SHOULD</bcp14> reflect the current state of the system.</t><t>Calling<t indent="0" pn="section-4.1.9-4">Calling this method may do things such as generating new ICE credentials, but it does not change the PeerConnection state, trigger candidate gathering, ororcause a media state change. Specifically, the answer is not applied, and does not become the current local description, until setLocalDescription is called.</t> </section> <sectiontitle="SessionDescriptionType" anchor="sec.sessiondescriptiontype"> <t>Sessionanchor="sec.sessiondescriptiontype" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.10"> <name slugifiedName="name-sessiondescriptiontype">SessionDescriptionType</name> <t indent="0" pn="section-4.1.10-1">Session description objects (RTCSessionDescription) may be of type "offer", "pranswer","answer""answer", or "rollback". These types provide information as to how the description parameter should beparsed,parsed and how the media state should be changed.</t><t>"offer"<t indent="0" pn="section-4.1.10-2">"offer" indicates that a descriptionshould<bcp14>MUST</bcp14> be parsed as an offer; said description may include many possible media configurations. A description used as an "offer" may be appliedanytimeany time the PeerConnection is in astable state,"stable" state or applied as an update to a previously supplied but unanswered "offer".</t><t>"pranswer"<t indent="0" pn="section-4.1.10-3">"pranswer" indicates that a descriptionshould<bcp14>MUST</bcp14> be parsed as an answer, but not a final answer, and soshould not<bcp14>MUST NOT</bcp14> result in the freeing of allocated resources. It may result in the start of media transmission, if the answer does not specify an inactive media direction. A description used as a "pranswer" may be applied as a response to an"offer","offer" or as an update to a previously sent "pranswer".</t><t>"answer"<t indent="0" pn="section-4.1.10-4">"answer" indicates that a descriptionshould<bcp14>MUST</bcp14> be parsed as an answer, theoffer-answeroffer/answer exchangeshould<bcp14>MUST</bcp14> be considered complete, and any resources (decoders, candidates) that are no longer neededcan<bcp14>SHOULD</bcp14> be released. A description used as an "answer" may be applied as a response to an"offer","offer" or as an update to a previously sent "pranswer".</t><t>The<t indent="0" pn="section-4.1.10-5">The only difference between a provisional and final answer is that the final answer results in the freeing of any unused resources that were allocated as a result of the offer. As such, the application can use some discretion on whether an answer should be applied as provisional orfinal,final and can change the type of the session description as needed. For example, in a serial forking scenario, an application may receive multiple "final" answers, one from each remote endpoint. The application could choose to accept the initial answers as provisionalanswers,answers and only apply an answer as final when it receives one that meets its criteria(e.g.(e.g., a live user instead of voicemail).</t><t>"rollback"<t indent="0" pn="section-4.1.10-6">"rollback" is a special session description typeimplyingindicating that the state machineshould<bcp14>MUST</bcp14> be rolled back to the previousstable"stable" state, as described in <xref target="sec.rollback"/>.format="default" sectionFormat="of" derivedContent="Section 4.1.10.2"/>. The contentsMUST<bcp14>MUST</bcp14> be empty.</t> <sectiontitle="Useanchor="sec.use-of-provisional-answer" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.10.1"> <name slugifiedName="name-use-of-provisional-answers">Use of ProvisionalAnswers" anchor="sec.use-of-provisional-answer"> <t>MostAnswers</name> <t indent="0" pn="section-4.1.10.1-1">Most applications will not need to create answers using the "pranswer" type. While it is good practice to send an immediate response to an offer, in order to warm up the session transport and prevent media clipping, the preferred handling for a JSEP application is to create and send a "sendonly" final answer with a null MediaStreamTrack immediately after receiving the offer, which will prevent media from being sent by thecaller,caller and allow media to be sent immediately upon answer by the callee. Later, when the callee actually accepts the call, the application can plug in the real MediaStreamTrack and create a new "sendrecv" offer to update the previous offer/answer pair and start bidirectional media flow. While this could also be done with a "sendonly"pranswer,pranswer followed by a "sendrecv" answer, the initial pranswer leaves theoffer-answeroffer/answer exchange open, which means that the caller cannot send an updated offer during thistime.</t> <t>Astime. </t> <t indent="0" pn="section-4.1.10.1-2">As an example, consider a typical JSEP application that wants to set up audio and video as quickly as possible. When the callee receives an offer with audio and video MediaStreamTracks, it will send an immediate answer accepting these tracks as sendonly (meaning that the caller will not send the callee any media yet, and because the callee has not yet added its own MediaStreamTracks, the callee will not send any media either). It will then ask the user to accept the call and acquire the needed local tracks. Upon acceptance by the user, the application will plug in the tracks it has acquired, which, because ICE handshaking and DTLS handshaking have likely completed by this point, can start transmitting immediately. The application will also send a new offer to the remote side indicating call acceptance and moving the audio and video to be two-way media. A detailed example flow along these lines is shown in <xreftarget="sec.warmup-example"></xref>.</t> <t>Oftarget="sec.warmup-example" format="default" sectionFormat="of" derivedContent="Section 7.3"/>.</t> <t indent="0" pn="section-4.1.10.1-3">Of course, some applications may not be able to perform this doubleoffer-answeroffer/answer exchange, particularly ones that are attempting to gateway to legacy signaling protocols. In these cases, pranswer can still provide the application with a mechanism to warm up the transport.</t> </section> <sectiontitle="Rollback" anchor="sec.rollback"> <t>Inanchor="sec.rollback" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.10.2"> <name slugifiedName="name-rollback">Rollback</name> <t indent="0" pn="section-4.1.10.2-1">In certainsituationssituations, it may be desirable to "undo" a change made to setLocalDescription or setRemoteDescription. Consider a case where a call isongoing,ongoing and one side wants to change some of the session parameters; that side generates an updated offer and then calls setLocalDescription. However, the remote side, either before or after setRemoteDescription, decides it does not want to accept the newparameters,parameters and sends a reject message back to the offerer. Now, the offerer, and possibly the answerer as well,needneeds to return to astable"stable" state and the previous local/remote description. To support this, we introduce the concept of "rollback", which discards any proposed changes to the session, returning the state machine to thestable"stable" state. A rollback is performed by supplying a session description of type "rollback" with empty contents to either setLocalDescription or setRemoteDescription.</t> </section> </section> <sectiontitle="setLocalDescription" anchor="sec.setlocaldescription"> <t>Theanchor="sec.setlocaldescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.11"> <name slugifiedName="name-setlocaldescription">setLocalDescription</name> <t indent="0" pn="section-4.1.11-1">The setLocalDescription method instructs the PeerConnection to apply the supplied session description as its local configuration. The type field indicates whether the description should be processed as an offer, provisional answer, final answer, or rollback; offers and answers are checked differently, using the various rules that exist for each SDP line.</t><t>This<t indent="0" pn="section-4.1.11-2">This API changes the local media state; among other things, it sets up local resources for receiving and decoding media. In order to successfully handle scenarios where the application wants to offer to change from one media format to a different, incompatible format, the PeerConnectionmust<bcp14>MUST</bcp14> be able to simultaneously support use of both the current and pending local descriptions (e.g., support the codecs that exist in either description). This dual processing begins when the PeerConnection enters the "have-local-offer" state, and it continues until setRemoteDescription is called with eithera(1) a final answer, at which point the PeerConnection can fully adopt the pending localdescription,description ora(2) a rollback, which results in a revert to the current local description.</t><t>This<t indent="0" pn="section-4.1.11-3">This API indirectly controls the candidate gathering process. When a local description issupplied,supplied and the number of transports currently in use does not match the number of transports needed by the local description, the PeerConnection will create transports as needed and begin gathering candidates for each transport, using ones from the candidate pool if available.</t><t>If<t indent="0" pn="section-4.1.11-4">If (1) setRemoteDescription was previously called with an offer,and(2) setLocalDescription is called with an answer (provisional or final),and(3) the media directions are compatible, and (4) media is available to send, this will result in the starting of mediatransmission.</t>transmission. </t> </section> <sectiontitle="setRemoteDescription" anchor="sec.setremotedescription"> <t>Theanchor="sec.setremotedescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.12"> <name slugifiedName="name-setremotedescription">setRemoteDescription</name> <t indent="0" pn="section-4.1.12-1">The setRemoteDescription method instructs the PeerConnection to apply the supplied session description as the desired remote configuration. As in setLocalDescription, the type field of the description indicates how it should be processed.</t><t>This<t indent="0" pn="section-4.1.12-2">This API changes the local media state; among other things, it sets up local resources for sending and encodingmedia.</t> <t>Ifmedia. </t> <t indent="0" pn="section-4.1.12-3">If (1) setLocalDescription was previously called with an offer,and(2) setRemoteDescription is called with an answer (provisional or final),and(3) the media directions are compatible, and (4) media is available to send, this will result in the starting of media transmission.</t> </section> <sectiontitle="currentLocalDescription" anchor="sec.currentlocaldescription"> <t>Theanchor="sec.currentlocaldescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.13"> <name slugifiedName="name-currentlocaldescription">currentLocalDescription</name> <t indent="0" pn="section-4.1.13-1">The currentLocalDescription method returns the current negotiated local description--- i.e., the local description from the last successful offer/answer exchange--- in addition to any local candidates that have been generated by the ICE agent since the local description was set.</t><t>A<t indent="0" pn="section-4.1.13-2">A null object will be returned if an offer/answer exchange has not yet been completed.</t> </section> <sectiontitle="pendingLocalDescription" anchor="sec.pendinglocaldescription"> <t>Theanchor="sec.pendinglocaldescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.14"> <name slugifiedName="name-pendinglocaldescription">pendingLocalDescription</name> <t indent="0" pn="section-4.1.14-1">The pendingLocalDescription method returns a copy of the local description currently in negotiation--- i.e., a local offer set without any corresponding remote answer--- in addition to any local candidates that have been generated by the ICE agent since the local description was set.</t><t>A<t indent="0" pn="section-4.1.14-2">A null object will be returned if the state of the PeerConnection is "stable" or "have-remote-offer".</t> </section> <sectiontitle="currentRemoteDescription" anchor="sec.currentremotedescription"> <t>Theanchor="sec.currentremotedescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.15"> <name slugifiedName="name-currentremotedescription">currentRemoteDescription</name> <t indent="0" pn="section-4.1.15-1">The currentRemoteDescription method returns a copy of the current negotiated remote description--- i.e., the remote description from the last successful offer/answer exchange--- in addition to any remote candidates that have been supplied via processIceMessage since the remote description was set.</t><t>A<t indent="0" pn="section-4.1.15-2">A null object will be returned if an offer/answer exchange has not yet been completed.</t> </section> <sectiontitle="pendingRemoteDescription" anchor="sec.pendingremotedescription"> <t>Theanchor="sec.pendingremotedescription" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.16"> <name slugifiedName="name-pendingremotedescription">pendingRemoteDescription</name> <t indent="0" pn="section-4.1.16-1">The pendingRemoteDescription method returns a copy of the remote description currently in negotiation--- i.e., a remote offer set without any corresponding local answer--- in addition to any remote candidates that have been supplied via processIceMessage since the remote description was set.</t><t>A<t indent="0" pn="section-4.1.16-2">A null object will be returned if the state of the PeerConnection is "stable" or "have-local-offer".</t> </section> <sectiontitle="canTrickleIceCandidates" anchor="sec.cantrickle"> <t>Theanchor="sec.cantrickle" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.17"> <name slugifiedName="name-cantrickleicecandidates">canTrickleIceCandidates</name> <t indent="0" pn="section-4.1.17-1">The canTrickleIceCandidates property indicates whether the remote side supports receiving trickled candidates. There are three potential values:<list style="hanging"> <t hangText="null:">No</t> <dl newline="false" spacing="normal" indent="3" pn="section-4.1.17-2"> <dt pn="section-4.1.17-2.1">null:</dt> <dd pn="section-4.1.17-2.2">No SDP has been received from the other side, so it is not known if it can handle trickle. This is the initial value beforesetRemoteDescription()setRemoteDescription iscalled.</t> <t hangText="true:">SDPcalled.</dd> <dt pn="section-4.1.17-2.3">true:</dt> <dd pn="section-4.1.17-2.4">SDP has been received from the other side indicating that it can supporttrickle.</t> <t hangText="false:">SDPtrickle.</dd> <dt pn="section-4.1.17-2.5">false:</dt> <dd pn="section-4.1.17-2.6">SDP has been received from the other side indicating that it cannot supporttrickle.</t> </list></t> <t>Astrickle.</dd> </dl> <t indent="0" pn="section-4.1.17-3">As described in <xref target="sec.ice-candidate-trickling"/>,format="default" sectionFormat="of" derivedContent="Section 3.5.2"/>, JSEP implementations always provide candidates to the application individually, consistent with what is needed for Trickle ICE. However, applications can use the canTrickleIceCandidates property to determine whether their peer can actually do Trickle ICE, i.e., whether it is safe to send an initial offer or answer followed later by candidates as they are gathered. As "true" is the only value that definitively indicates remote Trickle ICE support, an applicationwhichthat compares canTrickleIceCandidates against "true" will by default attempt Half Trickle on initial offers and Full Trickle on subsequent interactions with a Trickle ICE-compatible agent.</t> </section> <sectiontitle="setConfiguration" anchor="sec.setconfiguration"> <t>Theanchor="sec.setconfiguration" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.18"> <name slugifiedName="name-setconfiguration">setConfiguration</name> <t indent="0" pn="section-4.1.18-1">The setConfiguration method allows the global configuration of the PeerConnection, which was initially set by constructor parameters, to be changed during the session. The effects of calling this methodcalldepend on when it is invoked, anddifferthey will differ, depending on which specific parameters arechanged:</t> <t> <list style="symbols"> <t>Anychanged: </t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.1.18-2"> <li pn="section-4.1.18-2.1">Any changes to the STUN/TURN servers to use affect the next gathering phase. If an ICE gathering phase has already started or completed, the 'needs-ice-restart' bit mentioned in <xref target="sec.ice-gather-overview"/>format="default" sectionFormat="of" derivedContent="Section 3.5.1"/> will be set. This will cause the next call to createOffer to generate new ICE credentials, for the purpose of forcing an ICE restart and kicking off a new gathering phase, in which the new servers will be used. If the ICE candidate pool has a nonzerosize,size and a local description has not yet been applied, any existing candidates will be discarded, and new candidates will be gathered from the newservers.</t> <t>Anyservers.</li> <li pn="section-4.1.18-2.2">Any change to the ICE candidate policy affects the next gathering phase. If an ICE gathering phase has already started or completed, the 'needs-ice-restart' bit will be set. Either way, changes to the policy have no effect on the candidate pool, because pooled candidates are not made available to the application until a gathering phase occurs, and so any necessary filtering can still be done on any pooledcandidates.</t> <t>Thecandidates.</li> <li pn="section-4.1.18-2.3">The ICE candidate pool sizeMUST NOT<bcp14>MUST NOT</bcp14> be changed after applying a local description. If a local description has not yet been applied, any changes to the ICE candidate pool size take effect immediately; if increased, additional candidates are pre-gathered; if decreased, the now-superfluous candidates arediscarded.</t> <t>Thediscarded.</li> <li pn="section-4.1.18-2.4">The bundle and RTCP-multiplexing policiesMUST NOT<bcp14>MUST NOT</bcp14> be changed after the construction of thePeerConnection.</t> </list> </t> <t>This callPeerConnection.</li> </ul> <t indent="0" pn="section-4.1.18-3">Calling this method may result in a change to the state of the ICEAgent.</t>agent.</t> </section> <sectiontitle="addIceCandidate" anchor="sec.addicecandidate"> <t>Theanchor="sec.addicecandidate" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.19"> <name slugifiedName="name-addicecandidate">addIceCandidate</name> <t indent="0" pn="section-4.1.19-1">The addIceCandidate method provides an update to the ICE agent via an IceCandidate object<xref(<xref target="sec.ice-candidate-format"/>.format="default" sectionFormat="of" derivedContent="Section 3.5.2.1"/>). If the IceCandidate's candidate field isfilled in,non-null, the IceCandidate is treated as a new remote ICE candidate, which will be added to the current and/or pending remote description according to the rules defined for Trickle ICE. Otherwise, the IceCandidate is treated as an end-of-candidates indication, as defined in <xreftarget="I-D.ietf-ice-trickle" />.</t> <t>Intarget="RFC8838" sectionFormat="comma" section="14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8838#section-14" derivedContent="RFC8838"/>.</t> <t indent="0" pn="section-4.1.19-2">In either case, them="m=" section index, MID, and ufrag fields from the supplied IceCandidate are used to determine whichm="m=" section and ICE candidate generation the IceCandidate belongs to, as described in <xref target="sec.ice-candidate-format"/>format="default" sectionFormat="of" derivedContent="Section 3.5.2.1"/> above. In the case of an end-of-candidates indication, null values for theabsence of both the m="m=" section index and MID fieldsisare interpreted to mean that the indication applies to allm="m=" sections in the specified ICE candidate generation. However, if both fields areabsentnull for a new remote candidate, thisMUST<bcp14>MUST</bcp14> be treated as an invalid condition, as specified below.</t><t>If<t indent="0" pn="section-4.1.19-3">If any IceCandidate fields contain invalidvalues,values or an error occurs during the processing of the IceCandidate object, the supplied IceCandidateMUST<bcp14>MUST</bcp14> be ignored and an errorMUST<bcp14>MUST</bcp14> be returned.</t><t>Otherwise,<t indent="0" pn="section-4.1.19-4">Otherwise, the new remote candidate or end-of-candidates indication is supplied to the ICE agent. In the case of a new remote candidate, connectivity checks will be sent to the newcandidate.</t> </section> </section> <section title="RtpTransceiver" anchor="sec.transceiver"> <section title="stop" anchor="sec.transceiver-stop"> <t>The stop method stops an RtpTransceiver. This will cause future calls to createOffercandidate, assuming setLocalDescription has already been called togenerate a zero port forinitialize theassociated m= section. See below for more details.</t>ICE gathering process.</t> </section> <sectiontitle="stopped" anchor="sec.transceiver-stopped"> <t>The stopped property indicates whetheranchor="sec.onicecandidate" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.20"> <name slugifiedName="name-onicecandidate-event">onicecandidate Event</name> <t indent="0" pn="section-4.1.20-1">The onicecandidate event is dispatched to thetransceiverapplication in two situations: (1) when the ICE agent hasbeen stopped, either bydiscovered acallnew allowed local ICE candidate during ICE gathering, as outlined in <xref target="sec.ice-gather-overview" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/> and subject tostopTransceiverthe restrictions discussed in <xref target="sec.ice-candidate-policy" format="default" sectionFormat="of" derivedContent="Section 3.5.3"/>, orby applying(2) when ananswer that rejectsICE gathering phase completes. The event contains a single IceCandidate object, as defined in <xref target="sec.ice-candidate-format" format="default" sectionFormat="of" derivedContent="Section 3.5.2.1"/>.</t> <t indent="0" pn="section-4.1.20-2">In theassociated m= section. In either of these cases, itfirst case, the newly discovered candidate isset to "true",reflected in the IceCandidate object, andotherwiseall of its fields <bcp14>MUST</bcp14> be non-null. This candidate will also besetadded to"false".</t> <t>A stopped RtpTransceiver does not send any outgoing RTP or RTCP or process any incoming RTP or RTCP. It cannot be restarted.</t> </section> <section title="setDirection" anchor="sec.transceiver-set-direction"> <t>The setDirection method setsthedirection of a transceiver,current and/or pending local description according to the rules defined for Trickle ICE.</t> <t indent="0" pn="section-4.1.20-3">In the second case, the event's IceCandidate object <bcp14>MUST</bcp14> have its candidate field set to null to indicate that the current gathering phase is complete, i.e., there will be no further onicecandidate events in this phase. However, the IceCandidate's ufrag field <bcp14>MUST</bcp14> be specified to indicate which ICE candidate generation is ending. The IceCandidate's "m=" section index and MID fields <bcp14>MAY</bcp14> be specified to indicate that the event applies to a specific "m=" section, or set to null to indicate it applies to all "m=" sections in the current ICE candidate generation. This event can be used by the application to generate an end-of-candidates indication, as defined in <xref target="RFC8838" sectionFormat="comma" section="13" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8838#section-13" derivedContent="RFC8838"/>.</t> </section> </section> <section anchor="sec.transceiver" numbered="true" toc="include" removeInRFC="false" pn="section-4.2"> <name slugifiedName="name-rtptransceiver">RtpTransceiver</name> <section anchor="sec.transceiver-stop" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.1"> <name slugifiedName="name-stop">stop</name> <t indent="0" pn="section-4.2.1-1">The stop method stops an RtpTransceiver. This will cause future calls to createOffer to generate a zero port for the associated "m=" section. See below for more details.</t> </section> <section anchor="sec.transceiver-stopped" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.2"> <name slugifiedName="name-stopped">stopped</name> <t indent="0" pn="section-4.2.2-1">The stopped property indicates whether the transceiver has been stopped, either by a call to stop or by applying an answer that rejects the associated "m=" section. In either of these cases, it is set to "true" and otherwise will be set to "false".</t> <t indent="0" pn="section-4.2.2-2">A stopped RtpTransceiver does not send any outgoing RTP or RTCP or process any incoming RTP or RTCP. It cannot be restarted.</t> </section> <section anchor="sec.transceiver-set-direction" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.3"> <name slugifiedName="name-setdirection">setDirection</name> <t indent="0" pn="section-4.2.3-1">The setDirection method sets the direction of a transceiver, which affects the direction property of the associatedm="m=" section on future calls to createOffer and createAnswer. The permitted values for direction are "recvonly", "sendrecv", "sendonly", and "inactive", mirroring theidentically-named directionalidentically named direction attributes defined in <xreftarget="RFC4566"></xref>, Section 6.</t> <t>Whentarget="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>.</t> <t indent="0" pn="section-4.2.3-2">When creating offers, the transceiver direction is directly reflected in the output, even for re-offers. When creating answers, the transceiver direction is intersected with the offered direction, as explained in <xref target="sec.generating-an-answer"/>format="default" sectionFormat="of" derivedContent="Section 5.3"/> below.</t><t>Note<t indent="0" pn="section-4.2.3-3">Note that while setDirection sets the direction property of the transceiver immediately( <xref(<xref target="sec.transceiver-direction"/>),format="default" sectionFormat="of" derivedContent="Section 4.2.4"/>), this property does not immediately affect whether the transceiver's RtpSender will send or its RtpReceiver will receive. The direction in effect is represented by the currentDirection property, which is only updated when an answer is applied.</t> </section> <sectiontitle="direction" anchor="sec.transceiver-direction"> <t>Theanchor="sec.transceiver-direction" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.4"> <name slugifiedName="name-direction">direction</name> <t indent="0" pn="section-4.2.4-1">The direction property indicates the last value passed into setDirection. If setDirection has never been called, it is set to the direction the transceiver was initialized with.</t> </section> <sectiontitle="currentDirection" anchor="sec.transceiver-current-direction"> <t>Theanchor="sec.transceiver-current-direction" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.5"> <name slugifiedName="name-currentdirection">currentDirection</name> <t indent="0" pn="section-4.2.5-1">The currentDirection property indicates the last negotiated direction for the transceiver's associatedm="m=" section. More specifically, it indicates the<xref target="RFC3264"></xref> directionaldirection attribute <xref target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/> of the associatedm="m=" section in the last applied answer (including provisional answers), with "send" and "recv" directions reversed if it was a remote answer. For example, if thedirectionaldirection attribute for the associatedm="m=" section in a remote answer is "recvonly", currentDirection is set to "sendonly".</t><t>If<t indent="0" pn="section-4.2.5-2">If an answer that references this transceiver has not yet beenapplied,applied or if the transceiver is stopped, currentDirection is set tonull.</t>"null".</t> </section> <sectiontitle="setCodecPreferences" anchor="sec.transceiver-set-codec-preferences"> <t>Theanchor="sec.transceiver-set-codec-preferences" numbered="true" toc="include" removeInRFC="false" pn="section-4.2.6"> <name slugifiedName="name-setcodecpreferences">setCodecPreferences</name> <t indent="0" pn="section-4.2.6-1">The setCodecPreferences method sets the codec preferences of a transceiver, which in turn affect the presence and order of codecs of the associatedm="m=" section on future calls to createOffer and createAnswer. Note that setCodecPreferences does not directly affect which codec the implementation decides to send. It only affects which codecs the implementation indicates that it prefers to receive, via the offer or answer. Even when a codec is excluded by setCodecPreferences, it still may be used to send until the next offer/answer exchange discards it.</t><t>The<t indent="0" pn="section-4.2.6-2">The codec preferences of an RtpTransceiver can cause codecs to be excluded by subsequent calls to createOffer and createAnswer, in which case the corresponding media formats in the associatedm="m=" section will be excluded. The codec preferences cannot add media formats that would otherwise not be present.</t><t>The<t indent="0" pn="section-4.2.6-3">The codec preferences of an RtpTransceiver can also determine the order of codecs in subsequent calls to createOffer and createAnswer, in which case the order of the media formats in the associatedm="m=" section will follow the specified preferences.</t> </section> </section> </section> <sectiontitle="SDPanchor="sec.sdp-interaction-procedure" numbered="true" toc="include" removeInRFC="false" pn="section-5"> <name slugifiedName="name-sdp-interaction-procedures">SDP InteractionProcedures" anchor="sec.sdp-interaction-procedure"> <t>ThisProcedures</name> <t indent="0" pn="section-5-1">This section describes the specific procedures to be followed when creating and parsing SDP objects.</t> <sectiontitle="Requirements Overview" anchor="sec.requirements-overview"> <t>JSEPanchor="sec.requirements-overview" numbered="true" toc="include" removeInRFC="false" pn="section-5.1"> <name slugifiedName="name-requirements-overview">Requirements Overview</name> <t indent="0" pn="section-5.1-1">JSEP implementationsmust<bcp14>MUST</bcp14> comply with the specifications listed below that govern the creation and processing of offers and answers.</t> <sectiontitle="Usage Requirements" anchor="sec.usage-requirements"> <t>Allanchor="sec.usage-requirements" numbered="true" toc="include" removeInRFC="false" pn="section-5.1.1"> <name slugifiedName="name-usage-requirements">Usage Requirements</name> <t indent="0" pn="section-5.1.1-1">All session descriptions handled by JSEP implementations, both local and remote,MUST<bcp14>MUST</bcp14> indicate support for the following specifications. If any of these are absent, this omissionMUST<bcp14>MUST</bcp14> be treated as an error.<list style="symbols"> <t>ICE,</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1.1-2"> <li pn="section-5.1.1-2.1">ICE, as specified in <xreftarget="RFC8445"></xref>, MUSTtarget="RFC8445" format="default" sectionFormat="of" derivedContent="RFC8445"/>, <bcp14>MUST</bcp14> be used. Note that the remote endpoint may use aLitelite implementation; implementationsMUST<bcp14>MUST</bcp14> properly handle remote endpointswhich do ICE-Lite.</t> <t>DTLSthat use ICE-lite. The remote endpoint may also use an older version of ICE; implementations <bcp14>MUST</bcp14> properly handle remote endpoints that use ICE as specified in <xref target="RFC5245" format="default" sectionFormat="of" derivedContent="RFC5245"/>.</li> <li pn="section-5.1.1-2.2">DTLS <xref target="RFC6347"/>format="default" sectionFormat="of" derivedContent="RFC6347"/> or DTLS-SRTP <xreftarget="RFC5763"></xref>, MUSTtarget="RFC5763" format="default" sectionFormat="of" derivedContent="RFC5763"/> <bcp14>MUST</bcp14> be used, as appropriate for the media type, as specified in <xreftarget="I-D.ietf-rtcweb-security-arch" /></t> </list></t> <t>The SDEStarget="RFC8827" format="default" sectionFormat="of" derivedContent="RFC8827"/>.</li> </ul> <t indent="0" pn="section-5.1.1-3">The SDP security descriptions mechanism for SRTP keyingmechanism from<xref target="RFC4568"/> MUST NOTformat="default" sectionFormat="of" derivedContent="RFC4568"/> <bcp14>MUST NOT</bcp14> be used, as discussed in <xreftarget="I-D.ietf-rtcweb-security-arch" />.</t>target="RFC8827" format="default" sectionFormat="of" derivedContent="RFC8827"/>.</t> </section> <sectiontitle="Profileanchor="sec.profile-names" numbered="true" toc="include" removeInRFC="false" pn="section-5.1.2"> <name slugifiedName="name-profile-names-and-interoper">Profile Names andInteroperability" anchor="sec.profile-names"> <t>ForInteroperability</name> <t indent="0" pn="section-5.1.2-1">For mediam="m=" sections, JSEP implementationsMUST<bcp14>MUST</bcp14> support the "UDP/TLS/RTP/SAVPF" profile specified in <xreftarget="RFC5764"></xref>target="RFC5764" format="default" sectionFormat="of" derivedContent="RFC5764"/> as well as the "TCP/DTLS/RTP/SAVPF" profile specified in <xreftarget="RFC7850"></xref>,target="RFC7850" format="default" sectionFormat="of" derivedContent="RFC7850"/> andMUST<bcp14>MUST</bcp14> indicate one of these profiles for each mediam="m=" line they produce in an offer. For datam="m=" sections, implementationsMUST<bcp14>MUST</bcp14> support the "UDP/DTLS/SCTP" profile as well as the "TCP/DTLS/SCTP"profile,profile andMUST<bcp14>MUST</bcp14> indicate one of these profiles for each datam="m=" line they produce in an offer. The exact profile to use is determined by the protocol associated with the current default or selected ICE candidate, as described in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 3.2.1.2. </t> <t>Unfortunately,target="RFC8839" sectionFormat="comma" section="4.2.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.2.1.2" derivedContent="RFC8839"/>.</t> <t indent="0" pn="section-5.1.2-2">Unfortunately, in an attempt at compatibility, some endpoints generate other profile strings even when they mean to support one of these profiles. For instance, an endpoint might generate "RTP/AVP" but supply "a=fingerprint" and "a=rtcp-fb" attributes, indicating its willingness to support "UDP/TLS/RTP/SAVPF" or "TCP/DTLS/RTP/SAVPF". In order to simplify compatibility with such endpoints, JSEP implementationsMUST<bcp14>MUST</bcp14> follow the following rules when processing the mediam="m=" sections in a received offer:</t><t> <list style="symbols"> <t>Any<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1.2-3"> <li pn="section-5.1.2-3.1"> <t indent="0" pn="section-5.1.2-3.1.1">Any profile in the offer matching one of the followingMUST<bcp14>MUST</bcp14> be accepted:<list style="symbols"> <t>"RTP/AVP" (Defined in <xref target="RFC4566"></xref>, Section 8.2.2)</t> <t>"RTP/AVPF" (Defined in <xref target="RFC4585"></xref>, Section 9)</t> <t>"RTP/SAVP" (Defined in <xref target="RFC3711"></xref>, Section 12)</t> <t>"RTP/SAVPF" (Defined in <xref target="RFC5124"></xref>, Section 6)</t> <t>"TCP/DTLS/RTP/SAVP" (Defined</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1.2-3.1.2"> <li pn="section-5.1.2-3.1.2.1">"RTP/AVP" (defined in <xreftarget="RFC7850"></xref>, Section 3.4)</t> <t>"TCP/DTLS/RTP/SAVPF" (Definedtarget="RFC4566" sectionFormat="comma" section="8.2.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-8.2.2" derivedContent="RFC4566"/>)</li> <li pn="section-5.1.2-3.1.2.2">"RTP/AVPF" (defined in <xreftarget="RFC7850"></xref>, Section 3.5)</t> <t>"UDP/TLS/RTP/SAVP" (Definedtarget="RFC4585" sectionFormat="comma" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-9" derivedContent="RFC4585"/>)</li> <li pn="section-5.1.2-3.1.2.3">"RTP/SAVP" (defined in <xref target="RFC3711" sectionFormat="comma" section="12" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3711#section-12" derivedContent="RFC3711"/>)</li> <li pn="section-5.1.2-3.1.2.4">"RTP/SAVPF" (defined in <xref target="RFC5124" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5124#section-6" derivedContent="RFC5124"/>)</li> <li pn="section-5.1.2-3.1.2.5">"TCP/DTLS/RTP/SAVP" (defined in <xref target="RFC7850" sectionFormat="comma" section="3.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7850#section-3.4" derivedContent="RFC7850"/>)</li> <li pn="section-5.1.2-3.1.2.6">"TCP/DTLS/RTP/SAVPF" (defined in <xref target="RFC7850" sectionFormat="comma" section="3.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7850#section-3.5" derivedContent="RFC7850"/>)</li> <li pn="section-5.1.2-3.1.2.7">"UDP/TLS/RTP/SAVP" (defined in <xreftarget="RFC5764"></xref>, Section 9)</t> <t>"UDP/TLS/RTP/SAVPF" (Definedtarget="RFC5764" sectionFormat="comma" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5764#section-9" derivedContent="RFC5764"/>)</li> <li pn="section-5.1.2-3.1.2.8">"UDP/TLS/RTP/SAVPF" (defined in <xreftarget="RFC5764"></xref>, Section 9)</t> </list></t> <t>Thetarget="RFC5764" sectionFormat="comma" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5764#section-9" derivedContent="RFC5764"/>)</li> </ul> </li> <li pn="section-5.1.2-3.2">The profile in any "m=" line in any generated answerMUST<bcp14>MUST</bcp14> exactly match the profile provided in theoffer.</t> <t>Becauseoffer.</li> <li pn="section-5.1.2-3.3">Because DTLS-SRTP isREQUIRED,<bcp14>REQUIRED</bcp14>, the choice of SAVP or AVP has no effect; support for DTLS-SRTP is determined by the presence of one or more "a=fingerprint"attribute.attributes. Note that lack of an "a=fingerprint" attribute will lead to negotiationfailure.</t> <t>Thefailure.</li> <li pn="section-5.1.2-3.4">The use of AVPF or AVP simply controls the timing rules used for RTCP feedback. If AVPF isprovided,provided or an "a=rtcp-fb" attribute is present, assume AVPF timing, i.e., a default value of "trr-int=0". Otherwise, assume that AVPF is being used in anAVP compatibleAVP-compatible mode and use a value of"trr-int=4000".</t> <t>For"trr-int=4000".</li> <li pn="section-5.1.2-3.5">For datam="m=" sections, implementationsMUST<bcp14>MUST</bcp14> support receiving the "UDP/DTLS/SCTP", "TCP/DTLS/SCTP", or "DTLS/SCTP" (for backwards compatibility)profiles.</t> </list> </t> <t>Noteprofiles.</li> </ul> <t indent="0" pn="section-5.1.2-4">Note that re-offers by JSEP implementationsMUST<bcp14>MUST</bcp14> use the correct profile strings even if the initial offer/answer exchange used an (incorrect) older profile string. This simplifies JSEP behavior, with minimal downside, as any remote endpoint that fails to handle such a re-offer will also fail to handle a JSEP endpoint's initial offer.</t> </section> </section> <section anchor="sec-create-offer"title="Constructingnumbered="true" toc="include" removeInRFC="false" pn="section-5.2"> <name slugifiedName="name-constructing-an-offer">Constructing anOffer"> <t>WhenOffer</name> <t indent="0" pn="section-5.2-1">When createOffer is called, a new SDP descriptionmust<bcp14>MUST</bcp14> be created that includes the functionality specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>.target="RFC8834" format="default" sectionFormat="of" derivedContent="RFC8834"/>. The exact details of this process are explained below.</t> <sectiontitle="Initial Offers" anchor="sec.initial-offers"> <t>Whenanchor="sec.initial-offers" numbered="true" toc="include" removeInRFC="false" pn="section-5.2.1"> <name slugifiedName="name-initial-offers">Initial Offers</name> <t indent="0" pn="section-5.2.1-1">When createOffer is called for the first time, the result is known as the initial offer.</t><t>The<t indent="0" pn="section-5.2.1-2">The first step in generating an initial offer is to generate session-level attributes, as specified in <xreftarget="RFC4566"></xref>, Section 5.target="RFC4566" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5" derivedContent="RFC4566"/>. Specifically:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-3"> <li pn="section-5.2.1-3.1">The first SDP lineMUST<bcp14>MUST</bcp14> be"v=0","v=0" asspecifieddefined in <xreftarget="RFC4566"></xref>, Section 5.1</t> <t>Thetarget="RFC4566" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.1" derivedContent="RFC4566"/>.</li> <li pn="section-5.2.1-3.2">The second SDP lineMUST<bcp14>MUST</bcp14> be an "o="line,line asspecifieddefined in <xreftarget="RFC4566"></xref>, Section 5.2.target="RFC4566" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.2" derivedContent="RFC4566"/>. The value of the <username> fieldSHOULD<bcp14>SHOULD</bcp14> be "-". Thesess-id MUST<sess-id> <bcp14>MUST</bcp14> be representable by a 64-bit signed integer, and the valueMUST<bcp14>MUST</bcp14> be less than(2**63)-1.2<sup>63</sup>-1. It isRECOMMENDED<bcp14>RECOMMENDED</bcp14> that thesess-id<sess-id> be constructed by generating a 64-bit quantity with the highest bit set to zero and the remaining 63 bits being cryptographically random. The value of the <nettype> <addrtype> <unicast-address> tupleSHOULD<bcp14>SHOULD</bcp14> be set to a non-meaningful address, such as IN IP4 0.0.0.0, to prevent leaking a local IP address in this field; this problem is discussed in <xreftarget="I-D.ietf-rtcweb-ip-handling" />.target="RFC8828" format="default" sectionFormat="of" derivedContent="RFC8828"/>. As mentioned in <xreftarget="RFC4566"></xref>,target="RFC4566" format="default" sectionFormat="of" derivedContent="RFC4566"/>, the entireo="o=" line needs to be unique, but selecting a random number for <sess-id> is sufficient to accomplishthis.</t> <t>Thethis.</li> <li pn="section-5.2.1-3.3">The third SDP lineMUST<bcp14>MUST</bcp14> be a "s="line,line asspecifieddefined in <xreftarget="RFC4566"></xref>, Section 5.3;target="RFC4566" sectionFormat="comma" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.3" derivedContent="RFC4566"/>; to match the "o=" line, a single dashSHOULD<bcp14>SHOULD</bcp14> be used as the session name,e.g.e.g., "s=-". Note that this differs from the advice in <xref target="RFC4566"/>format="default" sectionFormat="of" derivedContent="RFC4566"/>, which proposes a single space, but as both "o=" and "s=" are meaningless in JSEP, having the same meaningless value seemsclearer.</t> <t>Sessionclearer.</li> <li pn="section-5.2.1-3.4">Session Information ("i="), URI ("u="), Email Address ("e="), Phone Number ("p="), Repeat Times ("r="), and Time Zones ("z=") lines are not useful in this context andSHOULD NOT<bcp14>SHOULD NOT</bcp14> beincluded.</t> <t>Encryptionincluded.</li> <li pn="section-5.2.1-3.5">Encryption Keys ("k=") lines do not provide sufficient security andMUST NOT<bcp14>MUST NOT</bcp14> beincluded.</t> <t>Aincluded.</li> <li pn="section-5.2.1-3.6">A "t=" lineMUST<bcp14>MUST</bcp14> be added, as specified in <xreftarget="RFC4566"></xref>, Section 5.9;target="RFC4566" sectionFormat="comma" section="5.9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.9" derivedContent="RFC4566"/>; both <start-time> and <stop-time>SHOULD<bcp14>SHOULD</bcp14> be set to zero,e.g.e.g., "t=00".</t> <t>An0".</li> <li pn="section-5.2.1-3.7">An "a=ice-options" line with the "trickle" and "ice2" optionsMUST<bcp14>MUST</bcp14> be added, as specified in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 3target="RFC8840" sectionFormat="comma" section="4.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.1" derivedContent="RFC8840"/> and <xreftarget="RFC8445"></xref>, Section 10.</t> <t>Iftarget="RFC8445" sectionFormat="comma" section="10" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-10" derivedContent="RFC8445"/>. </li> <li pn="section-5.2.1-3.8">If WebRTC identity is being used, an "a=identity" line <bcp14>MUST</bcp14> be added, as described in <xreftarget="I-D.ietf-rtcweb-security-arch" />, Section 5.</t> </list></t> <t>Thetarget="RFC8827" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8827#section-5" derivedContent="RFC8827"/>.</li> </ul> <t indent="0" pn="section-5.2.1-4">The next step is to generatem="m=" sections, as specified in <xref target="RFC4566"/>, Section 5.14.sectionFormat="comma" section="5.14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.14" derivedContent="RFC4566"/>. Anm="m=" section is generated for each RtpTransceiver that has been added to the PeerConnection, excluding any stopped RtpTransceivers; this is done in the order the RtpTransceivers were added to the PeerConnection. If there are no such RtpTransceivers, nom="m=" sections are generated; more can be added later, as discussed in <xref target="RFC3264"/>, Section 5.</t> <t>ForsectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-5" derivedContent="RFC3264"/>.</t> <t indent="0" pn="section-5.2.1-5">For eachm="m=" section generated for an RtpTransceiver, establish a mapping between the transceiver and the index of the generatedm="m=" section.</t><t>Each m=<t indent="0" pn="section-5.2.1-6">Each "m=" section, provided it is not marked as bundle-only,MUST generate<bcp14>MUST</bcp14> contain a unique set of ICE credentials andgather its owna unique set of ICE candidates. Bundle-onlym="m=" sectionsMUST NOT<bcp14>MUST NOT</bcp14> contain any ICE credentials andMUST NOT<bcp14>MUST NOT</bcp14> gather any candidates.</t><t>For<t indent="0" pn="section-5.2.1-7">For DTLS, allm="m=" sectionsMUST<bcp14>MUST</bcp14> use any and allthe certificate(s)certificates that have been specified for the PeerConnection; as a result, theyMUST<bcp14>MUST</bcp14> all have the same<xref target="RFC8122"></xref>fingerprintvalue(s),value or values <xref target="RFC8122" format="default" sectionFormat="of" derivedContent="RFC8122"/>, or thesevalue(s) MUSTvalues <bcp14>MUST</bcp14> be session-level attributes.</t><t>Each m=<t indent="0" pn="section-5.2.1-8">Each "m=" sectionshould<bcp14>MUST</bcp14> be generated as specified in <xreftarget="RFC4566"></xref>, Section 5.14.target="RFC4566" sectionFormat="comma" section="5.14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.14" derivedContent="RFC4566"/>. For them="m=" line itself, the following rulesMUST<bcp14>MUST</bcp14> be followed:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-9"> <li pn="section-5.2.1-9.1">If them="m=" section is marked as bundle-only, then theport<port> valueMUST<bcp14>MUST</bcp14> be set to0.zero. Otherwise, theport<port> value is set to the port of the default ICE candidate for thism="m=" section, but given that no candidates are available yet, the"dummy"default port value of 9 (Discard)MUST<bcp14>MUST</bcp14> be used, as indicated in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 5.1.</t> <t>Totarget="RFC8840" sectionFormat="comma" section="4.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.1" derivedContent="RFC8840"/>.</li> <li pn="section-5.2.1-9.2">To properly indicate use of DTLS, the <proto> fieldMUST<bcp14>MUST</bcp14> be set to "UDP/TLS/RTP/SAVPF", as specified in <xref target="RFC5764"/>, Section 8.</t> <t>IfsectionFormat="comma" section="8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5764#section-8" derivedContent="RFC5764"/>.</li> <li pn="section-5.2.1-9.3">If codec preferences have been set for the associated transceiver, media formatsMUST<bcp14>MUST</bcp14> be generated in the correspondingorder,order andMUST<bcp14>MUST</bcp14> exclude any codecs not present in the codecpreferences.</t> <t>Unlesspreferences.</li> <li pn="section-5.2.1-9.4">Unless excluded by the above restrictions, the media formatsMUST<bcp14>MUST</bcp14> include the mandatory audio/video codecs as specified in <xreftarget="RFC7874"></xref>, Section 3,target="RFC7874" sectionFormat="comma" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7874#section-3" derivedContent="RFC7874"/> and <xreftarget="RFC7742"></xref>, Section 5.</t> </list></t> <t>The m=target="RFC7742" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7742#section-5" derivedContent="RFC7742"/>.</li> </ul> <t indent="0" pn="section-5.2.1-10">The "m=" lineMUST<bcp14>MUST</bcp14> be followed immediately by a "c=" line, as specified in <xreftarget="RFC4566"></xref>, Section 5.7.target="RFC4566" sectionFormat="comma" section="5.7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.7" derivedContent="RFC4566"/>. Again, as no candidates are available yet, the "c=" linemust<bcp14>MUST</bcp14> contain the"dummy"default value "IN IP4 0.0.0.0", as defined in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 5.1.</t> <t>target="RFC8840" sectionFormat="comma" section="4.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.1" derivedContent="RFC8840"/>.</t> <t indent="0" pn="section-5.2.1-11"> <xreftarget="I-D.ietf-mmusic-sdp-mux-attributes" />target="RFC8859" format="default" sectionFormat="of" derivedContent="RFC8859"/> groups SDP attributes into different categories. To avoid unnecessary duplication when bundling, attributes of category IDENTICAL or TRANSPORTMUST NOT<bcp14>MUST NOT</bcp14> be repeated in bundledm="m=" sections, repeating the guidance from <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 8.1.target="RFC8843" sectionFormat="comma" section="7.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-7.1.3" derivedContent="RFC8843"/>. This includesm="m=" sections for which bundling has been negotiated and is still desired, as well asm="m=" sections marked as bundle-only.</t><t>The<t indent="0" pn="section-5.2.1-12">The following attributes, which are of a category other than IDENTICAL or TRANSPORT,MUST<bcp14>MUST</bcp14> be included in eachm="m=" section:</t><t> <list style="symbols"> <t>An<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-13"> <li pn="section-5.2.1-13.1">An "a=mid" line, as specified in <xreftarget="RFC5888"></xref>, Section 4.target="RFC5888" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-4" derivedContent="RFC5888"/>. All MID valuesMUST<bcp14>MUST</bcp14> be generated in a fashion that does not leak user information, e.g., randomly or using a per-PeerConnection counter, andSHOULD<bcp14>SHOULD</bcp14> be 3 bytes or less, to allow them to efficiently fit into the RTP header extension defined in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation"> </xref>, Section 14.target="RFC8843" sectionFormat="comma" section="15.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-15.2" derivedContent="RFC8843"/>. Note that this does not set the RtpTransceiver mid property, as that only occurs when the description is applied. The generated MID value can be considered a "proposed" MID at thispoint.</t> <t>Apoint.</li> <li pn="section-5.2.1-13.2">A direction attributewhichthat is the same as that of the associatedtransceiver.</t> <t>Fortransceiver.</li> <li pn="section-5.2.1-13.3">For each media format on them="m=" line, "a=rtpmap" and "a=fmtp" lines, as specified in <xreftarget="RFC4566"></xref>, Section 6,target="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/> and <xreftarget="RFC3264"></xref>, Section 5.1.</t> <t>Fortarget="RFC3264" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-5.1" derivedContent="RFC3264"/>.</li> <li pn="section-5.2.1-13.4">For each primary codec where RTP retransmission should be used, a corresponding "a=rtpmap" line indicating "rtx" with the clock rate of the primary codec and an "a=fmtp" line that references the payload type of the primary codec, as specified in <xreftarget="RFC4588"></xref>, Section 8.1.</t> <t>Fortarget="RFC4588" sectionFormat="comma" section="8.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4588#section-8.1" derivedContent="RFC4588"/>.</li> <li pn="section-5.2.1-13.5">For each supportedFECForward Error Correction (FEC) mechanism, "a=rtpmap" and "a=fmtp" lines, as specified in <xreftarget="RFC4566"></xref>, Section 6.target="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>. The FEC mechanisms thatMUST<bcp14>MUST</bcp14> be supported are specified in <xreftarget="I-D.ietf-rtcweb-fec"></xref>, Section 6,target="RFC8854" sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8854#section-7" derivedContent="RFC8854"/>, and specific usage for each media type is outlined in Sections4<xref target="sec.interface" format="counter" sectionFormat="of" derivedContent="4"/> and5.</t> <t>If<xref target="sec.sdp-interaction-procedure" format="counter" sectionFormat="of" derivedContent="5"/>.</li> <li pn="section-5.2.1-13.6">If thism="m=" section is for media with configurable durations of media per packet, e.g., audio, an "a=maxptime" line, indicating the maximum amount of media, specified in milliseconds, that can be encapsulated in each packet, as specified in <xreftarget="RFC4566"></xref>, Section 6.target="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>. This value is set to the smallest of the maximum duration values across all the codecs included in them= section.</t> <t>If"m=" section.</li> <li pn="section-5.2.1-13.7">If thism="m=" section is for videomedia,media and there are known limitations on the size of imageswhichthat can be decoded, an "a=imageattr" line, as specified in <xreftarget="sec.imageattr"></xref>.</t> <t>Fortarget="sec.imageattr" format="default" sectionFormat="of" derivedContent="Section 3.6"/>.</li> <li pn="section-5.2.1-13.8">For each supported RTP header extension, an "a=extmap" line, as specified in <xreftarget="RFC5285"></xref>, Section 5.target="RFC5285" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-5" derivedContent="RFC5285"/>. The list of header extensions thatSHOULD/MUST<bcp14>SHOULD</bcp14>/<bcp14>MUST</bcp14> be supported is specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>, Section 5.2.target="RFC8834" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8834#section-5.2" derivedContent="RFC8834"/>. Any header extensions that require encryptionMUST<bcp14>MUST</bcp14> be specified as indicated in <xreftarget="RFC6904"></xref>, Section 4.</t> <t>Fortarget="RFC6904" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6904#section-4" derivedContent="RFC6904"/>.</li> <li pn="section-5.2.1-13.9">For each supported RTCP feedback mechanism, an "a=rtcp-fb" line, as specified in <xreftarget="RFC4585"></xref>, Section 4.2.target="RFC4585" sectionFormat="comma" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-4.2" derivedContent="RFC4585"/>. The list of RTCP feedback mechanisms thatSHOULD/MUST<bcp14>SHOULD</bcp14>/<bcp14>MUST</bcp14> be supported is specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>, Section 5.1.</t> <t>Iftarget="RFC8834" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8834#section-5.1" derivedContent="RFC8834"/>.</li> <li pn="section-5.2.1-13.10"> <t indent="0" pn="section-5.2.1-13.10.1">If the RtpTransceiver has a sendrecv or sendonly direction:<list style="symbols"> <t>For</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-13.10.2"> <li pn="section-5.2.1-13.10.2.1">For each MediaStream that was associated with the transceiver when it was created via addTrack or addTransceiver, an "a=msid" line, as specified in <xreftarget="I-D.ietf-mmusic-msid"></xref>, Section 2,target="RFC8830" sectionFormat="comma" section="2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8830#section-2" derivedContent="RFC8830"/>, but omitting the "appdata"field.</t> </list></t> <t>Iffield.</li> </ul> </li> <li pn="section-5.2.1-13.11">If the RtpTransceiver has a sendrecv or sendonly direction, and the application has specifiedRID valuesa rid-id for an encoding, or has specified more than one encoding in the RtpSenders's parameters, an "a=rid" line for each encoding specified. The "a=rid" line is specified in <xreftarget="I-D.ietf-mmusic-rid"></xref>,target="RFC8851" format="default" sectionFormat="of" derivedContent="RFC8851"/>, and its directionMUST<bcp14>MUST</bcp14> be "send". If the application has chosen aRID value,rid-id, itMUST<bcp14>MUST</bcp14> beused as the rid-identifier; otherwiseused; otherwise, aRID value MUSTrid-id <bcp14>MUST</bcp14> be generated by the implementation.RID values MUSTrid-ids <bcp14>MUST</bcp14> be generated in a fashion that does not leak user information, e.g., randomly or using a per-PeerConnectioncounter,counter (see guidance at the end of <xref target="RFC8852" sectionFormat="comma" section="3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8852#section-3.3" derivedContent="RFC8852"/>), andSHOULD<bcp14>SHOULD</bcp14> be 3 bytes or less, to allow them to efficiently fit into the RTP headerextensionextensions defined in <xreftarget="I-D.ietf-avtext-rid"></xref>, Section 3.target="RFC8852" sectionFormat="comma" section="3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8852#section-3.3" derivedContent="RFC8852"/>. If no encodings have been specified, or only one encoding is specified but without aRID value,rid-id, then no "a=rid" lines aregenerated.</t> <t>Ifgenerated.</li> <li pn="section-5.2.1-13.12">If the RtpTransceiver has a sendrecv or sendonly direction and more than one "a=rid" line has been generated, an "a=simulcast" line, with direction "send", as defined in <xreftarget="I-D.ietf-mmusic-sdp-simulcast"></xref>, Section 6.2.target="RFC8853" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8853#section-5.1" derivedContent="RFC8853"/>. Thelistassociated set ofRIDs MUSTrid-ids <bcp14>MUST</bcp14> include all of theRID identifiersrid-ids used in the "a=rid" lines for thism= section.</t> <t>If"m=" section.</li> <li pn="section-5.2.1-13.13">If (1) the bundle policy for this PeerConnection is set to"max-bundle","max-bundle" and this is not the firstm= section,"m=" section or (2) the bundle policy is set to"balanced","balanced" and this is not the firstm="m=" section for this media type, an "a=bundle-only"line.</t> </list> </t> <t>Theline.</li> </ul> <t indent="0" pn="section-5.2.1-14">The following attributes, which are of category IDENTICAL or TRANSPORT,MUST<bcp14>MUST</bcp14> appear only in "m=" sectionswhichthat either have a unique address orwhichare associated with thebundle-tag.BUNDLE-tag. (In initial offers, this means those "m=" sectionswhichthat do not contain an "a=bundle-only" attribute.)</t><t> <list style="symbols"> <t>"a=ice-ufrag"<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-15"> <li pn="section-5.2.1-15.1">"a=ice-ufrag" and "a=ice-pwd" lines, as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 4.4.</t> <t>Fortarget="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>.</li> <li pn="section-5.2.1-15.2">For each desired digest algorithm, one or more "a=fingerprint" lines for each of the endpoint's certificates, as specified in <xreftarget="RFC8122"></xref>, Section 5.</t> <t>Antarget="RFC8122" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8122#section-5" derivedContent="RFC8122"/>.</li> <li pn="section-5.2.1-15.3">An "a=setup" line, as specified in <xreftarget="RFC4145"></xref>, Section 4,target="RFC4145" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4145#section-4" derivedContent="RFC4145"/> and clarified for use in DTLS-SRTP scenarios in <xreftarget="RFC5763"></xref>, Section 5.target="RFC5763" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5763#section-5" derivedContent="RFC5763"/>. The role value in the offerMUST<bcp14>MUST</bcp14> be"actpass".</t> <t>An"actpass".</li> <li pn="section-5.2.1-15.4">An "a=tls-id" line, as specified in <xreftarget="I-D.ietf-mmusic-dtls-sdp" />, Section 5.2.</t> <t>Antarget="RFC8842" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-5.2" derivedContent="RFC8842"/>.</li> <li pn="section-5.2.1-15.5">An "a=rtcp" line, as specified in <xreftarget="RFC3605"></xref>, Section 2.1,target="RFC3605" sectionFormat="comma" section="2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3605#section-2.1" derivedContent="RFC3605"/>, containing thedummydefault value "9 IN IP4 0.0.0.0", because no candidates have yet beengathered.</t> <t>Angathered.</li> <li pn="section-5.2.1-15.6">An "a=rtcp-mux" line, as specified in <xreftarget="RFC5761"></xref>, Section 5.1.3.</t> <t>Iftarget="RFC5761" sectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>.</li> <li pn="section-5.2.1-15.7">If the RTP/RTCP multiplexing policy is "require", an "a=rtcp-mux-only" line, as specified in <xreftarget="I-D.ietf-mmusic-mux-exclusive" />, Section 4.</t> <t>Antarget="RFC8858" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8858#section-4" derivedContent="RFC8858"/>.</li> <li pn="section-5.2.1-15.8">An "a=rtcp-rsize" line, as specified in <xreftarget="RFC5506"></xref>, Section 5.</t> </list> </t> <t>Lastly,target="RFC5506" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5506#section-5" derivedContent="RFC5506"/>.</li> </ul> <t indent="0" pn="section-5.2.1-16">Lastly, if a data channel has been created,a m=an "m=" sectionMUST<bcp14>MUST</bcp14> be generated for data. The <media> fieldMUST<bcp14>MUST</bcp14> be set to"application""application", and the <proto> fieldMUST<bcp14>MUST</bcp14> be set to "UDP/DTLS/SCTP" <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>.target="RFC8841" format="default" sectionFormat="of" derivedContent="RFC8841"/>. The"fmt"<fmt> valueMUST<bcp14>MUST</bcp14> be set to "webrtc-datachannel" as specified in <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>, Section 4.1.</t> <t>Withintarget="RFC8841" sectionFormat="comma" section="4.2.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-4.2.2" derivedContent="RFC8841"/>. </t> <t indent="0" pn="section-5.2.1-17">Within the datam="m=" section, an "a=mid" lineMUST<bcp14>MUST</bcp14> be generated and included as described above, along with an "a=sctp-port" line referencing the SCTP port number, as defined in <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>, Section 5.1,target="RFC8841" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-5.1" derivedContent="RFC8841"/>; and, if appropriate, an "a=max-message-size" line, as defined in <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>, Section 6.1.</t> <t>Astarget="RFC8841" sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-6.1" derivedContent="RFC8841"/>.</t> <t indent="0" pn="section-5.2.1-18">As discussed above, the following attributes of category IDENTICAL or TRANSPORT are included only if the datam="m=" section either has a unique address or is associated with thebundle-tagBUNDLE-tag (e.g., if it is the onlym="m=" section):<list style="symbols"> <t>"a=ice-ufrag"</t> <t>"a=ice-pwd"</t> <t>"a=fingerprint"</t> <t>"a=setup"</t> <t>"a=tls-id"</t> </list></t> <t>Once</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-19"> <li pn="section-5.2.1-19.1">"a=ice-ufrag"</li> <li pn="section-5.2.1-19.2">"a=ice-pwd"</li> <li pn="section-5.2.1-19.3">"a=fingerprint"</li> <li pn="section-5.2.1-19.4">"a=setup"</li> <li pn="section-5.2.1-19.5">"a=tls-id"</li> </ul> <t indent="0" pn="section-5.2.1-20">Once allm="m=" sections have been generated, a session-level "a=group" attributeMUST<bcp14>MUST</bcp14> be added as specified in <xreftarget="RFC5888"></xref>.target="RFC5888" format="default" sectionFormat="of" derivedContent="RFC5888"/>. This attributeMUST<bcp14>MUST</bcp14> have semantics"BUNDLE","BUNDLE" andMUST<bcp14>MUST</bcp14> include the mid identifiers of eachm="m=" section. The effect of this is that the JSEP implementation offers allm="m=" sections as one bundle group. However, whether them="m=" sections are bundle-only or not depends on the bundle policy.</t><t>The<t indent="0" pn="section-5.2.1-21">The next step is to generate session-level lip sync groups as defined in <xref target="RFC5888"/>, Section 7.sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-7" derivedContent="RFC5888"/>. For each MediaStream referenced by more than one RtpTransceiver (by passing those MediaStreams as arguments to the addTrack and addTransceiver methods), a group of type "LS"MUST<bcp14>MUST</bcp14> be added that contains themidMID values for each RtpTransceiver.</t><t>Attributes which<t indent="0" pn="section-5.2.1-22">Attributes that SDP permits toeitherbe at either the session level or the media levelSHOULD<bcp14>SHOULD</bcp14> generally be at the media level even if they are identical. This assists development and debugging by making it easier to understand individual media sections, especially if one of a set of initially identical attributes is subsequently changed. However, implementationsMAY<bcp14>MAY</bcp14> choose to aggregate attributes at the sessionlevellevel, and JSEP implementationsMUST<bcp14>MUST</bcp14> be prepared to receive attributes in either location.</t><t>Attributes<t indent="0" pn="section-5.2.1-23">Attributes other than the ones specified aboveMAY<bcp14>MAY</bcp14> be included, except for the followingattributesattributes, which are specifically incompatible with the requirements of <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>,target="RFC8834" format="default" sectionFormat="of" derivedContent="RFC8834"/> andMUST NOT<bcp14>MUST NOT</bcp14> be included:<list style="symbols"> <t>"a=crypto"</t> <t>"a=key-mgmt"</t> <t>"a=ice-lite"</t> </list></t> <t>Note</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.1-24"> <li pn="section-5.2.1-24.1">"a=crypto"</li> <li pn="section-5.2.1-24.2">"a=key-mgmt"</li> <li pn="section-5.2.1-24.3">"a=ice-lite"</li> </ul> <t indent="0" pn="section-5.2.1-25">Note that when bundle is used, any additional attributes that are addedMUST<bcp14>MUST</bcp14> follow the advice in <xreftarget="I-D.ietf-mmusic-sdp-mux-attributes"></xref>target="RFC8859" format="default" sectionFormat="of" derivedContent="RFC8859"/> on how those attributes interact with bundle.</t><t>Note<t indent="0" pn="section-5.2.1-26">Note that these requirements are in some cases stricter than those of SDP. ImplementationsMUST<bcp14>MUST</bcp14> be prepared to accept compliant SDP even if it would not conform to the requirements for generating SDP in this specification.</t> </section> <sectiontitle="Subsequent Offers" anchor="sec.subsequent-offers"> <t>Whenanchor="sec.subsequent-offers" numbered="true" toc="include" removeInRFC="false" pn="section-5.2.2"> <name slugifiedName="name-subsequent-offers">Subsequent Offers</name> <t indent="0" pn="section-5.2.2-1">When createOffer is called a second (or later)time,time or is called after a local description has already been installed, the processing is somewhat different than for an initial offer.</t><t>If<t indent="0" pn="section-5.2.2-2">If the previous offer was not applied using setLocalDescription, meaning the PeerConnection is still in the "stable" state, the steps for generating an initial offershould<bcp14>MUST</bcp14> be followed, subject to the following restriction:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.2-3"> <li pn="section-5.2.2-3.1">The fields of the "o=" lineMUST<bcp14>MUST</bcp14> stay the same except for the <session-version> field, whichMUST<bcp14>MUST</bcp14> increment by one on each call to createOffer if the offer might differ from the output of the previous call to createOffer; implementationsMAY<bcp14>MAY</bcp14> opt to increment <session-version> on every call. The value of the generated <session-version> is independent of the <session-version> of the current local description; in particular, in the case where the current version is N, an offer is created and applied with version N+1, and then that offer is rolled back so that the current version is again N, the next generated offer will still have versionN+2.</t> </list></t> <t>NoteN+2.</li> </ul> <t indent="0" pn="section-5.2.2-4">Note that if the application creates an offer by reading currentLocalDescription instead of calling createOffer, the returned SDP may be different than when setLocalDescription was originally called, due to the addition of gathered ICE candidates, but the <session-version> will not have changed. There are no known scenarios in which this causes problems, but if this is a concern, the solution is simply to use createOffer to ensure a unique <session-version>.</t><t>If<t indent="0" pn="section-5.2.2-5">If the previous offer was applied using setLocalDescription, but a corresponding answer from the remote side has not yet been applied, meaning the PeerConnection is still in the "have-local-offer" state, an offer is generated by following the steps in the "stable" state above, along with these exceptions:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.2-6"> <li pn="section-5.2.2-6.1">The "s=" and "t=" linesMUST<bcp14>MUST</bcp14> stay thesame.</t> <t>Ifsame.</li> <li pn="section-5.2.2-6.2">If any RtpTransceiver has beenadded,added and there exists anm="m=" section with a zero port in the current local description or the current remote description, thatm="m=" sectionMUST<bcp14>MUST</bcp14> be recycled by generating anm="m=" section for the added RtpTransceiver as if them="m=" section were being added to the session description (including a new MIDvalue),value) and placing it at the same index as them="m=" section with a zeroport.</t> <t>Ifport.</li> <li pn="section-5.2.2-6.3">If an RtpTransceiver is stopped and is not associated with anm="m=" section, anm="m=" sectionMUST NOT<bcp14>MUST NOT</bcp14> be generated for it. This prevents adding back RtpTransceivers whosem="m=" sections were recycled and used for a new RtpTransceiver in a previous offer/ answer exchange, as describedabove.</t> <t>Ifabove.</li> <li pn="section-5.2.2-6.4">If an RtpTransceiver has been stopped and is associated with anm="m=" section, and them="m=" section is not being recycled as described above, anm="m=" sectionMUST<bcp14>MUST</bcp14> be generated for it with the port set to zero and all "a=msid" linesremoved.</t> <t>Forremoved.</li> <li pn="section-5.2.2-6.5">For RtpTransceivers that are not stopped, the "a=msid"line(s) MUSTline or lines <bcp14>MUST</bcp14> stay the same if they are present in the current description, regardless of changes to the transceiver's direction or track. If no "a=msid" line is present in the current description, "a=msid" line(s)MUST<bcp14>MUST</bcp14> be generated according to the same rules as for an initialoffer.</t> <t>Eachoffer.</li> <li pn="section-5.2.2-6.6">Each "m=" andc=""c=" lineMUST<bcp14>MUST</bcp14> be filled in with the port, relevant RTP profile, and address of the default candidate for them="m=" section, as described in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 3.2.1.2,target="RFC8839" sectionFormat="comma" section="4.2.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.2.1.2" derivedContent="RFC8839"/> and clarified in <xreftarget="sec.profile-names"/>.target="sec.profile-names" format="default" sectionFormat="of" derivedContent="Section 5.1.2"/>. If no RTP candidates have yet been gathered,dummydefault valuesMUST<bcp14>MUST</bcp14> still be used, as describedabove.</t> <t>Eachabove.</li> <li pn="section-5.2.2-6.7">Each "a=mid" lineMUST<bcp14>MUST</bcp14> stay thesame.</t> <t>Eachsame.</li> <li pn="section-5.2.2-6.8">Each "a=ice-ufrag" and "a=ice-pwd" lineMUST<bcp14>MUST</bcp14> stay the same, unless the ICE configuration has changed(either(e.g., changes to either the supported STUN/TURNservers,servers or the ICE candidatepolicy),policy) or the"IceRestart"IceRestart option( <xref(<xref target="sec.icerestart"/>format="default" sectionFormat="of" derivedContent="Section 5.2.3.1"/>) was specified. If them="m=" section is bundled into anotherm="m=" section, it stillMUST NOT<bcp14>MUST NOT</bcp14> contain any ICEcredentials.</t> <t>Ifcredentials.</li> <li pn="section-5.2.2-6.9">If them="m=" section is not bundled into anotherm="m=" section, its "a=rtcp" attribute lineMUST<bcp14>MUST</bcp14> be filled in with the port and address of the default RTCP candidate, as indicated in <xreftarget="RFC5761"></xref>, Section 5.1.3.target="RFC5761" sectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>. If no RTCP candidates have yet been gathered,dummydefault valuesMUST<bcp14>MUST</bcp14> be used, as described in <xref target="sec.initial-offers" format="default" sectionFormat="of" derivedContent="Section 5.2.1"/> above.</li> <li pn="section-5.2.2-6.10">If theinitial offer section above.</t> <t>If the m="m=" section is not bundled into anotherm="m=" section, for each candidate that has been gathered during the most recent gathering phase (see <xreftarget="sec.ice-gather-overview"></xref>),target="sec.ice-gather-overview" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/>), an "a=candidate" lineMUST<bcp14>MUST</bcp14> be added, as defined in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 4.1.target="RFC8839" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.1" derivedContent="RFC8839"/>. If candidate gathering for the section has completed, an "a=end-of-candidates" attributeMUST<bcp14>MUST</bcp14> be added, as described in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 9.3.target="RFC8840" sectionFormat="comma" section="8.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-8.2" derivedContent="RFC8840"/>. If them="m=" section is bundled into anotherm="m=" section, both "a=candidate" and "a=end-of-candidates"MUST<bcp14>MUST</bcp14> beomitted.</t> <t>Foromitted. </li> <li pn="section-5.2.2-6.11">For RtpTransceivers that are still present, the "a=rid" linesMUST<bcp14>MUST</bcp14> stay thesame.</t> <t>Forsame.</li> <li pn="section-5.2.2-6.12">For RtpTransceivers that are still present, any "a=simulcast" lineMUST<bcp14>MUST</bcp14> stay thesame.</t> </list></t> <t>Ifsame.</li> </ul> <t indent="0" pn="section-5.2.2-7">If the previous offer was applied using setLocalDescription, and a corresponding answer from the remote side has been applied using setRemoteDescription, meaning the PeerConnection is in the "have-remote-pranswer" state or the "stable"states,state, an offer is generated based on the negotiated session descriptions by following the steps mentioned for the "have-local-offer" state above.</t><t>In<t indent="0" pn="section-5.2.2-8">In addition, for each existing, non-recycled, non-rejectedm="m=" section in the new offer, the following adjustments are made based on the contents of the correspondingm="m=" section in the current local or remote description, as appropriate:<list style="symbols"> <t>The m=</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2.2-9"> <li pn="section-5.2.2-9.1">The "m=" line and corresponding "a=rtpmap" and "a=fmtp" linesMUST<bcp14>MUST</bcp14> only include media formatswhichthat have not been excluded by the codec preferences of the associatedtransceiver,transceiver andMUSTalso <bcp14>MUST</bcp14> include all currently available formats. Media formats that were previously offered but are no longer available (e.g., a shared hardware codec)MAY<bcp14>MAY</bcp14> beexcluded.</t> <t>Unlessexcluded.</li> <li pn="section-5.2.2-9.2">Unless codec preferences have been set for the associated transceiver, the media formats on them="m=" lineMUST<bcp14>MUST</bcp14> be generated in the same order as in the most recent answer. Any media formats that were not present in the most recent answerMUST<bcp14>MUST</bcp14> be added after all existingformats.</t> <t>Theformats.</li> <li pn="section-5.2.2-9.3">The RTP header extensionsMUST<bcp14>MUST</bcp14> only include those that are present in the most recentanswer.</t> <t>Theanswer.</li> <li pn="section-5.2.2-9.4">The RTCP feedback mechanismsMUST<bcp14>MUST</bcp14> only include those that are present in the most recent answer, except for the case of format-specific mechanisms that are referencing anewly-addednewly added mediaformat.</t> <t>Theformat.</li> <li pn="section-5.2.2-9.5">The "a=rtcp" lineMUST NOT<bcp14>MUST NOT</bcp14> be added if the most recent answer included an "a=rtcp-mux"line.</t> <t>Theline.</li> <li pn="section-5.2.2-9.6">The "a=rtcp-mux" lineMUST<bcp14>MUST</bcp14> be the same as that in the most recentanswer.</t> <t>Theanswer.</li> <li pn="section-5.2.2-9.7">The "a=rtcp-mux-only" lineMUST NOT<bcp14>MUST NOT</bcp14> beadded.</t> <t>Theadded.</li> <li pn="section-5.2.2-9.8">The "a=rtcp-rsize" lineMUST NOT<bcp14>MUST NOT</bcp14> be added unless present in the most recentanswer.</t> <t>Ananswer.</li> <li pn="section-5.2.2-9.9">An "a=bundle-only"line MUST NOT be added,line, asindicateddefined in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 6.target="RFC8843" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-6" derivedContent="RFC8843"/>, <bcp14>MUST NOT</bcp14> be added. Instead, JSEP implementationsMUST<bcp14>MUST</bcp14> simply omit parameters in the IDENTICAL and TRANSPORT categories for bundledm="m=" sections, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 8.1.</t> <t>Notetarget="RFC8843" sectionFormat="comma" section="7.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-7.1.3" derivedContent="RFC8843"/>.</li> <li pn="section-5.2.2-9.10">Note that if mediam="m=" sections are bundled into a datam="m=" section, then certain TRANSPORT and IDENTICAL attributes may appear in the datam="m=" section even if they would otherwise only be appropriate for a mediam="m=" section (e.g., "a=rtcp-mux"). This cannot happen in initial offers because in the initial offer JSEP implementations always list mediam="m=" sections (if any) before the datam="m=" section (if any), and at least one of those mediam="m=" sections will not have the "a=bundle-only" attribute. Therefore, in initial offers, any "a=bundle-only"m="m=" sections will be bundled into a preceding non-bundle-only mediam= section.</t> </list></t> <t>The"m=" section.</li> </ul> <t indent="0" pn="section-5.2.2-10">The "a=group:BUNDLE" attributeMUST<bcp14>MUST</bcp14> include the MID identifiers specified in the bundle group in the most recent answer, minus anym="m=" sections that have been marked as rejected, plus any newly added or re-enabledm="m=" sections. In other words, the bundle attributemust<bcp14>MUST</bcp14> contain allm="m=" sections that were previously bundled, as long as they are still alive, as well as any newm="m=" sections.</t><t>"a=group:LS"<t indent="0" pn="section-5.2.2-11">"a=group:LS" attributes are generated in the same way as for initial offers, with the additional stipulation that any lip sync groups that were present in the most recent answerMUST<bcp14>MUST</bcp14> continue to exist andMUST<bcp14>MUST</bcp14> contain any previously existing MID identifiers, as long as the identifiedm="m=" sections still exist and are not rejected, and the group still contains at least two MID identifiers. This ensures that any synchronized "recvonly"m="m=" sections continue to be synchronized in the new offer.</t> </section> <sectiontitle="Options Handling" anchor="sec.options-handling1"> <t>Theanchor="sec.options-handling1" numbered="true" toc="include" removeInRFC="false" pn="section-5.2.3"> <name slugifiedName="name-options-handling">Options Handling</name> <t indent="0" pn="section-5.2.3-1">The createOffer method takes as a parameter an RTCOfferOptions object. Special processing is performed when generatingaan SDP description if the following options are present.</t> <sectiontitle="IceRestart" anchor="sec.icerestart"> <t>Ifanchor="sec.icerestart" numbered="true" toc="include" removeInRFC="false" pn="section-5.2.3.1"> <name slugifiedName="name-icerestart">IceRestart</name> <t indent="0" pn="section-5.2.3.1-1">If the"IceRestart"IceRestart option is specified, with a value of "true", the offerMUST<bcp14>MUST</bcp14> indicate an ICE restart by generating new ICE ufrag and pwd attributes, as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 3.4.1.1.1.target="RFC8839" sectionFormat="comma" section="4.4.3.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.4.3.1.1" derivedContent="RFC8839"/>. If this option is specified on an initial offer, it has no effect (since a new ICE ufrag and pwd are already generated). Similarly, if the ICE configuration has changed, this option has no effect, since new ufrag and pwd attributes will be generated automatically. This option is primarily useful for reestablishing connectivity in cases where failures are detected by the application.</t> </section> <sectiontitle="VoiceActivityDetection" anchor="sec.voiceactivitydetection1"> <t>Silenceanchor="sec.voiceactivitydetection1" numbered="true" toc="include" removeInRFC="false" pn="section-5.2.3.2"> <name slugifiedName="name-voiceactivitydetection">VoiceActivityDetection</name> <t indent="0" pn="section-5.2.3.2-1">Silence suppression, also known as discontinuous transmission ("DTX"), can reduce the bandwidth used for audio by switching to a special encoding when voice activity is not detected, at the cost of some fidelity.</t><t>If<t indent="0" pn="section-5.2.3.2-2">If the "VoiceActivityDetection" option is specified, with a value of "true", the offerMUST<bcp14>MUST</bcp14> indicate support for silence suppression in the audio it receives by including comfort noise ("CN") codecs for each offered audio codec, as specified in <xreftarget="RFC3389"></xref>, Section 5.1,target="RFC3389" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3389#section-5.1" derivedContent="RFC3389"/>, except for codecs that have their own internal silence suppression support. For codecs that have their own internal silence suppression support, the appropriate fmtp parameters for that codecMUST<bcp14>MUST</bcp14> be specified to indicate that silence suppression for received audio is desired. For example, when using the Opus codec <xref target="RFC6716"/>,format="default" sectionFormat="of" derivedContent="RFC6716"/>, the "usedtx=1" parameter, specified in <xref target="RFC7587"/>,format="default" sectionFormat="of" derivedContent="RFC7587"/>, would be used in the offer.</t><t>If<t indent="0" pn="section-5.2.3.2-3">If the "VoiceActivityDetection" option is specified, with a value of "false", the JSEP implementationMUST NOT<bcp14>MUST NOT</bcp14> emit "CN" codecs. For codecs that have their own internal silence suppression support, the appropriate fmtp parameters for that codecMUST<bcp14>MUST</bcp14> be specified to indicate that silence suppression for received audio is not desired. For example, when using the Opus codec, the "usedtx=0" parameter would be specified in the offer. In addition, the implementationMUST NOT<bcp14>MUST NOT</bcp14> use silence suppression for media it generates, regardless of whether the "CN" codecs or related fmtp parameters appear in the peer's description. The impact of these rules is that silence suppression in JSEP depends on mutual agreement of both sides, which ensures consistent handling regardless of which codec is used.</t><t>The<t indent="0" pn="section-5.2.3.2-4">The "VoiceActivityDetection" option does not have any impact on the setting of the "vad" value in the signaling of theclient to mixerclient-to-mixer audio level header extension described in <xreftarget="RFC6464"></xref>, Section 4.</t>target="RFC6464" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6464#section-4" derivedContent="RFC6464"/>.</t> </section> </section> </section> <sectiontitle="Generatinganchor="sec.generating-an-answer" numbered="true" toc="include" removeInRFC="false" pn="section-5.3"> <name slugifiedName="name-generating-an-answer">Generating anAnswer" anchor="sec.generating-an-answer"> <t>WhenAnswer</name> <t indent="0" pn="section-5.3-1">When createAnswer is called, a new SDP descriptionmust<bcp14>MUST</bcp14> be created that is compatible with the supplied remote description as well as the requirements specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>.target="RFC8834" format="default" sectionFormat="of" derivedContent="RFC8834"/>. The exact details of this process are explained below.</t> <sectiontitle="Initial Answers" anchor="sec.initial-answers"> <t>Whenanchor="sec.initial-answers" numbered="true" toc="include" removeInRFC="false" pn="section-5.3.1"> <name slugifiedName="name-initial-answers">Initial Answers</name> <t indent="0" pn="section-5.3.1-1">When createAnswer is called for the first time after a remote description has been provided, the result is known as the initial answer. If no remote description has been installed, an answer cannot be generated, and an errorMUST<bcp14>MUST</bcp14> be returned.</t><t>Note<t indent="0" pn="section-5.3.1-2">Note that the remote description SDP may not have been created by a JSEP endpoint and may not conform to all the requirements listed in <xreftarget="sec-create-offer"></xref>.target="sec-create-offer" format="default" sectionFormat="of" derivedContent="Section 5.2"/>. For many cases, this is not a problem. However, if any mandatory SDP attributes aremissing,missing or functionality listed as mandatory-to-use above is not present, thisMUST<bcp14>MUST</bcp14> be treated as anerror,error andMUST<bcp14>MUST</bcp14> cause the affectedm="m=" sections to be marked as rejected.</t><t>The<t indent="0" pn="section-5.3.1-3">The first step in generating an initial answer is to generate session-level attributes. The process here is identical to that indicated inthe initial offers section<xref target="sec.initial-offers" format="default" sectionFormat="of" derivedContent="Section 5.2.1"/> above, except that the "a=ice-options" line, with the "trickle" option as specified in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 3,target="RFC8840" sectionFormat="comma" section="4.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.3" derivedContent="RFC8840"/> and the "ice2" option as specified in <xreftarget="RFC8445"></xref>, Section 10,target="RFC8445" sectionFormat="comma" section="10" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-10" derivedContent="RFC8445"/>, is only included if such an option was present in the offer.</t><t>The<t indent="0" pn="section-5.3.1-4">The next step is to generate session-level lip sync groups, as defined in <xref target="RFC5888"/>, Section 7.sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-7" derivedContent="RFC5888"/>. For each group of type "LS" present in the offer, select the local RtpTransceivers that are referenced by the MID values in the specified group, and determine which of them either reference a common local MediaStream (specified in the calls to addTrack/addTransceiver used to createthem),them) or have no MediaStream to reference because they were not created by addTrack/addTransceiver. If at least two such RtpTransceivers exist, a group of type "LS" with themidMID values of these RtpTransceiversMUST<bcp14>MUST</bcp14> be added.OtherwiseOtherwise, the offered "LS" groupMUST<bcp14>MUST</bcp14> be ignored and no corresponding group generated in the answer.</t><t>As<t indent="0" pn="section-5.3.1-5">As a simple example, consider the following offer of a single audio and single video track contained in the same MediaStream. SDP lines not relevant to this example have been removed for clarity. As explained in <xref target="sec-create-offer"/>,format="default" sectionFormat="of" derivedContent="Section 5.2"/>, a group of type "LS" has been added that references each track's RtpTransceiver.</t><t> <figure> <artwork> <![CDATA[<sourcecode name="" type="sdp" markers="false" pn="section-5.3.1-6"> a=group:LS a1 v1 m=audio 10000 UDP/TLS/RTP/SAVPF 0 a=mid:a1 a=msid:ms1 m=video 10001 UDP/TLS/RTP/SAVPF 96 a=mid:v1a=msid:ms1 ]]> </artwork> </figure> </t> <t>Ifa=msid:ms1</sourcecode> <t indent="0" pn="section-5.3.1-7">If the answerer uses a single MediaStream when it adds its tracks, both of its transceivers will reference this stream, and so the subsequent answer will contain a "LS" group identical to that in the offer, as shown below:</t><t> <figure> <artwork> <![CDATA[<sourcecode name="" type="sdp" markers="false" pn="section-5.3.1-8"> a=group:LS a1 v1 m=audio 20000 UDP/TLS/RTP/SAVPF 0 a=mid:a1 a=msid:ms2 m=video 20001 UDP/TLS/RTP/SAVPF 96 a=mid:v1a=msid:ms2 ]]> </artwork> </figure> </t> <t>However,a=msid:ms2</sourcecode> <t indent="0" pn="section-5.3.1-9">However, if the answerer groups its tracks into separate MediaStreams, its transceivers will reference different streams, and so the subsequent answer will not contain a "LS" group.</t><t> <figure> <artwork> <![CDATA[<sourcecode name="" type="sdp" markers="false" pn="section-5.3.1-10"> m=audio 20000 UDP/TLS/RTP/SAVPF 0 a=mid:a1 a=msid:ms2a m=video 20001 UDP/TLS/RTP/SAVPF 96 a=mid:v1a=msid:ms2b ]]> </artwork> </figure> </t> <t>Finally,a=msid:ms2b</sourcecode> <t indent="0" pn="section-5.3.1-11">Finally, if the answerer does not add any tracks, its transceivers will not reference any MediaStreams, causing the preferences of the offerer to be maintained, and so the subsequent answer will contain an identical "LS" group.</t><t> <figure> <artwork> <![CDATA[<sourcecode name="" type="sdp" markers="false" pn="section-5.3.1-12"> a=group:LS a1 v1 m=audio 20000 UDP/TLS/RTP/SAVPF 0 a=mid:a1 a=recvonly m=video 20001 UDP/TLS/RTP/SAVPF 96 a=mid:v1a=recvonly ]]> </artwork> </figure> </t> <t>The <xref target="sec.detailed-example" />a=recvonly</sourcecode> <t indent="0" pn="section-5.3.1-13">The examplelaterinthis document<xref target="sec.detailed-example" format="default" sectionFormat="of" derivedContent="Section 7.2"/> shows a more involved case of "LS" group generation.</t><t>The<t indent="0" pn="section-5.3.1-14">The next step is to generatem= sectionsan "m=" section for eachm="m=" section that is present in the remote offer, as specified in <xreftarget="RFC3264"></xref>, Section 6.target="RFC3264" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6" derivedContent="RFC3264"/>. For the purposes of this discussion, any session-level attributes in the offer that are also valid as media-level attributes are considered to be present in eachm="m=" section. Each offeredm="m=" section will have an associated RtpTransceiver, as described in <xref target="sec.applying-a-remote-desc"/>.format="default" sectionFormat="of" derivedContent="Section 5.10"/>. If there are more RtpTransceivers than there arem="m=" sections, the unmatched RtpTransceivers will need to be associated in a subsequent offer.</t><t>For<t indent="0" pn="section-5.3.1-15">For each offeredm="m=" section, if any of the following conditions are true, the correspondingm="m=" section in the answerMUST<bcp14>MUST</bcp14> be marked as rejected by setting theport<port> in them="m=" line to zero, as indicated in <xreftarget="RFC3264"></xref>, Section 6,target="RFC3264" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6" derivedContent="RFC3264"/>, and further processing for thism="m=" section can be skipped:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-16"> <li pn="section-5.3.1-16.1">The associated RtpTransceiver has beenstopped.</t> <t>None of thestopped.</li> <li pn="section-5.3.1-16.2">There is no offered mediaformats areformat that is both supported and, if applicable, allowed by codecpreferences.</t> <t>Thepreferences.</li> <li pn="section-5.3.1-16.3">The bundle policy is "max-bundle", and this is not the firstm="m=" section or in the same bundle group as the firstm= section.</t> <t>The"m=" section.</li> <li pn="section-5.3.1-16.4">The bundle policy is "balanced", and this is not the firstm="m=" section for this media type or in the same bundle group as the firstm="m=" section for this mediatype.</t> <t>This m=type.</li> <li pn="section-5.3.1-16.5">This "m=" section is in a bundle group, and the group's offerer taggedm="m=" section is being rejected due to one of the above reasons. This requires allm="m=" sections in the bundle group to be rejected, as specified in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 7.3.3.</t> </list></t> <t>Otherwise,target="RFC8843" sectionFormat="comma" section="7.3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-7.3.3" derivedContent="RFC8843"/>.</li> </ul> <t indent="0" pn="section-5.3.1-17">Otherwise, eachm="m=" section in the answershould<bcp14>MUST</bcp14> then be generated as specified in <xreftarget="RFC3264"></xref>, Section 6.1.target="RFC3264" sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>. For them="m=" line itself, the following rulesmust<bcp14>MUST</bcp14> befollowed: <list style="symbols"> <t>The portfollowed:</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-18"> <li pn="section-5.3.1-18.1">The <port> value would normally be set to the port of the default ICE candidate for thism="m=" section, but given that no candidates are available yet, the"dummy" portdefault <port> value of 9 (Discard)MUST<bcp14>MUST</bcp14> be used, as indicated in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 5.1.</t> <t>Thetarget="RFC8840" sectionFormat="comma" section="4.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.1" derivedContent="RFC8840"/>.</li> <li pn="section-5.3.1-18.2">The <proto> fieldMUST<bcp14>MUST</bcp14> be set to exactly match the <proto> field for the correspondingm="m=" line in theoffer.</t> <t>Ifoffer.</li> <li pn="section-5.3.1-18.3">If codec preferences have been set for the associated transceiver, media formatsMUST<bcp14>MUST</bcp14> be generated in the corresponding order, regardless of what was offered, andMUST<bcp14>MUST</bcp14> exclude any codecs not present in the codecpreferences.</t> <t>Otherwise,preferences.</li> <li pn="section-5.3.1-18.4">Otherwise, the media formats on them="m=" lineMUST<bcp14>MUST</bcp14> be generated in the same order as those offered in the current remote description, excluding any currently unsupported formats. Any currently available media formats that are not present in the current remote descriptionMUST<bcp14>MUST</bcp14> be added after all existingformats.</t> <t>Informats.</li> <li pn="section-5.3.1-18.5">In either case, the media formats in the answerMUST<bcp14>MUST</bcp14> include at least one format that is present in theoffer,offer butMAY<bcp14>MAY</bcp14> include formats that are locally supported but not present in the offer, as mentioned in <xref target="RFC3264"/>, Section 6.1.sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>. If no common format exists, them="m=" section is rejected as describedabove.</t> </list></t> <t>The m=above.</li> </ul> <t indent="0" pn="section-5.3.1-19">The "m=" lineMUST<bcp14>MUST</bcp14> be followed immediately by a "c=" line, as specified in <xreftarget="RFC4566"></xref>, Section 5.7.target="RFC4566" sectionFormat="comma" section="5.7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.7" derivedContent="RFC4566"/>. Again, as no candidates are available yet, the "c=" linemust<bcp14>MUST</bcp14> contain the"dummy"default value "IN IP4 0.0.0.0", as defined in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 5.1.</t> <t>Iftarget="RFC8840" sectionFormat="comma" section="4.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-4.1.3" derivedContent="RFC8840"/>.</t> <t indent="0" pn="section-5.3.1-20">If the offer supports bundle, allm="m=" sections to be bundledmust<bcp14>MUST</bcp14> use the same ICE credentials and candidates; allm="m=" sections not being bundledmust<bcp14>MUST</bcp14> use unique ICE credentials and candidates. Eachm="m=" sectionMUST<bcp14>MUST</bcp14> contain the following attributes (which are of attribute types other than IDENTICALandor TRANSPORT):<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-21"> <li pn="section-5.3.1-21.1">If and only if present in the offer, an "a=mid" line, as specified in <xreftarget="RFC5888"></xref>, Section 9.1.target="RFC5888" sectionFormat="comma" section="9.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-9.1" derivedContent="RFC5888"/>. The"mid"MID valueMUST<bcp14>MUST</bcp14> match that specified in theoffer.</t> <t>Aoffer.</li> <li pn="section-5.3.1-21.2">A direction attribute, determined by applying the rules regarding the offered direction specified in <xref target="RFC3264"/>, Section 6.1,sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>, and then intersecting with the direction of the associated RtpTransceiver. For example, in the case where anm="m=" section is offered as"sendonly","sendonly" and the local transceiver is set to "sendrecv", the result in the answer is a "recvonly"direction.</t> <t>Fordirection.</li> <li pn="section-5.3.1-21.3">For each media format on them="m=" line, "a=rtpmap" and "a=fmtp" lines, as specified in <xreftarget="RFC4566"></xref>, Section 6,target="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/> and <xreftarget="RFC3264"></xref>, Section 6.1.</t> <t>Iftarget="RFC3264" sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>.</li> <li pn="section-5.3.1-21.4">If "rtx" is present in the offer, for each primary codec where RTP retransmission should be used, a corresponding "a=rtpmap" line indicating "rtx" with the clock rate of the primary codec and an "a=fmtp" line that references the payload type of the primary codec, as specified in <xreftarget="RFC4588"></xref>, Section 8.1.</t> <t>Fortarget="RFC4588" sectionFormat="comma" section="8.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4588#section-8.1" derivedContent="RFC4588"/>.</li> <li pn="section-5.3.1-21.5">For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines, as specified in <xreftarget="RFC4566"></xref>, Section 6.target="RFC4566" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>. The FEC mechanisms thatMUST<bcp14>MUST</bcp14> be supported are specified in <xreftarget="I-D.ietf-rtcweb-fec"></xref>, Section 6,target="RFC8854" sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8854#section-7" derivedContent="RFC8854"/>, and specific usage for each media type is outlined in Sections4<xref target="sec.interface" format="counter" sectionFormat="of" derivedContent="4"/> and5.</t> <t>If<xref target="sec.sdp-interaction-procedure" format="counter" sectionFormat="of" derivedContent="5"/>.</li> <li pn="section-5.3.1-21.6">If thism="m=" section is for media with configurable durations of media per packet, e.g., audio, an "a=maxptime" line, as described in <xref target="sec-create-offer"/>.</t> <t>Ifformat="default" sectionFormat="of" derivedContent="Section 5.2"/>.</li> <li pn="section-5.3.1-21.7">If thism="m=" section is for videomedia,media and there are known limitations on the size of imageswhichthat can be decoded, an "a=imageattr" line, as specified in <xreftarget="sec.imageattr"></xref>.</t> <t>Fortarget="sec.imageattr" format="default" sectionFormat="of" derivedContent="Section 3.6"/>.</li> <li pn="section-5.3.1-21.8">For each supported RTP header extension that is present in the offer, an "a=extmap" line, as specified in <xreftarget="RFC5285"></xref>, Section 5.target="RFC5285" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-5" derivedContent="RFC5285"/>. The list of header extensions thatSHOULD/MUST<bcp14>SHOULD</bcp14>/<bcp14>MUST</bcp14> be supported is specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>, Section 5.2.target="RFC8834" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8834#section-5.2" derivedContent="RFC8834"/>. Any header extensions that require encryptionMUST<bcp14>MUST</bcp14> be specified as indicated in <xreftarget="RFC6904"></xref>, Section 4.</t> <t>Fortarget="RFC6904" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6904#section-4" derivedContent="RFC6904"/>.</li> <li pn="section-5.3.1-21.9">For each supported RTCP feedback mechanism that is present in the offer, an "a=rtcp-fb" line, as specified in <xreftarget="RFC4585"></xref>, Section 4.2.target="RFC4585" sectionFormat="comma" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-4.2" derivedContent="RFC4585"/>. The list of RTCP feedback mechanisms thatSHOULD/MUST<bcp14>SHOULD</bcp14>/<bcp14>MUST</bcp14> be supported is specified in <xreftarget="I-D.ietf-rtcweb-rtp-usage"></xref>, Section 5.1.</t> <t>Iftarget="RFC8834" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8834#section-5.1" derivedContent="RFC8834"/>.</li> <li pn="section-5.3.1-21.10"> <t indent="0" pn="section-5.3.1-21.10.1">If the RtpTransceiver has a sendrecv or sendonly direction:<list style="symbols"> <t>For</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-21.10.2"> <li pn="section-5.3.1-21.10.2.1">For each MediaStream that was associated with the transceiver when it was created via addTrack or addTransceiver, an "a=msid" line, as specified in <xreftarget="I-D.ietf-mmusic-msid"></xref>, Section 2,target="RFC8830" sectionFormat="comma" section="2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8830#section-2" derivedContent="RFC8830"/>, but omitting the "appdata"field.</t> </list></t> </list></t> <t>Each m=field.</li> </ul> </li> </ul> <t indent="0" pn="section-5.3.1-22">Each "m=" sectionwhichthat is not bundled into anotherm= section, MUST"m=" section <bcp14>MUST</bcp14> contain the following attributes (which are of category IDENTICAL or TRANSPORT):</t><t> <list style="symbols"> <t>"a=ice-ufrag"<ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-23"> <li pn="section-5.3.1-23.1">"a=ice-ufrag" and "a=ice-pwd" lines, as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 4.4.</t> <t>Fortarget="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>.</li> <li pn="section-5.3.1-23.2">For each desired digest algorithm, one or more "a=fingerprint" lines for each of the endpoint's certificates, as specified in <xreftarget="RFC8122"></xref>, Section 5.</t> <t>Antarget="RFC8122" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8122#section-5" derivedContent="RFC8122"/>.</li> <li pn="section-5.3.1-23.3">An "a=setup" line, as specified in <xreftarget="RFC4145"></xref>, Section 4,target="RFC4145" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4145#section-4" derivedContent="RFC4145"/> and clarified for use in DTLS-SRTP scenarios in <xreftarget="RFC5763"></xref>, Section 5.target="RFC5763" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5763#section-5" derivedContent="RFC5763"/>. The role value in the answerMUST<bcp14>MUST</bcp14> be "active" or "passive". When the offer contains the "actpass" value, as will always be the case with JSEP endpoints, the answererSHOULD<bcp14>SHOULD</bcp14> use the "active" role. Offers from non-JSEP endpointsMAY<bcp14>MAY</bcp14> send other values for "a=setup", in which case the answerMUST<bcp14>MUST</bcp14> use a value consistent with the value in theoffer.</t> <t>Anoffer.</li> <li pn="section-5.3.1-23.4">An "a=tls-id" line, as specified in <xreftarget="I-D.ietf-mmusic-dtls-sdp" />, Section 5.3.</t> <t>Iftarget="RFC8842" sectionFormat="comma" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-5.3" derivedContent="RFC8842"/>.</li> <li pn="section-5.3.1-23.5">If present in the offer, an "a=rtcp-mux" line, as specified in <xreftarget="RFC5761"></xref>, Section 5.1.3.target="RFC5761" sectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>. Otherwise, an "a=rtcp" line, as specified in <xreftarget="RFC3605"></xref>, Section 2.1,target="RFC3605" sectionFormat="comma" section="2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3605#section-2.1" derivedContent="RFC3605"/>, containing thedummydefault value "9 IN IP4 0.0.0.0" (because no candidates have yet beengathered).</t> <t>Ifgathered).</li> <li pn="section-5.3.1-23.6">If present in the offer, an "a=rtcp-rsize" line, as specified in <xreftarget="RFC5506"></xref>, Section 5.</t> </list> </t> <t>Iftarget="RFC5506" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5506#section-5" derivedContent="RFC5506"/>.</li> </ul> <t indent="0" pn="section-5.3.1-24">If a data channelm="m=" section has been offered,a m=an "m=" sectionMUST<bcp14>MUST</bcp14> also be generated for data. The <media> fieldMUST<bcp14>MUST</bcp14> be set to"application""application", and the <proto> and <fmt> fieldsMUST<bcp14>MUST</bcp14> be set to exactly match the fields in the offer.</t><t>Within<t indent="0" pn="section-5.3.1-25">Within the datam="m=" section, an "a=mid" lineMUST<bcp14>MUST</bcp14> be generated and included as described above, along with an "a=sctp-port" line referencing the SCTP port number, as defined in <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>, Section 5.1,target="RFC8841" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-5.1" derivedContent="RFC8841"/>; and, if appropriate, an "a=max-message-size" line, as defined in <xreftarget="I-D.ietf-mmusic-sctp-sdp"></xref>, Section 6.1.</t> <t>Astarget="RFC8841" sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-6.1" derivedContent="RFC8841"/>.</t> <t indent="0" pn="section-5.3.1-26">As discussed above, the following attributes of category IDENTICAL or TRANSPORT are included only if the datam="m=" section is not bundled into anotherm="m=" section:<list style="symbols"> <t>"a=ice-ufrag"</t> <t>"a=ice-pwd"</t> <t>"a=fingerprint"</t> <t>"a=setup"</t> <t>"a=tls-id"</t> </list></t> <t>Note</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.1-27"> <li pn="section-5.3.1-27.1">"a=ice-ufrag"</li> <li pn="section-5.3.1-27.2">"a=ice-pwd"</li> <li pn="section-5.3.1-27.3">"a=fingerprint"</li> <li pn="section-5.3.1-27.4">"a=setup"</li> <li pn="section-5.3.1-27.5">"a=tls-id"</li> </ul> <t indent="0" pn="section-5.3.1-28">Note that if mediam="m=" sections are bundled into a datam="m=" section, then certain TRANSPORT and IDENTICAL attributes may also appear in the datam="m=" section even if they would otherwise only be appropriate for a mediam="m=" section (e.g., "a=rtcp-mux").</t><t>If<t indent="0" pn="section-5.3.1-29">If "a=group" attributes with semantics of "BUNDLE" are offered, corresponding session-level "a=group" attributesMUST<bcp14>MUST</bcp14> be added as specified in <xreftarget="RFC5888"></xref>.target="RFC5888" format="default" sectionFormat="of" derivedContent="RFC5888"/>. These attributesMUST<bcp14>MUST</bcp14> have semantics"BUNDLE","BUNDLE" andMUST<bcp14>MUST</bcp14> includetheall mid identifiers from the offered bundle groups that have not been rejected. Note that regardless of the presence of "a=bundle-only" in the offer,no m=all "m=" sections in the answershould<bcp14>MUST NOT</bcp14> have an "a=bundle-only" line.</t><t>Attributes<t indent="0" pn="section-5.3.1-30">Attributes that are common between allm="m=" sectionsMAY<bcp14>MAY</bcp14> be moved tosession-level,the session level if explicitly defined to be valid atsession-level.</t> <t>Thethe session level.</t> <t indent="0" pn="section-5.3.1-31">The attributes prohibited in the creation of offers are also prohibited in the creation of answers.</t> </section> <sectiontitle="Subsequent Answers" anchor="sec.subsequent-answers"> <t>Whenanchor="sec.subsequent-answers" numbered="true" toc="include" removeInRFC="false" pn="section-5.3.2"> <name slugifiedName="name-subsequent-answers">Subsequent Answers</name> <t indent="0" pn="section-5.3.2-1">When createAnswer is called a second (or later)time,time or is called after a local description has already been installed, the processing is somewhat different than for an initial answer.</t><t>If<t indent="0" pn="section-5.3.2-2">If the previous answer was not applied using setLocalDescription, meaning the PeerConnection is still in the "have-remote-offer" state, the steps for generating an initial answershould<bcp14>MUST</bcp14> be followed, subject to the following restriction:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.2-3"> <li pn="section-5.3.2-3.1">The fields of the "o=" lineMUST<bcp14>MUST</bcp14> stay the same except for the <session-version> field, whichMUST<bcp14>MUST</bcp14> increment if the session description changes in any way from the previously generatedanswer.</t> </list></t> <t>Ifanswer.</li> </ul> <t indent="0" pn="section-5.3.2-4">If any session description was previously supplied to setLocalDescription, an answer is generated by following the steps in the "have-remote-offer" state above, along with these exceptions:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3.2-5"> <li pn="section-5.3.2-5.1">The "s=" and "t=" linesMUST<bcp14>MUST</bcp14> stay thesame.</t> <t>Eachsame.</li> <li pn="section-5.3.2-5.2">Each "m=" andc=""c=" lineMUST<bcp14>MUST</bcp14> be filled in with the port and address of the default candidate for them="m=" section, as described in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 3.2.1.2.target="RFC8839" sectionFormat="comma" section="4.2.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.2.1.2" derivedContent="RFC8839"/>. Note that in certain cases, them="m=" line protocol may not match that of the default candidate, because them="m=" line protocol valueMUST<bcp14>MUST</bcp14> match what was supplied in the offer, as describedabove.</t> <t>Eachabove.</li> <li pn="section-5.3.2-5.3">Each "a=ice-ufrag" and "a=ice-pwd" lineMUST<bcp14>MUST</bcp14> stay the same, unless them="m=" section is restarting, in which case new ICE credentialsmust<bcp14>MUST</bcp14> be created as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 3.4.1.1.1.target="RFC8839" sectionFormat="comma" section="4.4.1.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.4.1.1.1" derivedContent="RFC8839"/>. If them="m=" section is bundled into anotherm="m=" section, it stillMUST NOT<bcp14>MUST NOT</bcp14> contain any ICEcredentials.</t> <t>Eachcredentials.</li> <li pn="section-5.3.2-5.4">Each "a=tls-id" lineMUST<bcp14>MUST</bcp14> stay thesamesame, unless the offerer's "a=tls-id" line changed, in which case a new"a=tls-id"tls-id valueMUST<bcp14>MUST</bcp14> be created, as described in <xreftarget="I-D.ietf-mmusic-dtls-sdp" />, Section 5.2.</t> <t>Eachtarget="RFC8842" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-5.2" derivedContent="RFC8842"/>.</li> <li pn="section-5.3.2-5.5">Each "a=setup" lineMUST<bcp14>MUST</bcp14> use an "active" or "passive" role value consistent with the existing DTLS association, if the association is being continued by theofferer.</t> <t>RTCPofferer.</li> <li pn="section-5.3.2-5.6">RTCP multiplexingmust<bcp14>MUST</bcp14> be used, and an "a=rtcp-mux" line inserted if and only if them="m=" section previously used RTCPmultiplexing.</t> <t>Ifmultiplexing.</li> <li pn="section-5.3.2-5.7">If them="m=" section is not bundled into anotherm="m=" section and RTCP multiplexing is not active, an "a=rtcp" attribute lineMUST<bcp14>MUST</bcp14> be filled in with the port and address of the default RTCP candidate. If no RTCP candidates have yet been gathered,dummydefault valuesMUST<bcp14>MUST</bcp14> be used, as described in <xref target="sec.initial-answers" format="default" sectionFormat="of" derivedContent="Section 5.3.1"/> above.</li> <li pn="section-5.3.2-5.8">If theinitial answer section above.</t> <t>If the m="m=" section is not bundled into anotherm="m=" section, for each candidate that has been gathered during the most recent gathering phase (see <xreftarget="sec.ice-gather-overview"></xref>),target="sec.ice-gather-overview" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/>), an "a=candidate" lineMUST<bcp14>MUST</bcp14> be added, as defined in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp"></xref>, Section 4.1.target="RFC8839" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.1" derivedContent="RFC8839"/>. If candidate gathering for the section has completed, an "a=end-of-candidates" attributeMUST<bcp14>MUST</bcp14> be added, as described in <xreftarget="I-D.ietf-ice-trickle"></xref>, Section 9.3.target="RFC8840" sectionFormat="comma" section="8.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-8.2" derivedContent="RFC8840"/>. If them="m=" section is bundled into anotherm="m=" section, both "a=candidate" and "a=end-of-candidates"MUST<bcp14>MUST</bcp14> beomitted.</t> <t>Foromitted. </li> <li pn="section-5.3.2-5.9">For RtpTransceivers that are not stopped, the "a=msid" line(s)MUST<bcp14>MUST</bcp14> stay the same, regardless of changes to the transceiver's direction or track. If no "a=msid" line is present in the current description, "a=msid" line(s)MUST<bcp14>MUST</bcp14> be generated according to the same rules as for an initialanswer.</t> </list></t>answer.</li> </ul> </section> <sectiontitle="Options Handling" anchor="sec.options-handling2"> <t>Theanchor="sec.options-handling2" numbered="true" toc="include" removeInRFC="false" pn="section-5.3.3"> <name slugifiedName="name-options-handling-2">Options Handling</name> <t indent="0" pn="section-5.3.3-1">The createAnswer method takes as a parameter an RTCAnswerOptions object. The set of parameters for RTCAnswerOptions is different than those supported in RTCOfferOptions; the IceRestart option is unnecessary, as ICE credentials will automatically be changed for allm="m=" sections where the offerer chose to perform ICE restart.</t><t>The<t indent="0" pn="section-5.3.3-2">The following options are supported in RTCAnswerOptions.</t> <sectiontitle="VoiceActivityDetection" anchor="sec.voiceactivitydetection2"> <t>Silenceanchor="sec.voiceactivitydetection2" numbered="true" toc="include" removeInRFC="false" pn="section-5.3.3.1"> <name slugifiedName="name-voiceactivitydetection-2">VoiceActivityDetection</name> <t indent="0" pn="section-5.3.3.1-1">Silence suppression in the answer is handled as described in <xreftarget="sec.voiceactivitydetection1"></xref>,target="sec.voiceactivitydetection1" format="default" sectionFormat="of" derivedContent="Section 5.2.3.2"/>, with one exception: if support for silence suppression was not indicated in the offer, the VoiceActivityDetection parameter has no effect, and the answershould<bcp14>MUST</bcp14> be generated as if VoiceActivityDetection was set tofalse."false". This is done on a per-codec basis (e.g., if the offerer somehow offered support for CN but set "usedtx=0" for Opus, setting VoiceActivityDetection totrue"true" would result in an answer with CN codecs and "usedtx=0"). The impact of this rule is that an answerer will not try to use silence suppression with any endpoint that does not offer it, making silence suppression support bilateral even with non-JSEP endpoints.</t> </section> </section> </section> <sectiontitle="Modifyinganchor="sec.modifying-sdp" numbered="true" toc="include" removeInRFC="false" pn="section-5.4"> <name slugifiedName="name-modifying-an-offer-or-answe">Modifying an Offer orAnswer" anchor="sec.modifying-sdp"> <t>TheAnswer</name> <t indent="0" pn="section-5.4-1">The SDP returned from createOffer or createAnswerMUST NOT<bcp14>MUST NOT</bcp14> be changed before passing it to setLocalDescription. If precise control over the SDP is needed, the aforementioned createOffer/createAnswer options or RtpTransceiver APIsMUST<bcp14>MUST</bcp14> be used.</t><t>After<t indent="0" pn="section-5.4-2">After calling setLocalDescription with an offer or answer, the applicationMAY<bcp14>MAY</bcp14> modify the SDP to reduce its capabilities before sending it to the far side, as long as it follows the rules above that define a valid JSEP offer or answer. Likewise, an application that has received an offer or answer from a peerMAY<bcp14>MAY</bcp14> modify the received SDP, subject to the same constraints, before calling setRemoteDescription.</t><t>As<t indent="0" pn="section-5.4-3">As always, the application is solely responsible for what it sends to the other party, and all incoming SDP will be processed by the JSEP implementation to the extent of its capabilities. It is an error to assume that all SDP iswell-formed;well formed; however, one should be able to assume that any implementation of this specification will be able to process, as a remote offer or answer, unmodified SDP coming from any other implementation of this specification.</t> </section> <sectiontitle="Processinganchor="sec.processing-a-local-desc" numbered="true" toc="include" removeInRFC="false" pn="section-5.5"> <name slugifiedName="name-processing-a-local-descript">Processing a LocalDescription" anchor="sec.processing-a-local-desc"> <t>WhenDescription</name> <t indent="0" pn="section-5.5-1">When a SessionDescription is supplied to setLocalDescription, the following stepsMUST<bcp14>MUST</bcp14> be performed:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.5-2"> <li pn="section-5.5-2.1">If the description is of type "rollback", follow the processing defined in <xref target="sec.processing-a-rollback"/>format="default" sectionFormat="of" derivedContent="Section 5.7"/> and skip the processing described in the rest of thissection.</t> <t>Otherwise,section.</li> <li pn="section-5.5-2.2"> <t indent="0" pn="section-5.5-2.2.1">Otherwise, the type of the SessionDescription is checked against the current state of the PeerConnection:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.5-2.2.2"> <li pn="section-5.5-2.2.2.1">If the type is "offer", the PeerConnection stateMUST<bcp14>MUST</bcp14> be either "stable" or"have-local-offer".</t> <t>If"have-local-offer".</li> <li pn="section-5.5-2.2.2.2">If the type is "pranswer" or "answer", the PeerConnection stateMUST<bcp14>MUST</bcp14> be either "have-remote-offer" or"have-local-pranswer".</t> </list></t> <t>If"have-local-pranswer".</li> </ul> </li> <li pn="section-5.5-2.3">If the type is not correct for the current state, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> bereturned.</t> <t>Thereturned.</li> <li pn="section-5.5-2.4">The SessionDescription is then checked to ensure that its contents are identical to those generated in the last call to createOffer/createAnswer, and thus have not been altered, as discussed in <xref target="sec.modifying-sdp"/>;format="default" sectionFormat="of" derivedContent="Section 5.4"/>; otherwise, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> bereturned.</t> <t>Next,returned.</li> <li pn="section-5.5-2.5">Next, the SessionDescription is parsed into a data structure, as described in <xref target="sec.parsing-a-desc"/> below.</t> <t>Finally,format="default" sectionFormat="of" derivedContent="Section 5.8"/> below.</li> <li pn="section-5.5-2.6">Finally, the parsed SessionDescription is applied as described in <xref target="sec.applying-a-local-desc"/> below.</t> </list></t>format="default" sectionFormat="of" derivedContent="Section 5.9"/> below.</li> </ul> </section> <sectiontitle="Processinganchor="sec.processing-a-remote-desc" numbered="true" toc="include" removeInRFC="false" pn="section-5.6"> <name slugifiedName="name-processing-a-remote-descrip">Processing a RemoteDescription" anchor="sec.processing-a-remote-desc"> <t>WhenDescription</name> <t indent="0" pn="section-5.6-1">When a SessionDescription is supplied to setRemoteDescription, the following stepsMUST<bcp14>MUST</bcp14> be performed:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.6-2"> <li pn="section-5.6-2.1">If the description is of type "rollback", follow the processing defined in <xref target="sec.processing-a-rollback"/>format="default" sectionFormat="of" derivedContent="Section 5.7"/> and skip the processing described in the rest of thissection.</t> <t>Otherwise,section.</li> <li pn="section-5.6-2.2"> <t indent="0" pn="section-5.6-2.2.1">Otherwise, the type of the SessionDescription is checked against the current state of the PeerConnection:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.6-2.2.2"> <li pn="section-5.6-2.2.2.1">If the type is "offer", the PeerConnection stateMUST<bcp14>MUST</bcp14> be either "stable" or"have-remote-offer".</t> <t>If"have-remote-offer".</li> <li pn="section-5.6-2.2.2.2">If the type is "pranswer" or "answer", the PeerConnection stateMUST<bcp14>MUST</bcp14> be either "have-local-offer" or"have-remote-pranswer".</t> </list></t> <t>If"have-remote-pranswer".</li> </ul> </li> <li pn="section-5.6-2.3">If the type is not correct for the current state, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> bereturned.</t> <t>Next,returned.</li> <li pn="section-5.6-2.4">Next, the SessionDescription is parsed into a data structure, as described in <xref target="sec.parsing-a-desc"/>format="default" sectionFormat="of" derivedContent="Section 5.8"/> below. If parsing fails for any reason, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> bereturned.</t> <t>Finally,returned.</li> <li pn="section-5.6-2.5">Finally, the parsed SessionDescription is applied as described in <xref target="sec.applying-a-remote-desc"/> below.</t> </list></t> </section> <section title="Processingformat="default" sectionFormat="of" derivedContent="Section 5.10"/> below.</li> </ul> </section> <section anchor="sec.processing-a-rollback" numbered="true" toc="include" removeInRFC="false" pn="section-5.7"> <name slugifiedName="name-processing-a-rollback">Processing aRollback" anchor="sec.processing-a-rollback"> <t>ARollback</name> <t indent="0" pn="section-5.7-1">A rollback may be performed if the PeerConnection is in any state except for "stable". This means that both offers and provisional answers can be rolled back. Rollback can only be used to cancel proposed changes; there is no support for rolling back from astable"stable" state to a previousstable"stable" state. If a rollback is attempted in the "stable" state, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> be returned. Note that this implies that once the answerer has performed setLocalDescription withhisits answer, this cannot be rolled back.</t><t>The<t indent="0" pn="section-5.7-2">The effect of rollbackMUST<bcp14>MUST</bcp14> be the same regardless of whether setLocalDescription or setRemoteDescription is called.</t><t>In<t indent="0" pn="section-5.7-3">In order to process rollback, a JSEP implementation abandons the current offer/answer transaction, sets the signaling state to "stable", and sets the pending local and/or remote description (see Sections <xref target="sec.pendinglocaldescription"/>format="counter" sectionFormat="of" derivedContent="4.1.14"/> and <xref target="sec.pendingremotedescription"/>)format="counter" sectionFormat="of" derivedContent="4.1.16"/>) tonull."null". Any resources or candidates that were allocated by the abandoned local description are discarded; any media that is received is processed according to the previous local and remote descriptions.</t><t>A<t indent="0" pn="section-5.7-4">A rollback disassociates any RtpTransceivers that were associated withm="m=" sections by the application of the rolled-back session description (see Sections <xref target="sec.applying-a-remote-desc"/>format="counter" sectionFormat="of" derivedContent="5.10"/> and <xref target="sec.applying-a-local-desc"/>).format="counter" sectionFormat="of" derivedContent="5.9"/>). This means that some RtpTransceivers that were previously associated will no longer be associated with anym="m=" section; in such cases, the value of the RtpTransceiver's mid propertyMUST<bcp14>MUST</bcp14> be set tonull,"null", and the mapping between the transceiver and itsm="m=" section indexMUST<bcp14>MUST</bcp14> be discarded. RtpTransceivers that were created by applying a remote offer that was subsequently rolled backMUST<bcp14>MUST</bcp14> be stopped and removed from the PeerConnection. However,aan RtpTransceiverMUST NOT<bcp14>MUST NOT</bcp14> be removed if a track was attached to the RtpTransceiver via the addTrack method. This is so that an application may call addTrack, then call setRemoteDescription with an offer, then roll back that offer, then call createOffer and havea m=an "m=" section for the added track appear in the generated offer.</t> </section> <sectiontitle="Parsinganchor="sec.parsing-a-desc" numbered="true" toc="include" removeInRFC="false" pn="section-5.8"> <name slugifiedName="name-parsing-a-session-descripti">Parsing a SessionDescription" anchor="sec.parsing-a-desc"> <t>TheDescription</name> <t indent="0" pn="section-5.8-1">The SDP contained in the session description object consists of a sequence of text lines, each containing a key-value expression, as described in <xref target="RFC4566"/>, Section 5.sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5" derivedContent="RFC4566"/>. The SDP is read,line-by-line,line by line, and converted to a data structure that contains the deserialized information. However, SDP allows many types of lines, not all of which are relevant to JSEP applications. For each line, the implementation will first ensure that it is syntactically correct according to its defining ABNF, check that it conforms to the semantics used in <xref target="RFC4566"/>format="default" sectionFormat="of" derivedContent="RFC4566"/> and <xref target="RFC3264"/> semantics,format="default" sectionFormat="of" derivedContent="RFC3264"/>, and then either parse and store or discard the provided value, as described below.</t><t>If<t indent="0" pn="section-5.8-2">If any line is notwell-formed,well formed or cannot be parsed as described, the parserMUST<bcp14>MUST</bcp14> stop with an error and reject the session description, even if the value is to be discarded. This ensures that implementations do not accidentally misinterpret ambiguous SDP.</t> <sectiontitle="Session-Level Parsing" anchor="sec.session-level-parse"> <t>First,anchor="sec.session-level-parse" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.1"> <name slugifiedName="name-session-level-parsing">Session-Level Parsing</name> <t indent="0" pn="section-5.8.1-1">First, the session-level lines are checked and parsed. These linesMUST<bcp14>MUST</bcp14> occur in a specific order, and with a specific syntax, as defined in <xref target="RFC4566"/>, Section 5.sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5" derivedContent="RFC4566"/>. Note that while the specific line types(e.g.(e.g., "v=", "c=")MUST<bcp14>MUST</bcp14> occur in the defined order, lines of the same type (typically "a=") can occur in any order.</t><t>The<t indent="0" pn="section-5.8.1-2">The following non-attribute lines are not meaningful in the JSEP context andMAY<bcp14>MAY</bcp14> be discarded once they have been checked.<list> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.1-3"> <li pn="section-5.8.1-3.1">The "c=" lineMUST<bcp14>MUST</bcp14> be checked forsyntaxsyntax, but its value is only used for ICE mismatch detection, as defined in <xref target="RFC8445"/>, Section 5.4.sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-5.4" derivedContent="RFC8445"/>. Note that JSEP implementations should never encounter this condition because ICE is required forWebRTC.</t> <t>TheWebRTC.</li> <li pn="section-5.8.1-3.2">The "i=", "u=", "e=", "p=", "t=", "r=", "z=", and "k=" linesare not used by this specification; they MUST<bcp14>MUST</bcp14> be checked forsyntaxsyntax, but their values are notused.</t> </list></t> <t>Theotherwise used. </li> </ul> <t indent="0" pn="section-5.8.1-4">The remaining non-attribute lines are processed as follows:<list> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.1-5"> <li pn="section-5.8.1-5.1">The "v=" lineMUST<bcp14>MUST</bcp14> have a version of 0, as specified in <xref target="RFC4566"/>, Section 5.1.</t> <t>ThesectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.1" derivedContent="RFC4566"/>.</li> <li pn="section-5.8.1-5.2">The "o=" lineMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4566"/>, Section 5.2.</t> <t>ThesectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.2" derivedContent="RFC4566"/>.</li> <li pn="section-5.8.1-5.3">The "b=" line, if present,MUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4566"/>, Section 5.8,sectionFormat="comma" section="5.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.8" derivedContent="RFC4566"/>, and the bwtype and bandwidth valuesstored.</t> </list></t> <t>Finally,stored.</li> </ul> <t indent="0" pn="section-5.8.1-6">Finally, the attribute lines are processed. Specific processingMUST<bcp14>MUST</bcp14> be applied for the following session-level attribute ("a=") lines:<list style="symbols"> <t>Any</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.1-7"> <li pn="section-5.8.1-7.1">Any "a=group" lines are parsed as specified in <xref target="RFC5888"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-5" derivedContent="RFC5888"/>, and the group's semantics and mids arestored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.2">If present, a single "a=ice-lite" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.3,target="RFC8839" sectionFormat="comma" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.3" derivedContent="RFC8839"/>, and a value indicating the presence of ice-lite isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.3">If present, a single "a=ice-ufrag" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4,target="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>, and the ufrag value isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.4">If present, a single "a=ice-pwd" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4,target="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>, and the password value isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.5">If present, a single "a=ice-options" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.6,target="RFC8839" sectionFormat="comma" section="5.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.6" derivedContent="RFC8839"/>, and the set of specified options isstored.</t> <t>Anystored.</li> <li pn="section-5.8.1-7.6">Any "a=fingerprint" lines are parsed as specified in <xref target="RFC8122"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8122#section-5" derivedContent="RFC8122"/>, and the set of fingerprint and algorithm values isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.7">If present, a single "a=setup" line is parsed as specified in <xref target="RFC4145"/>, Section 4,sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4145#section-4" derivedContent="RFC4145"/>, and the setup value isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.1-7.8">If present, a single "a=tls-id" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-dtls-sdp" /> Section 5,target="RFC8842" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-5" derivedContent="RFC8842"/>, and thetls-idattribute value isstored.</t> <t>Anystored.</li> <li pn="section-5.8.1-7.9">Any "a=identity" lines are parsed and the identity values stored for subsequent verification, as specified in <xreftarget="I-D.ietf-rtcweb-security-arch" />, Section 5.</t> <t>Anytarget="RFC8827" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8827#section-5" derivedContent="RFC8827"/>.</li> <li pn="section-5.8.1-7.10">Any "a=extmap" lines are parsed as specified in <xref target="RFC5285"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-5" derivedContent="RFC5285"/>, and their values arestored.</t> </list></t> <t>Otherstored.</li> </ul> <t indent="0" pn="section-5.8.1-8">Other attributes that are not relevant to JSEP may also be present, and implementationsSHOULD<bcp14>SHOULD</bcp14> process any that they recognize. As required by <xreftarget="RFC4566"></xref>, Section 5.13,target="RFC4566" sectionFormat="comma" section="5.13" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.13" derivedContent="RFC4566"/>, unknown attribute linesMUST<bcp14>MUST</bcp14> be ignored.</t><t>Once<t indent="0" pn="section-5.8.1-9">Once all the session-level lines have been parsed, processing continues with the lines inm="m=" sections.</t> </section> <sectiontitle="Mediaanchor="sec.media-level-parse" numbered="true" toc="include" removeInRFC="false" pn="section-5.8.2"> <name slugifiedName="name-media-section-parsing">Media SectionParsing" anchor="sec.media-level-parse"> <t>LikeParsing</name> <t indent="0" pn="section-5.8.2-1">Like the session-level lines, the media section linesMUST<bcp14>MUST</bcp14> occur in the specific order and with the specific syntax defined in <xref target="RFC4566"/>, Section 5.</t> <t>ThesectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5" derivedContent="RFC4566"/>.</t> <t indent="0" pn="section-5.8.2-2">The "m=" line itselfMUST<bcp14>MUST</bcp14> be parsed as described in <xref target="RFC4566"/>, Section 5.14,sectionFormat="comma" section="5.14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.14" derivedContent="RFC4566"/>, and themedia, port, proto,<media>, <port>, <proto>, andfmt<fmt> values stored.</t><t>Following<t indent="0" pn="section-5.8.2-3">Following the "m=" line, specific processingMUST<bcp14>MUST</bcp14> be applied for the following non-attribute lines:<list style="symbols"> <t>As</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.2-4"> <li pn="section-5.8.2-4.1">As with the "c=" line at the session level, the "c=" lineMUST<bcp14>MUST</bcp14> be parsed according to <xref target="RFC4566"/>, Section 5.7,sectionFormat="comma" section="5.7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.7" derivedContent="RFC4566"/>, but its value is notused.</t> <t>Theused.</li> <li pn="section-5.8.2-4.2">The "b=" line, if present,MUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4566"/>, Section 5.8,sectionFormat="comma" section="5.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.8" derivedContent="RFC4566"/>, and the bwtype and bandwidth valuesstored.</t> </list></t> <t>Specificstored.</li> </ul> <t indent="0" pn="section-5.8.2-5">Specific processingMUST<bcp14>MUST</bcp14> also be applied for the following attribute lines:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.2-6"> <li pn="section-5.8.2-6.1">If present, a single "a=ice-ufrag" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4,target="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>, and the ufrag value isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-6.2">If present, a single "a=ice-pwd" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4,target="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>, and the password value isstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-6.3">If present, a single "a=ice-options" line is parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.6,target="RFC8839" sectionFormat="comma" section="5.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.6" derivedContent="RFC8839"/>, and the set of specified options isstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-6.4">Any "a=candidate" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.1,target="RFC8839" sectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.1" derivedContent="RFC8839"/>, and their valuesstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-6.5">Any "a=remote-candidates" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.2,target="RFC8839" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.2" derivedContent="RFC8839"/>, but their values areignored.</t> <t>Ifignored.</li> <li pn="section-5.8.2-6.6">If present, a single "a=end-of-candidates" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-ice-trickle" />, Section 8.2,target="RFC8840" sectionFormat="comma" section="8.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8840#section-8.1" derivedContent="RFC8840"/>, and its presence or absence flagged andstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-6.7">Any "a=fingerprint" lines are parsed as specified in <xref target="RFC8122"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8122#section-5" derivedContent="RFC8122"/>, and the set of fingerprint and algorithm values isstored.</t> </list></t> <t>Ifstored.</li> </ul> <t indent="0" pn="section-5.8.2-7">If the "m="proto<proto> value indicates use of RTP, as described in <xref target="sec.profile-names"/>format="default" sectionFormat="of" derivedContent="Section 5.1.2"/> above, the following attribute linesMUST<bcp14>MUST</bcp14> be processed:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.2-8"> <li pn="section-5.8.2-8.1">The "m="fmt<fmt> valueMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4566"/>, Section 5.14,sectionFormat="comma" section="5.14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.14" derivedContent="RFC4566"/>, and the individual valuesstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.2">Any "a=rtpmap" or "a=fmtp" linesMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4566"/>, Section 6,sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>, and their valuesstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.3">If present, a single "a=ptime" lineMUST<bcp14>MUST</bcp14> be parsed as described in <xref target="RFC4566"/>, Section 6,sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>, and its valuestored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.4">If present, a single "a=maxptime" lineMUST<bcp14>MUST</bcp14> be parsed as described in <xref target="RFC4566"/>, Section 6,sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>, and its valuestored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.5">If present, a single direction attribute line(e.g.(e.g., "a=sendrecv")MUST<bcp14>MUST</bcp14> be parsed as described in <xref target="RFC4566"/>, Section 6,sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/>, and its valuestored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.6">Any "a=ssrc" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC5576"/>, Section 4.1,sectionFormat="comma" section="4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5576#section-4.1" derivedContent="RFC5576"/>, and their valuesstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.7">Any "a=extmap" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC5285"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-5" derivedContent="RFC5285"/>, and their valuesstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.8">Any "a=rtcp-fb" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC4585"/>, Section 4.2.,sectionFormat="comma" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-4.2" derivedContent="RFC4585"/>, and their valuesstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.9">If present, a single "a=rtcp-mux" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="RFC5761"></xref>, Section 5.1.3,target="RFC5761" sectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>, and its presence or absence flagged andstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.10">If present, a single "a=rtcp-mux-only" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-mux-exclusive" />, Section 3,target="RFC8858" sectionFormat="comma" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8858#section-3" derivedContent="RFC8858"/>, and its presence or absence flagged andstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.11">If present, a single "a=rtcp-rsize" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC5506"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5506#section-5" derivedContent="RFC5506"/>, and its presence or absence flagged andstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.12">If present, a single "a=rtcp" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC3605"/>, Section 2.1,sectionFormat="comma" section="2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3605#section-2.1" derivedContent="RFC3605"/>, but its value is ignored, as this information is superfluous when usingICE.</t> <t>IfICE.</li> <li pn="section-5.8.2-8.13">If present, "a=msid" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-msid" />, Section 3.2,target="RFC8830" sectionFormat="comma" section="3.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8830#section-3.2" derivedContent="RFC8830"/>, and their values stored, ignoring any "appdata" field. If no "a=msid" attributes are present, a random msid-id value is generated for a "default" MediaStream for the session, if not already present, and this value isstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.14">Any "a=imageattr" attributesMUST<bcp14>MUST</bcp14> be parsed as specified in <xref target="RFC6236"/>, Section 3,sectionFormat="comma" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6236#section-3" derivedContent="RFC6236"/>, and their valuesstored.</t> <t>Anystored.</li> <li pn="section-5.8.2-8.15">Any "a=rid" linesMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-rid"></xref>, Section 10,target="RFC8851" sectionFormat="comma" section="10" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8851#section-10" derivedContent="RFC8851"/>, and their valuesstored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-8.16">If present, a single "a=simulcast" lineMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-sdp-simulcast"></xref>,target="RFC8853" format="default" sectionFormat="of" derivedContent="RFC8853"/>, and its valuesstored.</t> </list></t> <t>Otherwise,stored.</li> </ul> <t indent="0" pn="section-5.8.2-9">Otherwise, if the "m="proto<proto> value indicates use of SCTP, the following attribute linesMUST<bcp14>MUST</bcp14> be processed:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.2-10"> <li pn="section-5.8.2-10.1">The "m="fmt<fmt> valueMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-sctp-sdp" />, Section 4.3,target="RFC8841" sectionFormat="comma" section="4.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-4.3" derivedContent="RFC8841"/>, and the application protocol valuestored.</t> <t>Anstored.</li> <li pn="section-5.8.2-10.2">An "a=sctp-port" attributeMUST<bcp14>MUST</bcp14> be present, and itMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-sctp-sdp" />, Section 5.2,target="RFC8841" sectionFormat="comma" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-5.2" derivedContent="RFC8841"/>, and the valuestored.</t> <t>Ifstored.</li> <li pn="section-5.8.2-10.3">If present, a single "a=max-message-size" attributeMUST<bcp14>MUST</bcp14> be parsed as specified in <xreftarget="I-D.ietf-mmusic-sctp-sdp" />, Section 6,target="RFC8841" sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-6" derivedContent="RFC8841"/>, and the value stored. Otherwise, use the specifieddefault.</t> </list></t> <t>Otherdefault.</li> </ul> <t indent="0" pn="section-5.8.2-11">Other attributes that are not relevant to JSEP may also be present, and implementationsSHOULD<bcp14>SHOULD</bcp14> process any that they recognize. As required by <xreftarget="RFC4566"></xref>, Section 5.13,target="RFC4566" sectionFormat="comma" section="5.13" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.13" derivedContent="RFC4566"/>, unknown attribute linesMUST<bcp14>MUST</bcp14> be ignored.</t> </section> <sectiontitle="Semantics Verification"> <t>Assumingnumbered="true" toc="include" removeInRFC="false" pn="section-5.8.3"> <name slugifiedName="name-semantics-verification">Semantics Verification</name> <t indent="0" pn="section-5.8.3-1">Assuming that parsing completes successfully, the parsed description is then evaluated to ensure internal consistency as well as proper support for mandatory features. Specifically, the following checks are performed:<list style="symbols"> <t>For</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.3-2"> <li pn="section-5.8.3-2.1"> <t indent="0" pn="section-5.8.3-2.1.1">For eachm="m=" section, valid values for each of the mandatory-to-use features enumerated in <xref target="sec.usage-requirements"/> MUSTformat="default" sectionFormat="of" derivedContent="Section 5.1.1"/> <bcp14>MUST</bcp14> be present. These valuesMAY either<bcp14>MAY</bcp14> be either present at the medialevel,level or inherited from the session level.<list style="symbols"> <t>ICE</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.3-2.1.2"> <li pn="section-5.8.3-2.1.2.1">ICE ufrag and password values, whichMUST<bcp14>MUST</bcp14> comply with the size limits specified in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 4.4.</t> <t>tls-idtarget="RFC8839" sectionFormat="comma" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/>.</li> <li pn="section-5.8.3-2.1.2.2">A tls-id value, whichMUST<bcp14>MUST</bcp14> be set according to <xreftarget="I-D.ietf-mmusic-dtls-sdp" />, Section 5.target="RFC8842" sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-5" derivedContent="RFC8842"/>. If this is a re-offer or a response to a re-offer and the tls-id value is different from that presently in use, the DTLS connection is not being continued and the remote descriptionMUST<bcp14>MUST</bcp14> be part of an ICE restart, together with new ufrag and passwordvalues.</t> <t>DTLSvalues.</li> <li pn="section-5.8.3-2.1.2.3">A DTLS setup value, whichMUST<bcp14>MUST</bcp14> be set according to the rules specified in <xref target="RFC5763"/>, Section 5sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5763#section-5" derivedContent="RFC5763"/> andMUST<bcp14>MUST</bcp14> be consistent with the selected role of the current DTLS connection, if one exists and is beingcontinued.</t> <t>DTLScontinued.</li> <li pn="section-5.8.3-2.1.2.4">DTLS fingerprint values, where at least one fingerprintMUST<bcp14>MUST</bcp14> bepresent.</t> </list></t> <t>All RID valuespresent.</li> </ul> </li> <li pn="section-5.8.3-2.2">All rid-ids referenced in an "a=simulcast" lineMUST<bcp14>MUST</bcp14> exist as "a=rid"lines.</t> <t>Each m=lines.</li> <li pn="section-5.8.3-2.3">Each "m=" section is also checked to ensure that prohibited features are notused.</t> <t>Ifused.</li> <li pn="section-5.8.3-2.4">If the RTP/RTCP multiplexing policy is "require", eachm="m=" sectionMUST<bcp14>MUST</bcp14> contain an "a=rtcp-mux" attribute. If anm="m=" section contains an "a=rtcp-mux-only" attribute, that sectionMUST<bcp14>MUST</bcp14> also contain an "a=rtcp-mux"attribute.</t> <t>Ifattribute.</li> <li pn="section-5.8.3-2.5">If anm="m=" section was present in the previous answer, the state of RTP/RTCP multiplexingMUST<bcp14>MUST</bcp14> match what was previouslynegotiated.</t> </list></t> <t>Ifnegotiated.</li> </ul> <t indent="0" pn="section-5.8.3-3">If this session description is of type "pranswer" or "answer", the following additional checks are applied:<list style="symbols"> <t>The</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.8.3-4"> <li pn="section-5.8.3-4.1">The session descriptionmust<bcp14>MUST</bcp14> follow the rules defined in <xref target="RFC3264"/>, Section 6,sectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6" derivedContent="RFC3264"/>, including the requirement that the number ofm="m=" sectionsMUST<bcp14>MUST</bcp14> exactly match the number ofm="m=" sections in the associatedoffer.</t> <t>Foroffer.</li> <li pn="section-5.8.3-4.2">For eachm="m=" section, the media type and protocol valuesMUST<bcp14>MUST</bcp14> exactly match the media type and protocol values in the correspondingm="m=" section in the associatedoffer.</t> </list></t> <t>Ifoffer.</li> </ul> <t indent="0" pn="section-5.8.3-5">If any of the preceding checks failed, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> be returned.</t> </section> </section> <sectiontitle="Applyinganchor="sec.applying-a-local-desc" numbered="true" toc="include" removeInRFC="false" pn="section-5.9"> <name slugifiedName="name-applying-a-local-descriptio">Applying a LocalDescription" anchor="sec.applying-a-local-desc"> <t>TheDescription</name> <t indent="0" pn="section-5.9-1">The following steps are performed at the media engine level to apply a local description. If an error is returned, the sessionMUST<bcp14>MUST</bcp14> be restored to the state it was in before performing these steps.</t><t>First, m=<t indent="0" pn="section-5.9-2">First, "m=" sections are processed. For eachm="m=" section, the following stepsMUST<bcp14>MUST</bcp14> be performed; if any parameters are out ofbounds,bounds or cannot be applied, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> be returned.<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.9-3"> <li pn="section-5.9-3.1">If thism="m=" section is new, begin gathering candidates for it, as defined in <xref target="RFC8445"/>, Section 5.1.1,sectionFormat="comma" section="5.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-5.1.1" derivedContent="RFC8445"/>, unless it is definitively being bundled (either (1) this is an offer and them="m=" section is markedbundle-only,bundle-only orit(2) it is an answer and them="m=" section is bundled intointoanotherm= section.)</t> <t>Or,"m=" section).</li> <li pn="section-5.9-3.2">Or, if the ICE ufrag and password values have changed, trigger the ICE agent to start an ICE restart as described in <xref target="RFC8445"/>, Section 9,sectionFormat="comma" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-9" derivedContent="RFC8445"/>, and begin gathering new candidates for them="m=" section. If this description is an answer, also start checks on that mediasection.</t> <t>Ifsection.</li> <li pn="section-5.9-3.3"> <t indent="0" pn="section-5.9-3.3.1">If them="m=" sectionproto<proto> value indicates use of RTP:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.9-3.3.2"> <li pn="section-5.9-3.3.2.1"> <t indent="0" pn="section-5.9-3.3.2.1.1">If there is no RtpTransceiver associated with thism="m=" section, find one and associate it with thism="m=" section according to the following steps. Note that this situation will only occur when applying an offer.<list style="symbols"> <t>Find</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.9-3.3.2.1.2"> <li pn="section-5.9-3.3.2.1.2.1">Find the RtpTransceiver that corresponds to thism="m=" section, using the mapping between transceivers andm="m=" section indices established when creating theoffer.</t> <t>Setoffer.</li> <li pn="section-5.9-3.3.2.1.2.2">Set the value of this RtpTransceiver's mid property to the MID of them= section.</t> </list></t> <t>If"m=" section.</li> </ul> </li> <li pn="section-5.9-3.3.2.2">If RTCP mux is indicated, prepare to demux RTP and RTCP from the RTP ICE component, as specified in <xref target="RFC5761"/>, Section 5.1.3.</t> <t>ForsectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>.</li> <li pn="section-5.9-3.3.2.3">For each specified RTP header extension, establish a mapping between the extension ID and URI, as described in <xref target="RFC5285"/>, Section 6.</t> <t>IfsectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-6" derivedContent="RFC5285"/>.</li> <li pn="section-5.9-3.3.2.4">If the MID header extension is supported, prepare to demux RTP streams intended for thism="m=" section based on the MID header extension, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 15.</t> <t>Fortarget="RFC8843" sectionFormat="comma" section="15" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-15" derivedContent="RFC8843"/>.</li> <li pn="section-5.9-3.3.2.5">For each specified media format, establish a mapping between the payload type and the actual media format, as described in <xref target="RFC3264"/>, Section 6.1.sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>. In addition, prepare to demux RTP streams intended for thism="m=" section based on the media formats supported by thism="m=" section, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 10.2.</t> <t>Fortarget="RFC8843" sectionFormat="comma" section="9.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-9.2" derivedContent="RFC8843"/>. </li> <li pn="section-5.9-3.3.2.6">For each specified "rtx" media format, establish a mapping between the RTX payload type and its associated primary payload type, as described in Sections <xref target="RFC4588"/>, Sections 8.6section="8.6" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4588#section-8.6" derivedContent="RFC4588"/> and8.7.</t> <t>If<xref target="RFC4588" section="8.7" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4588#section-8.7" derivedContent="RFC4588"/> of <xref target="RFC4588" format="default" sectionFormat="of" derivedContent="RFC4588"/>. </li> <li pn="section-5.9-3.3.2.7">If thedirectionaldirection attribute is of type "sendrecv" or "recvonly", enable receipt and decoding ofmedia.</t> </list></t> </list></t> <t>Finally,media.</li> </ul> </li> </ul> <t indent="0" pn="section-5.9-4">Finally, if this description is of type "pranswer" or "answer", follow the processing defined in <xref target="sec.applying-an-answer"/>format="default" sectionFormat="of" derivedContent="Section 5.11"/> below.</t> </section> <sectiontitle="Applyinganchor="sec.applying-a-remote-desc" numbered="true" toc="include" removeInRFC="false" pn="section-5.10"> <name slugifiedName="name-applying-a-remote-descripti">Applying a RemoteDescription" anchor="sec.applying-a-remote-desc"> <t>TheDescription</name> <t indent="0" pn="section-5.10-1">The following steps are performed to apply a remote description. If an error is returned, the sessionMUST<bcp14>MUST</bcp14> be restored to the state it was in before performing these steps.</t><t>If<t indent="0" pn="section-5.10-2">If the answer contains any "a=ice-options" attributes where "trickle" is listed as an attribute, update the PeerConnectioncanTricklecanTrickleIceCandidates property to betrue."true". Otherwise, set this property tofalse.</t> <t>The"false".</t> <t indent="0" pn="section-5.10-3">The following stepsMUST<bcp14>MUST</bcp14> be performed for attributes at the session level; if any parameters are out ofbounds,bounds or cannot be applied, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> be returned.<list style="symbols"> <t>For</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-4"> <li pn="section-5.10-4.1">For any specified "CT" bandwidth value, set this value as the limit for the maximum total bitrate for allm="m=" sections, as specified in <xreftarget="RFC4566"></xref>, Section 5.8.target="RFC4566" sectionFormat="comma" section="5.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.8" derivedContent="RFC4566"/>. Within this overall limit, the implementation can dynamically decide how to best allocate the available bandwidth betweenm="m=" sections, respecting any specific limits that have been specified for individualm= sections.</t> <t>For"m=" sections.</li> <li pn="section-5.10-4.2">For any specified "RR" or "RS" bandwidth values, handle as specified in <xreftarget="RFC3556"></xref>, Section 2.</t> <t>Anytarget="RFC3556" sectionFormat="comma" section="2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3556#section-2" derivedContent="RFC3556"/>.</li> <li pn="section-5.10-4.3">Any "AS" bandwidth valueMUST(<xref target="RFC4566" sectionFormat="comma" section="5.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-5.8" derivedContent="RFC4566"/>) <bcp14>MUST</bcp14> be ignored, as the meaning of this construct at the session level is not welldefined.</t> </list></t> <t>Fordefined. </li> </ul> <t indent="0" pn="section-5.10-5">For eachm="m=" section, the following stepsMUST<bcp14>MUST</bcp14> be performed; if any parameters are out ofbounds,bounds or cannot be applied, processingMUST<bcp14>MUST</bcp14> stop and an errorMUST<bcp14>MUST</bcp14> be returned.<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-6"> <li pn="section-5.10-6.1"> <t indent="0" pn="section-5.10-6.1.1">If the ICE ufrag or password changed from the previous remote description:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-6.1.2"> <li pn="section-5.10-6.1.2.1">If the description is of type "offer", the implementationMUST<bcp14>MUST</bcp14> note that an ICE restart is needed, as described in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 3.4.1.1.1</t> <t>Iftarget="RFC8839" sectionFormat="comma" section="4.4.1.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.4.1.1.1" derivedContent="RFC8839"/>.</li> <li pn="section-5.10-6.1.2.2">If the description is of type "answer" or "pranswer", then check to see if the current local description is an ICE restart, and if not, generate an error. If the PeerConnection state is"have-remote-pranswer","have-remote-pranswer" and the ICE ufrag or password changed from the previous provisional answer, then signal the ICE agent to discard any previous ICEcheck listchecklist state for them="m=" section. Finally, signal the ICE agent to beginchecks.</t> </list></t> <t>Ifchecks. </li> </ul> </li> <li pn="section-5.10-6.2">If the current local description indicates an ICErestart, and eitherrestart but neither the ICE ufragornor the password hasnotchanged from the previous remotedescription, asdescription (as prescribed by <xref target="RFC8445"/>, Section 9,sectionFormat="comma" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-9" derivedContent="RFC8445"/>), generate anerror.</t> <t>Configureerror.</li> <li pn="section-5.10-6.3">Configure the ICE components associated with this media section to use the supplied ICE remote ufrag and password for their connectivitychecks.</t> <t>Pairchecks.</li> <li pn="section-5.10-6.4">Pair any supplied ICE candidates with any gathered local candidates, as described in <xref target="RFC8445"/>, Section 6.1.2,sectionFormat="comma" section="6.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8445#section-6.1.2" derivedContent="RFC8445"/>, and start connectivity checks with the appropriatecredentials.</t> <t>Ifcredentials.</li> <li pn="section-5.10-6.5">If an "a=end-of-candidates" attribute is present, process the end-of-candidates indication as described in <xreftarget="I-D.ietf-ice-trickle" />, Section 11.</t> <t>Iftarget="RFC8838" sectionFormat="comma" section="14" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8838#section-14" derivedContent="RFC8838"/>.</li> <li pn="section-5.10-6.6"> <t indent="0" pn="section-5.10-6.6.1">If them="m=" sectionproto<proto> value indicates use of RTP:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-6.6.2"> <li pn="section-5.10-6.6.2.1">If them="m=" section is being recycled (see <xreftarget="sec.subsequent-offers"></xref>), dissociatetarget="sec.subsequent-offers" format="default" sectionFormat="of" derivedContent="Section 5.2.2"/>), disassociate the currently associated RtpTransceiver by setting its mid property tonull,"null", and discard the mapping between the transceiver and itsm="m=" sectionindex.</t> <t>Ifindex.</li> <li pn="section-5.10-6.6.2.2"> <t indent="0" pn="section-5.10-6.6.2.2.1">If them="m=" section is not associated with any RtpTransceiver (possibly because it wasdissociateddisassociated in the previous step), either find an RtpTransceiver or create one according to the following steps:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-6.6.2.2.2"> <li pn="section-5.10-6.6.2.2.2.1">If them="m=" section is sendrecv or recvonly, and there are RtpTransceivers of the same type that were added to the PeerConnection by addTrack and are not associated with anym="m=" section and are not stopped, find the first (according to the canonical order described in <xref target="sec.initial-offers"/>)format="default" sectionFormat="of" derivedContent="Section 5.2.1"/>) suchRtpTransceiver.</t> <t>IfRtpTransceiver.</li> <li pn="section-5.10-6.6.2.2.2.2">If no RtpTransceiver was found in the previous step, create one with a recvonlydirection.</t> <t>Associatedirection.</li> <li pn="section-5.10-6.6.2.2.2.3">Associate the found or created RtpTransceiver with them="m=" section by setting the value of the RtpTransceiver's mid property to the MID of them="m=" section, and establish a mapping between the transceiver and the index of them="m=" section. If them="m=" section does not include a MID (i.e., the remote endpoint does not support the MID extension), generate a value for the RtpTransceiver mid property, following the guidance for "a=mid" mentioned in <xref target="sec.initial-offers"/>.</t> </list></t> <t>Forformat="default" sectionFormat="of" derivedContent="Section 5.2.1"/>.</li> </ul> </li> <li pn="section-5.10-6.6.2.3">For each specified media format that is also supported by the local implementation, establish a mapping between the specified payload type and the media format, as described in <xref target="RFC3264"/>, Section 6.1.sectionFormat="comma" section="6.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/>. Specifically, this means that the implementation records the payload type to be used in outgoing RTP packets when sending each specified media format, as well as the relative preference for each format that is indicated in their ordering. If any indicated media format is not supported by the local implementation, itMUST<bcp14>MUST</bcp14> beignored.</t> <t>Forignored.</li> <li pn="section-5.10-6.6.2.4">For each specified "rtx" media format, establish a mapping between the RTX payload type and its associated primary payload type, as described in <xref target="RFC4588"/>, Section 4.sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4588#section-4" derivedContent="RFC4588"/>. If any referenced primary payload types are not present, thisMUST<bcp14>MUST</bcp14> result in an error. Note that RTX payload types may refer to primary payload typeswhichthat are not supported by the local media implementation, in whichcase,case the RTX payload typeMUST<bcp14>MUST</bcp14> also beignored.</t> <t>Forignored.</li> <li pn="section-5.10-6.6.2.5">For each specified fmtp parameter that is supported by the local implementation, enable them on the associated mediaformats.</t> <t>Forformats.</li> <li pn="section-5.10-6.6.2.6">For each specifiedSSRCSynchronization Source (SSRC) that is signaled in them="m=" section, prepare to demux RTP streams intended for thism="m=" section using that SSRC, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 10.2.</t> <t>Fortarget="RFC8843" sectionFormat="comma" section="9.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-9.2" derivedContent="RFC8843"/>.</li> <li pn="section-5.10-6.6.2.7">For each specified RTP header extension that is also supported by the local implementation, establish a mapping between the extension ID and URI, as described in <xref target="RFC5285"/>, Section 5.sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-5" derivedContent="RFC5285"/>. Specifically, this means that the implementation records the extension ID to be used in outgoing RTP packets when sending each specified header extension. If any indicated RTP header extension is not supported by the local implementation, itMUST<bcp14>MUST</bcp14> beignored.</t> <t>Forignored.</li> <li pn="section-5.10-6.6.2.8">For each specified RTCP feedback mechanism that is supported by the local implementation, enable them on the associated mediaformats.</t> <t>Forformats.</li> <li pn="section-5.10-6.6.2.9"> <t indent="0" pn="section-5.10-6.6.2.9.1">For any specified "TIAS" ("Transport Independent Application Specific Maximum") bandwidth value, set this value as a constraint on the maximum RTP bitrate to be used when sending media, as specified in <xreftarget="RFC3890"></xref>.target="RFC3890" format="default" sectionFormat="of" derivedContent="RFC3890"/>. If a "TIAS" value is notpresent,present but an "AS" value is specified, generate a "TIAS" value using this formula:<list style="format"> <t>TIAS</t> <artwork align="left" pn="section-5.10-6.6.2.9.2"> TIAS = AS * 1000 * 0.95 - (50 * 40 *8)</t> </list>The 50 is based on 50 packets per second, the 40 is based on an estimate of total header size, the8) </artwork> <t indent="0" pn="section-5.10-6.6.2.9.3"> The 1000 changes the unit from kbps to bps (as required by TIAS), and the 0.95 is to allocate 5% to RTCP."TIAS"An estimate of header overhead isusedthen subtracted out, inpreferencewhich the 50 is based on 50 packets per second, the 40 is based on typical header size (in bytes), and the 8 converts bytes to bits. Note that "TIAS" is preferred over "AS" because it provides more accurate control of bandwidth.</t><t>For</li> <li pn="section-5.10-6.6.2.10">For any "RR" or "RS" bandwidth values, handle as specified in <xreftarget="RFC3556"></xref>, Section 2.</t> <t>Anytarget="RFC3556" sectionFormat="comma" section="2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3556#section-2" derivedContent="RFC3556"/>.</li> <li pn="section-5.10-6.6.2.11">Any specified "CT" bandwidth valueMUST<bcp14>MUST</bcp14> be ignored, as the meaning of this construct at the media level is not welldefined.</t> <t>Ifdefined.</li> <li pn="section-5.10-6.6.2.12"> <t indent="0" pn="section-5.10-6.6.2.12.1">If them="m=" section is of typeaudio: <list style="symbols"> <t>For"audio": </t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.10-6.6.2.12.2"> <li pn="section-5.10-6.6.2.12.2.1">For each specified "CN" media format, configure silence suppression for all supported media formats with the sameclockrate,clock rate, as described in <xref target="RFC3389"/>, Section 5,sectionFormat="comma" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3389#section-5" derivedContent="RFC3389"/>, except for formats that have their own internal silence suppression mechanisms. Silence suppression for such formats (e.g., Opus) is controlled via fmtp parameters, as discussed in <xref target="sec.voiceactivitydetection1"/>.</t> <t>Forformat="default" sectionFormat="of" derivedContent="Section 5.2.3.2"/>.</li> <li pn="section-5.10-6.6.2.12.2.2">For each specified "telephone-event" media format, enableDTMFdual-tone multifrequency (DTMF) transmission for all supported media formats with the sameclockrate,clock rate, as described in <xref target="RFC4733"/>, Section 2.5.1.2.sectionFormat="comma" section="2.5.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4733#section-2.5.1.2" derivedContent="RFC4733"/>. If there are any supported media formats that do not have a corresponding telephone-event format, disable DTMF transmission for thoseformats.</t> <t>Forformats.</li> <li pn="section-5.10-6.6.2.12.2.3">For any specified "ptime" value, configure the available media formats to use the specified packet size when sending. If the specified size is not supported for a media format, use the next closest valueinstead.</t> </list></t> </list></t> </list></t> <t>Finally,instead.</li> </ul> </li> </ul> </li> </ul> <t indent="0" pn="section-5.10-7">Finally, if this description is of type "pranswer" or "answer", follow the processing defined in <xref target="sec.applying-an-answer"/>format="default" sectionFormat="of" derivedContent="Section 5.11"/> below.</t> </section> <sectiontitle="Applyinganchor="sec.applying-an-answer" numbered="true" toc="include" removeInRFC="false" pn="section-5.11"> <name slugifiedName="name-applying-an-answer">Applying anAnswer" anchor="sec.applying-an-answer"> <t>InAnswer</name> <t indent="0" pn="section-5.11-1">In addition to the steps mentioned above for processing a local or remote description, the following steps are performed when processing a description of type "pranswer" or "answer".</t><t>For<t indent="0" pn="section-5.11-2">For eachm="m=" section, the following stepsMUST<bcp14>MUST</bcp14> be performed:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.11-3"> <li pn="section-5.11-3.1">If them="m=" section has been rejected(i.e. port(i.e., the <port> value is set to zero in the answer), stop any reception or transmission of media for this section, and, unless a non-rejectedm="m=" section is bundled with thism="m=" section, discard any associated ICE components, as described in <xreftarget="I-D.ietf-mmusic-ice-sip-sdp" />, Section 3.4.3.1.</t> <t>Iftarget="RFC8839" sectionFormat="comma" section="4.4.3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-4.4.3.1" derivedContent="RFC8839"/>.</li> <li pn="section-5.11-3.2">If the remote DTLS fingerprint has been changed or thetls-idvalue of the "a=tls-id" attribute has changed, tear down the DTLS connection. This includes the case when the PeerConnection state is "have-remote-pranswer". If a DTLS connection needs to be torn down but the answer does not indicate an ICE restart or, in the case of "have-remote-pranswer", new ICE credentials, an errorMUST<bcp14>MUST</bcp14> be generated. If an ICE restart is performed without a change in the tls-id value or fingerprint, then the same DTLS connection is continued over the new ICE channel. Note that although JSEP requires that answerers change the tls-id value if and only if the offerer does, non-JSEP answerers are permitted to change the tls-id value as long as the offer contained an ICE restart. Thus, JSEP implementationswhichthat process DTLS data prior to receiving an answerMUST<bcp14>MUST</bcp14> be prepared to receive either a ClientHello or data from the previous DTLSconnection.</t> <t>Ifconnection.</li> <li pn="section-5.11-3.3">If no valid DTLS connection exists, prepare to start a DTLS connection, using the specified roles and fingerprints, on any underlying ICE components, once they areactive.</t> <t>Ifactive.</li> <li pn="section-5.11-3.4"> <t indent="0" pn="section-5.11-3.4.1">If them="m=" sectionproto<proto> value indicates use of RTP:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.11-3.4.2"> <li pn="section-5.11-3.4.2.1">If them="m=" section references RTCP feedback mechanisms that were not present in the correspondingm="m=" section in the offer, this indicates a negotiation problem andMUST<bcp14>MUST</bcp14> result in an error. However, new media formats and new RTP header extension values are permitted in the answer, as described in <xref target="RFC3264"/>, Section 7,sectionFormat="comma" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-7" derivedContent="RFC3264"/> and <xref target="RFC5285"/>, Section 6.</t> <t>IfsectionFormat="comma" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-6" derivedContent="RFC5285"/>.</li> <li pn="section-5.11-3.4.2.2">If them="m=" section has RTCP mux enabled, discard the RTCP ICE component, if one exists, and begin or continue muxing RTCP over the RTP ICE component, as specified in <xref target="RFC5761"/>, Section 5.1.3.sectionFormat="comma" section="5.1.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5761#section-5.1.3" derivedContent="RFC5761"/>. Otherwise, prepare to transmit RTCP over the RTCP ICE component; if no RTCP ICE componentexists,exists because RTCP mux was previously enabled, thisMUST<bcp14>MUST</bcp14> result in anerror.</t> <t>Iferror.</li> <li pn="section-5.11-3.4.2.3">If them="m=" section hasreduced-sizeReduced-Size RTCP enabled, configure the RTCP transmission for thism="m=" section to usereduced-sizeReduced-Size RTCP, as specified in <xref target="RFC5506"/>.</t> <t>Ifformat="default" sectionFormat="of" derivedContent="RFC5506"/>.</li> <li pn="section-5.11-3.4.2.4">If thedirectionaldirection attribute in the answer indicates that the JSEP implementation should be sending media ("sendonly" for local answers, "recvonly" for remote answers, or "sendrecv" for either type of answer), choose the media format to send as the most preferred media format from the remote description that is also locally supported, as discussed in Sections <xref target="RFC3264"/>, Sections 6.1section="6.1" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-6.1" derivedContent="RFC3264"/> and7,<xref target="RFC3264" section="7" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-7" derivedContent="RFC3264"/> of <xref target="RFC3264" format="default" sectionFormat="of" derivedContent="RFC3264"/>, and start transmitting RTP media using that format once the underlying transport layers have been established. If an SSRC has not already been chosen for this outgoing RTP stream, choose a unique random one. If media is already being transmitted, the same SSRCSHOULD<bcp14>SHOULD</bcp14> be used unless theclockrateclock rate of the new codec is different, in which case a new SSRCMUST<bcp14>MUST</bcp14> be chosen, as specified in <xref target="RFC7160"/>, Section 3.1.</t> <t>ThesectionFormat="comma" section="4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7160#section-4.1" derivedContent="RFC7160"/>.</li> <li pn="section-5.11-3.4.2.5">The payload type mapping from the remote description is used to determine payload types for the outgoing RTP streams, including the payload type for the send media format chosen above. Any RTP header extensions that were negotiated should be included in the outgoing RTP streams, using the extension mapping from the remotedescription; ifdescription. If theRIDMID header extension has been negotiated,and RID values are specified,include it in theRIDoutgoing RTP streams, as indicated in <xref target="RFC8843" sectionFormat="comma" section="15" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-15" derivedContent="RFC8843"/>. If the RtpStreamId or RepairedRtpStreamId headerextensionextensions have been negotiated and rid-ids have been established, include these header extensions in the outgoing RTP streams, as indicated in <xreftarget="I-D.ietf-mmusic-rid"></xref>, Section 4.</t> <t>Iftarget="RFC8851" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8851#section-4" derivedContent="RFC8851"/>.</li> <li pn="section-5.11-3.4.2.6">If them="m=" section is of typeaudio,"audio", and silence suppression was (1) configured for the send media format as a result of processing the remotedescription,description andis(2) also enabled for that format in the local description, use silence suppression for outgoing media, in accordance with the guidance in <xref target="sec.voiceactivitydetection1"/>.format="default" sectionFormat="of" derivedContent="Section 5.2.3.2"/>. If these conditions are not met, silence suppressionMUST NOT<bcp14>MUST NOT</bcp14> be used for outgoingmedia.</t> <t>Ifmedia.</li> <li pn="section-5.11-3.4.2.7">If simulcast has been negotiated, send the appropriate number of Source RTP Streams as specified in <xreftarget="I-D.ietf-mmusic-sdp-simulcast"></xref>, Section 6.2.2.</t> <t>Iftarget="RFC8853" sectionFormat="comma" section="5.3.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8853#section-5.3.3" derivedContent="RFC8853"/>.</li> <li pn="section-5.11-3.4.2.8">If the send media format chosen above has a corresponding "rtx" mediaformat,format or a FEC mechanism has been negotiated, establish aRedundancyredundancy RTPStreamstream with a unique random SSRC for each Source RTP Stream, and start or continue transmitting RTX/FEC packets asneeded.</t> <t>Ifneeded.</li> <li pn="section-5.11-3.4.2.9">If the send media format chosen above has a corresponding "red" media format of the sameclockrate,clock rate, allow redundant encoding using the specified format for resiliency purposes, as discussed in <xreftarget="I-D.ietf-rtcweb-fec" />, Section 3.2.target="RFC8854" sectionFormat="comma" section="3.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8854#section-3.2" derivedContent="RFC8854"/>. Note that unlike RTX or FEC media formats, the "red" format is transmitted on the Source RTP Stream, not theRedundancyredundancy RTPStream.</t> <t>Enablestream.</li> <li pn="section-5.11-3.4.2.10">Enable the RTCP feedback mechanisms referenced in the media section for all Source RTP Streams using the specified media formats. Specifically, begin or continue sending the requested feedback types and reacting to received feedback, as specified in <xref target="RFC4585"/>, Section 4.2.sectionFormat="comma" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-4.2" derivedContent="RFC4585"/>. When sending RTCP feedback, follow the rules and recommendations from <xreftarget="RFC8108"></xref> Section 5.4.1,target="RFC8108" sectionFormat="comma" section="5.4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8108#section-5.4.1" derivedContent="RFC8108"/> to select which SSRC touse.</t> <t>Ifuse.</li> <li pn="section-5.11-3.4.2.11">If thedirectionaldirection attribute in the answer indicates that the JSEP implementation should not be sending media ("recvonly" for local answers, "sendonly" for remote answers, or "inactive" for either type ofanswer)answer), stop transmitting all RTP media, but continue sending RTCP, as described in <xref target="RFC3264"/>, Section 5.1.</t> </list></t> <t>IfsectionFormat="comma" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3264#section-5.1" derivedContent="RFC3264"/>.</li> </ul> </li> <li pn="section-5.11-3.5"> <t indent="0" pn="section-5.11-3.5.1">If them="m=" sectionproto<proto> value indicates use of SCTP:<list style="symbols"> <t>If</t> <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.11-3.5.2"> <li pn="section-5.11-3.5.2.1">If an SCTP associationexists,exists and the remote SCTP port has changed, discard the existing SCTP association. This includes the case when the PeerConnection state is"have-remote-pranswer".</t> <t>If"have-remote-pranswer".</li> <li pn="section-5.11-3.5.2.2">If no valid SCTP association exists, prepare to initiateaan SCTP association over the associated ICE component and DTLS connection, using the local SCTP port value from the localdescription,description and the remote SCTP port value from the remote description, as described in <xreftarget="I-D.ietf-mmusic-sctp-sdp" />, Section 10.2.</t> </list></t> </list></t> <t>Iftarget="RFC8841" sectionFormat="comma" section="10.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8841#section-10.2" derivedContent="RFC8841"/>.</li> </ul> </li> </ul> <t indent="0" pn="section-5.11-4">If the answer contains valid bundle groups, discard any ICE components for them="m=" sections that will be bundled onto the primary ICE components in each bundle, and begin muxing thesem="m=" sections accordingly, as described in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 8.2.</t> <t>Iftarget="RFC8843" sectionFormat="comma" section="7.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-7.4" derivedContent="RFC8843"/>.</t> <t indent="0" pn="section-5.11-5">If the description is of type"answer","answer" and there are still remaining candidates in the ICE candidate pool, discard them.</t> </section> </section> <sectiontitle="Processing RTP/RTCP" anchor="sec.rtp.demux"> <t>Whenanchor="sec.rtp.demux" numbered="true" toc="include" removeInRFC="false" pn="section-6"> <name slugifiedName="name-processing-rtp-rtcp">Processing RTP/RTCP</name> <t indent="0" pn="section-6-1">When bundling, associating incoming RTP/RTCP with the properm="m=" section is defined in <xreftarget="I-D.ietf-mmusic-sdp-bundle-negotiation" />, Section 10.2.target="RFC8843" sectionFormat="comma" section="9.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8843#section-9.2" derivedContent="RFC8843"/>. When not bundling, the properm="m=" section is clear from the ICE component over which the RTP/RTCP is received.</t><t>Once<t indent="0" pn="section-6-2">Once the properm= section(s)"m=" section or sections are known, RTP/RTCP is delivered to the RtpTransceiver(s) associated with them="m=" section(s) and further processing of the RTP/RTCP is done at the RtpTransceiver level. This includes using the RID mechanism <xreftarget="I-D.ietf-mmusic-rid" />target="RFC8851" format="default" sectionFormat="of" derivedContent="RFC8851"/> and its associated RtpStreamId and RepairedRtpStreamId identifiers to distinguish between multipleEncoded Streams, as well asencoded streams and determine which Source RTP stream should be repaired by a givenRedundancyredundancy RTP stream.</t> </section> <sectiontitle="Examples" anchor="sec.examples"> <t>Noteanchor="sec.examples" numbered="true" toc="include" removeInRFC="false" pn="section-7"> <name slugifiedName="name-examples">Examples</name> <t indent="0" pn="section-7-1">Note that this example section shows several SDP fragments. Toformat in 72 columns,accommodate RFC line-length restrictions, some of thelines inSDP lines have been split into multiple lines, where leading whitespace indicates that a line is a continuation of the previous line. In addition, some blank lines have been added to improve readability but are not valid in SDP.</t><t>More<t indent="0" pn="section-7-2">More examples of SDP for WebRTC call flows, including examples with IPv6 addresses, can be found in <xreftarget="I-D.ietf-rtcweb-sdp"></xref>.</t> <section title="Simple Example" anchor="sec.simple-examples"> <t>Thistarget="I-D.ietf-rtcweb-sdp" format="default" sectionFormat="of" derivedContent="SDP4WebRTC"/>.</t> <section anchor="sec.simple-examples" numbered="true" toc="include" removeInRFC="false" pn="section-7.1"> <name slugifiedName="name-simple-example">Simple Example</name> <t indent="0" pn="section-7.1-1">This section shows a very simple example that sets up a minimalaudio / videoaudio/video call between two JSEP endpoints without usingtrickleTrickle ICE. The example in the following section provides a more detailed example of what could happen in a JSEP session.</t><t>The<t indent="0" pn="section-7.1-2">The code flow below shows Alice's endpoint initiating the session to Bob's endpoint. The messages from the JavaScript application in Alice's browser to the JavaScript in Bob's browser, abbreviated asAliceJS"AliceJS" andBobJS"BobJS", respectively, are assumed to flow over some signaling protocol via a web server. The JavaScript on both Alice's side and Bob's side waits for all candidates before sending the offer or answer, so the offers and answers are complete;trickleTrickle ICE is not used. The user agents (JSEP implementations) inAliceAlice's and Bob's browsers, abbreviated asAliceUA"AliceUA" andBobUA"BobUA", respectively, are both using the default bundle policy of"balanced","balanced" and the default RTCP mux policy of "require".</t><t> <figure> <artwork> <![CDATA[<artwork name="" type="ascii-art" align="left" alt="" pn="section-7.1-3"> // set up local media stateAliceJS->AliceUA:AliceJS->AliceUA: create new PeerConnectionAliceJS->AliceUA:AliceJS->AliceUA: addTrack with two tracks: audio and videoAliceJS->AliceUA:AliceJS->AliceUA: createOffer to get offerAliceJS->AliceUA:AliceJS->AliceUA: setLocalDescription with offerAliceUA->AliceJS:AliceUA->AliceJS: multiple onicecandidate events with candidates // wait for ICE gathering to completeAliceUA->AliceJS:AliceUA->AliceJS: onicecandidate event with null candidateAliceJS->AliceUA:AliceJS->AliceUA: get |offer-A1| from pendingLocalDescription // |offer-A1| is sent over signaling protocol to BobAliceJS->WebServer:AliceJS->WebServer: signaling with |offer-A1|WebServer->BobJS:WebServer->BobJS: signaling with |offer-A1| // |offer-A1| arrives at BobBobJS->BobUA:BobJS->BobUA: create a PeerConnectionBobJS->BobUA:BobJS->BobUA: setRemoteDescription with |offer-A1|BobUA->BobJS:BobUA->BobJS: ontrack events for audio and video tracks // Bob accepts callBobJS->BobUA:BobJS->BobUA: addTrack with local tracksBobJS->BobUA:BobJS->BobUA: createAnswerBobJS->BobUA:BobJS->BobUA: setLocalDescription with answerBobUA->BobJS:BobUA->BobJS: multiple onicecandidate events with candidates // wait for ICE gathering to completeBobUA->BobJS:BobUA->BobJS: onicecandidate event with null candidateBobJS->BobUA:BobJS->BobUA: get |answer-A1| from currentLocalDescription // |answer-A1| is sent over signaling protocol // to AliceBobJS->WebServer:BobJS->WebServer: signaling with |answer-A1|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-A1| // |answer-A1| arrives at AliceAliceJS->AliceUA:AliceJS->AliceUA: setRemoteDescription with |answer-A1|AliceUA->AliceJS:AliceUA->AliceJS: ontrack events for audio and video tracks // media flowsBobUA->AliceUA:BobUA->AliceUA: media sent from Bob to AliceAliceUA->BobUA:AliceUA->BobUA: media sent from Alice to Bob]]></artwork></figure> </t> <t>The<t indent="0" pn="section-7.1-4">The SDP for |offer-A1| looks like:</t><t> <figure> <artwork alt="offer-A1"> <![CDATA[<sourcecode name="offer-A1" type="sdp" markers="false" pn="section-7.1-5"> v=0 o=- 4962303333179871722 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 10100 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 203.0.113.100 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:47017fee-b6c1-4162-929c-a25110252400 a=ice-ufrag:ETEn a=ice-pwd:OtSK0WpNtpUjkY4+86js7ZQl a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04: BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 a=setup:actpass a=tls-id:91bbf309c0990a6bec11e38ba2933cee a=rtcp:10101 IN IP4 203.0.113.100 a=rtcp-mux a=rtcp-rsize a=candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host a=candidate:1 2 udp 2113929470 203.0.113.100 10101 typ host a=end-of-candidates m=video 10102 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 203.0.113.100 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=msid:47017fee-b6c1-4162-929c-a25110252400 a=ice-ufrag:BGKk a=ice-pwd:mqyWsAjvtKwTGnvhPztQ9mIf a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04: BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 a=setup:actpass a=tls-id:91bbf309c0990a6bec11e38ba2933cee a=rtcp:10103 IN IP4 203.0.113.100 a=rtcp-mux a=rtcp-rsize a=candidate:1 1 udp 2113929471 203.0.113.100 10102 typ host a=candidate:1 2 udp 2113929470 203.0.113.100 10103 typ hosta=end-of-candidates ]]> </artwork> </figure> </t> <t>Thea=end-of-candidates</sourcecode> <t indent="0" pn="section-7.1-6">The SDP for |answer-A1| looks like:</t><t> <figure> <artwork alt="answer-A1"> <![CDATA[<sourcecode name="answer-A1" type="sdp" markers="false" pn="section-7.1-7"> v=0 o=- 6729291447651054566 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 10200 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 203.0.113.200 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:61317484-2ed4-49d7-9eb7-1414322a7aae a=ice-ufrag:6sFv a=ice-pwd:cOTZKZNVlO9RSGsEGM63JXT2 a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35: DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 a=setup:active a=tls-id:eec3392ab83e11ceb6a0990c903fbb19 a=rtcp-mux a=rtcp-rsize a=candidate:1 1 udp 2113929471 203.0.113.200 10200 typ host a=end-of-candidates m=video 10200 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 203.0.113.200 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack plia=msid:61317484-2ed4-49d7-9eb7-1414322a7aae ]]> </artwork> </figure> </t>a=msid:61317484-2ed4-49d7-9eb7-1414322a7aae</sourcecode> </section> <sectiontitle="Detailed Example" anchor="sec.detailed-example"> <t>Thisanchor="sec.detailed-example" numbered="true" toc="include" removeInRFC="false" pn="section-7.2"> <name slugifiedName="name-detailed-example">Detailed Example</name> <t indent="0" pn="section-7.2-1">This section shows a more involved example of a session between two JSEP endpoints. Trickle ICE is used in full trickle mode, with a bundle policy of "max-bundle", an RTCP mux policy of "require", and a single TURN server. Initially, both Alice and Bob establish an audio channel and a data channel. Later, Bob adds two videoflows,flows -- one for his videofeed,feed and one forscreensharing,screen sharing, both supportingFEC, andFEC -- with the video feed configured for simulcast. Alice accepts these videoflows,flows but does not add video flows of her own, so they are handled as recvonly. Alice also specifies a maximum video decoder resolution.</t><t> <figure> <artwork> <![CDATA[<artwork name="" type="ascii-art" align="left" alt="" pn="section-7.2-2"> // set up local media stateAliceJS->AliceUA:AliceJS->AliceUA: create new PeerConnectionAliceJS->AliceUA:AliceJS->AliceUA: addTrack with an audio trackAliceJS->AliceUA:AliceJS->AliceUA: createDataChannel to get data channelAliceJS->AliceUA:AliceJS->AliceUA: createOffer to get |offer-B1|AliceJS->AliceUA:AliceJS->AliceUA: setLocalDescription with |offer-B1| // |offer-B1| is sent over signaling protocol to BobAliceJS->WebServer:AliceJS->WebServer: signaling with |offer-B1|WebServer->BobJS:WebServer->BobJS: signaling with |offer-B1| // |offer-B1| arrives at BobBobJS->BobUA:BobJS->BobUA: create a PeerConnectionBobJS->BobUA:BobJS->BobUA: setRemoteDescription with |offer-B1|BobUA->BobJS:BobUA->BobJS: ontrack event with audio track from Alice // candidates are sent to BobAliceUA->AliceJS:AliceUA->AliceJS: onicecandidate (host) |offer-B1-candidate-1|AliceJS->WebServer:AliceJS->WebServer: signaling with |offer-B1-candidate-1|AliceUA->AliceJS:AliceUA->AliceJS: onicecandidate (srflx) |offer-B1-candidate-2|AliceJS->WebServer:AliceJS->WebServer: signaling with |offer-B1-candidate-2|AliceUA->AliceJS:AliceUA->AliceJS: onicecandidate (relay) |offer-B1-candidate-3|AliceJS->WebServer:AliceJS->WebServer: signaling with |offer-B1-candidate-3|WebServer->BobJS:WebServer->BobJS: signaling with |offer-B1-candidate-1|BobJS->BobUA:BobJS->BobUA: addIceCandidate with |offer-B1-candidate-1|WebServer->BobJS:WebServer->BobJS: signaling with |offer-B1-candidate-2|BobJS->BobUA:BobJS->BobUA: addIceCandidate with |offer-B1-candidate-2|WebServer->BobJS:WebServer->BobJS: signaling with |offer-B1-candidate-3|BobJS->BobUA:BobJS->BobUA: addIceCandidate with |offer-B1-candidate-3| // Bob accepts callBobJS->BobUA:BobJS->BobUA: addTrack with local audioBobJS->BobUA:BobJS->BobUA: createDataChannel to get data channelBobJS->BobUA:BobJS->BobUA: createAnswer to get |answer-B1|BobJS->BobUA:BobJS->BobUA: setLocalDescription with |answer-B1| // |answer-B1| is sent to AliceBobJS->WebServer:BobJS->WebServer: signaling with |answer-B1|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-B1|AliceJS->AliceUA:AliceJS->AliceUA: setRemoteDescription with |answer-B1|AliceUA->AliceJS:AliceUA->AliceJS: ontrack event with audio track from Bob // candidates are sent to AliceBobUA->BobJS:BobUA->BobJS: onicecandidate (host) |answer-B1-candidate-1|BobJS->WebServer:BobJS->WebServer: signaling with |answer-B1-candidate-1|BobUA->BobJS:BobUA->BobJS: onicecandidate (srflx) |answer-B1-candidate-2|BobJS->WebServer:BobJS->WebServer: signaling with |answer-B1-candidate-2|BobUA->BobJS:BobUA->BobJS: onicecandidate (relay) |answer-B1-candidate-3|BobJS->WebServer:BobJS->WebServer: signaling with |answer-B1-candidate-3|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-B1-candidate-1|AliceJS->AliceUA:AliceJS->AliceUA: addIceCandidate with |answer-B1-candidate-1|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-B1-candidate-2|AliceJS->AliceUA:AliceJS->AliceUA: addIceCandidate with |answer-B1-candidate-2|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-B1-candidate-3|AliceJS->AliceUA:AliceJS->AliceUA: addIceCandidate with |answer-B1-candidate-3| // data channel opensBobUA->BobJS:BobUA->BobJS: ondatachannel eventAliceUA->AliceJS:AliceUA->AliceJS: ondatachannel eventBobUA->BobJS:BobUA->BobJS: onopenAliceUA->AliceJS:AliceUA->AliceJS: onopen // media is flowing between endpointsBobUA->AliceUA:BobUA->AliceUA: audio+data sent from Bob to AliceAliceUA->BobUA:AliceUA->BobUA: audio+data sent from Alice to Bob // some timelaterlater, Bob adds two video streams //note,note: no candidates exchanged, because of bundleBobJS->BobUA:BobJS->BobUA: addTrack with first video streamBobJS->BobUA:BobJS->BobUA: addTrack with second video streamBobJS->BobUA:BobJS->BobUA: createOffer to get |offer-B2|BobJS->BobUA:BobJS->BobUA: setLocalDescription with |offer-B2| // |offer-B2| is sent to AliceBobJS->WebServer:BobJS->WebServer: signaling with |offer-B2|WebServer->AliceJS:WebServer->AliceJS: signaling with |offer-B2|AliceJS->AliceUA:AliceJS->AliceUA: setRemoteDescription with |offer-B2|AliceUA->AliceJS:AliceUA->AliceJS: ontrack event with first video trackAliceUA->AliceJS:AliceUA->AliceJS: ontrack event with second video trackAliceJS->AliceUA:AliceJS->AliceUA: createAnswer to get |answer-B2|AliceJS->AliceUA:AliceJS->AliceUA: setLocalDescription with |answer-B2| // |answer-B2| is sent over signaling protocol // to BobAliceJS->WebServer:AliceJS->WebServer: signaling with |answer-B2|WebServer->BobJS:WebServer->BobJS: signaling with |answer-B2|BobJS->BobUA:BobJS->BobUA: setRemoteDescription with |answer-B2| // media is flowing between endpointsBobUA->AliceUA:BobUA->AliceUA: audio+video+data sent from Bob to AliceAliceUA->BobUA:AliceUA->BobUA: audio+video+data sent from Alice to Bob]]></artwork></figure> </t> <t>The<t indent="0" pn="section-7.2-3">The SDP for |offer-B1| looks like:</t><t> <figure> <artwork alt="offer-B1"> <![CDATA[<sourcecode name="offer-B1" type="sdp" markers="false" pn="section-7.2-4"> v=0 o=- 4962303333179871723 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 d1 m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 0.0.0.0 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:57017fee-b6c1-4162-929c-a25110252400 a=ice-ufrag:ATEn a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl a=fingerprint:sha-256 29:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04: BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 a=setup:actpass a=tls-id:17f0f4ba8a5f1213faca591b58ba52a7 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize m=application 0 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 0.0.0.0 a=mid:d1 a=sctp-port:5000 a=max-message-size:65536a=bundle-only ]]> </artwork> </figure> </t> <t>|offer-B1-candidate-1|a=bundle-only</sourcecode> <t indent="0" pn="section-7.2-5">|offer-B1-candidate-1| looks like:</t><t> <figure> <artwork alt="offer-B1-candidate-1"> <![CDATA[<sourcecode name="offer-B1-candidate-1" type="sdp" markers="false" pn="section-7.2-6"> ufrag ATEn index 0 mid a1 attr candidate:1 1 udp 2113929471 203.0.113.100 10100 typhost ]]> </artwork> </figure> </t> <t>|offer-B1-candidate-2|host</sourcecode> <t indent="0" pn="section-7.2-7">|offer-B1-candidate-2| looks like:</t><t> <figure> <artwork alt="offer-B1-candidate-2"> <![CDATA[<sourcecode name="offer-B1-candidate-2" type="sdp" markers="false" pn="section-7.2-8"> ufrag ATEn index 0 mid a1 attr candidate:1 1 udp 1845494015 198.51.100.100 11100 typ srflx raddr 203.0.113.100 rport10100 ]]> </artwork> </figure> </t> <t>|offer-B1-candidate-3|10100</sourcecode> <t indent="0" pn="section-7.2-9">|offer-B1-candidate-3| looks like:</t><t> <figure> <artwork alt="offer-B1-candidate-3"> <![CDATA[<sourcecode name="offer-B1-candidate-3" type="sdp" markers="false" pn="section-7.2-10"> ufrag ATEn index 0 mid a1 attr candidate:1 1 udp 255 192.0.2.100 12100 typ relay raddr 198.51.100.100 rport11100 ]]> </artwork> </figure> </t> <t>The11100</sourcecode> <t indent="0" pn="section-7.2-11">The SDP for |answer-B1| looks like:</t><t> <figure> <artwork alt="answer-B1"> <![CDATA[<sourcecode name="answer-B1" type="sdp" markers="false" pn="section-7.2-12"> v=0 o=- 7729291447651054566 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 d1 m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 0.0.0.0 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae a=ice-ufrag:7sFv a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2 a=fingerprint:sha-256 7B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35: DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 a=setup:active a=tls-id:7a25ab85b195acaf3121f5a8ab4f0f71 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize m=application 9 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 0.0.0.0 a=mid:d1 a=sctp-port:5000a=max-message-size:65536 ]]> </artwork> </figure> </t> <t>|answer-B1-candidate-1|a=max-message-size:65536</sourcecode> <t indent="0" pn="section-7.2-13">|answer-B1-candidate-1| looks like:</t><t> <figure> <artwork alt="answer-B1-candidate-1"> <![CDATA[<sourcecode name="answer-B1-candidate-1" type="sdp" markers="false" pn="section-7.2-14"> ufrag 7sFv index 0 mid a1 attr candidate:1 1 udp 2113929471 203.0.113.200 10200 typhost ]]> </artwork> </figure> </t> <t>|answer-B1-candidate-2|host</sourcecode> <t indent="0" pn="section-7.2-15">|answer-B1-candidate-2| looks like:</t><t> <figure> <artwork alt="answer-B1-candidate-2"> <![CDATA[<sourcecode name="answer-B1-candidate-2" type="sdp" markers="false" pn="section-7.2-16"> ufrag 7sFv index 0 mid a1 attr candidate:1 1 udp 1845494015 198.51.100.200 11200 typ srflx raddr 203.0.113.200 rport10200 ]]> </artwork> </figure> </t> <t>|answer-B1-candidate-3|10200</sourcecode> <t indent="0" pn="section-7.2-17">|answer-B1-candidate-3| looks like:</t><t> <figure> <artwork alt="answer-B1-candidate-3"> <![CDATA[<sourcecode name="answer-B1-candidate-3" type="sdp" markers="false" pn="section-7.2-18"> ufrag 7sFv index 0 mid a1 attr candidate:1 1 udp 255 192.0.2.200 12200 typ relay raddr 198.51.100.200 rport11200 ]]> </artwork> </figure> </t> <t>The11200</sourcecode> <t indent="0" pn="section-7.2-19">The SDP for |offer-B2| is shown below. In addition to the newm="m=" sections for video, both of which are offeringFEC,FEC and one of which is offering simulcast, note the increment of the version number in theo= line,"o=" line; changes to thec="c=" line, indicating the local candidate that wasselected,selected; and the inclusion of gathered candidates as a=candidate lines.</t><t> <figure> <artwork alt="offer-B2"> <![CDATA[<sourcecode name="offer-B2" type="sdp" markers="false" pn="section-7.2-20"> v=0 o=- 7729291447651054566 2 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 d1 v1 v2 a=group:LS a1 v1 m=audio 12200 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 192.0.2.200 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae a=ice-ufrag:7sFv a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2 a=fingerprint:sha-256 7B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35: DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 a=setup:actpass a=tls-id:7a25ab85b195acaf3121f5a8ab4f0f71 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize a=candidate:1 1 udp 2113929471 203.0.113.200 10200 typ host a=candidate:1 1 udp 1845494015 198.51.100.200 11200 typ srflx raddr 203.0.113.200 rport 10200 a=candidate:1 1 udp 255 192.0.2.200 12200 typ relay raddr 198.51.100.200 rport 11200 a=end-of-candidates m=application 12200 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 192.0.2.200 a=mid:d1 a=sctp-port:5000 a=max-message-size:65536 m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103 104 c=IN IP4 192.0.2.200 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=rtpmap:104 flexfec/90000 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=msid:71317484-2ed4-49d7-9eb7-1414322a7aae a=rid:1 send a=rid:2 send a=rid:3 send a=simulcast:send 1;2;3 m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103 104 c=IN IP4 192.0.2.200 a=mid:v2 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=rtpmap:104 flexfec/90000 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack plia=msid:81317484-2ed4-49d7-9eb7-1414322a7aae ]]> </artwork> </figure> </t> <t>Thea=msid:81317484-2ed4-49d7-9eb7-1414322a7aae</sourcecode> <t indent="0" pn="section-7.2-21">The SDP for |answer-B2| is shown below. In addition to the acceptance of the videom="m=" sections, the use of a=recvonly to indicate one-way video, and the use of a=imageattr to limit the received resolution, note the use of setup:passive to maintain the existing DTLS roles.</t><t> <figure> <artwork alt="answer-B2"> <![CDATA[<sourcecode name="answer-B2" type="sdp" markers="false" pn="section-7.2-22"> v=0 o=- 4962303333179871723 2 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 d1 v1 v2 a=group:LS a1 v1 m=audio 12100 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 192.0.2.100 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:57017fee-b6c1-4162-929c-a25110252400 a=ice-ufrag:ATEn a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl a=fingerprint:sha-256 29:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04: BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 a=setup:passive a=tls-id:17f0f4ba8a5f1213faca591b58ba52a7 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize a=candidate:1 1 udp 2113929471 203.0.113.100 10100 typ host a=candidate:1 1 udp 1845494015 198.51.100.100 11100 typ srflx raddr 203.0.113.100 rport 10100 a=candidate:1 1 udp 255 192.0.2.100 12100 typ relay raddr 198.51.100.100 rport 11100 a=end-of-candidates m=application 12100 UDP/DTLS/SCTP webrtc-datachannel c=IN IP4 192.0.2.100 a=mid:d1 a=sctp-port:5000 a=max-message-size:65536 m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 192.0.2.100 a=mid:v1 a=recvonly a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=imageattr:100 recv [x=[48:1920],y=[48:1080],q=1.0] a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 192.0.2.100 a=mid:v2 a=recvonly a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=imageattr:100 recv [x=[48:1920],y=[48:1080],q=1.0] a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nackpli ]]> </artwork> </figure> </t>pli</sourcecode> </section> <sectiontitle="Earlyanchor="sec.warmup-example" numbered="true" toc="include" removeInRFC="false" pn="section-7.3"> <name slugifiedName="name-early-transport-warmup-exam">Early Transport WarmupExample" anchor="sec.warmup-example"> <t>ThisExample</name> <t indent="0" pn="section-7.3-1">This example demonstrates theearly warmupearly-warmup technique described in <xref target="sec.use-of-provisional-answer"/>.format="default" sectionFormat="of" derivedContent="Section 4.1.10.1"/>. Here, Alice's endpoint sends an offer to Bob's endpoint to start an audio/video call. Bob immediately responds with an answer that accepts the audio/videom= sections,"m=" sections but marks them as sendonly (from his perspective), meaning that Alice will not yet send media. This allows the JSEP implementation to start negotiating ICE and DTLS immediately. Bob's endpoint then prompts him to answer the call, and when he does, his endpoint sends a secondofferoffer, which enables the audio and videom="m=" sections, and thereby bidirectional media transmission. The advantage of such a flow is that as soon as the first answer is received, the implementation can proceed with ICE and DTLS negotiation and establish the session transport. If the transport setup completes before the second offer is sent, then media can be transmittedimmediatelyby the callee immediately upon answering the call, minimizing perceivedpost-dial-delay.post-dial delay. The second offer/answer exchange can also change the preferred codecs or other session parameters.</t><t>This<t indent="0" pn="section-7.3-2">This example also makes use of the "relay" ICE candidate policy described in <xref target="sec.ice-candidate-policy"/>format="default" sectionFormat="of" derivedContent="Section 3.5.3"/> to minimize the ICE gathering and checking needed.</t><t> <figure> <artwork> <![CDATA[<artwork name="" type="ascii-art" align="left" alt="" pn="section-7.3-3"> // set up local media stateAliceJS->AliceUA:AliceJS->AliceUA: create new PeerConnection with "relay" ICE policyAliceJS->AliceUA:AliceJS->AliceUA: addTrack with two tracks: audio and videoAliceJS->AliceUA:AliceJS->AliceUA: createOffer to get |offer-C1|AliceJS->AliceUA:AliceJS->AliceUA: setLocalDescription with |offer-C1| // |offer-C1| is sent over signaling protocol to BobAliceJS->WebServer:AliceJS->WebServer: signaling with |offer-C1|WebServer->BobJS:WebServer->BobJS: signaling with |offer-C1| // |offer-C1| arrives at BobBobJS->BobUA:BobJS->BobUA: create new PeerConnection with "relay" ICE policyBobJS->BobUA:BobJS->BobUA: setRemoteDescription with |offer-C1|BobUA->BobJS:BobUA->BobJS: ontrack events for audio and video // a relay candidate is sent to BobAliceUA->AliceJS:AliceUA->AliceJS: onicecandidate (relay) |offer-C1-candidate-1|AliceJS->WebServer:AliceJS->WebServer: signaling with |offer-C1-candidate-1|WebServer->BobJS:WebServer->BobJS: signaling with |offer-C1-candidate-1|BobJS->BobUA:BobJS->BobUA: addIceCandidate with |offer-C1-candidate-1| // Bob prepares an early answer towarmupwarm up the // transportBobJS->BobUA:BobJS->BobUA: addTransceiver with null audio and video tracksBobJS->BobUA:BobJS->BobUA: transceiver.setDirection(sendonly) for bothBobJS->BobUA:BobJS->BobUA: createAnswerBobJS->BobUA:BobJS->BobUA: setLocalDescription with answer // |answer-C1| is sent over signaling protocol // to AliceBobJS->WebServer:BobJS->WebServer: signaling with |answer-C1|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-C1| // |answer-C1| (sendonly) arrives at AliceAliceJS->AliceUA:AliceJS->AliceUA: setRemoteDescription with |answer-C1|AliceUA->AliceJS:AliceUA->AliceJS: ontrack events for audio and video // a relay candidate is sent to AliceBobUA->BobJS:BobUA->BobJS: onicecandidate (relay) |answer-B1-candidate-1|BobJS->WebServer:BobJS->WebServer: signaling with |answer-B1-candidate-1|WebServer->AliceJS:WebServer->AliceJS: signaling with |answer-B1-candidate-1|AliceJS->AliceUA:AliceJS->AliceUA: addIceCandidate with |answer-B1-candidate-1| // ICE and DTLS establish while call is ringing // Bob accepts call, starts media, and sends // new offerBobJS->BobUA:BobJS->BobUA: transceiver.setTrack with audio and video tracksBobUA->AliceUA:BobUA->AliceUA: media sent from Bob to AliceBobJS->BobUA:BobJS->BobUA: transceiver.setDirection(sendrecv) for both transceiversBobJS->BobUA:BobJS->BobUA: createOfferBobJS->BobUA:BobJS->BobUA: setLocalDescription with offer // |offer-C2| is sent over signaling protocol // to AliceBobJS->WebServer:BobJS->WebServer: signaling with |offer-C2|WebServer->AliceJS:WebServer->AliceJS: signaling with |offer-C2| // |offer-C2| (sendrecv) arrives at AliceAliceJS->AliceUA:AliceJS->AliceUA: setRemoteDescription with |offer-C2|AliceJS->AliceUA:AliceJS->AliceUA: createAnswerAliceJS->AliceUA:AliceJS->AliceUA: setLocalDescription with |answer-C2|AliceUA->BobUA:AliceUA->BobUA: media sent from Alice to Bob // |answer-C2| is sent over signaling protocol // to BobAliceJS->WebServer:AliceJS->WebServer: signaling with |answer-C2|WebServer->BobJS:WebServer->BobJS: signaling with |answer-C2|BobJS->BobUA:BobJS->BobUA: setRemoteDescription with |answer-C2|]]></artwork></figure> </t> <t>The<t indent="0" pn="section-7.3-4">The SDP for |offer-C1| looks like:</t><t> <figure> <artwork alt="offer-C1"> <![CDATA[<sourcecode name="offer-C1" type="sdp" markers="false" pn="section-7.3-5"> v=0 o=- 1070771854436052752 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 0.0.0.0 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce a=ice-ufrag:4ZcD a=ice-pwd:ZaaG6OG7tCn4J/lehAGz+HHD a=fingerprint:sha-256 C4:68:F8:77:6A:44:F1:98:6D:7C:9F:47:EB:E3:34:A4: 0A:AA:2D:49:08:28:70:2E:1F:AE:18:7D:4E:3E:66:BF a=setup:actpass a=tls-id:9e5b948ade9c3d41de6617b68f769e55 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize m=video 0 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 0.0.0.0 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fcea=bundle-only ]]> </artwork> </figure> </t> <t>|offer-C1-candidate-1|a=bundle-only</sourcecode> <t indent="0" pn="section-7.3-6">|offer-C1-candidate-1| looks like:</t><t> <figure> <artwork alt="offer-C1-candidate-1"> <![CDATA[<sourcecode name="offer-C1-candidate-1" type="sdp" markers="false" pn="section-7.3-7"> ufrag 4ZcD index 0 mid a1 attr candidate:1 1 udp 255 192.0.2.100 12100 typ relay raddr 0.0.0.0 rport0 ]]> </artwork> </figure> </t> <t>The0</sourcecode> <t indent="0" pn="section-7.3-8">The SDP for |answer-C1| looks like:</t><t> <figure> <artwork alt="answer-C1"> <![CDATA[<sourcecode name="answer-C1" type="sdp" markers="false" pn="section-7.3-9"> v=0 o=- 6386516489780559513 1 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 0.0.0.0 a=mid:a1 a=sendonly a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:751f239e-4ae0-c549-aa3d-890de772998b a=ice-ufrag:TpaA a=ice-pwd:t2Ouhc67y8JcCaYZxUUTgKw/ a=fingerprint:sha-256 A2:F3:A5:6D:4C:8C:1E:B2:62:10:4A:F6:70:61:C4:FC: 3C:E0:01:D6:F3:24:80:74:DA:7C:3E:50:18:7B:CE:4D a=setup:active a=tls-id:55e967f86b7166ed14d3c9eda849b5e9 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize m=video 9 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 0.0.0.0 a=mid:v1 a=sendonly a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack plia=msid:751f239e-4ae0-c549-aa3d-890de772998b ]]> </artwork> </figure> </t> <t>|answer-C1-candidate-1|a=msid:751f239e-4ae0-c549-aa3d-890de772998b</sourcecode> <t indent="0" pn="section-7.3-10">|answer-C1-candidate-1| looks like:</t><t> <figure> <artwork alt="answer-C1-candidate-1"> <![CDATA[<sourcecode name="answer-C1-candidate-1" type="sdp" markers="false" pn="section-7.3-11"> ufrag TpaA index 0 mid a1 attr candidate:1 1 udp 255 192.0.2.200 12200 typ relay raddr 0.0.0.0 rport0 ]]> </artwork> </figure> </t> <t>The0</sourcecode> <t indent="0" pn="section-7.3-12">The SDP for |offer-C2| looks like:</t><t> <figure> <artwork alt="offer-C2"> <![CDATA[<sourcecode name="offer-C2" type="sdp" markers="false" pn="section-7.3-13"> v=0 o=- 6386516489780559513 2 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 12200 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 192.0.2.200 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:751f239e-4ae0-c549-aa3d-890de772998b a=ice-ufrag:TpaA a=ice-pwd:t2Ouhc67y8JcCaYZxUUTgKw/ a=fingerprint:sha-256 A2:F3:A5:6D:4C:8C:1E:B2:62:10:4A:F6:70:61:C4:FC: 3C:E0:01:D6:F3:24:80:74:DA:7C:3E:50:18:7B:CE:4D a=setup:actpass a=tls-id:55e967f86b7166ed14d3c9eda849b5e9 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize a=candidate:1 1 udp 255 192.0.2.200 12200 typ relay raddr 0.0.0.0 rport 0 a=end-of-candidates m=video 12200 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 192.0.2.200 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack plia=msid:751f239e-4ae0-c549-aa3d-890de772998b ]]> </artwork> </figure> </t> <t>Thea=msid:751f239e-4ae0-c549-aa3d-890de772998b</sourcecode> <t indent="0" pn="section-7.3-14">The SDP for |answer-C2| looks like:</t><t> <figure> <artwork alt="answer-C2"> <![CDATA[<sourcecode name="answer-C2" type="sdp" markers="false" pn="section-7.3-15"> v=0 o=- 1070771854436052752 2 IN IP4 0.0.0.0 s=- t=0 0 a=ice-options:trickle ice2 a=group:BUNDLE a1 v1 a=group:LS a1 v1 m=audio 12100 UDP/TLS/RTP/SAVPF 96 0 8 97 98 c=IN IP4 192.0.2.100 a=mid:a1 a=sendrecv a=rtpmap:96 opus/48000/2 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 telephone-event/8000 a=rtpmap:98 telephone-event/48000 a=fmtp:97 0-15 a=fmtp:98 0-15 a=maxptime:120 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce a=ice-ufrag:4ZcD a=ice-pwd:ZaaG6OG7tCn4J/lehAGz+HHD a=fingerprint:sha-256 C4:68:F8:77:6A:44:F1:98:6D:7C:9F:47:EB:E3:34:A4: 0A:AA:2D:49:08:28:70:2E:1F:AE:18:7D:4E:3E:66:BF a=setup:passive a=tls-id:9e5b948ade9c3d41de6617b68f769e55 a=rtcp-mux a=rtcp-mux-only a=rtcp-rsize a=candidate:1 1 udp 255 192.0.2.100 12100 typ relay raddr 0.0.0.0 rport 0 a=end-of-candidates m=video 12100 UDP/TLS/RTP/SAVPF 100 101 102 103 c=IN IP4 192.0.2.100 a=mid:v1 a=sendrecv a=rtpmap:100 VP8/90000 a=rtpmap:101 H264/90000 a=fmtp:101 packetization-mode=1;profile-level-id=42e01f a=rtpmap:102 rtx/90000 a=fmtp:102 apt=100=rtpmap:103a=rtpmap:103 rtx/90000 a=fmtp:103 apt=101 a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack plia=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce ]]> </artwork> </figure> </t>a=msid:bbce3ba6-abfc-ac63-d00a-e15b286f8fce</sourcecode> </section> </section> <sectiontitle="Security Considerations" anchor="sec.security-considerations"> <t>Theanchor="sec.security-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-8"> <name slugifiedName="name-security-considerations">Security Considerations</name> <t indent="0" pn="section-8-1">The IETF has published separate documents <xreftarget="I-D.ietf-rtcweb-security-arch" /> <xref target="I-D.ietf-rtcweb-security" />target="RFC8827" format="default" sectionFormat="of" derivedContent="RFC8827"/> <xref target="RFC8826" format="default" sectionFormat="of" derivedContent="RFC8826"/> describing the security architecture for WebRTC as a whole. The remainder of this section describes security considerations for this document.</t><t>While<t indent="0" pn="section-8-2">While formally the JSEP interface is an API, it is better to think of it as an Internet protocol, with the application JavaScript being untrustworthy from the perspective of the JSEP implementation. Thus, the threat model of <xref target="RFC3552"/>format="default" sectionFormat="of" derivedContent="RFC3552"/> applies. In particular, JavaScript can call the API in any order and with any inputs, including malicious ones. This is particularly relevant when we consider the SDPwhichthat is passed tosetLocalDescription().setLocalDescription. While correct API usage requires that the application pass in SDPwhichthat was derived fromcreateOffer()createOffer orcreateAnswer(),createAnswer, there is no guarantee that applications do so. The JSEP implementationMUST<bcp14>MUST</bcp14> be prepared for the JavaScript to pass in bogus data instead.</t><t>Conversely,<t indent="0" pn="section-8-3">Conversely, the application programmer needs to be aware that the JavaScript does not have complete control of endpoint behavior. One case that bears particular mention is that editing ICE candidates out of the SDP or suppressing trickled candidates does not have the expected behavior: implementations will still perform checks from those candidates even if they are not sent to the other side. Thus, for instance, it is not possible to prevent the remote peer from learning your public IP address by removingserver reflexiveserver-reflexive candidates. Applicationswhichthat wish to conceal their public IP addressshould<bcp14>MUST</bcp14> instead configure the ICE agent to use only relay candidates.</t> </section> <sectiontitle="IANA Considerations" anchor="sec.iana-considerations"> <t>Thisanchor="sec.iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-9"> <name slugifiedName="name-iana-considerations">IANA Considerations</name> <t indent="0" pn="section-9-1">This documentrequireshas noactions from IANA.</t> </section> <section title="Acknowledgements" anchor="sec.acknowledgements"> <t>Harald Alvestrand, Taylor Brandstetter, Suhas Nandakumar, and Peter Thatcher provided significant text for this draft. Bernard Aboba, Adam Bergkvist, Dan Burnett, Ben Campbell, Alissa Cooper, Richard Ejzak, Stefan Hakansson, Ted Hardie, Christer Holmberg Andrew Hutton, Randell Jesup, Matthew Kaufman, Anant Narayanan, Adam Roach, Robert Sparks, Neil Stratford, Martin Thomson, Sean Turner, and Magnus Westerlund all provided valuable feedback on this proposal.</t>IANA actions.</t> </section> </middle> <back> <displayreference target="I-D.ietf-rtcweb-sdp" to="SDP4WebRTC"/> <referencestitle="Normative References"> <?rfc include='reference.I-D.ietf-avtext-rid'?> <?rfc include='reference.I-D.ietf-ice-trickle'?> <?rfc include='reference.I-D.ietf-mmusic-dtls-sdp'?> <?rfc include='reference.I-D.ietf-mmusic-ice-sip-sdp'?> <?rfc include='reference.I-D.ietf-mmusic-msid'?> <?rfc include='reference.I-D.ietf-mmusic-mux-exclusive'?> <?rfc include='reference.I-D.ietf-mmusic-rid'?> <?rfc include='reference.I-D.ietf-mmusic-sctp-sdp'?> <?rfc include='reference.I-D.ietf-mmusic-sdp-bundle-negotiation'?> <?rfc include='reference.I-D.ietf-mmusic-sdp-mux-attributes'?> <?rfc include='reference.I-D.ietf-mmusic-sdp-simulcast'?> <?rfc include='reference.I-D.ietf-rtcweb-fec'?> <?rfc include='reference.I-D.ietf-rtcweb-rtp-usage'?> <?rfc include='reference.I-D.ietf-rtcweb-security'?> <?rfc include='reference.I-D.ietf-rtcweb-security-arch'?> <?rfc include='reference.RFC.2119.xml'?> <?rfc include='reference.RFC.3261.xml'?> <?rfc include='reference.RFC.3264.xml'?> <?rfc include='reference.RFC.3552.xml'?> <?rfc include='reference.RFC.3605.xml'?> <?rfc include='reference.RFC.3890.xml'?> <?rfc include='reference.RFC.4145.xml'?> <?rfc include='reference.RFC.4566.xml'?> <?rfc include='reference.RFC.4585.xml'?> <?rfc include='reference.RFC.5124.xml'?> <?rfc include='reference.RFC.5285.xml'?> <?rfc include='reference.RFC.5761.xml'?> <?rfc include='reference.RFC.5888.xml'?> <?rfc include='reference.RFC.6236.xml'?> <?rfc include='reference.RFC.6347.xml'?> <?rfc include='reference.RFC.6716.xml'?> <?rfc include='reference.RFC.6904.xml'?> <?rfc include='reference.RFC.7160.xml'?> <?rfc include='reference.RFC.7587.xml'?> <?rfc include='reference.RFC.7742.xml'?> <?rfc include='reference.RFC.7850.xml'?> <?rfc include='reference.RFC.7874.xml'?> <?rfc include='reference.RFC.8108.xml'?> <?rfc include='reference.RFC.8122.xml'?> <?rfc include='reference.RFC.8445.xml'?> <?rfc include='reference.RFC.3711.xml'?> </references>pn="section-10"> <name slugifiedName="name-references">References</name> <referencestitle="Informative References"> <?rfc include='reference.I-D.ietf-rtcweb-ip-handling'?> <?rfc include='reference.I-D.ietf-mmusic-trickle-ice-sip'?> <?rfc include='reference.I-D.ietf-rtcweb-sdp'?> <?rfc include='reference.RFC.3389.xml'?> <?rfc include='reference.RFC.3960.xml'?> <?rfc include='reference.RFC.4568.xml'?> <?rfc include='reference.RFC.4588.xml'?> <?rfc include='reference.RFC.4733.xml'?> <?rfc include='reference.RFC.5245.xml'?> <?rfc include='reference.RFC.5506.xml'?> <?rfc include='reference.RFC.5576.xml'?> <?rfc include='reference.RFC.5763.xml'?> <?rfc include='reference.RFC.5764.xml'?> <?rfc include='reference.RFC.6464.xml'?> <?rfc include='reference.RFC.6544.xml'?> <?rfc include='reference.RFC.3556.xml'?>pn="section-10.1"> <name slugifiedName="name-normative-references">Normative References</name> <referenceanchor="W3C.webrtc" target="https://www.w3.org/TR/2017/WD-webrtc-20170515/">anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119"> <front><title>WebRTC 1.0: Real-time Communication Between Browsers</title><title>Key words for use in RFCs to Indicate Requirement Levels</title> <authorfullname="Adam Bergkvist" initials="A." surname="Bergkvist"> <organization>Ericsson</organization>initials="S." surname="Bradner" fullname="S. Bradner"> <organization showOnFrontPage="true"/> </author> <date year="1997" month="March"/> <abstract> <t indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t> </abstract> </front> <seriesInfo name="BCP" value="14"/> <seriesInfo name="RFC" value="2119"/> <seriesInfo name="DOI" value="10.17487/RFC2119"/> </reference> <reference anchor="RFC3261" target="https://www.rfc-editor.org/info/rfc3261" quoteTitle="true" derivedAnchor="RFC3261"> <front> <title>SIP: Session Initiation Protocol</title> <author initials="J." surname="Rosenberg" fullname="J. Rosenberg"> <organization showOnFrontPage="true"/> </author> <authorfullname="Daniel C. Burnett" initials="D." surname="Burnett"> <organization></organization>initials="H." surname="Schulzrinne" fullname="H. Schulzrinne"> <organization showOnFrontPage="true"/> </author> <authorfullname="Cullen Jennings" initials="C." surname="Jennings"> <organization>Cisco</organization>initials="G." surname="Camarillo" fullname="G. Camarillo"> <organization showOnFrontPage="true"/> </author> <authorfullname="Anant Narayanan"initials="A."surname="Narayanan"> <organization>Mozilla</organization>surname="Johnston" fullname="A. Johnston"> <organization showOnFrontPage="true"/> </author> <authorfullname="Bernard Aboba" initials="B." surname="Aboba"> <organization>Microsoft Corporation</organization>initials="J." surname="Peterson" fullname="J. Peterson"> <organization showOnFrontPage="true"/> </author> <authorfullname="Taylor Brandstetter" initials="T." surname="Brandstetter"> <organization>Google</organization>initials="R." surname="Sparks" fullname="R. Sparks"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Handley" fullname="M. Handley"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Schooler" fullname="E. Schooler"> <organization showOnFrontPage="true"/> </author> <dateday="15" month="May" year="2017" />year="2002" month="June"/> <abstract> <t indent="0">This document describes Session Initiation Protocol (SIP), an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants. These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfoname="World Wide Web Consortium WD" value="WD-webrtc-20170515" /> <format target="https://www.w3.org/TR/2017/WD-webrtc-20170515/" type="HTML" />name="RFC" value="3261"/> <seriesInfo name="DOI" value="10.17487/RFC3261"/> </reference> <referenceanchor="TS26.114" target="http://www.3gpp.org/DynaReport/26114.htm">anchor="RFC3264" target="https://www.rfc-editor.org/info/rfc3264" quoteTitle="true" derivedAnchor="RFC3264"> <front><title>3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; IP Multimedia Subsystem (IMS); Multimedia Telephony; Media handling and interaction (Release 12)</title> <author> <organization>3GPP TS 26.114 V12.8.0</organization><title>An Offer/Answer Model with Session Description Protocol (SDP)</title> <author initials="J." surname="Rosenberg" fullname="J. Rosenberg"> <organization showOnFrontPage="true"/> </author> <author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne"> <organization showOnFrontPage="true"/> </author> <dateyear="2014" month="December" /> </front> </reference> </references> <section title="Appendix A" anchor="sec.appendix-a"> <t>Foryear="2002" month="June"/> <abstract> <t indent="0">This document defines a mechanism by which two entities can make use of thesyntax validation performedSession Description Protocol (SDP) to arrive at a common view of a multimedia session between them. In the model, one participant offers the other a description of the desired session from their perspective, and the other participant answers with the desired session from their perspective. This offer/answer model is most useful in<xref target="sec.parsing-a-desc" />,unicast sessions where information from both participants is needed for thefollowing listcomplete view ofABNF definitionsthe session. The offer/answer model isused:</t> <texttable anchor="sdp-abnf" title="SDP ABNF References"> <ttcol align='left'>Attribute</ttcol> <ttcol align='left'>Reference</ttcol> <c>ptime</c> <c> <xref target="RFC4566" /> Section 9</c> <c>maxptime</c> <c> <xref target="RFC4566" /> Section 9</c> <c>rtpmap</c> <c> <xref target="RFC4566" /> Section 9</c> <c>recvonly</c> <c> <xref target="RFC4566" /> Section 9</c> <c>sendrecv</c> <c> <xref target="RFC4566" /> Section 9</c> <c>sendonly</c> <c> <xref target="RFC4566" /> Section 9</c> <c>inactive</c> <c> <xref target="RFC4566" /> Section 9</c> <c>framerate</c> <c> <xref target="RFC4566" /> Section 9</c> <c>fmtp</c> <c> <xref target="RFC4566" /> Section 9</c> <c>quality</c> <c> <xref target="RFC4566" /> Section 9</c> <c>rtcp</c> <c> <xref target="RFC3605" /> Section 2.1</c> <c>setup</c> <c> <xref target="RFC4145" /> Sections 3, 4, and 5</c> <c>connection</c> <c> <xref target="RFC4145" /> Sections 3, 4, and 5</c> <c>fingerprint</c> <c> <xref target="RFC8122" /> Section 5</c> <c>rtcp-fb</c> <c> <xref target="RFC4585" /> Section 4.2</c> <c>extmap</c> <c> <xref target="RFC5285" /> Section 7</c> <c>mid</c> <c> <xref target="RFC5888" /> Sections 4 and 5</c> <c>group</c> <c> <xref target="RFC5888" /> Sections 4 and 5</c> <c>imageattr</c> <c> <xref target="RFC6236" /> Section 3.1</c> <c>extmap (encrypt option)</c> <c> <xref target="RFC6904" /> Section 4</c> <c>candidate</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.1</c> <c>remote-candidates</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.2</c> <c>ice-lite</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.3</c> <c>ice-ufrag</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.4</c> <c>ice-pwd</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.4</c> <c>ice-options</c> <c> <xref target="I-D.ietf-mmusic-ice-sip-sdp" /> Section 4.6</c> <c>msid</c> <c> <xref target="I-D.ietf-mmusic-msid" /> Section 2</c> <c>rid</c> <c> <xref target="I-D.ietf-mmusic-rid" /> Section 10</c> <c>simulcast</c> <c> <xref target="I-D.ietf-mmusic-sdp-simulcast" /> Section 6.1</c> <c>tls-id</c> <c> <xref target="I-D.ietf-mmusic-dtls-sdp" /> Section 4</c> </texttable> </section> <section title="Change log" anchor="sec.change-log"> <t>Note toused by protocols like the Session Initiation Protocol (SIP). [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="3264"/> <seriesInfo name="DOI" value="10.17487/RFC3264"/> </reference> <reference anchor="RFC3552" target="https://www.rfc-editor.org/info/rfc3552" quoteTitle="true" derivedAnchor="RFC3552"> <front> <title>Guidelines for Writing RFCEditor: Please remove this section before publication.</t> <t>Changes in draft-26:</t> <t> <list style="symbols"> <t>Update guidanceText ongeneration of the m= proto valueSecurity Considerations</title> <author initials="E." surname="Rescorla" fullname="E. Rescorla"> <organization showOnFrontPage="true"/> </author> <author initials="B." surname="Korver" fullname="B. Korver"> <organization showOnFrontPage="true"/> </author> <date year="2003" month="July"/> <abstract> <t indent="0">All RFCs are required tobe consistent with ice-sip-sdp.</t> </list> </t> <t>Changes in draft-25:</t> <t> <list style="symbols"> <t>Remove MSID track ID from offers and answers.</t> <t>Add note about rejecting all m= sections inhave aBUNDLE group.</t> <t>Update ICE referencesSecurity Considerations section. Historically, such sections have been relatively weak. This document provides guidelines to RFC8445authors on how to write a good Security Considerations section. This document specifies an Internet Best Current Practices for the Internet Community, andmention ice2.</t> </list> </t> <t>Changesrequests discussion and suggestions for improvements.</t> </abstract> </front> <seriesInfo name="BCP" value="72"/> <seriesInfo name="RFC" value="3552"/> <seriesInfo name="DOI" value="10.17487/RFC3552"/> </reference> <reference anchor="RFC3605" target="https://www.rfc-editor.org/info/rfc3605" quoteTitle="true" derivedAnchor="RFC3605"> <front> <title>Real Time Control Protocol (RTCP) attribute indraft-24:</t> <t> <list style="symbols"> <t>Clarify that roundingSession Description Protocol (SDP)</title> <author initials="C." surname="Huitema" fullname="C. Huitema"> <organization showOnFrontPage="true"/> </author> <date year="2003" month="October"/> <abstract> <t indent="0">The Session Description Protocol (SDP) ispermitted when trying to maintain aspect ratio.</t> <t>Update tls-id handlingused tomatch what is specified in dtls-sdp.</t> </list> </t> <t>Changesdescribe the parameters of media streams used indraft-23:</t> <t> <list style="symbols"> <t>Clarify rollback handling, and treat it similarly to other setLocal/setRemote usages.</t> <t>Adoptmultimedia sessions. When afirst-fit policy for handlingsession requires multipleremote a=imageattr attributes.</t> <t>Clarifyports, SDP assumes thatathese ports have consecutive numbers. However, when the sessiondescription with zero m= sections is legal.</t> </list> </t> <t>Changes in draft-22:</t> <t> <list style="symbols"> <t>Clarify currentDirection versus direction.</t> <t>Correct session-id text so that it aligns with RFC 3264.</t> <t>Clarifycrosses a network address translation device thatgenerated ICE candidate objects must have all four fields.</t> <t>Make rollback work from any state besides stable and regardless of whether setLocalDescription or setRemoteDescription is used.</t> <t>Allow modifying SDP before sending or after receiving either offers or answers (previously this was forbidden for answers).</t> <t>Provide rationale for several design choices.</t> </list> </t> <t>Changes in draft-21:</t> <t> <list style="symbols"> <t>Change dtls-id to tls-id to match MMUSIC draft.</t> <t>Replace regular expression for proto field with a list and clarify that the answer must exactly match the offer.</t> <t>Remove text about how to error check on setLocal because local descriptions cannot be changed.</t> <t>Rework silence suppression support to always require that both sides agree to silence suppression or none is used.</t> <t>Remove instructions to parse "a=ssrc-group".</t> <t>Allow the addition of new codecs in answers and in subsequent offers.</t> <t>Clarify imageattr processing. Replace use of [x=0,y=0] with direction indicators.</t> <t>Document when early media can occur.</t> <t>Fix ICE defaultalso uses porthandling when bundle-only is used.</t> <t>Forbid duplicating IDENTICAL/TRANSPORT attributes when you are bundling.</t> <t>Clarifymapping, thenumberordering ofcomponents to gather when bundle is involved.</t> <t>Explicitly state that PTs and SSRCs are toports can beused for demuxing.</t> <t>Update guidance on "a=setup" line. This should now matchdestroyed by theMMUSIC draft.</t> <t>Update guidance on certificate/digest matching to conform to RFC8122.</t> <t>Update examples.</t> </list> </t> <t>Changes in draft-20:</t> <t> <list style="symbols"> <t>Remove Appendix-B.</t> </list> </t> <t>Changes in draft-19:</t> <t> <list style="symbols"> <t>Examples are now machine-generated for correctness, and use IETF-approved example IP addresses.</t> <t>Add early transport warmup example, and add missing attributestranslation. To handle this, we propose an extension attribute toexisting examples.</t> <t>Only send "a=rtcp-mux-only" and "a=bundle-only" on new m= sections.</t> <t>Update references.</t> <t>Add coverage of a=identity.</t> <t>ExplainSDP.</t> </abstract> </front> <seriesInfo name="RFC" value="3605"/> <seriesInfo name="DOI" value="10.17487/RFC3605"/> </reference> <reference anchor="RFC3711" target="https://www.rfc-editor.org/info/rfc3711" quoteTitle="true" derivedAnchor="RFC3711"> <front> <title>The Secure Real-time Transport Protocol (SRTP)</title> <author initials="M." surname="Baugher" fullname="M. Baugher"> <organization showOnFrontPage="true"/> </author> <author initials="D." surname="McGrew" fullname="D. McGrew"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Naslund" fullname="M. Naslund"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Carrara" fullname="E. Carrara"> <organization showOnFrontPage="true"/> </author> <author initials="K." surname="Norrman" fullname="K. Norrman"> <organization showOnFrontPage="true"/> </author> <date year="2004" month="March"/> <abstract> <t indent="0">This document describes thelipsync group algorithm more thoroughly.</t> <t>Remove unnecessary listSecure Real-time Transport Protocol (SRTP), a profile ofMTI specs.</t> <t>Allow codecsthe Real-time Transport Protocol (RTP), whichweren't offered to appear in answerscan provide confidentiality, message authentication, andwhich weren't selectedreplay protection toappear in subsequent offers.</t> <t>Codec preferences now are applied on both initial and subsequent offersthe RTP traffic andanswers.</t> <t>Clarify a=msid handling for recvonly m= sections.</t> <t>Clarify behavior of attributes for bundle-only data channels.</t> <t>Allow media attributestoappear in data m= sections when allthemedia m= sections are bundle-only.</t> <t>Use consistent terminology for JSEP implementations.</t> <t>Describe how to handle failed API calls.</t> <t>Some cleanup on routing rules.</t> </list> </t> <t>Changes in draft-18:</t> <t> <list style="symbols"> <t>Update demux algorithm and move it to an appendix in preparationcontrol traffic formerging it into BUNDLE.</t> <t>Clarify why we can't handle an incoming offer to send simulcast.</t> <t>Expand IceCandidate object text.</t> <t>Further document use of ICE candidate pool.</t> <t>Document removeTrack.</t> <t>Update requirements to only acceptRTP, thelast generated offer/answer as an argument to setLocalDescription.</t> <t>Allow round pixels.</t> <t>Fix code around default timing when AVPF is not specified.</t> <t>Clean up terminology around m= line and m=section.</t> <t>Provide a more realistic exampleReal-time Transport Control Protocol (RTCP). [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="3711"/> <seriesInfo name="DOI" value="10.17487/RFC3711"/> </reference> <reference anchor="RFC3890" target="https://www.rfc-editor.org/info/rfc3890" quoteTitle="true" derivedAnchor="RFC3890"> <front> <title>A Transport Independent Bandwidth Modifier forminimum decoder capabilities.</t> <t>Document behavior when rtcp-mux policy is require but rtcp-mux attribute not provided.</t> <t>Expanded discussion of RtpSender and RtpReceiver.</t> <t>Add RtpTransceiver.currentDirection andthe Session Description Protocol (SDP)</title> <author initials="M." surname="Westerlund" fullname="M. Westerlund"> <organization showOnFrontPage="true"/> </author> <date year="2004" month="September"/> <abstract> <t indent="0">This documentsetDirection.</t> <t>Require imageattr x=0, y=0 to indicate that there are no valid resolutions.</t> <t>Requiredefines aprivacy-preserving MID/RID construction.</t> <t>Require support for RFC 3556Session Description Protocol (SDP) Transport Independent Application Specific Maximum (TIAS) bandwidthmodifiers.</t> <t>Update maxptime description.</t> <t>Notemodifier thatendpoints may encounter extra codecs in answers and subsequent offers from non-JSEP peers.</t> <t>Update references.</t> </list> </t> <t>Changes in draft-17:</t> <t> <list style="symbols"> <t>Split createOffer and createAnswer sections to clearly indicate attributes which always appear and which only appear whendoes notbundled into another m= section.</t> <t>Add descriptions of RtpTransceiver methods.</t> <t>Describe howinclude transport overhead; instead an additional packet rate attribute is defined. The transport independent bit-rate value together with the maximum packet rate can then be used toprocess RTCP feedback attributes.</t> <t>Clarify transceiver directionscalculate the real bit-rate over the transport actually used. </t> <t indent="0"> The existing SDP bandwidth modifiers and theirinteraction with 3264.</t> <t>Describe setCodecPreferences.</t> <t>Update RTP demux algorithm. Include RTCP.</t> <t>Update requirementsvalues include the bandwidth needed for the transport and IP layers. When using SDP with protocols like the Session Announcement Protocol (SAP), the Session Initiation Protocol (SIP), and the Real-Time Streaming Protocol (RTSP), and whena=rtcp is included, limitingthe involved hosts has different transport overhead, for example due tocases where itdifferent IP versions, the interpretation of what lower layer bandwidths are included isneeded for backward compatibility.</t> <t>Clarify SAR handling.</t> <t>Updated addTrack matching algorithm.</t> <t>Remove a=ssrc requirements.</t> <t>Handle a=setupnot clear. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="3890"/> <seriesInfo name="DOI" value="10.17487/RFC3890"/> </reference> <reference anchor="RFC4145" target="https://www.rfc-editor.org/info/rfc4145" quoteTitle="true" derivedAnchor="RFC4145"> <front> <title>TCP-Based Media Transport inreoffers.</t> <t>Discuss how RTX/FEC should be handled.</t> <t>Discuss how telephone-event should be handled.</t> <t>Discussthe Session Description Protocol (SDP)</title> <author initials="D." surname="Yon" fullname="D. Yon"> <organization showOnFrontPage="true"/> </author> <author initials="G." surname="Camarillo" fullname="G. Camarillo"> <organization showOnFrontPage="true"/> </author> <date year="2005" month="September"/> <abstract> <t indent="0">This document describes howCN/DTX should be handled.</t> <t>Add missing references to ABNF table.</t> </list> </t> <t>Changes in draft-16:</t> <t> <list style="symbols"> <t>Update addIceCandidate to indicate ICE generation and allow per-m= section end-of-candidates.</t> <t>Update fingerprint handlingtouse draft-ietf-mmusic-4572-update.</t> <t>Update text aroundexpress media transport over TCP using the Session Description Protocol (SDP). It defines the SDPprocessing of RTP header extensions and payload formats.</t> <t>Add sections on simulcast, addTransceiver,'TCP' protocol identifier, the SDP 'setup' attribute, which describes the connection setup procedure, andcreateDataChannel.</t> <t>Clarify text to ensure thatthesession ID is a positive 63 bit integer.</t> <t>ClarifySDPprocessing for direction indication.</t> <t>Describe'connection' attribute, which handles connection reestablishment. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4145"/> <seriesInfo name="DOI" value="10.17487/RFC4145"/> </reference> <reference anchor="RFC4566" target="https://www.rfc-editor.org/info/rfc4566" quoteTitle="true" derivedAnchor="RFC4566"> <front> <title>SDP: Session Description Protocol</title> <author initials="M." surname="Handley" fullname="M. Handley"> <organization showOnFrontPage="true"/> </author> <author initials="V." surname="Jacobson" fullname="V. Jacobson"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Perkins" fullname="C. Perkins"> <organization showOnFrontPage="true"/> </author> <date year="2006" month="July"/> <abstract> <t indent="0">This memo defines the Session Description Protocol (SDP). SDPprocessingis intended forrtcp-mux-only.</t> <t>Specify how SDPdescribing multimedia sessions for the purposes of sessionversion in o= line.</t> <t>Requireannouncement, session invitation, and other forms of multimedia session initiation. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4566"/> <seriesInfo name="DOI" value="10.17487/RFC4566"/> </reference> <reference anchor="RFC4585" target="https://www.rfc-editor.org/info/rfc4585" quoteTitle="true" derivedAnchor="RFC4585"> <front> <title>Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)</title> <author initials="J." surname="Ott" fullname="J. Ott"> <organization showOnFrontPage="true"/> </author> <author initials="S." surname="Wenger" fullname="S. Wenger"> <organization showOnFrontPage="true"/> </author> <author initials="N." surname="Sato" fullname="N. Sato"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Burmeister" fullname="C. Burmeister"> <organization showOnFrontPage="true"/> </author> <author initials="J." surname="Rey" fullname="J. Rey"> <organization showOnFrontPage="true"/> </author> <date year="2006" month="July"/> <abstract> <t indent="0">Real-time media streams thatwhen doing an re-offer,use RTP are, to some degree, resilient against packet losses. Receivers may use thecapabilitiesbase mechanisms of thenew session are mostly requiredReal-time Transport Control Protocol (RTCP) tobereport packet reception statistics and thus allow asubset ofsender to adapt its transmission behavior in thepreviously negotiated session.</t> <t>Clarified ICE restart interaction with bundle-only.</t> <t>Remove support for changing SDP before calling setLocalDescription.</t> <t>Specify algorithmmid-term. This is the sole means fordemuxing RTP based on MID, PT,feedback andSSRC.</t> <t>Clarify rules for rejecting m= lines when bundle policy is balanced or max-bundle.</t> </list> </t> <t>Changes in draft-15:</t> <t> <list style="symbols"> <t>Clarify text around codecs offered in subsequent transactions to refer to what's been negotiated.</t> <t>Rewrite LS handling textfeedback-based error repair (besides a few codec-specific mechanisms). This document defines an extension toindicate edge cases and that we're living with them.</t> <t>Requirethe Audio-visual Profile (AVP) thatanswerer reject m= lines when there are no codecs in common.</t> <t>Enforce max-bundle on offer processing.</t> <t>Fix TIAS formulaenables receivers tohandle bits vs. kilobits.</t> <t>Describe addTrack algorithm.</t> <t>Clean up references.</t> </list> </t> <t>Changes in draft-14:</t> <t> <list style="symbols"> <t>Added discussion of RtpTransceivers + RtpSenders + RtpReceivers,provide, statistically, more immediate feedback to the senders andhow they interact with createOffer/createAnswer.</t> <t>Removed obsolete OfferToReceiveX options.</t> <t>Explained how addIceCandidate can be usedthus allows forend-of-candidates.</t> </list> </t> <t>Changes in draft-13:</t> <t> <list style="symbols"> <t>Clarified which SDP lines can be ignored.</t> <t>Clarified howshort-term adaptation and efficient feedback-based repair mechanisms tohandle various received attributes.</t> <t>Revised how attributes shouldbegenerated for bundled m= lines.</t> <t>Remove unused references.</t> <t>Remove text advocating use of unilateral PTs.</t> <t>Trigger an ICE restart even if the ICE candidate policy is being made more strict.</t> <t>Removeimplemented. This early feedback profile (AVPF) maintains the'public' ICE candidate policy.</t> <t>Move open issues into GitHub issues.</t> <t>Split local/remote description accessors into current/pending.</t> <t>Clarify a=imageattr handling.</t> <t>Add more detail on VoiceActivityDetection handling.</t> <t>Reference draft-shieh-rtcweb-ip-handling.</t> <t>Make it clear when an ICE restart should occur.</t> <t>Resolve changes needed in references.</t> <t>Remove MSID semantics.</t> <t>ice-options are now at session level.</t> <t>DefaultAVP bandwidth constraints for RTCPmux policy is now 'require'.</t> </list> </t> <t>Changes in draft-12:</t> <t> <list style="symbols"> <t>Filled in sections on applying localandremote descriptions.</t> <t>Discussed downscalingpreserves scalability to large groups. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4585"/> <seriesInfo name="DOI" value="10.17487/RFC4585"/> </reference> <reference anchor="RFC5124" target="https://www.rfc-editor.org/info/rfc5124" quoteTitle="true" derivedAnchor="RFC5124"> <front> <title>Extended Secure RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/SAVPF)</title> <author initials="J." surname="Ott" fullname="J. Ott"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Carrara" fullname="E. Carrara"> <organization showOnFrontPage="true"/> </author> <date year="2008" month="February"/> <abstract> <t indent="0">An RTP profile (SAVP) for secure real-time communications andupscalinganother profile (AVPF) tofulfill imageattr requirements.</t> <t>Updated what SDP can be modified byprovide timely feedback from theapplication.</t> <t>Updated to latest datachannel SDP.</t> <t>Allowed multiple fingerprint lines.</t> <t>Switched backreceivers toIPv4 for dummy candidates.</t> <t>Added additional clarity on ICE default candidates.</t> </list> </t> <t>Changesa sender are defined indraft-11:</t> <t> <list style="symbols"> <t>Clarified handlingRFC 3711 and RFC 4585, respectively. This memo specifies the combination of both profiles to enable secure RTPCNAMEs.</t> <t>Updated what SDP lines should be processed or ignored.</t> <t>Specified how a=imageattr should be used.</t> </list> </t> <t>Changes in draft-10:</t> <t> <list style="symbols"> <t>Described video size negotiationcommunications withimageattr.</t> <t>Clarified rejection of sections that do not have mux-only.</t> <t>Add handling of LS groups</t> </list> </t> <t>Changes in draft-09:</t> <t> <list style="symbols"> <t>Don't return nullfeedback. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5124"/> <seriesInfo name="DOI" value="10.17487/RFC5124"/> </reference> <reference anchor="RFC5285" target="https://www.rfc-editor.org/info/rfc5285" quoteTitle="true" derivedAnchor="RFC5285"> <front> <title>A General Mechanism for{local,remote}Description after close().</t> <t>Changed TCP/TLSRTP Header Extensions</title> <author initials="D." surname="Singer" fullname="D. Singer"> <organization showOnFrontPage="true"/> </author> <author initials="H." surname="Desineni" fullname="H. Desineni"> <organization showOnFrontPage="true"/> </author> <date year="2008" month="July"/> <abstract> <t indent="0">This document provides a general mechanism toUDP/DTLS inuse the header extension feature of RTPprofile names.</t> <t>Separate out bundle and mux policy.</t> <t>Added specific references(the Real-Time Transport Protocol). It provides the option toFEC mechanisms.</t> <t>Added canTrickle mechanism.</t> <t>Added section on subsequent answers and, answer options.</t> <t>Added text defining set{Local,Remote}Description behavior.</t> </list> </t> <t>Changesuse a small number of small extensions indraft-08: <list style="symbols"> <t>Added new example sectioneach RTP packet, where the universe of possible extensions is large andremoved old examplesregistration is de-centralized. The actual extensions inappendix.</t> <t>Fixed <proto> field handling.</t> <t>Added text describing a=rtcp attribute.</t> <t>Reworked handling of OfferToReceiveAudiouse in a session are signaled in the setup information for that session. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5285"/> <seriesInfo name="DOI" value="10.17487/RFC5285"/> </reference> <reference anchor="RFC5761" target="https://www.rfc-editor.org/info/rfc5761" quoteTitle="true" derivedAnchor="RFC5761"> <front> <title>Multiplexing RTP Data andOfferToReceiveVideo per discussion at IETF 90.</t> <t>Reworked trickle ICE handlingControl Packets on a Single Port</title> <author initials="C." surname="Perkins" fullname="C. Perkins"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Westerlund" fullname="M. Westerlund"> <organization showOnFrontPage="true"/> </author> <date year="2010" month="April"/> <abstract> <t indent="0">This memo discusses issues that arise when multiplexing RTP data packets andits impactRTP Control Protocol (RTCP) packets onm=a single UDP port. It updates RFC 3550 andc= lines per discussion at interim.</t> <t>Added max-bundle-and-rtcp-mux policy.</t> <t>Added description of maxptime handling.</t> <t>Updated ICE candidate pool defaultRFC 3551 to0.</t> <t>Resolved open issues around AppID/receiver-ID.</t> <t>Reworkeddescribe when such multiplexing is andexpanded how changes to the ICE configuration are handled.</t> <t>Some reference updates.</t> <t>Editorial clarification.</t> </list></t> <t>Changes in draft-07: <list style="symbols"> <t>Expanded discussion of VADis not appropriate, andOpus DTX.</t> <t>Added a security considerations section.</t> <t>Rewroteit explains how thesection on modifying SDPSession Description Protocol (SDP) can be used torequire implementationssignal multiplexed sessions. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5761"/> <seriesInfo name="DOI" value="10.17487/RFC5761"/> </reference> <reference anchor="RFC5888" target="https://www.rfc-editor.org/info/rfc5888" quoteTitle="true" derivedAnchor="RFC5888"> <front> <title>The Session Description Protocol (SDP) Grouping Framework</title> <author initials="G." surname="Camarillo" fullname="G. Camarillo"> <organization showOnFrontPage="true"/> </author> <author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne"> <organization showOnFrontPage="true"/> </author> <date year="2010" month="June"/> <abstract> <t indent="0">In this specification, we define a framework toclearly indicate whether any given modification is allowed.</t> <t>Clarified impact of IceRestart on CreateOffergroup "m" lines inlocal-offer state.</t> <t>Guidance on whether attributes should be defined atthemedia level orSession Description Protocol (SDP) for different purposes. This framework uses thesession level.</t> <t>Renamed "default" bundle policy to "balanced".</t> <t>Removed default ICE candidate pool size"group" andclarify how it works.</t> <t>Defined a canonical order for assignment"mid" SDP attributes, both ofMSTswhich are defined in this specification. Additionally, we specify how tom= lines.</t> <t>Removed discussion of rehydration.</t> <t>Added Eric Rescorla as a draft editor.</t> <t>Cleaned up references.</t> <t>Editorial cleanup</t> </list></t> <t>Changes in draft-06: <list style="symbols"> <t>Reworked handling of m= line recycling.</t> <t>Added handling of BUNDLE and bundle-only.</t> <t>Clarified handling of rollback.</t> <t>Added text describinguse theICE Candidate Poolframework for two different purposes: for lip synchronization andits behavior.</t> <t>Allowed OfferToReceiveX to create multiple recvonly m= sections.</t> </list></t> <t>Changes in draft-05: <list style="symbols"> <t>Fixedfor receiving a media flow consisting of severalissues identifiedmedia streams on different transport addresses. This document obsoletes RFC 3388. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5888"/> <seriesInfo name="DOI" value="10.17487/RFC5888"/> </reference> <reference anchor="RFC6236" target="https://www.rfc-editor.org/info/rfc6236" quoteTitle="true" derivedAnchor="RFC6236"> <front> <title>Negotiation of Generic Image Attributes in thecreateOffer/Answer sections duringSession Description Protocol (SDP)</title> <author initials="I." surname="Johansson" fullname="I. Johansson"> <organization showOnFrontPage="true"/> </author> <author initials="K." surname="Jung" fullname="K. Jung"> <organization showOnFrontPage="true"/> </author> <date year="2011" month="May"/> <abstract> <t indent="0">This documentreview.</t> <t>Updated references.</t> </list></t> <t>Changes in draft-04: <list style="symbols"> <t>Filled in sections on createOffer and createAnswer.</t> <t>Added SDP examples.</t> <t>Fixed references.</t> </list></t> <t>Changes in draft-03: <list style="symbols"> <t>Added text describing relationshipproposes a new generic session setup attribute toW3C specification</t> </list></t> <t>Changes in draft-02: <list style="symbols"> <!--make it possible to negotiate different image attributes such as image size. A--> <t>Converted from nroff</t> <!-- B --> <t>Removed comparisonspossible use case is toold approaches abandoned bymake it possible for a \%low-end \%hand- held terminal to display video without theworking group</t> <!-- C --> <t>Removed stuff that has movedneed toW3C specification</t> <!-- D --> <t>Align SDP handling with W3C draft</t> <!-- E --> <t>Clarified section on forking.</t> <!-- F --> <!-- G --> <!-- H --> <!-- I --> <!-- J --> <!-- K --> <!-- L --> </list></t> <t>Changes in draft-01: <list style="symbols"> <t>Added diagrams for architecture and state machine.</t> <t>Added sections on forking and rehydration.</t> <t>Clarified meaningrescale the image, something that may consume large amounts of"pranswer" and "answer".</t> <t>Reworked how ICE restartsmemory andmedia directions are controlled.</t> <t>Added list of parametersprocessing power. The document also helps to maintain an optimal bitrate for video as only the image size thatcan be changedis desired by the receiver is transmitted. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="6236"/> <seriesInfo name="DOI" value="10.17487/RFC6236"/> </reference> <reference anchor="RFC6347" target="https://www.rfc-editor.org/info/rfc6347" quoteTitle="true" derivedAnchor="RFC6347"> <front> <title>Datagram Transport Layer Security Version 1.2</title> <author initials="E." surname="Rescorla" fullname="E. Rescorla"> <organization showOnFrontPage="true"/> </author> <author initials="N." surname="Modadugu" fullname="N. Modadugu"> <organization showOnFrontPage="true"/> </author> <date year="2012" month="January"/> <abstract> <t indent="0">This document specifies version 1.2 of the Datagram Transport Layer Security (DTLS) protocol. The DTLS protocol provides communications privacy for datagram protocols. The protocol allows client/server applications to communicate in adescription.</t> <t>Updated suggested API and examplesway that is designed tomatch latest thinking.</t> <t>Suggested APIprevent eavesdropping, tampering, or message forgery. The DTLS protocol is based on the Transport Layer Security (TLS) protocol andexamples have been moved to an appendix.</t> </list></t> <t>Changes in draft -00: <list style="symbols"> <t>Migrated from draft-uberti-rtcweb-jsep-02.</t> </list></t>provides equivalent security guarantees. Datagram semantics of the underlying transport are preserved by the DTLS protocol. This document updates DTLS 1.0 to work with TLS version 1.2. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="6347"/> <seriesInfo name="DOI" value="10.17487/RFC6347"/> </reference> <reference anchor="RFC6716" target="https://www.rfc-editor.org/info/rfc6716" quoteTitle="true" derivedAnchor="RFC6716"> <front> <title>Definition of the Opus Audio Codec</title> <author initials="JM." surname="Valin" fullname="JM. Valin"> <organization showOnFrontPage="true"/> </author> <author initials="K." surname="Vos" fullname="K. Vos"> <organization showOnFrontPage="true"/> </author> <author initials="T." surname="Terriberry" fullname="T. Terriberry"> <organization showOnFrontPage="true"/> </author> <date year="2012" month="September"/> <abstract> <t indent="0">This document defines the Opus interactive speech and audio codec. Opus is designed to handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, and even live, distributed music performances. It scales from low bitrate narrowband speech at 6 kbit/s to very high quality stereo music at 510 kbit/s. Opus uses both Linear Prediction (LP) and the Modified Discrete Cosine Transform (MDCT) to achieve good compression of both speech and music. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="6716"/> <seriesInfo name="DOI" value="10.17487/RFC6716"/> </reference> <reference anchor="RFC6904" target="https://www.rfc-editor.org/info/rfc6904" quoteTitle="true" derivedAnchor="RFC6904"> <front> <title>Encryption of Header Extensions in the Secure Real-time Transport Protocol (SRTP)</title> <author initials="J." surname="Lennox" fullname="J. Lennox"> <organization showOnFrontPage="true"/> </author> <date year="2013" month="April"/> <abstract> <t indent="0">The Secure Real-time Transport Protocol (SRTP) provides authentication, but not encryption, of the headers of Real-time Transport Protocol (RTP) packets. However, RTP header extensions may carry sensitive information for which participants in multimedia sessions want confidentiality. This document provides a mechanism, extending the mechanisms of SRTP, to selectively encrypt RTP header extensions in SRTP.</t> <t indent="0">This document updates RFC 3711, the Secure Real-time Transport Protocol specification, to require that all future SRTP encryption transforms specify how RTP header extensions are to be encrypted.</t> </abstract> </front> <seriesInfo name="RFC" value="6904"/> <seriesInfo name="DOI" value="10.17487/RFC6904"/> </reference> <reference anchor="RFC7160" target="https://www.rfc-editor.org/info/rfc7160" quoteTitle="true" derivedAnchor="RFC7160"> <front> <title>Support for Multiple Clock Rates in an RTP Session</title> <author initials="M." surname="Petit-Huguenin" fullname="M. Petit-Huguenin"> <organization showOnFrontPage="true"/> </author> <author initials="G." surname="Zorn" fullname="G. Zorn" role="editor"> <organization showOnFrontPage="true"/> </author> <date year="2014" month="April"/> <abstract> <t indent="0">This document clarifies the RTP specification regarding the use of different clock rates in an RTP session. It also provides guidance on how legacy RTP implementations that use multiple clock rates can interoperate with RTP implementations that use the algorithm described in this document. It updates RFC 3550.</t> </abstract> </front> <seriesInfo name="RFC" value="7160"/> <seriesInfo name="DOI" value="10.17487/RFC7160"/> </reference> <reference anchor="RFC7587" target="https://www.rfc-editor.org/info/rfc7587" quoteTitle="true" derivedAnchor="RFC7587"> <front> <title>RTP Payload Format for the Opus Speech and Audio Codec</title> <author initials="J." surname="Spittka" fullname="J. Spittka"> <organization showOnFrontPage="true"/> </author> <author initials="K." surname="Vos" fullname="K. Vos"> <organization showOnFrontPage="true"/> </author> <author initials="JM." surname="Valin" fullname="JM. Valin"> <organization showOnFrontPage="true"/> </author> <date year="2015" month="June"/> <abstract> <t indent="0">This document defines the Real-time Transport Protocol (RTP) payload format for packetization of Opus-encoded speech and audio data necessary to integrate the codec in the most compatible way. It also provides an applicability statement for the use of Opus over RTP. Further, it describes media type registrations for the RTP payload format.</t> </abstract> </front> <seriesInfo name="RFC" value="7587"/> <seriesInfo name="DOI" value="10.17487/RFC7587"/> </reference> <reference anchor="RFC7742" target="https://www.rfc-editor.org/info/rfc7742" quoteTitle="true" derivedAnchor="RFC7742"> <front> <title>WebRTC Video Processing and Codec Requirements</title> <author initials="A.B." surname="Roach" fullname="A.B. Roach"> <organization showOnFrontPage="true"/> </author> <date year="2016" month="March"/> <abstract> <t indent="0">This specification provides the requirements and considerations for WebRTC applications to send and receive video across a network. It specifies the video processing that is required as well as video codecs and their parameters.</t> </abstract> </front> <seriesInfo name="RFC" value="7742"/> <seriesInfo name="DOI" value="10.17487/RFC7742"/> </reference> <reference anchor="RFC7850" target="https://www.rfc-editor.org/info/rfc7850" quoteTitle="true" derivedAnchor="RFC7850"> <front> <title>Registering Values of the SDP 'proto' Field for Transporting RTP Media over TCP under Various RTP Profiles</title> <author initials="S." surname="Nandakumar" fullname="S. Nandakumar"> <organization showOnFrontPage="true"/> </author> <date year="2016" month="April"/> <abstract> <t indent="0">The Real-time Transport Protocol (RTP) specification establishes a registry of profile names for use by higher-level control protocols, such as the Session Description Protocol (SDP), to refer to the transport methods. This specification describes the following new SDP transport protocol identifiers for transporting RTP Media over TCP: 'TCP/RTP/AVPF', 'TCP/RTP/SAVP', 'TCP/RTP/SAVPF', 'TCP/DTLS/RTP/SAVP', 'TCP/DTLS/RTP/SAVPF', 'TCP/TLS/RTP/AVP', and 'TCP/TLS/RTP/AVPF'.</t> </abstract> </front> <seriesInfo name="RFC" value="7850"/> <seriesInfo name="DOI" value="10.17487/RFC7850"/> </reference> <reference anchor="RFC7874" target="https://www.rfc-editor.org/info/rfc7874" quoteTitle="true" derivedAnchor="RFC7874"> <front> <title>WebRTC Audio Codec and Processing Requirements</title> <author initials="JM." surname="Valin" fullname="JM. Valin"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Bran" fullname="C. Bran"> <organization showOnFrontPage="true"/> </author> <date year="2016" month="May"/> <abstract> <t indent="0">This document outlines the audio codec and processing requirements for WebRTC endpoints.</t> </abstract> </front> <seriesInfo name="RFC" value="7874"/> <seriesInfo name="DOI" value="10.17487/RFC7874"/> </reference> <reference anchor="RFC8108" target="https://www.rfc-editor.org/info/rfc8108" quoteTitle="true" derivedAnchor="RFC8108"> <front> <title>Sending Multiple RTP Streams in a Single RTP Session</title> <author initials="J." surname="Lennox" fullname="J. Lennox"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Westerlund" fullname="M. Westerlund"> <organization showOnFrontPage="true"/> </author> <author initials="Q." surname="Wu" fullname="Q. Wu"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Perkins" fullname="C. Perkins"> <organization showOnFrontPage="true"/> </author> <date year="2017" month="March"/> <abstract> <t indent="0">This memo expands and clarifies the behavior of Real-time Transport Protocol (RTP) endpoints that use multiple synchronization sources (SSRCs). This occurs, for example, when an endpoint sends multiple RTP streams in a single RTP session. This memo updates RFC 3550 with regard to handling multiple SSRCs per endpoint in RTP sessions, with a particular focus on RTP Control Protocol (RTCP) behavior. It also updates RFC 4585 to change and clarify the calculation of the timeout of SSRCs and the inclusion of feedback messages.</t> </abstract> </front> <seriesInfo name="RFC" value="8108"/> <seriesInfo name="DOI" value="10.17487/RFC8108"/> </reference> <reference anchor="RFC8122" target="https://www.rfc-editor.org/info/rfc8122" quoteTitle="true" derivedAnchor="RFC8122"> <front> <title>Connection-Oriented Media Transport over the Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP)</title> <author initials="J." surname="Lennox" fullname="J. Lennox"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Holmberg" fullname="C. Holmberg"> <organization showOnFrontPage="true"/> </author> <date year="2017" month="March"/> <abstract> <t indent="0">This document specifies how to establish secure connection-oriented media transport sessions over the Transport Layer Security (TLS) protocol using the Session Description Protocol (SDP). It defines the SDP protocol identifier, 'TCP/TLS'. It also defines the syntax and semantics for an SDP 'fingerprint' attribute that identifies the certificate that will be presented for the TLS session. This mechanism allows media transport over TLS connections to be established securely, so long as the integrity of session descriptions is assured.</t> <t indent="0">This document obsoletes RFC 4572 by clarifying the usage of multiple fingerprints.</t> </abstract> </front> <seriesInfo name="RFC" value="8122"/> <seriesInfo name="DOI" value="10.17487/RFC8122"/> </reference> <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174"> <front> <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title> <author initials="B." surname="Leiba" fullname="B. Leiba"> <organization showOnFrontPage="true"/> </author> <date year="2017" month="May"/> <abstract> <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t> </abstract> </front> <seriesInfo name="BCP" value="14"/> <seriesInfo name="RFC" value="8174"/> <seriesInfo name="DOI" value="10.17487/RFC8174"/> </reference> <reference anchor="RFC8445" target="https://www.rfc-editor.org/info/rfc8445" quoteTitle="true" derivedAnchor="RFC8445"> <front> <title>Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal</title> <author initials="A." surname="Keranen" fullname="A. Keranen"> <organization showOnFrontPage="true"/> </author> <author initials="C." surname="Holmberg" fullname="C. Holmberg"> <organization showOnFrontPage="true"/> </author> <author initials="J." surname="Rosenberg" fullname="J. Rosenberg"> <organization showOnFrontPage="true"/> </author> <date year="2018" month="July"/> <abstract> <t indent="0">This document describes a protocol for Network Address Translator (NAT) traversal for UDP-based communication. This protocol is called Interactive Connectivity Establishment (ICE). ICE makes use of the Session Traversal Utilities for NAT (STUN) protocol and its extension, Traversal Using Relay NAT (TURN).</t> <t indent="0">This document obsoletes RFC 5245.</t> </abstract> </front> <seriesInfo name="RFC" value="8445"/> <seriesInfo name="DOI" value="10.17487/RFC8445"/> </reference> <reference anchor="RFC8826" target="https://www.rfc-editor.org/info/rfc8826" quoteTitle="true" derivedAnchor="RFC8826"> <front> <title>Security Considerations for WebRTC</title> <author initials="E." surname="Rescorla" fullname="Eric Rescorla"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8826"/> <seriesInfo name="DOI" value="10.17487/RFC8826"/> </reference> <reference anchor="RFC8827" target="https://www.rfc-editor.org/info/rfc8827" quoteTitle="true" derivedAnchor="RFC8827"> <front> <title>WebRTC Security Architecture</title> <author initials="E." surname="Rescorla" fullname="Eric Rescorla"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8827"/> <seriesInfo name="DOI" value="10.17487/RFC8827"/> </reference> <reference anchor="RFC8830" target="https://www.rfc-editor.org/info/rfc8830" quoteTitle="true" derivedAnchor="RFC8830"> <front> <title>WebRTC MediaStream Identification in the Session Description Protocol</title> <author initials="H" surname="Alvestrand" fullname="Harald Alvestrand"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8830"/> <seriesInfo name="DOI" value="10.17487/RFC8830"/> </reference> <reference anchor="RFC8834" target="https://www.rfc-editor.org/info/rfc8834" quoteTitle="true" derivedAnchor="RFC8834"> <front> <title>Media Transport and Use of RTP in WebRTC</title> <author initials="C." surname="Perkins" fullname="Colin Perkins"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Westerlund" fullname="Magnus Westerlund"> <organization showOnFrontPage="true"/> </author> <author initials="J." surname="Ott" fullname="Jörg Ott"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8834"/> <seriesInfo name="DOI" value="10.17487/RFC8834"/> </reference> <reference anchor="RFC8838" target="https://www.rfc-editor.org/info/rfc8838" quoteTitle="true" derivedAnchor="RFC8838"> <front> <title>Trickle ICE: Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (ICE) Protocol</title> <author initials="E" surname="Ivov" fullname="Emil Ivov"> <organization showOnFrontPage="true"/> </author> <author initials="J" surname="Uberti" fullname="Justin Uberti"> <organization showOnFrontPage="true"/> </author> <author initials="P" surname="Saint-Andre" fullname="Peter Saint-Andre"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8838"/> <seriesInfo name="DOI" value="10.17487/RFC8838"/> </reference> <reference anchor="RFC8839" target="https://www.rfc-editor.org/info/rfc8839" quoteTitle="true" derivedAnchor="RFC8839"> <front> <title>Session Description Protocol (SDP) Offer/Answer Procedures for Interactive Connectivity Establishment (ICE)</title> <author initials="M" surname="Petit-Huguenin" fullname="Marc Petit-Huguenin"> <organization showOnFrontPage="true"/> </author> <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar"> <organization showOnFrontPage="true"/> </author> <author initials="C" surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <author initials="A" surname="Keränen" fullname="Ari Keränen"> <organization showOnFrontPage="true"/> </author> <author initials="R" surname="Shpount" fullname="Roman Shpount"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8839"/> <seriesInfo name="DOI" value="10.17487/RFC8839"/> </reference> <reference anchor="RFC8840" target="https://www.rfc-editor.org/info/rfc8840" quoteTitle="true" derivedAnchor="RFC8840"> <front> <title>A Session Initiation Protocol (SIP) Usage for Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (Trickle ICE)</title> <author initials="E" surname="Ivov" fullname="Emil Ivov"> <organization showOnFrontPage="true"/> </author> <author initials="T" surname="Stach" fullname="Thomas Stach"> <organization showOnFrontPage="true"/> </author> <author initials="E" surname="Marocco" fullname="Enrico Marocco"> <organization showOnFrontPage="true"/> </author> <author initials="C" surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8840"/> <seriesInfo name="DOI" value="10.17487/RFC8840"/> </reference> <reference anchor="RFC8841" target="https://www.rfc-editor.org/info/rfc8841" quoteTitle="true" derivedAnchor="RFC8841"> <front> <title>Session Description Protocol (SDP) Offer/Answer Procedures for Stream Control Transmission Protocol (SCTP) over Datagram Transport Layer Security (DTLS) Transport</title> <author initials="C." surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <author initials="R." surname="Shpount" fullname="Roman Shpount"> <organization showOnFrontPage="true"/> </author> <author initials="S." surname="Loreto" fullname="Salvatore Loreto"> <organization showOnFrontPage="true"/> </author> <author initials="G." surname="Camarillo" fullname="Gonzalo Camarillo"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8841"/> <seriesInfo name="DOI" value="10.17487/RFC8841"/> </reference> <reference anchor="RFC8842" target="https://www.rfc-editor.org/info/rfc8842" quoteTitle="true" derivedAnchor="RFC8842"> <front> <title>Session Description Protocol (SDP) Offer/Answer Considerations for Datagram Transport Layer Security (DTLS) and Transport Layer Security (TLS)</title> <author initials="C." surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <author initials="R." surname="Shpount" fullname="Roman Shpount"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8842"/> <seriesInfo name="DOI" value="10.17487/RFC8842"/> </reference> <reference anchor="RFC8843" target="https://www.rfc-editor.org/info/rfc8843" quoteTitle="true" derivedAnchor="RFC8843"> <front> <title>Negotiating Media Multiplexing Using the Session Description Protocol (SDP)</title> <author initials="C" surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <author initials="H" surname="Alvestrand" fullname="Harald Alvestrand"> <organization showOnFrontPage="true"/> </author> <author initials="C" surname="Jennings" fullname="Cullen Jennings"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8843"/> <seriesInfo name="DOI" value="10.17487/RFC8843"/> </reference> <reference anchor="RFC8851" target="https://www.rfc-editor.org/info/rfc8851" quoteTitle="true" derivedAnchor="RFC8851"> <front> <title>RTP Payload Format Restrictions</title> <author initials="A.B." surname="Roach" fullname="Adam Roach" role="editor"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8851"/> <seriesInfo name="DOI" value="10.17487/RFC8851"/> </reference> <reference anchor="RFC8852" target="https://www.rfc-editor.org/info/rfc8852" quoteTitle="true" derivedAnchor="RFC8852"> <front> <title>RTP Stream Identifier Source Description (SDES)</title> <author initials="A.B." surname="Roach" fullname="Adam Roach"/> <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar"/> <author initials="P" surname="Thatcher" fullname="Peter Thatcher"/> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8852"/> <seriesInfo name="DOI" value="10.17487/RFC8852"/> </reference> <reference anchor="RFC8853" target="https://www.rfc-editor.org/info/rfc8853" quoteTitle="true" derivedAnchor="RFC8853"> <front> <title>Using Simulcast in Session Description Protocol (SDP) and RTP Sessions</title> <author initials="B" surname="Burman" fullname="Bo Burman"> <organization showOnFrontPage="true"/> </author> <author initials="M" surname="Westerlund" fullname="Magnus Westerlund"> <organization showOnFrontPage="true"/> </author> <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar"> <organization showOnFrontPage="true"/> </author> <author initials="M" surname="Zanaty" fullname="Mo Zanaty"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8853"/> <seriesInfo name="DOI" value="10.17487/RFC8853"/> </reference> <reference anchor="RFC8854" target="https://www.rfc-editor.org/info/rfc8854" quoteTitle="true" derivedAnchor="RFC8854"> <front> <title>WebRTC Forward Error Correction Requirements</title> <author initials="J." surname="Uberti" fullname="Justin Uberti"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8854"/> <seriesInfo name="DOI" value="10.17487/RFC8854"/> </reference> <reference anchor="RFC8858" target="https://www.rfc-editor.org/info/rfc8858" quoteTitle="true" derivedAnchor="RFC8858"> <front> <title>Indicating Exclusive Support of RTP and RTP Control Protocol (RTCP) Multiplexing Using the Session Description Protocol (SDP)</title> <author initials="C." surname="Holmberg" fullname="Christer Holmberg"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8858"/> <seriesInfo name="DOI" value="10.17487/RFC8858"/> </reference> <reference anchor="RFC8859" target="https://www.rfc-editor.org/info/rfc8859" quoteTitle="true" derivedAnchor="RFC8859"> <front> <title>A Framework for Session Description Protocol (SDP) Attributes When Multiplexing</title> <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8859"/> <seriesInfo name="DOI" value="10.17487/RFC8859"/> </reference> </references> <references pn="section-10.2"> <name slugifiedName="name-informative-references">Informative References</name> <reference anchor="RFC3389" target="https://www.rfc-editor.org/info/rfc3389" quoteTitle="true" derivedAnchor="RFC3389"> <front> <title>Real-time Transport Protocol (RTP) Payload for Comfort Noise (CN)</title> <author initials="R." surname="Zopf" fullname="R. Zopf"> <organization showOnFrontPage="true"/> </author> <date year="2002" month="September"/> </front> <seriesInfo name="RFC" value="3389"/> <seriesInfo name="DOI" value="10.17487/RFC3389"/> </reference> <reference anchor="RFC3556" target="https://www.rfc-editor.org/info/rfc3556" quoteTitle="true" derivedAnchor="RFC3556"> <front> <title>Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth</title> <author initials="S." surname="Casner" fullname="S. Casner"> <organization showOnFrontPage="true"/> </author> <date year="2003" month="July"/> <abstract> <t indent="0">This document defines an extension to the Session Description Protocol (SDP) to specify two additional modifiers for the bandwidth attribute. These modifiers may be used to specify the bandwidth allowed for RTP Control Protocol (RTCP) packets in a Real-time Transport Protocol (RTP) session. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="3556"/> <seriesInfo name="DOI" value="10.17487/RFC3556"/> </reference> <reference anchor="RFC3960" target="https://www.rfc-editor.org/info/rfc3960" quoteTitle="true" derivedAnchor="RFC3960"> <front> <title>Early Media and Ringing Tone Generation in the Session Initiation Protocol (SIP)</title> <author initials="G." surname="Camarillo" fullname="G. Camarillo"> <organization showOnFrontPage="true"/> </author> <author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne"> <organization showOnFrontPage="true"/> </author> <date year="2004" month="December"/> <abstract> <t indent="0">This document describes how to manage early media in the Session Initiation Protocol (SIP) using two models: the gateway model and the application server model. It also describes the inputs one needs to consider in defining local policies for ringing tone generation. This memo provides information for the Internet community.</t> </abstract> </front> <seriesInfo name="RFC" value="3960"/> <seriesInfo name="DOI" value="10.17487/RFC3960"/> </reference> <reference anchor="RFC4568" target="https://www.rfc-editor.org/info/rfc4568" quoteTitle="true" derivedAnchor="RFC4568"> <front> <title>Session Description Protocol (SDP) Security Descriptions for Media Streams</title> <author initials="F." surname="Andreasen" fullname="F. Andreasen"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Baugher" fullname="M. Baugher"> <organization showOnFrontPage="true"/> </author> <author initials="D." surname="Wing" fullname="D. Wing"> <organization showOnFrontPage="true"/> </author> <date year="2006" month="July"/> <abstract> <t indent="0">This document defines a Session Description Protocol (SDP) cryptographic attribute for unicast media streams. The attribute describes a cryptographic key and other parameters that serve to configure security for a unicast media stream in either a single message or a roundtrip exchange. The attribute can be used with a variety of SDP media transports, and this document defines how to use it for the Secure Real-time Transport Protocol (SRTP) unicast media streams. The SDP crypto attribute requires the services of a data security protocol to secure the SDP message. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4568"/> <seriesInfo name="DOI" value="10.17487/RFC4568"/> </reference> <reference anchor="RFC4588" target="https://www.rfc-editor.org/info/rfc4588" quoteTitle="true" derivedAnchor="RFC4588"> <front> <title>RTP Retransmission Payload Format</title> <author initials="J." surname="Rey" fullname="J. Rey"> <organization showOnFrontPage="true"/> </author> <author initials="D." surname="Leon" fullname="D. Leon"> <organization showOnFrontPage="true"/> </author> <author initials="A." surname="Miyazaki" fullname="A. Miyazaki"> <organization showOnFrontPage="true"/> </author> <author initials="V." surname="Varsa" fullname="V. Varsa"> <organization showOnFrontPage="true"/> </author> <author initials="R." surname="Hakenberg" fullname="R. Hakenberg"> <organization showOnFrontPage="true"/> </author> <date year="2006" month="July"/> <abstract> <t indent="0">RTP retransmission is an effective packet loss recovery technique for real-time applications with relaxed delay bounds. This document describes an RTP payload format for performing retransmissions. Retransmitted RTP packets are sent in a separate stream from the original RTP stream. It is assumed that feedback from receivers to senders is available. In particular, it is assumed that Real-time Transport Control Protocol (RTCP) feedback as defined in the extended RTP profile for RTCP-based feedback (denoted RTP/AVPF) is available in this memo. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4588"/> <seriesInfo name="DOI" value="10.17487/RFC4588"/> </reference> <reference anchor="RFC4733" target="https://www.rfc-editor.org/info/rfc4733" quoteTitle="true" derivedAnchor="RFC4733"> <front> <title>RTP Payload for DTMF Digits, Telephony Tones, and Telephony Signals</title> <author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne"> <organization showOnFrontPage="true"/> </author> <author initials="T." surname="Taylor" fullname="T. Taylor"> <organization showOnFrontPage="true"/> </author> <date year="2006" month="December"/> <abstract> <t indent="0">This memo describes how to carry dual-tone multifrequency (DTMF) signalling, other tone signals, and telephony events in RTP packets. It obsoletes RFC 2833.</t> <t indent="0">This memo captures and expands upon the basic framework defined in RFC 2833, but retains only the most basic event codes. It sets up an IANA registry to which other event code assignments may be added. Companion documents add event codes to this registry relating to modem, fax, text telephony, and channel-associated signalling events. The remainder of the event codes defined in RFC 2833 are conditionally reserved in case other documents revive their use.</t> <t indent="0">This document provides a number of clarifications to the original document. However, it specifically differs from RFC 2833 by removing the requirement that all compliant implementations support the DTMF events. Instead, compliant implementations taking part in out-of-band negotiations of media stream content indicate what events they support. This memo adds three new procedures to the RFC 2833 framework: subdivision of long events into segments, reporting of multiple events in a single packet, and the concept and reporting of state events. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="4733"/> <seriesInfo name="DOI" value="10.17487/RFC4733"/> </reference> <reference anchor="RFC5245" target="https://www.rfc-editor.org/info/rfc5245" quoteTitle="true" derivedAnchor="RFC5245"> <front> <title>Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols</title> <author initials="J." surname="Rosenberg" fullname="J. Rosenberg"> <organization showOnFrontPage="true"/> </author> <date year="2010" month="April"/> <abstract> <t indent="0">This document describes a protocol for Network Address Translator (NAT) traversal for UDP-based multimedia sessions established with the offer/answer model. This protocol is called Interactive Connectivity Establishment (ICE). ICE makes use of the Session Traversal Utilities for NAT (STUN) protocol and its extension, Traversal Using Relay NAT (TURN). ICE can be used by any protocol utilizing the offer/answer model, such as the Session Initiation Protocol (SIP). [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5245"/> <seriesInfo name="DOI" value="10.17487/RFC5245"/> </reference> <reference anchor="RFC5506" target="https://www.rfc-editor.org/info/rfc5506" quoteTitle="true" derivedAnchor="RFC5506"> <front> <title>Support for Reduced-Size Real-Time Transport Control Protocol (RTCP): Opportunities and Consequences</title> <author initials="I." surname="Johansson" fullname="I. Johansson"> <organization showOnFrontPage="true"/> </author> <author initials="M." surname="Westerlund" fullname="M. Westerlund"> <organization showOnFrontPage="true"/> </author> <date year="2009" month="April"/> <abstract> <t indent="0">This memo discusses benefits and issues that arise when allowing Real-time Transport Protocol (RTCP) packets to be transmitted with reduced size. The size can be reduced if the rules on how to create compound packets outlined in RFC 3550 are removed or changed. Based on that analysis, this memo defines certain changes to the rules to allow feedback messages to be sent as Reduced-Size RTCP packets under certain conditions when using the RTP/AVPF (Real-time Transport Protocol / Audio-Visual Profile with Feedback) profile (RFC 4585). This document updates RFC 3550, RFC 3711, and RFC 4585. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5506"/> <seriesInfo name="DOI" value="10.17487/RFC5506"/> </reference> <reference anchor="RFC5576" target="https://www.rfc-editor.org/info/rfc5576" quoteTitle="true" derivedAnchor="RFC5576"> <front> <title>Source-Specific Media Attributes in the Session Description Protocol (SDP)</title> <author initials="J." surname="Lennox" fullname="J. Lennox"> <organization showOnFrontPage="true"/> </author> <author initials="J." surname="Ott" fullname="J. Ott"> <organization showOnFrontPage="true"/> </author> <author initials="T." surname="Schierl" fullname="T. Schierl"> <organization showOnFrontPage="true"/> </author> <date year="2009" month="June"/> <abstract> <t indent="0">The Session Description Protocol (SDP) provides mechanisms to describe attributes of multimedia sessions and of individual media streams (e.g., Real-time Transport Protocol (RTP) sessions) within a multimedia session, but does not provide any mechanism to describe individual media sources within a media stream. This document defines a mechanism to describe RTP media sources, which are identified by their synchronization source (SSRC) identifiers, in SDP, to associate attributes with these sources, and to express relationships among sources. It also defines several source-level attributes that can be used to describe properties of media sources. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5576"/> <seriesInfo name="DOI" value="10.17487/RFC5576"/> </reference> <reference anchor="RFC5763" target="https://www.rfc-editor.org/info/rfc5763" quoteTitle="true" derivedAnchor="RFC5763"> <front> <title>Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using Datagram Transport Layer Security (DTLS)</title> <author initials="J." surname="Fischl" fullname="J. Fischl"> <organization showOnFrontPage="true"/> </author> <author initials="H." surname="Tschofenig" fullname="H. Tschofenig"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Rescorla" fullname="E. Rescorla"> <organization showOnFrontPage="true"/> </author> <date year="2010" month="May"/> <abstract> <t indent="0">This document specifies how to use the Session Initiation Protocol (SIP) to establish a Secure Real-time Transport Protocol (SRTP) security context using the Datagram Transport Layer Security (DTLS) protocol. It describes a mechanism of transporting a fingerprint attribute in the Session Description Protocol (SDP) that identifies the key that will be presented during the DTLS handshake. The key exchange travels along the media path as opposed to the signaling path. The SIP Identity mechanism can be used to protect the integrity of the fingerprint attribute from modification by intermediate proxies. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5763"/> <seriesInfo name="DOI" value="10.17487/RFC5763"/> </reference> <reference anchor="RFC5764" target="https://www.rfc-editor.org/info/rfc5764" quoteTitle="true" derivedAnchor="RFC5764"> <front> <title>Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)</title> <author initials="D." surname="McGrew" fullname="D. McGrew"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Rescorla" fullname="E. Rescorla"> <organization showOnFrontPage="true"/> </author> <date year="2010" month="May"/> <abstract> <t indent="0">This document describes a Datagram Transport Layer Security (DTLS) extension to establish keys for Secure RTP (SRTP) and Secure RTP Control Protocol (SRTCP) flows. DTLS keying happens on the media path, independent of any out-of-band signalling channel present. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="5764"/> <seriesInfo name="DOI" value="10.17487/RFC5764"/> </reference> <reference anchor="RFC6120" target="https://www.rfc-editor.org/info/rfc6120" quoteTitle="true" derivedAnchor="RFC6120"> <front> <title>Extensible Messaging and Presence Protocol (XMPP): Core</title> <author initials="P." surname="Saint-Andre" fullname="P. Saint-Andre"> <organization showOnFrontPage="true"/> </author> <date year="2011" month="March"/> <abstract> <t indent="0">The Extensible Messaging and Presence Protocol (XMPP) is an application profile of the Extensible Markup Language (XML) that enables the near-real-time exchange of structured yet extensible data between any two or more network entities. This document defines XMPP's core protocol methods: setup and teardown of XML streams, channel encryption, authentication, error handling, and communication primitives for messaging, network availability ("presence"), and request-response interactions. This document obsoletes RFC 3920. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="6120"/> <seriesInfo name="DOI" value="10.17487/RFC6120"/> </reference> <reference anchor="RFC6464" target="https://www.rfc-editor.org/info/rfc6464" quoteTitle="true" derivedAnchor="RFC6464"> <front> <title>A Real-time Transport Protocol (RTP) Header Extension for Client-to-Mixer Audio Level Indication</title> <author initials="J." surname="Lennox" fullname="J. Lennox" role="editor"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Ivov" fullname="E. Ivov"> <organization showOnFrontPage="true"/> </author> <author initials="E." surname="Marocco" fullname="E. Marocco"> <organization showOnFrontPage="true"/> </author> <date year="2011" month="December"/> <abstract> <t indent="0">This document defines a mechanism by which packets of Real-time Transport Protocol (RTP) audio streams can indicate, in an RTP header extension, the audio level of the audio sample carried in the RTP packet. In large conferences, this can reduce the load on an audio mixer or other middlebox that wants to forward only a few of the loudest audio streams, without requiring it to decode and measure every stream that is received. [STANDARDS-TRACK]</t> </abstract> </front> <seriesInfo name="RFC" value="6464"/> <seriesInfo name="DOI" value="10.17487/RFC6464"/> </reference> <reference anchor="RFC8828" target="https://www.rfc-editor.org/info/rfc8828" quoteTitle="true" derivedAnchor="RFC8828"> <front> <title>WebRTC IP Address Handling Requirements</title> <author initials="J" surname="Uberti" fullname="Justin Uberti"> <organization showOnFrontPage="true"/> </author> <author initials="G" surname="Shieh" fullname="Guo-wei Shieh"> <organization showOnFrontPage="true"/> </author> <date month="January" year="2021"/> </front> <seriesInfo name="RFC" value="8828"/> <seriesInfo name="DOI" value="10.17487/RFC8828"/> </reference> <reference anchor="I-D.ietf-rtcweb-sdp" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-rtcweb-sdp-14" derivedAnchor="SDP4WebRTC"> <front> <title>Annotated Example SDP for WebRTC</title> <author initials="S" surname="Nandakumar" fullname="Suhas Nandakumar"> <organization showOnFrontPage="true"/> </author> <author initials="C" surname="Jennings" fullname="Cullen Jennings"> <organization showOnFrontPage="true"/> </author> <date month="December" day="17" year="2020"/> <abstract> <t indent="0">The Web Real Time Communications (WebRTC) family of protocols defines mechanism for direct interactive rich communication using audio, video, and data between two peers' web browsers. With in the WebRTC framework, the Session Description Protocol (SDP) is used for negotiating session capabilities between the peers. Such a negotiation happens based on the SDP offer/answer exchange mechanism This document provides an informational reference in describing the role of SDP and the offer/answer exchange mechanism for the most common WebRTC use cases. This document makes no changes to the SDP offer/answer exchange mechanism.</t> </abstract> </front> <seriesInfo name="Internet-Draft" value="draft-ietf-rtcweb-sdp-14"/> <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-rtcweb-sdp-14.txt"/> <refcontent>Work in Progress</refcontent> </reference> <reference anchor="TS26.114" target="https://www.3gpp.org/DynaReport/26114.htm" quoteTitle="true" derivedAnchor="TS26.114"> <front> <title>3rd Generation Partnership Project; Technical Specification Group Services and System Aspects; IP Multimedia Subsystem (IMS); Multimedia Telephony; Media handling and interaction (Release 16)</title> <seriesInfo name="3GPP TS" value="26.114 V16.3.0"/> <author> <organization showOnFrontPage="true">3GPP</organization> </author> <date year="2019" month="September"/> </front> </reference> <reference anchor="W3C.webrtc" target="https://www.w3.org/TR/2020/PR-webrtc-20201215/" quoteTitle="true" derivedAnchor="W3C.webrtc"> <front> <title>WebRTC 1.0: Real-time Communication Between Browsers</title> <author fullname="Cullen Jennings" initials="C." surname="Jennings" role="editor"> <organization showOnFrontPage="true">Cisco</organization> </author> <author fullname="Henrik Boström" asciiFullname="Henrik Bostrom" initials="H." surname="Boström" asciiSurname="Bostrom" role="editor"> <organization showOnFrontPage="true">Google</organization> </author> <author fullname="Jan-Ivar Bruaroey" initials="J." surname="Bruaroey" role="editor"> <organization showOnFrontPage="true">Mozilla</organization> </author> <date month="Dec" year="2020"/> </front> <refcontent>World Wide Web Consortium PR PR-webrtc-20201215</refcontent> </reference> </references> </references> <section anchor="sec.appendix-a" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a"> <name slugifiedName="name-sdp-abnf-syntax">SDP ABNF Syntax</name> <t indent="0" pn="section-appendix.a-1">For the syntax validation performed in <xref target="sec.parsing-a-desc" format="default" sectionFormat="of" derivedContent="Section 5.8"/>, the following list of ABNF definitions is used:</t> <table anchor="sdp-abnf" align="center" pn="table-1"> <name slugifiedName="name-sdp-abnf-references">SDP ABNF References</name> <thead> <tr> <th align="left" colspan="1" rowspan="1">Attribute</th> <th align="left" colspan="1" rowspan="1">Reference</th> </tr> </thead> <tbody> <tr> <td align="left" colspan="1" rowspan="1">ptime</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">maxptime</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">rtpmap</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-6" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">recvonly</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-9" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">sendrecv</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-9" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">sendonly</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-9" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">inactive</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-9" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">fmtp</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4566" sectionFormat="of" section="9" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4566#section-9" derivedContent="RFC4566"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">rtcp</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC3605" sectionFormat="of" section="2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3605#section-2.1" derivedContent="RFC3605"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">setup</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4145" section="4" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4145#section-4" derivedContent="RFC4145"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">fingerprint</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8122" sectionFormat="of" section="5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8122#section-5" derivedContent="RFC8122"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">rtcp-fb</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC4585" sectionFormat="of" section="4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc4585#section-4.2" derivedContent="RFC4585"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">extmap</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC5285" sectionFormat="of" section="7" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5285#section-7" derivedContent="RFC5285"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">mid</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC5888" section="4" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-4" derivedContent="RFC5888"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">group</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC5888" section="5" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5888#section-5" derivedContent="RFC5888"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">imageattr</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC6236" sectionFormat="of" section="3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6236#section-3.1" derivedContent="RFC6236"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">extmap (encrypt option)</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC6904" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6904#section-4" derivedContent="RFC6904"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">candidate</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.1" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">remote-candidates</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.2" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">ice-lite</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.3" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">ice-ufrag</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">ice-pwd</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.4" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">ice-options</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8839" sectionFormat="of" section="5.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8839#section-5.6" derivedContent="RFC8839"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">msid</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8830" sectionFormat="of" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8830#section-3" derivedContent="RFC8830"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">rid</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8851" sectionFormat="of" section="10" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8851#section-10" derivedContent="RFC8851"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">simulcast</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8853" sectionFormat="of" section="5.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8853#section-5.1" derivedContent="RFC8853"/></td> </tr> <tr> <td align="left" colspan="1" rowspan="1">tls-id</td> <td align="left" colspan="1" rowspan="1"> <xref target="RFC8842" sectionFormat="of" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8842#section-4" derivedContent="RFC8842"/></td> </tr> </tbody> </table> </section> <section anchor="sec.acknowledgements" numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b"> <name slugifiedName="name-acknowledgements">Acknowledgements</name> <t indent="0" pn="section-appendix.b-1"><contact fullname="Harald Alvestrand"/>, <contact fullname="Taylor Brandstetter"/>, <contact fullname="Suhas Nandakumar"/>, and <contact fullname="Peter Thatcher"/> provided significant text for this document. <contact fullname="Bernard Aboba"/>, <contact fullname="Adam Bergkvist"/>, <contact fullname="Jan-Ivar Bruaroey"/>, <contact fullname="Dan Burnett"/>, <contact fullname="Ben Campbell"/>, <contact fullname="Alissa Cooper"/>, <contact fullname="Richard Ejzak"/>, <contact fullname="Stefan Håkansson"/>, <contact fullname="Ted Hardie"/>, <contact fullname="Christer Holmberg"/>, <contact fullname="Andrew Hutton"/>, <contact fullname="Randell Jesup"/>, <contact fullname="Matthew Kaufman"/>, <contact fullname="Anant Narayanan"/>, <contact fullname="Adam Roach"/>, <contact fullname="Robert Sparks"/>, <contact fullname="Neil Stratford"/>, <contact fullname="Martin Thomson"/>, <contact fullname="Sean Turner"/>, and <contact fullname="Magnus Westerlund"/> all provided valuable feedback on this document.</t> </section> <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c"> <name slugifiedName="name-authors-addresses">Authors' Addresses</name> <author fullname="Justin Uberti" initials="J." surname="Uberti"> <organization showOnFrontPage="true">Google</organization> <address> <postal> <street>747 6th Street South</street> <city>Kirkland</city> <region>WA</region> <code>98033</code> <country>United States of America</country> </postal> <email>justin@uberti.name</email> </address> </author> <author fullname="Cullen Jennings" initials="C." surname="Jennings"> <organization showOnFrontPage="true">Cisco</organization> <address> <postal> <street>400 3rd Avenue SW</street> <city>Calgary</city> <region>AB</region> <code>T2P 4H2</code> <country>Canada</country> </postal> <email>fluffy@iii.ca</email> </address> </author> <author fullname="Eric Rescorla" initials="E." surname="Rescorla" role="editor"> <organization showOnFrontPage="true">Mozilla</organization> <address> <email>ekr@rtfm.com</email> </address> </author> </section> </back> </rfc>