28181接入网关查询NVR录像文件

2 篇文章 0 订阅

使用公安spvmn的调测软件测试,下发如下命令:

<?xml version="1.0"?>
<Query>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001110000001</DeviceID>
<StartTime>2016-05-11T19:46:17</StartTime>
<EndTime>2016-05-12T19:46:17</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Query>

为了方便我将nvr的ID改为111,按编码规则应该是118,发送上述命令后,设备返回:

MESSAGE sip:34020000001310000001@34020000 SIP/2.0
Call-ID: 476f5bf59ea9c50a629d97729192d340@0.0.0.0
CSeq: 1 MESSAGE
From: <sip:34020000002000000001@34020000>;tag=60103465_53173353_1f01e42a-5ce4-4790-9243-7e7901a6f01c
To: <sip:34020000001310000001@34020000>
Max-Forwards: 70
Content-Type: Application/MANSCDP+xml
Route: <sip:34020000001310000001@10.60.1.245:5060;lr>
Via: SIP/2.0/UDP 10.60.1.189:5060;branch=z9hG4bK1f01e42a-5ce4-4790-9243-7e7901a6f01c_53173353_7406162174963
Content-Length: 255

<?xml version="1.0"?>
<Query>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001110000001</DeviceID>
<StartTime>2016-05-11T19:46:17</StartTime>
<EndTime>2016-05-12T19:46:17</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Query>
SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 10.60.1.189:5060;branch=z9hG4bK1f01e42a-5ce4-4790-9243-7e7901a6f01c_53173353_7406162174963
From: <sip:34020000002000000001@34020000>;tag=60103465_53173353_1f01e42a-5ce4-4790-9243-7e7901a6f01c
To: <sip:34020000001310000001@34020000>;tag=404651674
Call-ID: 476f5bf59ea9c50a629d97729192d340@0.0.0.0
CSeq: 1 MESSAGE
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0

设备回了一个不能识别,说明这样发送是有点问题的,NVR绑定了两个IPC,需要设置通道编码ID,查录像文件应该是按通道ID来查,而不是按NVR,不然会出错。


不是发NVR的id,而是发送通道ID,往哪里发呢,当然是往NVR的地址了,具体如下:

<?xml version="1.0"?>
<Query>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001310000004</DeviceID>
<StartTime>2016-05-11T19:46:17</StartTime>
<EndTime>2016-05-12T19:46:17</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Query>

设备返回:
MESSAGE sip:34020000001310000001@34020000 SIP/2.0
Call-ID: f79c14a8538a96e8111d88ad383022bd@0.0.0.0
CSeq: 1 MESSAGE
From: <sip:34020000002000000001@34020000>;tag=84598796_53173353_1f01e42a-5ce4-4790-9243-7e7901a6f01c
To: <sip:34020000001310000001@34020000>
Max-Forwards: 70
Content-Type: Application/MANSCDP+xml
Route: <sip:34020000001310000001@10.60.1.245:5060;lr>
Via: SIP/2.0/UDP 10.60.1.189:5060;branch=z9hG4bK1f01e42a-5ce4-4790-9243-7e7901a6f01c_53173353_7887086612904
Content-Length: 255

<?xml version="1.0"?>
<Query>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001310000004</DeviceID>
<StartTime>2016-05-11T19:46:17</StartTime>
<EndTime>2016-05-12T19:46:17</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Query>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.60.1.189:5060;branch=z9hG4bK1f01e42a-5ce4-4790-9243-7e7901a6f01c_53173353_7887086612904
From: <sip:34020000002000000001@34020000>;tag=84598796_53173353_1f01e42a-5ce4-4790-9243-7e7901a6f01c
To: <sip:34020000001310000001@34020000>;tag=463233309
Call-ID: f79c14a8538a96e8111d88ad383022bd@0.0.0.0
CSeq: 1 MESSAGE
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 0


MESSAGE sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 10.60.1.245:5060;rport=5060;branch=z9hG4bK1291769096;received=10.60.1.245
From: <sip:34020000001110000001@3402000000>;tag=536001771
To: <sip:34020000002000000001@3402000000>
Call-ID: 1953755354
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 2964

