一、 问题现象
【问题现象】NVR使用GB接三方平台发现倍速回放时,
【现场拓扑】现场拓扑如下
(1) NVR侧使用家用宽带的方式,通过国标跨公网接入三方平台。
图1.1:网络拓扑
二、 抓包分析
INVITE sip:42000000401320000001@192.168.0.14:5060 SIP/2.0
To: sip:42000000401320000001@4200000040
From: sip:42000000402000000001@4200000040;tag=7uu6NGa9
Call-ID: 852055@192.168.0.13
CSeq: 90148 INVITE
Content-Type: application/sdp
User-Agent: NODE GB28181 SERVER V1
Subject: 42000000401320000001:1000009981,42000000402000000001:0
Contact: sip:42000000402000000001@192.168.0.13:5060
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK940592;rport
Content-Length: 323
v=0
o=42000000402000000001 0 0 IN IP4 192.168.0.13
s=Playback
u=42000000401320000001:0
c=IN IP4 192.168.0.13
t=1648780493 1648780553
m=video 10000 TCP/RTP/AVP 96 97 98
a=rtpmap:96 PS/90000
a=rtpmap:97 MPEG4/90000
a=rtpmap:98 H264/90000
a=recvonly
a=setup:passive
a=connection:new
y=1000009981
f=v/2/4///a///
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK940592;rport=5060
From: sip:42000000402000000001@4200000040;tag=7uu6NGa9
To: sip:42000000401320000001@4200000040;tag=1790623530
Call-ID: 852055@192.168.0.13
CSeq: 90148 INVITE
Contact: sip:42000000401320000001@192.168.0.14:5060
Content-Type: application/SDP
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 230
v=0
o=42000000401180000010 0 0 IN IP4 192.168.0.14
s=Playback
c=IN IP4 192.168.0.14
t=1648809293 1648809353
m=video 62006 TCP/RTP/AVP 96
a=sendonly
a=rtpmap:96 PS/90000
a=setup:active
y=1000009981
f=v/2/6/25/1/4096a///
ACK sip:42000000401320000001@192.168.0.14:5060 SIP/2.0
To: sip:42000000401320000001@4200000040;tag=1790623530
From: sip:42000000402000000001@4200000040;tag=7uu6NGa9
Call-ID: 852055@192.168.0.13
CSeq: 90148 ACK
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK320851;rport
Content-Length: 0
INFO sip:42000000401320000001@192.168.0.14:5060 SIP/2.0
To: sip:42000000401320000001@4200000040;tag=1700172176
From: sip:42000000402000000001@4200000040;tag=gtGEJgfw
Call-ID: 562803@192.168.0.13
CSeq: 69 Info
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK989332;rport
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK905191;rport
Content-Length: 38
Contact: sip:42000000402000000001@192.168.0.13:5060
PLAY MANSRTSP/1.0
CSeq:3
Scale:2.0
SIP/2.0 481 Call Leg/Transaction Does Not Exist
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK989332;rport=5060
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK905191;rport
From: sip:42000000402000000001@4200000040;tag=gtGEJgfw
To: sip:42000000401320000001@4200000040;tag=1700172176
Call-ID: 562803@192.168.0.13
CSeq: 69 Info
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0
INFO sip:42000000401320000001@192.168.0.14:5060 SIP/2.0
To: sip:42000000401320000001@4200000040;tag=1790623530
From: sip:42000000402000000001@4200000040;tag=7uu6NGa9
Call-ID: 852055@192.168.0.13
CSeq: 21 Info
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK883179;rport
Contact: sip:42000000402000000001@192.168.0.13:5060
Content-Length: 38
PLAY MANSRTSP/1.0
CSeq:1
Scale:2.0
SIP/2.0 500 Internal Server Error
Via: SIP/2.0/UDP 192.168.0.13:5060;branch=z9hG4bK883179;rport=5060
From: sip:42000000402000000001@4200000040;tag=7uu6NGa9
To: sip:42000000401320000001@4200000040;tag=1790623530
Call-ID: 852055@192.168.0.13
CSeq: 21 Info
User-Agent: Embedded Net DVR/NVR/DVS
Retry-After: 10
Content-Length: 0
(1) 从上述报文可以看出平台在取回放流的时候,Cseq值是CSeq: 90148 INVITE
(2) 在后续的倍速信息中,设备回复的Cseq值变成了CSeq: 21 Info;
(3) 此原因是导致设备倍速操作失败的原因。
三、 详细原因
(1) 在GB协议中,CALL-ID标识唯一会话,
(2) 所以取流中的任何暂停倍速信息都同一会话。
(3) 在一个会话中,Cesq值不能随机赋予,可以与之前的相同,但不能小于之前的值。
(4) 其他的GB报文逻辑相同。