视频监控安防平台-GB28181-2016版-移动位置订阅

视频监控安防平台-GB28181-2016版-移动位置订阅

         由于项目原因最近还是好久没更新博客了,一直想把移动位置订阅这个更新上去避免检测的时候遇到和我一样的问题。移动位置订阅是国标28181-2016版本新出的协议,协议里面对移动位置订阅的描述不是很清晰,检测的时候还单纯的以为是移动位置查询,结果检测的时候傻眼了,一看还有移动位置订阅 移动位置取消订阅 移动位置上班的检测项,瞬间就知道是理解错了,最后只能趁检测人员午休的时候现改代码,下面说一下移动订阅的简单流程。

1、订阅和取消订阅流程 

视频监控安防平台-GB28181-2016版-移动位置订阅_第1张图片
直接参考28181文档里面的订阅流程:
移动位置订阅的包体信息:


MobilePosition
51
64000000001310000001
6

移动位置取消订阅的包体信息:


MobilePosition
7
64000000001310000001

2、移动位置通知流程
视频监控安防平台-GB28181-2016版-移动位置订阅_第2张图片
移动位置通知消息,包体内容:


64000000001310000001
MobilePosition
128

116.336
39.942
0.0
0.0
0.0


下面简单粘贴下抓包的信息

移动位置订阅消息:
SUBSCRIBE sip:[email protected]:5060 SIP/2.0
Call-ID: [email protected]
CSeq: 1 SUBSCRIBE
From: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
To:
Max-Forwards: 70
Contact: "34020000002000000001"
Expires: 600
Event: Catalog;id=55
Content-Type: Application/MANSCDP+xml
Via: SIP/2.0/UDP 192.168.1.81:5060;branch=z9hG4bK53a5809f-9432-4c74-b2f3-1b0d496fc3db_53173353_7382400244196
Content-Length: 157




MobilePosition
51
64000000001310000001
6

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.81:5060;branch=z9hG4bK53a5809f-9432-4c74-b2f3-1b0d496fc3db_53173353_7382400244196
From: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
To: ;tag=waUyeIgW
Call-ID: [email protected]
CSeq: 1 SUBSCRIBE
Contact:
Expires: 600
Content-Length: 0


移动位置上报的抓包信息(由于检测的时候设备还没有设备厂商过了GB28181-2016检测,还是采用的定制海康的设备,包体内容还有些小bug给公安一所说了,后面有所修改):
NOTIFY sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.93:5060;rport;branch=z9hG4bK-3d09000-17478ee-Hi8M6Ajh
From: ;tag=waUyeIgW
To: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
Call-ID: [email protected]
CSeq: 2 NOTIFY
Contact:
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
Event: Catalog;id=55
Subscription-State: active
Content-Length:   310




64000000001310000001
MobilePosition
126

116.336
39.942
0.0
0.0
0.0

SIP/2.0 200 OK
To: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
Via: SIP/2.0/UDP 192.168.1.93:5060;rport=5060;branch=z9hG4bK-3d09000-17478ee-Hi8M6Ajh;received=192.168.1.93
CSeq: 2 NOTIFY
Call-ID: [email protected]
From: ;tag=waUyeIgW
Contact:
Content-Length: 0

移动位置取消订阅:
SUBSCRIBE sip:192.168.1.93:5060 SIP/2.0
CSeq: 2 SUBSCRIBE
From: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
To: ;tag=waUyeIgW
Call-ID: [email protected]
Max-Forwards: 70
Contact:
Expires: 0
Event: Catalog;id=55
Content-Type: Application/MANSCDP+xml
Via: SIP/2.0/UDP 192.168.1.81:5060;branch=z9hG4bK53a5809f-9432-4c74-b2f3-1b0d496fc3db_53173353_7422092422952
Content-Length: 150




MobilePosition
55
64000000001310000001

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.81:5060;branch=z9hG4bK53a5809f-9432-4c74-b2f3-1b0d496fc3db_53173353_7422092422952
From: ;tag=98909488_53173353_53a5809f-9432-4c74-b2f3-1b0d496fc3db
To: ;tag=waUyeIgW
Call-ID: [email protected]
CSeq: 2 SUBSCRIBE
Contact:
Expires: 600
Content-Length: 0

下面附注一下检测的结果:

视频监控安防平台-GB28181-2016版-移动位置订阅_第3张图片


你可能感兴趣的:(视频监控系统平台)