The generic SDP considerations, including the SDP offer/answer procedures [
RFC 3264], for negotiating a WebRTC data channel are defined in [
RFC 8864]. This section and its subsections define the SDP considerations that are specific to an MSRP data channel, identified by the "subprotocol" attribute parameter, with an "msrp" parameter value in the 'dcmap' attribute.
This document extends the MSRP URI syntax [
RFC 4975] by defining the new transport parameter value "dc" (an abbreviation of data channel):
transport /= "dc"
; Add "dc" to existing transports per Section 9 of [RFC4975]
MSRP design provides for new transport bindings (see
Section 6 of
RFC 4975). MSRP implementations are expected to allow unrecognized transports for which there is no need to establish a connection to the resource described by the URI, as is the case of data channels (
Section 4.4).
The msrp-scheme portion of the MSRP URI that represents an MSRP data channel endpoint (used in the SDP 'path' attribute and in the MSRP message headers) is always "msrps", which indicates that the MSRP data channel is always secured using DTLS as described in [
RFC 8831].
An offerer and answerer
SHALL, in each offer and answer, include a 'dcmap' attribute [
RFC 8864] in the SDP media description ("m=" section) [
RFC 4566] describing the SCTP association [
RFC 4960] used to realize the MSRP data channel.
The attribute includes the following data channel parameters:
-
"label=" labelstring
-
"subprotocol=" "msrp"
The labelstring is set by the MSRP application according to [
RFC 8864].
The offerer and answerer
SHALL NOT include the "max-retr" and the "max-time" attribute parameters in the 'dcmap' attribute.
The offerer and answerer
MAY include the "ordered" attribute parameter in the 'dcmap' attribute. If included, the attribute parameter value
SHALL be set to "true".
Below is an example of a 'dcmap' attribute for an MSRP session to be negotiated with the "dcmap-stream-id" parameter set to 2 and the "label" parameter set to "chat":
a=dcmap:2 label="chat";subprotocol="msrp"
An offerer and answerer can, in each offer and answer, include one or more data channel subprotocol attributes ('dcsa' attributes) [
RFC 8864] in the "m=" section describing the SCTP association used to realize the MSRP data channel. An SDP attribute included in a 'dcsa' attribute is referred to as a DCSA-embedded attribute.
If an offerer or answerer receives a 'dcsa' attribute that contains an SDP attribute for which usage has not been defined for an MSRP data channel, the offerer or answerer should ignore the 'dcsa' attribute, following the rules in
Section 6.7 of
RFC 8864.
An offerer and answerer
SHALL include a 'dcsa' attribute for each of the following MSRP-specific SDP attributes:
It is considered a protocol error if one or more of the DCSA-embedded attributes listed above are not included in an offer or answer.
An offerer and answerer
MAY include a 'dcsa' attribute for any of the following MSRP-specific SDP attributes, following the procedures defined for each attribute:
-
defined in [RFC 4975]: 'accept-types', 'accept-wrapped-types', and 'max-size'.
-
defined in [RFC 4566]: 'sendonly', 'recvonly', 'inactive', and 'sendrecv'.
-
defined in [RFC 5547]: all the parameters related to MSRP file transfer. See Section 4.7.
A subsequent offer or answer
MAY update the previously negotiated MSRP subprotocol attributes while keeping the 'dcmap' attribute associated with the MSRP data channel unchanged. The semantics for newly negotiated MSRP subprotocol attributes are per [
RFC 4975].
When MSRP messages are transported on a data channel, the 'path' attribute is not used for the routing of the messages. The MSRP data channel is established using the SDP offer/answer procedures defined in [
RFC 8864], and the MSRP messages are then transported on that data channel. This is different from legacy MSRP [
RFC 4975] but similar to MSRP Connection Establishment for Media Anchoring (MSRP CEMA) [
RFC 6714]. Because of this, a DCSA-embedded 'msrp-cema' attribute is mandated for MSRP sessions over data channels. However, when an endpoint receives an MSRP message over a data channel, it
MUST still perform the MSRP URI comparison procedures defined in [
RFC 4975].
As described in
Section 4.4, the usage of a DCSA-embedded 'setup' attribute is mandated for MSRP sessions over data channels. It is used to negotiate which MSRP data channel endpoint assumes the active role as per
Section 4.2.2 of
RFC 6135 and
Section 5.4 of
RFC 4975. It has no relationship with the DTLS connection establishment roles [
RFC 8841].
The DCSA-embedded 'setup' attribute is of the form "a=dcsa:x setup:<role>", with x being the data channel's SCTP stream identifier, so that the 'setup' attribute is explicitly associated with an MSRP session over a specific data channel.
An MSRP session is closed by closing the associated data channel following the procedures in [
RFC 8864].
The port value for the "m=" line
SHOULD NOT be changed (e.g., to zero) when closing an MSRP session (unless all data channels are being closed and the SCTP association is no longer needed) since this would close the SCTP association and impact all of the data channels. In all cases in [
RFC 4975] where the procedure calls for setting the port to zero in the MSRP "m=" line in an SDP offer for TCP transport, the SDP offerer of an MSRP session with data channel transport
SHALL remove the corresponding 'dcmap' and 'dcsa' attributes.
SDP attributes specified in [
RFC 5547] for a file transfer "m=" line are embedded as subprotocol-specific attributes using the syntax defined in [
RFC 8864].
Below is an example of an offer and an answer that include the attributes needed to establish two MSRP sessions: one for chat and one for file transfer. The example is derived from a combination of examples in [
RFC 4975] and [
RFC 5547].
Offer:
m=application 54111 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP6 2001:db8::3
a=max-message-size:100000
a=sctp-port:5000
a=setup:actpass
a=fingerprint:SHA-256 12:DF:3E:5D:49:6B:19:E5:7C:AB:4A:AD:B9:B1:\
3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB:4A:AD
a=tls-id:4a756565cddef001be82
a=dcmap:0 label="chat";subprotocol="msrp"
a=dcsa:0 msrp-cema
a=dcsa:0 setup:active
a=dcsa:0 accept-types:message/cpim text/plain
a=dcsa:0 path:msrps://2001:db8::3:54111/si438dsaodes;dc
a=dcmap:2 label="file transfer";subprotocol="msrp"
a=dcsa:2 sendonly
a=dcsa:2 msrp-cema
a=dcsa:2 setup:active
a=dcsa:2 accept-types:message/cpim
a=dcsa:2 accept-wrapped-types:*
a=dcsa:2 path:msrps://2001:db8::3:54111/jshA7we;dc
a=dcsa:2 file-selector:name:"picture1.jpg" type:image/jpeg \
size:1463440 hash:sha-256:7C:DF:3E:5D:49:6B:19:E5:12:AB:4A:AD:\
4A:B1:3F:82:3E:3B:54:12:02:5D:18:DF:49:6B:19:E5:7C:AB:B9:AD
a=dcsa:2 file-transfer-id:rjEtHAcYVZ7xKwGYpGGwyn5gqsSaU7Ep
a=dcsa:2 file-disposition:attachment
a=dcsa:2 file-date:creation:"Tue, 11 Aug 2020 19:05:30 +0200"
a=dcsa:2 file-icon:cid:id2@bob.example.com
a=dcsa:2 file-range:1-1463440
Answer:
m=application 51444 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP6 IP6 2001:db8::1
a=max-message-size:100000
a=sctp-port:6000
a=setup:passive
a=fingerprint:SHA-256 5D:02:3E:AD:49:6B:19:E5:7C:AB:4A:AD:B9:\
B1:3F:82:18:3B:54:DF:12:6B:3E:5D:49:DF:19:E5:7C:AB:4A:5D
a=tls-id:65cd4a7565debe82f100
a=dcmap:0 label="chat";subprotocol="msrp"
a=dcsa:0 msrp-cema
a=dcsa:0 setup:passive
a=dcsa:0 accept-types:message/cpim text/plain
a=dcsa:0 path:msrps://2001:db8::1:51444/di551fsaodes;dc
a=dcmap:2 label="file transfer";subprotocol="msrp"
a=dcsa:2 recvonly
a=dcsa:2 msrp-cema
a=dcsa:2 setup:passive
a=dcsa:2 accept-types:message/cpim
a=dcsa:2 accept-wrapped-types:*
a=dcsa:2 path:msrps://2001:db8::1:51444/jksh7Bwc;dc
a=dcsa:2 file-selector:name:"picture1.jpg" type:image/jpeg \
size:1463440
a=dcsa:2 file-transfer-id:rjEtHAcYVZ7xKwGYpGGwyn5gqsSaU7Ep
a=dcsa:2 file-range:1-1463440
Note that due to RFC formatting conventions, this document splits SDP content that exceeds 72 characters across lines, marking this line folding with a backslash character. This backslash and its trailing CRLF and whitespace would not appear in actual SDP content.