panjjo / gosip

sipserver,GB28181,ZLMediaKit
324 stars 104 forks source link

海康摄像头gb28181接入注册失败 Unauthorized #9

Open bighuangbee opened 1 year ago

bighuangbee commented 1 year ago

在海康摄像头设置了gb28181接入,日志提示: TRAC[0600] send response,to: 192.168.80.2:5061 txkey: Call-ID: 455235fedf2f791845736753134c76af message: SIP/2.0 401 Unauthorized

panjjo commented 1 year ago

海康的录像机是通过web管理页面设置话,他那个密码每次都需要重新输入。

panjjo commented 1 year ago

确定一下用户sipid ,有部分海康录像机设置sipid后不生效,还是发送的默认sipid。

bighuangbee commented 1 year ago

是大华摄像机,还没测试海康 image

panjjo commented 1 year ago

方便的话抓个包我看下吧。

bighuangbee commented 1 year ago

这是注册的数据包吧 TRAC[0005] receive request from: 192.168.80.2:5060 ,method: REGISTER txKey: Call-ID: e21f979af9e350b75c837f605a546d40 message: REGISTER sip:37070000082008000001@192.168.80.107:5060 SIP/2.0 Authorization: Digest username="34020000001320000001", realm="3707000008", nonce="BEZLrQFbzfkCI7LBJMExvgSddtPpX6qL", uri="sip:37070000082008000001@192.168.80.107:5060", response="e9b09e3a0f5b91a8843de876128f1b01", algorithm=MD5, cnonce="0a4f113b", qop=auth, nc=00000001 Call-ID: e21f979af9e350b75c837f605a546d40 Contact: sip:34020000001320000001@192.168.80.2:5060 Content-Length: 0 CSeq: 524 REGISTER Expires: 3600 From: sip:34020000001320000001@192.168.80.2:5060;tag=a4c0a6693d0ae2d0b7efaa90b427eb4d Max-Forwards: 70 Route: sip:34020000001320000001@192.168.80.107:5060;lr To: sip:34020000001320000001@192.168.80.2:5060 User-Agent: SIP UAS V3.0.0.1049939 Via: SIP/2.0/UDP 192.168.80.2:5060;rport;branch=z9hG4bKc311ac6ce478554e01363c5111f40c5f


TRAC[0031] writeTo 432 , [::]:5060 -> 192.168.80.2:5060 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.80.2:5060;rport;branch=z9hG4bK402b0494962b149ce5698ff4849dbfb2 From: sip:34020000001320000001@192.168.80.2:5060;tag=3efcbbcac2f1a8816c7c61d543accb7b To: sip:34020000001320000001@192.168.80.2:5060 Call-ID: a91f5d7215bde30fa14a0573b060d2d1 CSeq: 438 REGISTER WWW-Authenticate: Digest nonce="4xuiayeOBRdEGbbHb8XZbxiIQIKPAQRo", algorithm=MD5, realm="3707000008",qop="auth"

panjjo commented 1 year ago

我重新提交了一个版本,有在线API接口了,你看下这个用户sipid,感觉不对,你是设置的34开头的么?

bighuangbee commented 1 year ago

是34开头