大华海康等摄像头、录像机通过GB28181注册LiveGBS国标流媒体实现网页直播的注册流程解析

GB28181注册区分需要认证和无需认证

LiveGBS国标流媒体服务基础配置页面默认接入密码是:12345678 。如果不需要接入认证的话可以把接入密码填空。

注册流程

当密码不为空时即需要接入认证,注册流程会分为如下4个步骤

1. 等待无鉴权注册 (设备>>服务)

REGISTER sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.64:5060;rport=5060;received=192.168.2.64;branch=z9hG4bK1235305492
From: <sip:34020000001320000264@3402000000>;tag=180588994
To: <sip:34020000001320000264@3402000000>
Call-ID: 575393982
CSeq: 1 REGISTER
Contact: <sip:34020000001320000264@192.168.2.64:5060>
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0

2. 国标流媒体服务响应(服务>>设备)

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.64:5060;rport=5060;received=192.168.2.64;branch=z9hG4bK1235305492
From: <sip:34020000001320000264@3402000000>;tag=180588994
To: <sip:34020000001320000264@3402000000>;tag=776284809
CSeq: 1 REGISTER
Call-ID: 575393982
User-Agent: LiveQing
Contact: <sip:34020000002000000001@192.168.2.135:5060>
Content-Length: 0
WWW-Authenticate: Digest realm="3402000000",qop="auth",nonce="6eb1340d99c404a0e4d3b68d15d1d46f"

3. 等待有鉴权注册(设备>>服务)

REGISTER sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.64:5060;rport=5060;received=192.168.2.64;branch=z9hG4bK173969927
From: <sip:34020000001320000264@3402000000>;tag=180588994
To: <sip:34020000001320000264@3402000000>
Call-ID: 575393982
CSeq: 2 REGISTER
Contact: <sip:34020000001320000264@192.168.2.64:5060>
Authorization: Digest username="34020000001320000264", realm="3402000000", nonce="6eb1340d99c404a0e4d3b68d15d1d46f", uri="sip:34020000002000000001@3402000000", response="4c97657aa0412c25d4b862219b635c17", algorithm=MD5, cnonce="0a4f113b", qop=auth, nc=00000001
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0

4. 服务响应 (服务>>设备)

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.64:5060;rport=5060;received=192.168.2.64;branch=z9hG4bK173969927
From: <sip:34020000001320000264@3402000000>;tag=180588994
To: <sip:34020000001320000264@3402000000>;tag=368284899
CSeq: 2 REGISTER
Call-ID: 575393982
User-Agent: LiveQing
Contact: <sip:34020000002000000001@192.168.2.135:5060>
Content-Length: 0
Date: 2019-08-07T13:56:20.643
Expires: 3600

如果没有接入密码为空,即不需要接入认证的话,只有第1、4两个步骤就注册成功拉。

posted @ 2019-08-08 13:24 Kim的博客 阅读(...) 评论(...) 编辑 收藏