根据INVITE ,183、UPDATE、UPDATE 200 OK的SDP内容,详细分析媒体协商过程
1、INVITE :
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 1778092305 932624262 IN IP4 10.193.20.**
Owner Username: -
Session ID: 1778092305
Session Version: 932624262
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 10.193.20.**
Session Name (s): SBC call
Connection Information (c): IN IP4 10.193.20.**
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 10.193.20.**
Bandwidth Information (b): AS:50
Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)]
Bandwidth Value: 50 kb/s
Bandwidth Information (b): RR:1875
Bandwidth Modifier: RR
Bandwidth Value: 1875
Bandwidth Information (b): RS:625
Bandwidth Modifier: RS
Bandwidth Value: 625
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 32098 RTP/AVP 110 112 107 106 105 104 101 102 18 8 0
Media Type: audio
Media Port: 32098
Media Protocol: RTP/AVP
Media Format: DynamicRTP-Type-110
Media Format: DynamicRTP-Type-112
Media Format: DynamicRTP-Type-107
Media Format: DynamicRTP-Type-106
Media Format: DynamicRTP-Type-105
Media Format: DynamicRTP-Type-104
Media Format: DynamicRTP-Type-101
Media Format: DynamicRTP-Type-102
Media Format: ITU-T G.729
Media Format: ITU-T G.711 PCMA
Media Format: ITU-T G.711 PCMU
Bandwidth Information (b): AS:80
Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)]
Bandwidth Value: 80 kb/s
Bandwidth Information (b): RR:1875
Bandwidth Modifier: RR
Bandwidth Value: 1875
Bandwidth Information (b): RS:625
Bandwidth Modifier: RS
Bandwidth Value: 625
Media Attribute (a): rtpmap:110 EVS/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 110
MIME Type: EVS
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:110 br=9.6-24.4;bw=swb;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 110 [EVS]
Media format specific parameters: br=9.6-24.4
Media format specific parameters: bw=swb
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:112 EVS/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 112
MIME Type: EVS
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:112 br=5.9-24.4;bw=wb;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 112 [EVS]
Media format specific parameters: br=5.9-24.4
Media format specific parameters: bw=wb
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:107 AMR-WB/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 107
MIME Type: AMR-WB
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:107 mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 107 [AMR-WB]
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:106 AMR-WB/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 106
MIME Type: AMR-WB
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:106 octet-align=1;mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 106 [AMR-WB]
Media format specific parameters: octet-align=1
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:105 AMR/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 105
MIME Type: AMR
Sample Rate: 8000
Audio Channels: 1
Media Attribute (a): fmtp:105 mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 105 [AMR]
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:104 AMR/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 104
MIME Type: AMR
Sample Rate: 8000
Audio Channels: 1
Media Attribute (a): fmtp:104 octet-align=1;mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 104 [AMR]
Media format specific parameters: octet-align=1
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:101 telephone-event/16000
Media Attribute Fieldname: rtpmap
Media Format: 101
MIME Type: telephone-event
Sample Rate: 16000
Media Attribute (a): fmtp:101 0-15
Media Attribute Fieldname: fmtp
Media Format: 101 [telephone-event]
Media format specific parameters: 0-15
Media Attribute (a): rtpmap:102 telephone-event/8000
Media Attribute Fieldname: rtpmap
Media Format: 102
MIME Type: telephone-event
Sample Rate: 8000
Media Attribute (a): fmtp:102 0-15
Media Attribute Fieldname: fmtp
Media Format: 102 [telephone-event]
Media format specific parameters: 0-15
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): maxptime:240
Media Attribute Fieldname: maxptime
Media Attribute Value: 240
Media Attribute (a): sendrecv
Media Attribute (a): curr:qos local none
Media Attribute Fieldname: curr
Media Attribute Value: qos local none
Media Attribute (a): curr:qos remote none
Media Attribute Fieldname: curr
Media Attribute Value: qos remote none
Media Attribute (a): des:qos mandatory local sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos mandatory local sendrecv
Media Attribute (a): des:qos optional remote sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos optional remote sendrecv
Media Attribute (a): rtpmap:18 G729/8000
Media Attribute Fieldname: rtpmap
Media Format: 18
MIME Type: G729
Sample Rate: 8000
Media Attribute (a): fmtp:18 annexb=no
Media Attribute Fieldname: fmtp
Media Format: 18 [G729]
Media format specific parameters: annexb=no
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute Fieldname: rtpmap
Media Format: 8
MIME Type: PCMA
Sample Rate: 8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute Fieldname: rtpmap
Media Format: 0
MIME Type: PCMU
Sample Rate: 8000
阶段 1:INVITE(主叫侧初始媒体能力发起)
基础会话信息
主叫侧 IP:10.193.20.**,音频端口:32098;会话永久有效(t=0 0)。
编码能力集
优先顺序:EVS (110/112) → AMR-WB (107/106) → AMR (105/104) → 事件音 (101/102) → G729/PCMA/PCMU
支持宽带 EVS、AMR-WB、窄带 AMR、传统固网编码全制式,覆盖 5G/4G 高清 + 普通语音。
时序参数
ptime:20、maxptime:240,支持最大打包时长 240ms。
带宽参数
会话级 AS/RR/RS、媒体级 AS/RR/RS 均做带宽限制,预留抖动缓冲带宽。
QoS 协商初始状态
curr:qos local/remote none;des侧配置本地强制 sendrecv、远端可选 sendrecv,初始未激活 QoS 承载。
收发模式
携带a=sendrecv,双向语音收发。
2、183 SESSION PROGRESS
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): HuaweiSoftx3000 1202719897 1202719898 IN IP4 10.189.2.
Owner Username: HuaweiSoftx3000
Session ID: 1202719897
Session Version: 1202719898
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 10.189.2.
Session Name (s): SipCall
Connection Information (c): IN IP4 10.185.2.
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 10.185.2.
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 23824 RTP/AVP 105 102 --仅保留与主叫交集:105(AMR 8k) + 102(telephone-event 8k)
Media Type: audio
Media Port: 23824
Media Protocol: RTP/AVP
Media Format: DynamicRTP-Type-105
Media Format: DynamicRTP-Type-102
Media Attribute (a): rtpmap:105 AMR/8000
Media Attribute Fieldname: rtpmap
Media Format: 105
MIME Type: AMR
Sample Rate: 8000
Media Attribute (a): fmtp:105 mode-set=7;mode-change-neighbor=1;mode-change-period=2;mode-change-capability=2
Media Attribute Fieldname: fmtp
Media Format: 105 [AMR]
Media format specific parameters: mode-set=7
Media format specific parameters: mode-change-neighbor=1
Media format specific parameters: mode-change-period=2
Media format specific parameters: mode-change-capability=2
Media Attribute (a): rtpmap:102 telephone-event/8000
Media Attribute Fieldname: rtpmap
Media Format: 102
MIME Type: telephone-event
Sample Rate: 8000
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): maxptime:20
Media Attribute Fieldname: maxptime
Media Attribute Value: 20 --maxptime由 240收敛为 20 严格限制最大打包时长,降低时延抖动。
Media Attribute (a): curr:qos local sendrecv
Media Attribute Fieldname: curr
Media Attribute Value: qos local sendrecv
Media Attribute (a): curr:qos remote none
Media Attribute Fieldname: curr
Media Attribute Value: qos remote none
Media Attribute (a): des:qos optional local sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos optional local sendrecv
Media Attribute (a): des:qos mandatory remote sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos mandatory remote sendrecv
Media Attribute (a): conf:qos remote sendrecv
Media Attribute Fieldname: conf
Media Attribute Value: qos remote sendrecv --conf:qos remote sendrecv,预配置远端 QoS 确认策略。
阶段 2:183 Session Progress(被叫侧媒体协商应答)
基础会话信息
被叫侧 IP:10.185.2.,音频端口:23824,锁定后续 RTP 收发端口。
编码能力协商收敛
仅保留与主叫交集:105(AMR 8k) + 102(telephone-event 8k)
直接放弃 EVS、AMR-WB 高清编码,降级协商为普通窄带 AMR 语音。
时序参数收敛
ptime:20保持一致;maxptime由 240收敛为 20,严格限制最大打包时长,降低时延抖动。
QoS 状态更新
本地 QoS:curr sendrecv已就绪
远端 QoS:curr none未就绪
des策略调整为:本地可选、远端强制 sendrecv
新增conf:qos remote sendrecv,预配置远端 QoS 确认策略。
3、UPDATE
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): - 1778092305 932624263 IN IP4 10.193.20.**
Owner Username: -
Session ID: 1778092305
Session Version: 932624263
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 10.193.20.**
Session Name (s): SBC call
Connection Information (c): IN IP4 10.193.20.**
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 10.193.20.**
Bandwidth Information (b): AS:37
Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)]
Bandwidth Value: 37 kb/s
Bandwidth Information (b): RR:1387
Bandwidth Modifier: RR
Bandwidth Value: 1387
Bandwidth Information (b): RS:462
Bandwidth Modifier: RS
Bandwidth Value: 462
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 32098 RTP/AVP 105 102 111 113 114 115 18 8 0 103
Media Type: audio
Media Port: 32098
Media Protocol: RTP/AVP
Media Format: DynamicRTP-Type-105
Media Format: DynamicRTP-Type-102
Media Format: DynamicRTP-Type-111
Media Format: DynamicRTP-Type-113
Media Format: DynamicRTP-Type-114
Media Format: DynamicRTP-Type-115
Media Format: ITU-T G.729
Media Format: ITU-T G.711 PCMA
Media Format: ITU-T G.711 PCMU
Media Format: DynamicRTP-Type-103
Bandwidth Information (b): AS:82
Bandwidth Modifier: AS [Application Specific (RTP session bandwidth)]
Bandwidth Value: 82 kb/s
Bandwidth Information (b): RR:1387
Bandwidth Modifier: RR
Bandwidth Value: 1387
Bandwidth Information (b): RS:462
Bandwidth Modifier: RS
Bandwidth Value: 462
Media Attribute (a): rtpmap:105 AMR/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 105
MIME Type: AMR
Sample Rate: 8000
Audio Channels: 1
Media Attribute (a): fmtp:105 mode-set=7;mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 105 [AMR]
Media format specific parameters: mode-set=7
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:102 telephone-event/8000
Media Attribute Fieldname: rtpmap
Media Format: 102
MIME Type: telephone-event
Sample Rate: 8000
Media Attribute (a): fmtp:102 0-15
Media Attribute Fieldname: fmtp
Media Format: 102 [telephone-event]
Media format specific parameters: 0-15
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): maxptime:20
Media Attribute Fieldname: maxptime
Media Attribute Value: 20
Media Attribute (a): sendrecv
Media Attribute (a): curr:qos local sendrecv
Media Attribute Fieldname: curr
Media Attribute Value: qos local sendrecv
Media Attribute (a): curr:qos remote sendrecv
Media Attribute Fieldname: curr
Media Attribute Value: qos remote sendrecv
Media Attribute (a): des:qos mandatory local sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos mandatory local sendrecv
Media Attribute (a): des:qos optional remote sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos optional remote sendrecv
Media Attribute (a): rtpmap:111 EVS/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 111
MIME Type: EVS
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:111 br=9.6-64;bw=swb;mode-change-capability=2;cmr=0;dtx=0
Media Attribute Fieldname: fmtp
Media Format: 111 [EVS]
Media format specific parameters: br=9.6-64
Media format specific parameters: bw=swb
Media format specific parameters: mode-change-capability=2
Media format specific parameters: cmr=0
Media format specific parameters: dtx=0
Media Attribute (a): rtpmap:113 EVS/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 113
MIME Type: EVS
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:113 br=5.9-64;bw=wb;mode-change-capability=2;cmr=0;dtx=0
Media Attribute Fieldname: fmtp
Media Format: 113 [EVS]
Media format specific parameters: br=5.9-64
Media format specific parameters: bw=wb
Media format specific parameters: mode-change-capability=2
Media format specific parameters: cmr=0
Media format specific parameters: dtx=0
Media Attribute (a): rtpmap:114 AMR-WB/16000/1
Media Attribute Fieldname: rtpmap
Media Format: 114
MIME Type: AMR-WB
Sample Rate: 16000
Audio Channels: 1
Media Attribute (a): fmtp:114 mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 114 [AMR-WB]
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:115 AMR/8000/1
Media Attribute Fieldname: rtpmap
Media Format: 115
MIME Type: AMR
Sample Rate: 8000
Audio Channels: 1
Media Attribute (a): fmtp:115 mode-change-capability=2;max-red=0
Media Attribute Fieldname: fmtp
Media Format: 115 [AMR]
Media format specific parameters: mode-change-capability=2
Media format specific parameters: max-red=0
Media Attribute (a): rtpmap:18 G729/8000
Media Attribute Fieldname: rtpmap
Media Format: 18
MIME Type: G729
Sample Rate: 8000
Media Attribute (a): fmtp:18 annexb=no
Media Attribute Fieldname: fmtp
Media Format: 18 [G729]
Media format specific parameters: annexb=no
Media Attribute (a): rtpmap:8 PCMA/8000
Media Attribute Fieldname: rtpmap
Media Format: 8
MIME Type: PCMA
Sample Rate: 8000
Media Attribute (a): rtpmap:0 PCMU/8000
Media Attribute Fieldname: rtpmap
Media Format: 0
MIME Type: PCMU
Sample Rate: 8000
Media Attribute (a): rtpmap:103 telephone-event/16000
Media Attribute Fieldname: rtpmap
Media Format: 103
MIME Type: telephone-event
Sample Rate: 16000
Media Attribute (a): fmtp:103 0-15
Media Attribute Fieldname: fmtp
Media Format: 103 [telephone-event]
Media format specific parameters: 0-15
阶段 3:UPDATE(主叫侧依据 183 反馈刷新媒体 SDP)
会话及端口不变
沿用主叫原有 IP、端口 32098,会话版本号升级,标识 SDP 刷新。
编码集调整
保留原有交集 105/102,同时补充 EVS/AMR-WB 扩展编码(111/113/114/115/103)做兼容兜底,但实际仍以 105 AMR 为首选。
带宽适配下调
AS/RR/RS 带宽值整体下调,适配窄带 AMR 码率需求。
时序参数对齐
主动将maxptime由 240 改为20,与 183 被叫侧完全对齐,消除时序不匹配隐患。
QoS 状态同步
curr:qos local/remote 均为 sendrecv,双向 QoS 进入就绪态,为后续专有承载建立完成协商预配置。
4、200 OK (UPDATE)
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): HuaweiSoftx3000 1202719897 1202719899 IN IP4 10.189.2.
Owner Username: HuaweiSoftx3000
Session ID: 1202719897
Session Version: 1202719899
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 10.189.2.
Session Name (s): SipCall
Connection Information (c): IN IP4 10.185.2.
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 10.185.2.
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 23824 RTP/AVP 105 102
Media Type: audio
Media Port: 23824
Media Protocol: RTP/AVP
Media Format: DynamicRTP-Type-105
Media Format: DynamicRTP-Type-102
Media Attribute (a): rtpmap:105 AMR/8000
Media Attribute Fieldname: rtpmap
Media Format: 105
MIME Type: AMR
Sample Rate: 8000
Media Attribute (a): fmtp:105 mode-set=7;mode-change-neighbor=1;mode-change-period=2;mode-change-capability=2
Media Attribute Fieldname: fmtp
Media Format: 105 [AMR]
Media format specific parameters: mode-set=7
Media format specific parameters: mode-change-neighbor=1
Media format specific parameters: mode-change-period=2
Media format specific parameters: mode-change-capability=2
Media Attribute (a): rtpmap:102 telephone-event/8000
Media Attribute Fieldname: rtpmap
Media Format: 102
MIME Type: telephone-event
Sample Rate: 8000
Media Attribute (a): ptime:20
Media Attribute Fieldname: ptime
Media Attribute Value: 20
Media Attribute (a): maxptime:20
Media Attribute Fieldname: maxptime
Media Attribute Value: 20
Media Attribute (a): curr:qos local sendrecv
Media Attribute Fieldname: curr
Media Attribute Value: qos local sendrecv
Media Attribute (a): curr:qos remote sendrecv
Media Attribute Fieldname: curr
Media Attribute Value: qos remote sendrecv
Media Attribute (a): des:qos optional local sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos optional local sendrecv
Media Attribute (a): des:qos mandatory remote sendrecv
Media Attribute Fieldname: des
Media Attribute Value: qos mandatory remote sendrecv
阶段 4:UPDATE 200 OK(被叫侧最终确认,媒体协商固化)
会话 IP、端口、编码完全锁定
沿用被叫 IP、23824 端口,固化仅 105 (AMR)+102 (事件音) 最终通话编码,彻底放弃高清编码。
时序参数完全一致
ptime=20、maxptime=20,两端时序参数完全匹配。
QoS 最终状态敲定
curr:qos local/remote 均为 sendrecv,双向 QoS 均就绪;
des策略固定:本地可选、远端强制 sendrecv,专有承载可正常触发建立。
媒体协商闭环完成
至此IP、端口、编码、时序、QoS、带宽全部参数双向达成一致,媒体通道可正常接通 RTP 语音流。
