SDP会话描述由若干行<type>=<value>格式的文本组成,其中,<type>是大小写敏感的单个字符,"="两边不能紧接空格。SDP会话描述由一个会话层描述段和可选的若干媒体层描述段组成,会话层描述段以"v=<value>"行开始,媒体层描述段以"m=<value>"开始。
标准会话描述如下所示,"*"标示行为可选行,各行之间的顺序固定不可变。
Session description
v= (protocol version)
o= <username> <session id> <version> <network type> <address type> <address>
s= (session name)
i=* (session information)
u=* (URI of description)
e=* (email address)
p=* (phone number)
c=* <network type> <address type> <connection address> (其中地址可以为<base multicast address>/<ttl>/<number of addresses>) (not required if included in all media)
b=* <modifier>:<bandwidth-value>
One or more time descriptions (see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* <attribute> (<attribute:value>)(比较复杂,详见rfc2327)
Zero or more media descriptions (see below)
Time description
t= (time the session is active)
r=* (zero or more repeat times)
Media description
m=<media> <port> <transport> <fmt list>
i=* (media title)
c=* (connection information - optional if included at session-level)
b=* (bandwidth information)
k=* (encryption key)
a=* (zero or more media attribute lines)
详细内容参照RFC2327