v=0
SDP version always set to 0 for now, not used.
o=- 4611731400430051336 2 IN IP4 127.0.0.1
o=<username> <sessID> <sessVersion> <netType> <addrType> <unicastAddress>
The username can be "-".
The sessID MUST be ignored on a receive.
The sessVersion MUST be a numeric value but the value MUST be ignored on a receive.
The netType MUST be "IN" for Internet.
The addrtype MUST be either "IP4" or "IP6".
the unicastAddress MUST be in "IP4" or "IP6" formatted following addrtype.
s=-
session name is not commonly used, not used.
t=0 0
Timing field, indicates the session is unbounded (start and stop times are both set to 0).
a=group:BUNDLE 0
This attribute specifies that media lines are bundled together using a single transport (in this case, media line with the identifier '0').
a=group:BUNDLE m1 m2
This attribute specifies that media lines have 2 media line (identifiers as m1 and m2).
a=extmap-allow-mixed
This attribute allows the use of both one-byte and two-byte RTP header extensions in the same RTP session.
a=msid-semantic: WMS
This attribute specifies the semantic for multiple media streams (msid). WMS stands for WebRTC Media Stream.
m=application 50782 UDP/DTLS/SCTP webrtc-datachannel
Media (m) line describes the media type (application), port (50782), transport protocol (UDP/DTLS/SCTP), and media format (webrtc-datachannel).
c=IN IP4 115.87.239.220
Connection (c) line specifies the network type (IN for Internet), address type (IP4), and the connection address (115.87.239.220).
ice candidates, ice username, ice password, ice options, fingerprint, DTLS role can be equals and reuse on every medias.
For example, if you have more multiple medias the difference is midia id and specific media attributes such as a=sctp-port:
and a=max-message-size:
that only have for application media type.
a=candidate:...
These attribute lines represent ICE (Interactive Connectivity Establishment) candidates, which provide information about possible network paths for establishing a connection between peers.
a=ice-ufrag:J8xg
This attribute specifies the ICE username fragment for this session.
a=ice-pwd:brYDyKCXku2B1XTvqd2aJgg5
This attribute specifies the ICE password for this session.
a=ice-options:trickle
This attribute specifies the ICE options for this session.
a=fingerprint:sha-256 ...
This line contains the fingerprint of the DTLS (Datagram Transport Layer Security) certificate. It is used to authenticate the DTLS connection, ensuring the integrity and security of the data channel.
for offer will be
a=setup:actpass
for answer will be
a=setup:active
a=mid:0
The media identification that specific in a=group:BUNDLE
a=sctp-port:5000
For the Data Channel, This line indicates the SCTP (Stream Control Transmission Protocol) port used for the data channel. SCTP is the transport protocol used by WebRTC data channels.
a=max-message-size:262144
For the Data Channel, The maximum message size in bytes that the endpoint can receive on the data channel.
https://webrtchacks.github.io/sdp-anatomy/
https://datatracker.ietf.org/doc/html/draft-roach-mmusic-unified-plan-00
https://datatracker.ietf.org/doc/html/draft-ietf-rtcweb-jsep-24