实现国标GB/T28181流媒体服务解决方案EasyGBS之GB35114和GB28181的注册信令流程简介
背景分析
视频监控整合人工智能技术,虽然在加强监控的同时也伴随着一些潜在风险,但是潜在的优点显然超过了缺点。且如今人工智能在算法与芯片领域的成熟及成本的下降,使得智能监控的商业化落地更加快速地普及,同时智能监控市场在寻求差异化竞争形成了百花齐放的形势。
国标GB28181视频流媒体服务平台
EasyGBS国标(GB28181)流媒体服务软件: 提供用户管理及Web可视化页面管理; 提供设备状态管理,可实时查看设备是否掉线等信息; 实时流媒体处理,PS(TS)转ES; 设备状态监测、云台控制、录像检索、回放; 提供RTSP、RTMP、HTTP-FLV、HLS等多种协议流输出; 对外提供服务器获取状态、信息,控制等HTTP API接口。
最近在开发GB35114的功能,我们在这里简单上传几个注册信令。目前只开发了设备和平台之间的协议,希望对大家有所帮助:
1、单向注册
13:31:56.621434 IP 192.168.3.12.sip > localhost.localdomain.sip: SIP, length: 1267
Eh....@.@...................REGISTER sip:11011200002000000100@1101120000 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.12:5060;rport;branch=z9hG4bK443099353
From: <sip:11011200001325000001@1101120000>;tag=249558797
To: <sip:11011200001325000001@1101120000>
Call-ID: 1524440977
CSeq: 1 REGISTER
Contact: <sip:11011200001325000001@192.168.3.12:5060>
Authorization: Capability algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", keyversion="2019-08-06T05:31:39", cnonce="devicecert:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJiVENDQVJNQ0FRRXdDZ1lJS29FY3oxVUJnM1V3UWpFTE1Ba0dBMVVFQmhNQ1EwNHhFREFPQmdOVkJBZ00KQjJkaU16VXhNVFF4SVRBZkJnTlZCQW9NR0VsdWRHVnlibVYwSUZkcFpHZHBkSE1nVUhSNUlFeDBaREFlRncweApPVEEzTWpVd09USTVORGRhRncweU9UQTNNakl3T1RJNU5EZGFNRU14Q3pBSkJnTlZCQVlUQWtOT01UUXdNZ1lEClZRUUREQ3N6TWpBd01EQXdNREF3TVRNeU5UQXdNREF3TVY4eE56RTNNREV5TURFMU1EZ3dNVEk1TURZMU1URTMKTUZrd0V3WUhLb1pJemowQ0FRWUlLb0VjejFVQmdpMERRZ0FFWkhmbFZYaGxvOFZDTkRHZFcvZjVROE50SUVjcAoyRGZVbjI2Rm5WKy9Ob3F0b1dzb1JjRityUzZ2bTVubStqc0pKdWc0amN4WlBiaTNkOE9qWDgwMnpUQUtCZ2dxCmdSelBWUUdEZFFOSUFEQkZBaUVBeFMzQk9oVkRGQjBBVDBjTFJCYUJtQ3o2WXBFZjB4eUxBclVHdDBqeUwzQUMKSUR2RkE5NWFXc1JEazRaTm5iZ2l4eHRmbW53eXB1UUZLY0lwMGMwZUZKcHIKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
13:31:56.719840 IP localhost.localdomain.sip > 192.168.3.12.sip: SIP, length: 458
E....y@.@.-................VSIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.3.12:5060;rport=5060;branch=z9hG4bK443099353
From: <sip:11011200001325000001@1101120000>;tag=249558797
To: <sip:11011200001325000001@1101120000>;tag=127583574
Call-ID: 1524440977
CSeq: 1 REGISTER
WWW-Authenticate: Unidirection algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", random1="PRAIIbutDbd5x/NKsbwwYw=="
Content-Type: Application/MANSCDP+xml
User-Agent: videosvr 1.0
Content-Length: 0
13:31:56.935980 IP 192.168.3.12.sip > localhost.localdomain.sip: SIP, length: 684
Eh....@.@..C...............CREGISTER sip:11011200002000000100@1101120000 SIP/2.0
Via: SIP/2.0/UDP 192.168.3.12:5060;rport;branch=z9hG4bK582371201
From: <sip:11011200001325000001@1101120000>;tag=249558797
To: <sip:11011200001325000001@1101120000>
Call-ID: 1524440977
CSeq: 2 REGISTER
Contact: <sip:11011200001325000001@192.168.3.12:5060>
Authorization: Unidirection random1="PRAIIbutDbd5x/NKsbwwYw==", random2="F4InuQewuMMqYPy1ItBdhQ==", serverid="11011200002000000100", sign1="MEYCIQD/9gP8olHM0TeLj0MxBRw3C8tQKFMMRgUupnyD4xXTTwIhAJvXxvTEDXj8Yk5qjHwujzUjpYpxxCGq7Zz0tKzhhJUU", algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
13:31:57.055349 IP localhost.localdomain.sip > 192.168.3.12.sip: SIP, length: 619
E.....@.@.,E.............s..SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.3.12:5060;rport=5060;branch=z9hG4bK582371201
From: <sip:11011200001325000001@1101120000>;tag=249558797
To: <sip:11011200001325000001@1101120000>;tag=822951361
Call-ID: 1524440977
CSeq: 2 REGISTER
Contact: <sip:11011200001325000001@192.168.3.22:5060>
User-Agent: videosvr 1.0
Expires: 3600
Date: 2019-08-06T13:31:57.004
SecurityInfo: Unidirection cryptkey="MHkCIBHIiuBM7BulVNA9W1lwMzqDWFgmwqmF3lUg2ek0OJ77AiEAhLUtNE+yGqjqOKSUDIMyaSuNTaI5NUkhLq/cDxHKXJwEIHFMxhef2Mm87QjLenmuVKs1rGm7Ls3aMG+1zPp47365BBAnTJVAmqz9pBE2xKOXhpQF", algorithm="A:SM2;H:SM3"
Content-Length: 0
2、双向注册
REGISTER sip:34020000002000000003@34020000 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.64:5060;rport;branch=z9hG4bK520712539
From: <sip:34020000001320000001@34020000>;tag=1465468922
To: <sip:34020000001320000001@34020000>
Call-ID: 563593916
CSeq: 1 REGISTER
Contact: <sip:34020000001320000001@192.168.1.64:5060>
Authorization: Capability algorithm="A:SM2;H:SM3;S:SM1/OFB/PKCS5;SI:SM3-SM2", keyversion="2018-12-20T19:27:41"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.64:5060;rport=5060;branch=z9hG4bK520712539
From: <sip:34020000001320000001@34020000>;tag=1465468922
To: <sip:34020000001320000001@34020000>;tag=1966674912
Call-ID: 563593916
CSeq: 1 REGISTER
User-Agent: videosvr 1.0
Expires: 3600
Date: 2018-12-20T19:27:42.000
WWW-Authenticate: Bidirection algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2", random1="OxImNZnZwyNMtx0FjnWKrg=="
Content-Length: 0
REGISTER sip:34020000002000000003@34020000 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.64:5060;rport;branch=z9hG4bK1060289490
From: <sip:34020000001320000001@34020000>;tag=1465468922
To: <sip:34020000001320000001@34020000>
Call-ID: 563593916
CSeq: 2 REGISTER
Contact: <sip:34020000001320000001@192.168.1.64:5060>
Authorization: Bidirection random1="OxImNZnZwyNMtx0FjnWKrg==", random2="KBDLEUo83FgcnHXcSNN04w==", serverid="34020000002000000003", sign1="MEYCIQDRWE9xmwU4+2pS7RF4H+VXhFvo6VkM/hiCvTZpxVKZ7AIhAJbLfc9r7OpgzMc0bdqE6XuOs70vF96BcCbvoOqKGRjh", algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2"
Max-Forwards: 70
User-Agent: IP Camera
Expires: 3600
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.64:5060;rport=5060;branch=z9hG4bK1060289490
From: <sip:34020000001320000001@34020000>;tag=1465468922
To: <sip:34020000001320000001@34020000>;tag=1980721111
Call-ID: 563593916
CSeq: 2 REGISTER
User-Agent: videosvr 1.0
Expires: 3600
Date: 2018-12-20T19:27:42.000
SecurityInfo: Bidirection algorithm="A:SM2;H:SM3;S:SM4/OFB/PKCS5,SM1/OFB/PKCS5;SI:SM3-SM2",random1="OxImNZnZwyNMtx0FjnWKrg==",random2="KBDLEUo83FgcnHXcSNN04w==",deviceid="34020000001320000001",serverid="34020000002000000003",cryptkey="MHgCICPmu12OKCfCNsiTK/6wSsHpDEF43fedv9AxRjj+XzQ0AiAZnh6496mWVcpV+BWOK4tZ3G3q/TZ4Dwt6vBv3G4xlXQQgMfbkaXwYUL8RObHfkpQEC++/CA/Enssg7rlZgDnKCXQEEEWqHpbVai9NJaT0orxaQ4Y=",sign2="MEUCIQDzvGhJCuxmH/3NNtLNnrXIUOxYkYB7j8/3Th1LvjZHggIgD/nd9RbpEd6neZTuXDsIbNzydyS8WarbN1p6nHD5pHk="
Content-Length: 0