【VOLTE】SDP Session Description Protocol 会话描述协议
(2016-03-17 21:31:03)
标签:
sdp会话描述协议volteims |
分类: VOLTE |
一、
SDP 完全是一种会话描述格式 ― 它不属于传输协议 ― 它只使用不同的适当的传输协议,包括会话通知协议(SAP)、会话初始协议(SIP)、实时流协议(RTSP)、MIME 扩展协议的电子邮件以及超文本传输协议(HTTP)。SDP协议是也是基于文本的协议,这样就能保证协议的可扩展性比较强,这样就使其具有广泛的应用范围。SDP 不支持会话内容或媒体编码的协商,所以在流媒体中只用来描述媒体信息。媒体协商这一块要用RTSP来实现
二、
SDP 协议结构
SDP描述由许多文本行组成,文本行的格式为<</span>类型>=<</span>值>,
<</span>类型>是一个字母,
<</span>值>是结构化的文本串,其格式依<</span>类型>而定。
Session description
v= (protocol version)
o= (owner/creator and session identifier).
s= (session name)
i=* (session information)
u=* (URI of description)
e=* (email address)
p=* (phone number)
c=* (connection information - not required if included in all media)
b=* (bandwidth information)
One or more time descriptions (see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
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 name and transport address)
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)
三、
SDP
字段
|
字段 |
含义 |
说明 |
|
Session description |
||
|
V= |
protocol version |
协议版本,总是0 |
|
O= |
(owner/creator and session identifier |
会发初始者信息以及对应的地址 |
|
s= |
session name |
会话名字,每个会话中只能有一个s= |
|
i=* |
session information |
会话描述信息 |
|
u=* |
URI of description |
通过URI描述会话以外的会议信息 |
|
e=* |
email address |
Email地址 |
|
p=* |
phone number |
手机号码 |
|
c=* |
connection information - not required if included in all media |
连接信息 |
|
b=* |
bandwidth information |
带宽信息 |
|
z=* |
time zone adjustments |
时间信息 |
|
k=* |
encryption key |
秘钥 |
|
a=* |
zero or more session attribute lines |
媒体属性 |
|
Time description |
||
|
t= |
time the session is active |
|
|
r=* |
(zero or more repeat times |
|
|
Media description |
||
|
m= |
media name and transport address |
媒体名字和传输地址 |
|
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 |
媒体属性 |
3.1
Protocol Version
字段:
SDP协议版本,目前唯一值,v=0
3.2
Origin
字段:
会话发起者以及对应的地址
结构:
o=
可以是发起者的主机名,或者用”-“
例如:o=- 1014 1000 IN IP6
2409:8095:40e:1e3:a281:fb44:9d9f:946a
3.3 session
name
字段:
会话名称,每个SDP会话只能有一个s=属性
结构:
s=
例:s=QC
VOIP
3.4 session
description
字段:
会话描述信息,一个会话中,最多只能有一个i=*字段
结构:i=<<a
name="OLE_LINK10">session
description>
3.5
URI
字段:
会话以外的会议信息。原文为:This
field is optional, but if it is present it should be specified
before the first media field
结构:
u=
3.6 Email
Address and Phone Number
字段:
Email地址和手机号码。用户conference中。
3.7
Connection Data
字段:
连接数据
结构:
c=
例如
3.8
Bandwidth
字段:
带宽信息
结构:
b=:
的单位是kbps
is a single alphanumeric word giving the meaning of the bandwidth figure.有两种类型
1.CT Conference Total:会议总带宽,通过=CT 以决定是否可以有2个或更多的会议共存。
2. AS Application-Specific Maximum:应用最大的带宽需求
例如:
b=AS:49
b=RS:0
b=RR:0
3.9 Times,
Repeat Times and Time Zones
字段:
会话开始和结束时间,一般在直播中较常见。
结构:
如果
和都为0,那么表示通话将一直存在,直到用户结束为止。
3.10 Encryption
Keys
字段:
秘钥。
结构:
k=
k=:
3.11 attribute
字段:
媒体属性
结构:
a=
a=:
协议中给出了一些建议的属性
|
字段&结构 |
说明 |
|
a=cat: |
会话等级,用户可以根据会话等级筛选接收内容 |
|
a=keywds: |
类似cat,关键字,用户可以根据关键字筛选会话,This allows a receiver to select interesting session based on keywords |
|
a=tool: |
|
|
a=ptime: |
一个媒体文件在数据包中持续的时间长度,单位 ms |
|
a=recvonly |
仅接收 |
|
a=sendrecv |
发送和接收同时 |
|
a=sendonly |
仅发送 |
|
a=orient: |
|
|
a=type: |
会议类型,常见的有,三方通话要用到此属性。 ‘broadcast’, ‘meeting’, ‘moderated’, ‘test’ and ‘H332’.‘recvonly’ |
|
a=charset: |
display the session name and information data 显示会话名称等信息 |
|
a=sdplang: |
语音描述。这个是会话级,或媒体级别的描述session level attribute or a media level attribute |
|
a=lang: |
|
|
a=framerate: |
This gives the maximum video frame rate in frames/sec |
|
a=quality: |
the quality of the encoding as an integer value.取值范围0~10 10 - the best still-image quality the compression scheme can give. 5 - the default behaviour given no quality suggestion. 0 - the worst still-image quality the codec designer thinks is still usable. |
|
a=fmtp: |
用于转换SDP的一个参数 |
3.12 Media
Announcements
字段:
媒体名称和传输地址
结构:
m=
例如:
m=video 49170/2 RTP/AVP 31
描述了media type。例如是vedio
描述了send发送端口.49170表示有2对端口,第一对端口是49170/19171
,第二对端口是49172/49173
描述了传输协议Transport
protocol .常见的有UDP、RTP/AVP
subfield media type 子媒体格式。对于语音或视频自媒体,通常是media
payload (type as
defined in the RTP Audio/Video Profile)
m=video 49232 RTP/AVP 98
a=rtpmap:98 L16/16000/2
格式:
a=rtpmap: /[/
parameters>]
rtpmap:RTP mapping
例如:
m=audio 49230 RTP/AVP 96 97 98
a=rtpmap:96 L8/8000
a=rtpmap:97 L16/8000
a=rtpmap:98
L16/11025/2
四、 参考文档
1.RFC2327

加载中…