<?xml version="1.0"?>
<Response>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<SumNum>15</SumNum>
<RecordList Num="10">
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462966268_1462968241</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T19:31:08</StartTime>
<EndTime>2016-05-11T20:04:01</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462968250_1462971411</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T20:04:10</StartTime>
<EndTime>2016-05-11T20:56:51</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462971418_1462971796</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T20:56:58</StartTime>
<EndTime>2016-05-11T21:03:16</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462971736_1462971791</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T21:02:16</StartTime>
<EndTime>2016-05-11T21:03:11</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462971858_1462975248</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T21:04:18</StartTime>
<EndTime>2016-05-11T22:00:48</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462975253_1462978311</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T22:00:53</StartTime>
<EndTime>2016-05-11T22:51:51</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462978317_1462980934</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T22:51:57</StartTime>
<EndTime>2016-05-11T23:35:34</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462980941_1462984455</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-11T23:35:41</StartTime>
<EndTime>2016-05-12T00:34:15</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462984461_1462988287</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T00:34:21</StartTime>
<EndTime>2016-05-12T01:38:07</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462988296_1462992080</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T01:38:16</StartTime>
<EndTime>2016-05-12T02:41:20</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
</RecordList>
</Response>

SIP/2.0 200 OK
To: <sip:34020000002000000001@3402000000>;tag=19640308_53173353_362b2cba-f607-44f6-a970-7671a73bc4ef
Via: SIP/2.0/UDP 10.60.1.245:5060;rport=5060;branch=z9hG4bK1291769096;received=10.60.1.245
CSeq: 20 MESSAGE
Call-ID: 1953755354
From: <sip:34020000001110000001@3402000000>;tag=536001771
Content-Length: 0


MESSAGE sip:34020000002000000001@3402000000 SIP/2.0
Via: SIP/2.0/UDP 10.60.1.245:5060;rport=5060;branch=z9hG4bK1023085277;received=10.60.1.245
From: <sip:34020000001110000001@3402000000>;tag=1951781126
To: <sip:34020000002000000001@3402000000>
Call-ID: 1296376675
CSeq: 20 MESSAGE
Content-Type: Application/MANSCDP+xml
Max-Forwards: 70
User-Agent: Embedded Net DVR/NVR/DVS
Content-Length: 1588

<?xml version="1.0"?>
<Response>
<CmdType>RecordInfo</CmdType>
<SN>17430</SN>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<SumNum>15</SumNum>
<RecordList Num="5">
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462992081_1462995940</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T02:41:21</StartTime>
<EndTime>2016-05-12T03:45:40</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462995949_1462999775</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T03:45:49</StartTime>
<EndTime>2016-05-12T04:49:35</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1462999783_1463003096</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T04:49:43</StartTime>
<EndTime>2016-05-12T05:44:56</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1463003096_1463015058</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T05:44:56</StartTime>
<EndTime>2016-05-12T09:04:18</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
<Item>
<DeviceID>34020000001310000004</DeviceID>
<Name>IPCamera 01</Name>
<FilePath>1463015058_1463020210</FilePath>
<Address>Address 1</Address>
<StartTime>2016-05-12T09:04:18</StartTime>
<EndTime>2016-05-12T10:30:10</EndTime>
<Secrecy>0</Secrecy>
<Type>time</Type>
</Item>
</RecordList>
</Response>

SIP/2.0 200 OK
To: <sip:34020000002000000001@3402000000>;tag=34859437_53173353_272146f9-97d1-4332-8f56-10a9088fd18a
Via: SIP/2.0/UDP 10.60.1.245:5060;rport=5060;branch=z9hG4bK1023085277;received=10.60.1.245
CSeq: 20 MESSAGE
Call-ID: 1296376675
From: <sip:34020000001110000001@3402000000>;tag=1951781126
Content-Length: 0

这样就可以查到NVR的录像文件了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值