back to RFC 8866  

ABNF for SDP: from RFC 8866 and other RFCs

Verification with IANA is in progress
(still based on RFC 4566)
session-description =
proto-version
; "v="  protocol version
origin-field
; "o="  originator and session identifier
session-name-field
; "s="  session name
information-field
; "i="  session information (OPTIONAL)
uri-field
; "u="  URI of description (OPTIONAL)
email-fields
; "e="  email address (OPTIONAL)
phone-fields
; "p="  phone number (OPTIONAL)
connection-field
; "c="  connection information (OPTIONAL)
bandwidth-fields
; "b="  zero or more bandwidth information lines (OPTIONAL)
time-fields
; one or more time descriptions
; "t="  time the session is active
; "r="  zero or more repeat times (OPTIONAL)
; "z="  time zone adjustments (OPTIONAL)
key-field
; "k="  encryption key (OPTIONAL)
attribute-fields
; "a="  zero or more session attribute lines (OPTIONAL)
media-descriptions
; zero or more media descriptions
; "m="  media name and transport address
; "i="  media title (OPTIONAL)
; "c="  connection information (OPTIONAL)
; "b="  zero or more bandwidth information lines (OPTIONAL)
; "k="  encryption key (OPTIONAL)
; "a="  zero or more media attribute lines (OPTIONAL)
; Here is an example:
Top
proto-version =
%x76   "="  1*DIGITCRLF

origin-field =
%x6f   "="  usernameSPsess‑idSPsess‑versionSPnettypeSPaddrtypeSPunicast‑addressCRLF

username =
sess-id =
1*DIGIT

sess-version =
1*DIGIT

nettype =
token

; Network Type
; → IANA
; IN
; → RFC 8866Section 8.2.6
; TN
; → RFC 2848Section 3.4.1
; ATM
; → RFC 3108Section 9
; PSTN
; → RFC 7195Section 8.2


addrtype =
token

; Address Type
; → IANA
; IP4,  IP6
; → RFC 8866Section 8.2.7
; NSAP,  GWID,  E164
; → RFC 3108Section 9
; E164
; → RFC 7195Section 8.3


session-name-field =
%x73   "="  textCRLF

information-field =
[ %x69   "=" textCRLF ]

uri-field =
[ %x75   "=" uriCRLF]

uri =
email-fields =
*( %x65   "="  email‑addressCRLF )

email-address =
address-and-comment =
addr‑spec  1*SP  "("  1*email‑safe  ")"

dispname-and-address =
1*email‑safe  1*SP  "<"  addr‑spec  ">"

phone-fields =
*( %x70   "="  phone‑numberCRLF )

phone-number =
phone  *SP  "("  1*email‑safe  ")" /  1*email‑safe  "<"  phone  ">" /  phone

phone =
[ "+" ]  DIGIT  1*( SP /  "-" /  DIGIT )

connection-field =
[ %x63   "="  nettypeSPaddrtypeSPconnection‑addressCRLF ]

connection-address =
bandwidth-fields =
*( %x62   "="  bwtype  ":"  bandwidthCRLF )

bwtype =
token

; Bandwidth Type
; → IANA
; "CT"  Conference Total
; "AS"  Application Specific
; → RFC 8866 – Section 5.8
; "RS"  RTCP for Senders
; "RR"  RTCP for Receivers
; → RFC 3556Section 2
; "TIAS"  Transport Independent Application Specific
; → RFC 3890Section 6.2.2


bandwidth =
1*DIGIT

time-fields =
1*( %x74   "="  start‑timeSPstop‑time  *( CRLFrepeat‑fields )  CRLF)  [ zone‑adjustmentsCRLF ]

start-time =
time /  "0"

stop-time =
time /  "0"

time =
repeat-fields =
%x72   "="  repeat‑intervalSPtyped‑time  1*( SPtyped‑time )

repeat-interval =
typed-time =
fixed-len-time-unit =
"d" /  "h" /  "m" /  "s"

zone-adjustments =
%x7a   "="  timeSP  [ "-" ]  typed‑time  *( SPtimeSP  [ "-" ]  typed‑time )

key-field =
[ %x6b   "="  key‑typeCRLF ]

key-type =
"prompt" /  "clear:"  text /  "base64:"  base64 /  "uri:"  uri

base64 =
base64-unit =
base64-pad =
2base64‑char  "==" /  3base64‑pad  "="

base64-char =
ALPHA /  DIGIT /  "+" /  "/"

attribute-fields =
*( %x61   "="  attributeCRLF )

attribute =
att‑field  ":"  att‑value ) /  att‑field

att-field =
att-value =
media-descriptions =
media-field =
%x6d   "="  mediaSPport  [ "/"  integer ]  SPproto  1*( SPfmt )  CRLF

media =
token

; Media Type
; → IANA
; audio,  video,  text,  application,  message
; → RFC 8866Section 8.2.1
; image
; → RFC 6466Section 1


port =
1*DIGIT

proto =
token  *( "/"  token )

