From 6374a8f2e5829c1fc8d6f1bce49e5f824c69391c Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Mon, 30 Jan 2023 14:25:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=AE=E5=BD=95=E6=8E=A8?=
=?UTF-8?q?=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../cmd/impl/SIPCommanderFroPlatform.java | 286 ++++++++++--------
.../query/cmd/CatalogQueryMessageHandler.java | 6 +-
2 files changed, 165 insertions(+), 127 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
index 620f0ff9..da5c11fa 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.gb28181.transmit.cmd.impl;
import com.alibaba.fastjson2.JSON;
+import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.gb28181.SipLayer;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
@@ -61,6 +62,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
@Autowired
private SIPSender sipSender;
+ @Autowired
+ private DynamicTask dynamicTask;
+
@Override
public void register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException {
register(parentPlatform, null, null, errorEvent, okEvent, false, true);
@@ -109,13 +113,14 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
public String keepalive(ParentPlatform parentPlatform,SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws SipException, InvalidArgumentException, ParseException {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer keepaliveXml = new StringBuffer(200);
- keepaliveXml.append("\r\n");
- keepaliveXml.append("\r\n");
- keepaliveXml.append("Keepalive\r\n");
- keepaliveXml.append("" + (int)((Math.random()*9+1)*100000) + "\r\n");
- keepaliveXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- keepaliveXml.append("OK\r\n");
- keepaliveXml.append("\r\n");
+ keepaliveXml.append("\r\n")
+ .append("\r\n")
+ .append("Keepalive\r\n")
+ .append("" + (int)((Math.random()*9+1)*100000) + "\r\n")
+ .append("" + parentPlatform.getDeviceGBId() + "\r\n")
+ .append("OK\r\n")
+ .append("\r\n");
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
@@ -133,7 +138,6 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
* 向上级回复通道信息
* @param channel 通道信息
* @param parentPlatform 平台信息
- * @return
*/
@Override
public void catalogQuery(DeviceChannel channel, ParentPlatform parentPlatform, String sn, String fromTag, int size) throws SipException, InvalidArgumentException, ParseException {
@@ -160,18 +164,18 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
if ( parentPlatform ==null) {
return ;
}
- sendCatalogResponse(channels, parentPlatform, sn, fromTag, 0);
+ sendCatalogResponse(channels, parentPlatform, sn, fromTag, 0, true);
}
private String getCatalogXml(List channels, String sn, ParentPlatform parentPlatform, int size) {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer catalogXml = new StringBuffer(600);
- catalogXml.append("\r\n");
- catalogXml.append("\r\n");
- catalogXml.append("Catalog\r\n");
- catalogXml.append("" +sn + "\r\n");
- catalogXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- catalogXml.append("" + size + "\r\n");
- catalogXml.append("\r\n");
+ catalogXml.append("\r\n")
+ .append("\r\n")
+ .append("Catalog\r\n")
+ .append("" +sn + "\r\n")
+ .append("" + parentPlatform.getDeviceGBId() + "\r\n")
+ .append("" + size + "\r\n")
+ .append("\r\n");
if (channels.size() > 0) {
for (DeviceChannel channel : channels) {
if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
@@ -222,7 +226,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return catalogXml.toString();
}
- private void sendCatalogResponse(List channels, ParentPlatform parentPlatform, String sn, String fromTag, int index) throws SipException, InvalidArgumentException, ParseException {
+ private void sendCatalogResponse(List channels, ParentPlatform parentPlatform, String sn, String fromTag, int index, boolean sendAfterResponse) throws SipException, InvalidArgumentException, ParseException {
if (index >= channels.size()) {
return;
}
@@ -236,15 +240,49 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
// callid
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
- Request request = headerProviderPlatformProvider.createMessageRequest(parentPlatform, catalogXml, fromTag, SipUtils.getNewViaTag(), callIdHeader);
- sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, null, eventResult -> {
- int indexNext = index + parentPlatform.getCatalogGroup();
- try {
- sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext);
- } catch (SipException | InvalidArgumentException | ParseException e) {
- logger.error("[命令发送失败] 国标级联 目录查询回复: {}", e.getMessage());
- }
- });
+ SIPRequest request = (SIPRequest)headerProviderPlatformProvider.createMessageRequest(parentPlatform, catalogXml, fromTag, SipUtils.getNewViaTag(), callIdHeader);
+
+ String timeoutTaskKey = "catalog_task_" + parentPlatform.getServerGBId() + sn;
+
+ String callId = request.getCallIdHeader().getCallId();
+
+ if (sendAfterResponse) {
+ // 默认按照收到200回复后发送下一条, 如果超时收不到回复,就以30毫秒的间隔直接发送。
+ dynamicTask.startDelay(timeoutTaskKey, ()->{
+ sipSubscribe.removeOkSubscribe(callId);
+ int indexNext = index + parentPlatform.getCatalogGroup();
+ try {
+ sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext, false);
+ } catch (SipException | InvalidArgumentException | ParseException e) {
+ logger.error("[命令发送失败] 国标级联 目录查询回复: {}", e.getMessage());
+ }
+ }, 3000);
+ sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, eventResult -> {
+ logger.error("[目录推送失败] 国标级联 platform : {}, code: {}, msg: {}, 停止发送", parentPlatform.getServerGBId(), eventResult.statusCode, eventResult.msg);
+ dynamicTask.stop(timeoutTaskKey);
+ }, eventResult -> {
+ dynamicTask.stop(timeoutTaskKey);
+ int indexNext = index + parentPlatform.getCatalogGroup();
+ try {
+ sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext, true);
+ } catch (SipException | InvalidArgumentException | ParseException e) {
+ logger.error("[命令发送失败] 国标级联 目录查询回复: {}", e.getMessage());
+ }
+ });
+ }else {
+ sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, eventResult -> {
+ logger.error("[目录推送失败] 国标级联 platform : {}, code: {}, msg: {}, 停止发送", parentPlatform.getServerGBId(), eventResult.statusCode, eventResult.msg);
+ dynamicTask.stop(timeoutTaskKey);
+ }, null);
+ dynamicTask.startDelay(timeoutTaskKey, ()->{
+ int indexNext = index + parentPlatform.getCatalogGroup();
+ try {
+ sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext, false);
+ } catch (SipException | InvalidArgumentException | ParseException e) {
+ logger.error("[命令发送失败] 国标级联 目录查询回复: {}", e.getMessage());
+ }
+ }, 30);
+ }
}
/**
@@ -261,17 +299,17 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
}
String characterSet = parentPlatform.getCharacterSet();
StringBuffer deviceInfoXml = new StringBuffer(600);
- deviceInfoXml.append("\r\n");
- deviceInfoXml.append("\r\n");
- deviceInfoXml.append("DeviceInfo\r\n");
- deviceInfoXml.append("" +sn + "\r\n");
- deviceInfoXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- deviceInfoXml.append("" + parentPlatform.getName() + "\r\n");
- deviceInfoXml.append("wvp\r\n");
- deviceInfoXml.append("wvp-28181-2.0\r\n");
- deviceInfoXml.append("2.0.202107\r\n");
- deviceInfoXml.append("OK\r\n");
- deviceInfoXml.append("\r\n");
+ deviceInfoXml.append("\r\n")
+ .append("\r\n")
+ .append("DeviceInfo\r\n")
+ .append("" +sn + "\r\n")
+ .append("" + parentPlatform.getDeviceGBId() + "\r\n")
+ .append("" + parentPlatform.getName() + "\r\n")
+ .append("wvp\r\n")
+ .append("wvp-28181-2.0\r\n")
+ .append("2.0.202107\r\n")
+ .append("OK\r\n")
+ .append("\r\n");
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
@@ -294,15 +332,15 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
String statusStr = (status==1)?"ONLINE":"OFFLINE";
String characterSet = parentPlatform.getCharacterSet();
StringBuffer deviceStatusXml = new StringBuffer(600);
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("DeviceStatus\r\n");
- deviceStatusXml.append("" +sn + "\r\n");
- deviceStatusXml.append("" + channelId + "\r\n");
- deviceStatusXml.append("OK\r\n");
- deviceStatusXml.append(""+statusStr+"\r\n");
- deviceStatusXml.append("OK\r\n");
- deviceStatusXml.append("\r\n");
+ deviceStatusXml.append("\r\n")
+ .append("\r\n")
+ .append("DeviceStatus\r\n")
+ .append("" +sn + "\r\n")
+ .append("" + channelId + "\r\n")
+ .append("OK\r\n")
+ .append(""+statusStr+"\r\n")
+ .append("OK\r\n")
+ .append("\r\n");
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
@@ -321,18 +359,18 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer deviceStatusXml = new StringBuffer(600);
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("MobilePosition\r\n");
- deviceStatusXml.append("" + (int)((Math.random()*9+1)*100000) + "\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getId() + "\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getLng() + "\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getLat() + "\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getSpeed() + "\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getDirection() + "\r\n");
- deviceStatusXml.append("" + gpsMsgInfo.getAltitude() + "\r\n");
- deviceStatusXml.append("\r\n");
+ deviceStatusXml.append("\r\n")
+ .append("\r\n")
+ .append("MobilePosition\r\n")
+ .append("" + (int)((Math.random()*9+1)*100000) + "\r\n")
+ .append("" + gpsMsgInfo.getId() + "\r\n")
+ .append("\r\n")
+ .append("" + gpsMsgInfo.getLng() + "\r\n")
+ .append("" + gpsMsgInfo.getLat() + "\r\n")
+ .append("" + gpsMsgInfo.getSpeed() + "\r\n")
+ .append("" + gpsMsgInfo.getDirection() + "\r\n")
+ .append("" + gpsMsgInfo.getAltitude() + "\r\n")
+ .append("\r\n");
sendNotify(parentPlatform, deviceStatusXml.toString(), subscribeInfo, eventResult -> {
logger.error("发送NOTIFY通知消息失败。错误:{} {}", eventResult.statusCode, eventResult.msg);
@@ -349,21 +387,21 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
deviceAlarm.getLongitude(), deviceAlarm.getLatitude(), JSON.toJSONString(deviceAlarm));
String characterSet = parentPlatform.getCharacterSet();
StringBuffer deviceStatusXml = new StringBuffer(600);
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("Alarm\r\n");
- deviceStatusXml.append("" + (int)((Math.random()*9+1)*100000) + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getChannelId() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getAlarmPriority() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getAlarmMethod() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getAlarmTime() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getAlarmDescription() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getLongitude() + "\r\n");
- deviceStatusXml.append("" + deviceAlarm.getLatitude() + "\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("" + deviceAlarm.getAlarmType() + "\r\n");
- deviceStatusXml.append("\r\n");
- deviceStatusXml.append("\r\n");
+ deviceStatusXml.append("\r\n")
+ .append("\r\n")
+ .append("Alarm\r\n")
+ .append("" + (int)((Math.random()*9+1)*100000) + "\r\n")
+ .append("" + deviceAlarm.getChannelId() + "\r\n")
+ .append("" + deviceAlarm.getAlarmPriority() + "\r\n")
+ .append("" + deviceAlarm.getAlarmMethod() + "\r\n")
+ .append("" + deviceAlarm.getAlarmTime() + "\r\n")
+ .append("" + deviceAlarm.getAlarmDescription() + "\r\n")
+ .append("" + deviceAlarm.getLongitude() + "\r\n")
+ .append("" + deviceAlarm.getLatitude() + "\r\n")
+ .append("\r\n")
+ .append("" + deviceAlarm.getAlarmType() + "\r\n")
+ .append("\r\n")
+ .append("\r\n");
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
@@ -422,13 +460,13 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
StringBuffer catalogXml = new StringBuffer(600);
String characterSet = parentPlatform.getCharacterSet();
- catalogXml.append("\r\n");
- catalogXml.append("\r\n");
- catalogXml.append("Catalog\r\n");
- catalogXml.append("" + (int) ((Math.random() * 9 + 1) * 100000) + "\r\n");
- catalogXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- catalogXml.append("1\r\n");
- catalogXml.append("\r\n");
+ catalogXml.append("\r\n")
+ .append("\r\n")
+ .append("Catalog\r\n")
+ .append("" + (int) ((Math.random() * 9 + 1) * 100000) + "\r\n")
+ .append("" + parentPlatform.getDeviceGBId() + "\r\n")
+ .append("1\r\n")
+ .append("\r\n");
if (channels.size() > 0) {
for (DeviceChannel channel : channels) {
if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
@@ -449,16 +487,16 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
catalogXml.append("" + channel.getParental() + "\r\n");
if (channel.getParental() == 0) {
// 通道项
- catalogXml.append("" + channel.getManufacture() + "\r\n");
- catalogXml.append("" + channel.getSecrecy() + "\r\n");
- catalogXml.append("" + channel.getRegisterWay() + "\r\n");
- catalogXml.append("" + (channel.getStatus() == 0 ? "OFF" : "ON") + "\r\n");
+ catalogXml.append("" + channel.getManufacture() + "\r\n")
+ .append("" + channel.getSecrecy() + "\r\n")
+ .append("" + channel.getRegisterWay() + "\r\n")
+ .append("" + (channel.getStatus() == 0 ? "OFF" : "ON") + "\r\n");
if (channel.getChannelType() != 2) { // 业务分组/虚拟组织/行政区划 不设置以下属性
- catalogXml.append("" + channel.getModel() + "\r\n");
- catalogXml.append(" " + channel.getOwner()+ "\r\n");
- catalogXml.append("" + channel.getCivilCode() + "\r\n");
- catalogXml.append("" + channel.getAddress() + "\r\n");
+ catalogXml.append("" + channel.getModel() + "\r\n")
+ .append(" " + channel.getOwner()+ "\r\n")
+ .append("" + channel.getCivilCode() + "\r\n")
+ .append("" + channel.getAddress() + "\r\n");
}
if (!"presence".equals(subscribeInfo.getEventType())) {
catalogXml.append("" + type + "\r\n");
@@ -468,8 +506,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
catalogXml.append("\r\n");
}
}
- catalogXml.append("\r\n");
- catalogXml.append("\r\n");
+ catalogXml.append("\r\n")
+ .append("\r\n");
return catalogXml.toString();
}
@@ -515,26 +553,26 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer catalogXml = new StringBuffer(600);
- catalogXml.append("\r\n");
- catalogXml.append("\r\n");
- catalogXml.append("Catalog\r\n");
- catalogXml.append("" + (int) ((Math.random() * 9 + 1) * 100000) + "\r\n");
- catalogXml.append("" + parentPlatform.getDeviceGBId() + "\r\n");
- catalogXml.append("1\r\n");
- catalogXml.append("\r\n");
+ catalogXml.append("\r\n")
+ .append("\r\n")
+ .append("Catalog\r\n")
+ .append("" + (int) ((Math.random() * 9 + 1) * 100000) + "\r\n")
+ .append("" + parentPlatform.getDeviceGBId() + "\r\n")
+ .append("1\r\n")
+ .append("\r\n");
if (channels.size() > 0) {
for (DeviceChannel channel : channels) {
if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
channel.setParentId(parentPlatform.getDeviceGBId());
}
- catalogXml.append("- \r\n");
- catalogXml.append("" + channel.getChannelId() + "\r\n");
- catalogXml.append("" + type + "\r\n");
- catalogXml.append("
\r\n");
+ catalogXml.append("- \r\n")
+ .append("" + channel.getChannelId() + "\r\n")
+ .append("" + type + "\r\n")
+ .append("
\r\n");
}
}
- catalogXml.append("\r\n");
- catalogXml.append("\r\n");
+ catalogXml.append("\r\n")
+ .append("\r\n");
return catalogXml.toString();
}
@Override
@@ -544,12 +582,12 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
}
String characterSet = parentPlatform.getCharacterSet();
StringBuffer recordXml = new StringBuffer(600);
- recordXml.append("\r\n");
- recordXml.append("\r\n");
- recordXml.append("RecordInfo\r\n");
- recordXml.append("" +recordInfo.getSn() + "\r\n");
- recordXml.append("" + recordInfo.getDeviceId() + "\r\n");
- recordXml.append("" + recordInfo.getSumNum() + "\r\n");
+ recordXml.append("\r\n")
+ .append("\r\n")
+ .append("RecordInfo\r\n")
+ .append("" +recordInfo.getSn() + "\r\n")
+ .append("" + recordInfo.getDeviceId() + "\r\n")
+ .append("" + recordInfo.getSumNum() + "\r\n");
if (recordInfo.getRecordList() == null ) {
recordXml.append("\r\n");
}else {
@@ -558,12 +596,12 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
for (RecordItem recordItem : recordInfo.getRecordList()) {
recordXml.append("- \r\n");
if (deviceChannel != null) {
- recordXml.append("" + recordItem.getDeviceId() + "\r\n");
- recordXml.append("" + recordItem.getName() + "\r\n");
- recordXml.append("" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(recordItem.getStartTime()) + "\r\n");
- recordXml.append("" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(recordItem.getEndTime()) + "\r\n");
- recordXml.append("" + recordItem.getSecrecy() + "\r\n");
- recordXml.append("" + recordItem.getType() + "\r\n");
+ recordXml.append("" + recordItem.getDeviceId() + "\r\n")
+ .append("" + recordItem.getName() + "\r\n")
+ .append("" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(recordItem.getStartTime()) + "\r\n")
+ .append("" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(recordItem.getEndTime()) + "\r\n")
+ .append("" + recordItem.getSecrecy() + "\r\n")
+ .append("" + recordItem.getType() + "\r\n");
if (!ObjectUtils.isEmpty(recordItem.getFileSize())) {
recordXml.append("" + recordItem.getFileSize() + "\r\n");
}
@@ -576,8 +614,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
}
}
- recordXml.append("
\r\n");
- recordXml.append("\r\n");
+ recordXml.append("\r\n")
+ .append("\r\n");
// callid
CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport());
@@ -596,13 +634,13 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer mediaStatusXml = new StringBuffer(200);
- mediaStatusXml.append("\r\n");
- mediaStatusXml.append("\r\n");
- mediaStatusXml.append("MediaStatus\r\n");
- mediaStatusXml.append("" + (int)((Math.random()*9+1)*100000) + "\r\n");
- mediaStatusXml.append("" + sendRtpItem.getChannelId() + "\r\n");
- mediaStatusXml.append("121\r\n");
- mediaStatusXml.append("\r\n");
+ mediaStatusXml.append("\r\n")
+ .append("\r\n")
+ .append("MediaStatus\r\n")
+ .append("" + (int)((Math.random()*9+1)*100000) + "\r\n")
+ .append("" + sendRtpItem.getChannelId() + "\r\n")
+ .append("121\r\n")
+ .append("\r\n");
SIPRequest messageRequest = (SIPRequest)headerProviderPlatformProvider.createMessageRequest(parentPlatform, mediaStatusXml.toString(),
sendRtpItem);
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
index cb1e7ae3..25a3df37 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/query/cmd/CatalogQueryMessageHandler.java
@@ -1,9 +1,10 @@
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
import com.genersoft.iot.vmp.conf.SipConfig;
-import com.genersoft.iot.vmp.gb28181.bean.*;
+import com.genersoft.iot.vmp.gb28181.bean.Device;
+import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
+import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
-import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
@@ -63,7 +64,6 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
@Override
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
- String key = DeferredResultHolder.CALLBACK_CMD_CATALOG + parentPlatform.getServerGBId();
FromHeader fromHeader = (FromHeader) evt.getRequest().getHeader(FromHeader.NAME);
try {
// 回复200 OK