GB28181协议实现系列之----IPC设备目录查询(3)

设备目录查询是国标平台对国标设备接入的目录查询,目的是查询该设备带有的监控点和报警设备信息以及语言设备信息。

         GB28181协议实现系列之----IPC设备目录查询(3)

1.       SIP服务器首先发起请求要求查询设备目录,发送的协议体可以参考数据包。

2.       IPC收到设备的目录查询信息之后回复200OK。

3.       IPC向SIP服务器上报IPC的设备目录,以XML的协议体为目录信息:

<?xmlversion="1.0"?>

<Response>

  <CmdType>Catalog</CmdType>

  <SN>248</SN>

 <DeviceID>34020000001320000001</DeviceID>

  <SumNum>1</SumNum>

  <DeviceList Num="1">

    <Item>

     <DeviceID>34020000001320000001</DeviceID>

      <Name>IPCamera</Name>

      <Manufacturer>IPCameraCompany</Manufacturer>

      <Model>PAN_QZ</Model>

      <Owner>IPCameraCompany</Owner>

     <CivilCode>34020000</CivilCode>

      <Address>Address</Address>

      <Parental>0</Parental>

      <SafetyWay>0</SafetyWay>

      <RegisterWay>1</RegisterWay>

      <Secrecy>0</Secrecy>

     <IPAddress>192.168.1.164</IPAddress>

      <Port>80</Port>

      <Password>9999</Password>

      <Status>ON</Status>

    </Item>

  </DeviceList>

</Response>

4.       网页弹出的界面显示设备目录信息如下:

GB28181协议实现系列之----IPC设备目录查询(3)


SIP交互数据(4次数据交互):

 

MESSAGE sip:[email protected]/2.0

Call-ID: [email protected]

CSeq: 1 MESSAGE

From:<sip:[email protected]>;tag=03833219_53173353_41afe263-c634-4962-916c-579a717a3435

To:<sip:[email protected]>

Max-Forwards: 70

Content-Type: Application/MANSCDP+xml

Route:<sip:[email protected]:5060;lr>

Via: SIP/2.0/UDP192.168.1.154:5060;branch=z9hG4bK41afe263-c634-4962-916c-579a717a3435_53173353_9738104298451

Content-Length: 125

 

<?xml version="1.0"?>

<Query>

<CmdType>Catalog</CmdType>

<SN>248</SN>

<DeviceID>34020000001320000001</DeviceID>

</Query>

SIP/2.0 200 OK

Via: SIP/2.0/UDP192.168.1.154:5060;branch=z9hG4bK41afe263-c634-4962-916c-579a717a3435_53173353_9738104298451

From:<sip:[email protected]>;tag=03833219_53173353_41afe263-c634-4962-916c-579a717a3435

To:<sip:[email protected]>;tag=153980316

Call-ID:[email protected]

CSeq: 1 MESSAGE

User-Agent: IPC  v1.0

Content-Length: 0

 

 

MESSAGEsip:[email protected]:5060 SIP/2.0

Via: SIP/2.0/UDP192.168.1.168:5060;rport=5060;branch=z9hG4bK250059858;received=192.168.1.168

From:<sip:[email protected]>;tag=1446330830

To:<sip:[email protected]:5060>

Call-ID: 959221034

CSeq: 20 MESSAGE

Content-Type: Application/MANSCDP+xml

Max-Forwards: 70

User-Agent: IPC  v1.0

Content-Length: 716

 

<?xml version="1.0"?>

<Response>

 <CmdType>Catalog</CmdType>

 <SN>248</SN>

 <DeviceID>34020000001320000001</DeviceID>

 <SumNum>1</SumNum>

 <DeviceList Num="1">

   <Item>

      <DeviceID>34020000001320000001</DeviceID>

     <Name>panorama camera</Name>

     <Manufacturer>AVIC BIT</Manufacturer>

     <Model>BY360</Model>

     <Owner>AVIC BIT</Owner>

     <CivilCode>34020000</CivilCode>

     <Address>Address</Address>

     <Parental>0</Parental>

     <SafetyWay>0</SafetyWay>

     <RegisterWay>1</RegisterWay>

     <Secrecy>0</Secrecy>

     <IPAddress>192.168.1.168</IPAddress>

     <Port>80</Port>

     <Password>9999</Password>

     <Status>ON</Status>

   </Item>

 </DeviceList>

</Response>

 

SIP/2.0 200 OK

To:<sip:[email protected]:5060>;tag=42936228_53173353_71eada17-b544-4355-8660-fd5692a15aca

Via: SIP/2.0/UDP192.168.1.168:5060;rport=5060;branch=z9hG4bK250059858;received=192.168.1.168

CSeq: 20 MESSAGE

Call-ID: 959221034

From:<sip:[email protected]>;tag=1446330830

Content-Length: 0