; Transport Protocol,   see:  IANA
; RTP/AVP
; RTP/SAVP
; udp
; → RFC 8866Section 8.2.2
; TCP
; → RFC 4145Section 3
; TCP/RTP/AVP
; → RFC 4571Section 4
; TCP/TLS
; → RFC 8122Section 4
; TCP/BFCP
; TCP/TLS/BFCP
; → RFC 4583Section 3
; RTP/AVPF
; → RFC 4585Section 9
; TCP/MSRP
; TCP/TLS/MSRP
; → RFC 4975Section 8.1
; RTP/SAVPF
; → RFC 5124Section 3.1
; DCCP
; DCCP/RTP/AVP
; DCCP/RTP/SAVP
; DCCP/RTP/AVPF
; DCCP/RTP/SAVPF
; → RFC 5762Section 5.1
; UDP/TLS/RTP/SAVP
; DCCP/TLS/RTP/SAVP
; UDP/TLS/RTP/SAVPF
; DCCP/TLS/RTP/SAVPF
; → RFC 5764Section 9
; UDP/MBMS-FEC/RTP/AVP
; UDP/MBMS-FEC/RTP/SAVP
; UDP/MBMS-REPAIR
; → RFC 6064Section 8.1
; FEC/UDP
; UDP/FEC
; → RFC 6364Section 8.1
; TCP/MRCPv2
; TCP/TLS/MRCPv2
; → RFC 6787Section 13.7.1
; PSTN
; → RFC 7195Section 8.4
; UDP/TLS/UDPTL
; → RFC 7345Section 7
; TCP/RTP/AVPF
; TCP/RTP/SAVP
; TCP/RTP/SAVPF
; TCP/DTLS/RTP/SAVP
; TCP/DTLS/RTP/SAVPF
; TCP/TLS/RTP/AVP
; TCP/TLS/RTP/AVPF
; → RFC 7850Section 5


fmt = Top
unicast-address =
multicast-address =
IP4-address =
b1  3( "."  decimal‑uchar )

b1 =
decimal‑uchar     ; less than "224"

IP6-address =
6( h16  ":" )  ls32  /
"::"  5( h16  ":" )  ls32  /
[ h16 ]  "::"  4( h16  ":" )  ls32  /
[ *1( h16  ":" )  h16 ]  "::"  3( h16  ":" )  ls32  /
[ *2( h16  ":" )  h16 ]  "::"  2( h16  ":" )  ls32  /
[ *3( h16  ":" )  h16 ]  "::"  h16  ":"    ls32  /
[ *4( h16  ":" )  h16 ]  "::"  ls32  /
[ *5( h16  ":" )  h16 ]  "::"  h16  /
[ *6( h16  ":" )  h16 ]  "::"

h16 =
1*4HEXDIG

ls32 =
h16   ":"   h16 ) /  IP4‑address

IP4-multicast =
m1  3( "."  decimal‑uchar )  "/"  ttl  [ "/"  integer ]
;  224.0.0.0 to 239.255.255.255

m1 =
( "22"  ( "4" /  "5" /  "6" /  "7" /  "8" /  "9" ) ) /  ( "23"  DIGIT )

ttl =
POS‑DIGIT  *2DIGIT ) /  "0"

IP6-multicast =
IP6‑address  [ "/"  integer ]

FQDN =
4*( alpha‑numeric /  "-" /  "." )
;  fully qualified domain name as specified in and updates

extn-addr =
non‑ws‑string
;  Generic for other address families
Top
alpha-numeric =
ALPHA /  DIGIT

POS-DIGIT =
%x31-39     ; 1-9

decimal-uchar =
DIGIT
 /  POS‑DIGITDIGIT
 /  ( "1"  2*( DIGIT ) )
 /  ( "2"  ( "0" /  "1" /  "2" /  "3" /  "4")   DIGIT )
 /  ( "2"  "5"  ( "0" /  "1" /  "2" /  "3" /  "4" /  "5" ) )

text =
byte‑string
; default is to interpret this as UTF8 text
; ISO 8859‑1 requires "a=charset:ISO‑8859‑1" session‑level attribute to be used

byte-string =
1*( %x01‑09 /  %x0B‑0C /  %x0E‑FF )
; any byte except NUL, CR or LF

non-ws-string =
1*( VCHAR /  %x80‑FF )
; string of visible characters

token =
1*( token‑char )

token-char =
%x21 /  %x23‑27 /  %x2A‑2B /  %x2D‑2E /  %x30‑39 /  %x41‑5A /  %x5E‑7E

email-safe =
%x01‑09 /  %x0B‑0C /  %x0E‑27 /  %x2A‑3B /  %x3D /  %x3F‑FF
;  any byte except NUL, CR, LF, or the quoting characters   ( )  <   >

integer = Top
OCTET =
%x00-FF
; 8 bits of data

CHAR =
%x01-7F
; any 7-bit US-ASCII character,
; excluding NUL

VCHAR =
%x21-7E
; visible (printing) characters

ALPHA =
%x41‑5A /  %x61‑7A
; A‑Z  /  a‑z

DIGIT =
%x30‑39
; 0-9

CTL =
%x00‑1F /  %x7F
; any US-ASCII control character:
; (octets 0 - 31) and DEL (127)

HTAB =
%x09
; horizontal tab

LF =
%x0A
; linefeed

CR =
%x0D
; carriage return

SP =
%x20
; space

DQUOTE =
%x22
; " (Double Quote)

BIT =
"0" /  "1"

HEXDIG =
DIGIT /  "A" /  "B" /  "C" /  "D" /  "E" /  "F"
; Note: according to the 'char-val' rule,
; letters (A-F) are case insensitive

CRLF =
CRLF
; Internet standard newline

WSP =
SP /  HTAB
; white space

LWSP =
*( WSP /  CRLFWSP )
; linear white space (past newline)

Top