2.2 Message Syntax

The Session Description Protocol (SDP) Extensions do not introduce a new message format and rely on SIP and SDP message formats. The SIP message format is specified in [RFC3261] section 7. The SDP format is specified in [RFC4566]. The extensions are defined as custom SDP fields and attributes.

The following example shows a standard SDP packet and the extensions.

 v=0
 o=username 0 0 IN IP4 157.59.134.89
 s=session
 c=IN IP4 157.59.134.89
 b=CT:1000
 t=0 0
 m=audio 56472 RTP/AVP 97 111 112 6 0 8 4 5 3 101
 k=base64:bhdsfsd78f7dssdfssfsd7sdfssa
 a=rtpmap:97 red/8000
 a=rtpmap:111 SIREN/16000
 a=fmtp:111 bitrate=16000
 a=rtpmap:112 G7221/16000
 a=fmtp:112 bitrate=24000
 a=rtpmap:6 DVI4/16000
 a=rtpmap:0 PCMU/8000
 a=rtpmap:8 PCMA/8000
 a=rtpmap:4 G723/8000
 a=rtpmap:5 DVI4/8000
 a=rtpmap:3 GSM/8000
 a=rtpmap:101 telephone-event/8000
 a=fmtp:101 0-16
 a=encryption:required
 m=video 33792 RTP/AVP 34 31
 k=base64:bhdsfsd78f7dssdfssfsd7sdfssa
 a=rtcp:33801
 a=rtpmap:34 H263/90000
 a=rtpmap:31 H261/90000
 a=encryption:required
 m=application 1503 tcp msdata
 a=sendonly
 a=encryption:required

For all media description blocks, notice the a=encryption:required attribute, which is an SDP Extensions extension to indicate that encryption is required for these media. Other possible values for the a=encryption attribute are a=encryption:optional and a=encryption:rejected. The a=encryption extension is described in detail in section 3.

The following example shows SDP for an instant messaging session.

 v=0
 o=- 0 0 IN IP4 172.27.174.212
 s=session
 c=IN IP4 172.27.174.212
 t=0 0
 m=x-ms-message 5060 sip null
  

Notice the m=x-ms-message line, which shows the SDP Extensions extension for a new media name x-ms-message that is used to negotiate instant messaging.

Except for the noted extensions in the two examples, the rest of the session description is standard SDP.