28181平台对接接口详解
扫地
1 信令接口
龙钟是什么意思1.1 平台注册
下级平台主动向上级平台注册;
注册鉴权信息(用户名和密码)由上级提供;
举例说明:
下级--->上级
REGISTER sip:6200001负质量@:7100 SIP/
春节横幅标语
Call-ID: c82dee890ea56d9d332fe4a5dbd2772c@
CSeq: 1 REGISTER
From: <sip:6200001@:5080>;tag=5923_661_2647061
To: <sip:6200001@:5080>
Max-Forwards: 70
Contact: <sip:6200001@:5080>
Expires: 3600
Via: SIP/UDP :5080;branch=z9hG4bK2647061_661_0081
Content-Length: 0
上级--->下级
丁文涛SIP/ 401 Unauthorized
Via: SIP/UDP :5080;branch=z9hG4bK2647061_661_0081
From: <sip:6200001@:5080>;tag=5923_661_2647061
To: <sip:6200001@:5080>;tag=9
Call-ID: c82dee890ea56d9d332fe4a5dbd2772c@
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="1234", nonce="7104983f5477dd30a65167b28553df65", opaque="f10efb1af3e8a362bcda73ce", algorithm=MD5
Ur-Agent: Hikvision
Expires: 3600
Content-Length: 0
下级--->上级
美国科幻电影大全REGISTER sip:6200001@:7100 SIP/
Call-ID: c82dee890ea56d9d332fe4a5dbd2772c@
CSeq: 2 REGISTER
From: <sip:6200001@:5080>;tag=5923_661_2647061
To: <sip:6200001@:5080>
Max-Forwards: 70
Contact: <sip:6200001@:5080>
Via: SIP/UDP :5080;branch=z9hG4bK2647061_661_5136301
Authorization: Digest urname="admin",realm="1234",nonce="7104983f5477dd30a65167b28553df65",uri="sip:6200001@:7100",respon="ceb3a5fb0c6d66d24a7e77b5",algorithm=MD5,opaque="f10efb1af3e8a362bcda73ce"
Expires: 3600
Content-Length: 0
上级--->下级
SIP/ 200 OK
Via: SIP/UDP :5080;branch=z9hG4bK2647061_661_5136301
From: <sip:6200001@:5080>;tag=5923_661_2647061
To: <sip:6200001@:5080>;tag=9
Call-ID: c82dee890ea56d9d332fe4a5dbd2772c@
CSeq: 2 REGISTER
Contact: <sip:6200001@:5080>
Ur-Agent: Hikvision
Date: 2013-07-27T14:45:39
Content-Length: 0
1.2 平台心跳保活
下级平台定期向上级平台发心跳消息;
定期时间可配置,上下级配置一致;
上级平台连续三次未收到下级心跳消息,则认为下级平台离线;
下级平台连续三次未收到心跳响应,则认为上级平台离线;
举例说明:
下级--->上级
MESSAGE sip:6200001@:7100 SIP/
Call-ID: 69c20964c5c9a8f0cc6cc5a7381423d5@
CSeq: 1 MESSAGE
From: <sip:6200001@>;tag=0673_661_2850021
To: <sip:6200001@>
Max-Forwards: 70
Content-Type: application/Xml
Via: SIP/UDP :5080;branch=z9hG4bK2850021_661_4200
Content-Length: 138
<xml version="" >
<Notify>
<CmdType>Keepalive</CmdType>
<SN>43</SN>
<DeviceID>6200001</DeviceID>
<Status>OK</Status>
</Notify>
上级--->下级
SIP/ 200 OK
Via: SIP/UDP :5080;branch=z9hG4bK2850021_661_4200文章线索
From: <sip:6200001@>;tag=0673_661_2850021
To: <sip:6200001@>;tag=22
Call-ID: 69c20964c5c9a8f0cc6cc5a7381423d5@
CSeq: 1 MESSAGE
Content-Length: 0
1.3 平台设备共享
下级平台将设备共享给上级平台,共享关系临时保存在本地数据库;
下级平台收到上级平台的目录查询消息时,返回共享给该上级平台的所有共享设备信息;
上级平台收到目录查询响应结果后,根据设备编码或自定义方式给设备建立目录;
上级平台最好支持定期查询目录和手动查询目录功能,以便及时获取到下级平台新共享的设备;
举例说明
电脑护眼上级--->下级
MESSAGE sip:6200001@:5080 SIP/
Via: SIP/UDP :7100;rport;branch=z9hG4bK66