tech-invite   World Map     

IETF     RFCs     Groups     SIP     ABNFs    |    3GPP     Specs     Glossaries     Architecture     IMS     UICC    |    search     info

ABNF grammars

|   SIP_Messages   |   SIP_URIs   |   SIP_Headers   |   SIP_Private_Headers   |   SIP_Response_Codes   |   SIP_basic_rules   |   SIP_common_rules   |   SDP_Session_Description   |   SDP_Attributes   |   RFC723x_HTTP_1.1   |   RFC3986_Generic_URI   |   RFC3987_IRI   |   RFC5322_IMF   |   RFC4975_MSRP   |   draft2326bis_RTSP_2.0   |   RFC5234_ABNF_Notation   |

ABNF for SDP – Session Description Protocol – RFC 4566

 

 

Here

 

Top

 

 

 

 

 

Next

 

Session_Description     Addressing     Generic_Rules 

RFC 4566 – Section 5Section 9

Up

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)

SDP example

Up

v=0
o=alice   2890844526   2890844526   IN   IP4   host.atlanta.example.com
s=
c=IN   IP4   host.atlanta.example.com
t=0   0
m=audio   49170   RTP/AVP   0   8   97
a=rtpmap:0   PCMU/8000
a=rtpmap:8   PCMA/8000
a=rtpmap:97   iLBC/8000
m=video   51372   RTP/AVP   31   32
a=rtpmap:31   H261/90000
a=rtpmap:32   MPV/90000

 

RFC 4566 – Section 5.1

Up

proto-version   =
%x76   "="   1*DIGIT   CRLF

 

o=   Origin

RFC 4566 – Section 5.2

Up

origin-field   =
%x6f   "="   username   SP   sess-id   SP   sess-version   SP   nettype   SP   addrtype   SP
unicast-address   CRLF

username   =
sess-id   =
1*DIGIT

sess-version   =
1*DIGIT

nettype   =
addrtype   =
token

; Address Type,   see: Registration with IANA
; IP4,   IP6     RFC 4566 – Section 8.2.7
; NSAP,   GWID,   E164     RFC 3108 – Section 9
; E164     RFC 7195 – Section 8.3

 

s=   Session Name

RFC 4566 – Section 5.3

Up

session-name-field   =
%x73   "="   text   CRLF

 

RFC 4566 – Section 5.4

Up

information-field   =
[ %x69   "=" text   CRLF ]

 

u=   URI

RFC 4566 – Section 5.5

Up

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

uri   =

 

RFC 4566 – Section 5.6

Up

email-fields   =
*( %x65   "="   email-address   CRLF )

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

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

 

u=   Phone Number

RFC 4566 – Section 5.6

Up

phone-fields   =
*( %x70   "="   phone-number   CRLF )

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

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

 

RFC 4566 – Section 5.7

Up

connection-field   =
[ %x63   "="   nettype   SP   addrtype   SP   connection-address   CRLF ]

connection-address   =
multicast-address  /     ;  RFC 4566
unicast-address  /     ;  RFC 4566
global-number-digits  /     ;  RFC 7195 – Section 5.7
"-"     ;  RFC 7195

 

u=   Bandwidth

RFC 4566 – Section 5.8

Up

bandwidth-fields   =
*( %x62   "="   bwtype   ":"   bandwidth   CRLF )

bwtype   =
token

; Bandwidth Type,   see:  Registration with IANA
; "CT"   Conference Total
; "AS"   Application Specific
; "RS"   RTCP for Senders     RFC 3556 – Section 2
; "RR"   RTCP for Receivers     RFC 3556 – Section 2
; "TIAS"   Transport Independent Application Specific     RFC 3890 – Section 6.2.2


bandwidth   =
1*DIGIT

 

t=   r=   z=   Timing

RFC 4566 – Section 5.9   –   Section 5.10   –   Section 5.11

Up

time-fields   =
1*( %x74   "="   start-time   SP   stop-time   *( CRLF   repeat-fields )   CRLF)
[ zone-adjustments   CRLF ]

start-time   =
time  /  "0"

stop-time   =
time  /  "0"

time   =
repeat-fields   =
%x72   "="   repeat-interval   SP   typed-time   1*( SP   typed-time )

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

zone-adjustments   =
%x7a   "="   time   SP   [ "-" ]   typed-time   *( SP   time   SP   [ "-" ]   typed-time )

 

RFC 4566 – Section 5.12

Up

key-field   =
[ %x6b   "="   key-type   CRLF ]

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

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

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

 

a=   Attributes

RFC 4566 – Section 5.13

Up

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

attribute   =
( att-field   ":"   att-value )  /  att-field

att-field   =
att-value   =

 

m=   i=   c=   b=   k=   a=   Media Descriptions

RFC 4566 – Section 5.14

Up

media-descriptions   =
media-field   =
%x6d   "="   media   SP   port   [ "/"   integer ]   SP   proto   1*( SP   fmt )   CRLF

media   =
token

; Media Type,   see: Registration with IANA
; audio,   video,   text,   application,   message     RFC 4566 – Section 8.2.1
; image     RFC 6466 – Section 1


port   =
1*DIGIT

proto   =
token   *( "/"   token )

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


fmt   =

 



Session_Description     Addressing     Generic_Rules 

RFC 4566 – Section 9, p. 42

Errata ID: 1089

Up

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

 



Session_Description     Addressing     Generic_Rules 

RFC 4566 – Section 9, p. 43

Up

alpha-numeric   =
ALPHA  /  DIGIT

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

decimal-uchar   =
DIGIT
 /  POS-DIGIT   DIGIT
 /  ( "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   =