2,554
社区成员
发帖
与我相关
我的任务
分享
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:34020000001180000002@3402000000 SIP/2.0
Message Header
Via: SIP/2.0/UDP 192.168.1.134:5060;rport;branch=z9hG4bK741052420
From: <sip:34020000002000000001@3402000000>;tag=334479113
To: <sip:34020000001180000002@3402000000>
Call-ID: 655742294
CSeq: 20 INVITE
Contact: <sip:34020000002000000001@192.168.1.134:5060>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: exosipdemo/0.0.0
Subject: 34020000001320000004:1,34020000004000000001:1
Content-Length: 273
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): 34020000004000000001 0 0 IN IP4 192.168.1.134
Session Name (s): Playback
URI of Description (u): 34020000001320000004:3
Connection Information (c): IN IP4 192.168.1.134
Time Description, active time (t): 1520728052 1520729999
Media Description, name and address (m): video 5061 RTP/AVP 96 98 97
Media Attribute (a): recvonly
Media Attribute (a): rtpmap:96 PS/90000
Media Attribute (a): rtpmap:98 H264/90000
Media Attribute (a): rtpmap:97 MPEG4/90000
Unknown: y=1200000001
Unknown: f=
Session Initiation Protocol (400)
Status-Line: SIP/2.0 400 Bad Request
Message Header
Via: SIP/2.0/UDP 192.168.1.134:5060;rport=5060;branch=z9hG4bK741052420
From: <sip:34020000002000000001@3402000000>;tag=334479113
To: <sip:34020000001180000002@3402000000>;tag=997336290
Call-ID: 655742294
CSeq: 20 INVITE
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0

只能说,各种办法都试试。哈哈。你可以参考RFC3261说明,以下是一种情况:
8.1.3.5 Processing 4xx Responses
...
If a 420 (Bad Extension) response is received (Section 21.4.15), the
request contained a Require or Proxy-Require header field listing an
option-tag for a feature not supported by a proxy or UAS. The UAC
SHOULD retry the request, this time omitting any extensions listed in
the Unsupported header field in the response.
...
其他的,再详细看看RFC原文吧:https://www.rfc-editor.org/pdfrfc/rfc3261.txt.pdf
问题的根本原因还是我个人对SIP协议吃得不够透彻。
解决本贴中问题的方法很简单:把Request-Line中的URI设置为SDP中的u字段的URI(即NVR中的通道ID)就行了。
对于这种错误,我表示很尴尬。
好久没用28181的东西了,以前也只是做过IPC与平台的国标检测,没试过NVR。海康的NVR如果过检了,应该是经过这个软件检测的,但按你说的测试NVR又有问题,如果实在搞不定,只能尝试联系下海康的售后了。

INVITE sip:34020000001320000001@3402000000 SIP/2.0
Call-ID: 05e8affcd324bff50b631f49e6020acb@0.0.0.0
CSeq: 1 INVITE
From: <sip:34020000002000000001@3402000000>;tag=18061828_53173353_08f1fbb7-381b-45bb-a457-725a566012a9
To: <sip:34020000001320000001@3402000000>
Max-Forwards: 70
Contact: "34020000002000000001" <sip:192.168.2.12:5100>
Content-Type: application/sdp
Route: <sip:34020000001320000001@192.168.13.155:7010;lr>
Via: SIP/2.0/UDP 192.168.2.12:5100;branch=z9hG4bK08f1fbb7-381b-45bb-a457-725a566012a9_53173353_3577300819576244
Content-Length: 225
v=0
o=34020000001320000001 0 0 IN IP4 192.168.13.155
s=Play
c=IN IP4 192.168.13.155
t=0 0
m=video 6000 RTP/AVP 96 98 97
a=recvonly
a=rtpmap:96 PS/90000
a=rtpmap:98 H264/90000
a=rtpmap:97 MPEG4/90000
y=0100000001
f=
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:34020000001180000002@3402000000 SIP/2.0
Message Header
Via: SIP/2.0/UDP 192.168.1.134:5060;rport;branch=z9hG4bK3552532082
From: <sip:34020000002000000001@3402000000>;tag=3613302276
To: <sip:34020000001180000002@3402000000>
Call-ID: 3124317512
CSeq: 20 INVITE
Contact: <sip:34020000002000000001@192.168.1.134:5060>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: exosipdemo/0.0.0
Content-Length: 221
Message Body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): 34020000004000000001 0 0 IN IP4 192.168.1.134
Session Name (s): Play
Connection Information (c): IN IP4 192.168.1.134
Time Description, active time (t): 0 0
Media Description, name and address (m): video 5061 RTP/AVP 96 98 97
Media Attribute (a): recvonly
Media Attribute (a): rtpmap:96 PS/90000
Media Attribute (a): rtpmap:98 H264/90000
Media Attribute (a): rtpmap:97 MPEG4/90000
Unknown: y=0200000001
应答还是:
Session Initiation Protocol (400)
Status-Line: SIP/2.0 400 Bad Request
Message Header
Via: SIP/2.0/UDP 192.168.1.134:5060;rport=5060;branch=z9hG4bK3552532082
From: <sip:34020000002000000001@3402000000>;tag=3613302276
To: <sip:34020000001180000002@3402000000>;tag=1899996222
Call-ID: 3124317512
CSeq: 20 INVITE
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0
