- * Title: processTimeout - *
- *- * Description: - *
- * - * @param timeoutEvent - */ - @Override - public void processTimeout(TimeoutEvent timeoutEvent) { - // TODO Auto-generated method stub - - } - - /** - *- * Title: processIOException - *
- *- * Description: - *
- * - * @param exceptionEvent - */ - @Override - public void processIOException(IOExceptionEvent exceptionEvent) { - // TODO Auto-generated method stub - } - - /** - *- * Title: processTransactionTerminated - *
- *- * Description: - *
- * - * @param transactionTerminatedEvent - */ - @Override - public void processTransactionTerminated(TransactionTerminatedEvent transactionTerminatedEvent) { - // TODO Auto-generated method stub - } - - /** - *- * Title: processDialogTerminated - *
- *- * Description: - *
- * - * @param dialogTerminatedEvent - */ - @Override - public void processDialogTerminated(DialogTerminatedEvent dialogTerminatedEvent) { - // TODO Auto-generated method stub - - } - } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/auth/RegisterLogicHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/auth/RegisterLogicHandler.java index 01b0a129..62d4bec0 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/auth/RegisterLogicHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/auth/RegisterLogicHandler.java @@ -9,7 +9,7 @@ import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; /** - * @Description:注册逻辑处理,当设备注册后触发逻辑。 + * @description:注册逻辑处理,当设备注册后触发逻辑。 * @author: swwheihei * @date: 2020年5月8日 下午9:41:46 */ diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java index bfbf5477..761437fc 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java @@ -109,6 +109,11 @@ public class Device { */ private String charset ; + /** + * 目录订阅周期,0为不订阅 + */ + private int subscribeCycleForCatalog ; + public String getDeviceId() { @@ -270,4 +275,12 @@ public class Device { public void setCharset(String charset) { this.charset = charset; } + + public int getSubscribeCycleForCatalog() { + return subscribeCycleForCatalog; + } + + public void setSubscribeCycleForCatalog(int subscribeCycleForCatalog) { + this.subscribeCycleForCatalog = subscribeCycleForCatalog; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java index aba33924..c6cf7825 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java @@ -1,7 +1,7 @@ package com.genersoft.iot.vmp.gb28181.bean; /** - * @Description: 移动位置bean + * @description: 移动位置bean * @author: lawrencehj * @date: 2021年1月23日 */ diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java index 4ec182af..24fc2212 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordInfo.java @@ -6,14 +6,18 @@ package com.genersoft.iot.vmp.gb28181.bean; import java.util.List; /** - * @Description:设备录像信息bean + * @description:设备录像信息bean * @author: swwheihei * @date: 2020年5月8日 下午2:05:56 */ public class RecordInfo { private String deviceId; - + + private String channelId; + + private String sn; + private String name; private int sumNum; @@ -52,4 +56,19 @@ public class RecordInfo { this.recordList = recordList; } + public String getChannelId() { + return channelId; + } + + public void setChannelId(String channelId) { + this.channelId = channelId; + } + + public String getSn() { + return sn; + } + + public void setSn(String sn) { + this.sn = sn; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java index 1533b664..39f894ce 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RecordItem.java @@ -8,7 +8,7 @@ import java.text.SimpleDateFormat; import java.util.Date; /** - * @Description:设备录像bean + * @description:设备录像bean * @author: swwheihei * @date: 2020年5月8日 下午2:06:54 */ diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java index 60998ea3..e5b57c8b 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/DeviceOffLineDetector.java @@ -7,7 +7,7 @@ import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.utils.redis.RedisUtil; /** - * @Description:设备离在线状态检测器,用于检测设备状态 + * @description:设备离在线状态检测器,用于检测设备状态 * @author: swwheihei * @date: 2020年5月13日 下午2:40:29 */ diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java index 04229621..33d6dd43 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java @@ -13,7 +13,7 @@ import com.genersoft.iot.vmp.gb28181.event.offline.OfflineEvent; import com.genersoft.iot.vmp.gb28181.event.online.OnlineEvent; /** - * @Description:Event事件通知推送器,支持推送在线事件、离线事件 + * @description:Event事件通知推送器,支持推送在线事件、离线事件 * @author: swwheihei * @date: 2020年5月6日 上午11:30:50 */ diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java index e00a59fc..f341548e 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java @@ -1,38 +1,127 @@ package com.genersoft.iot.vmp.gb28181.event; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import javax.sip.ResponseEvent; +import javax.sip.*; +import javax.sip.header.CallIdHeader; +import javax.sip.message.Response; +import java.util.Calendar; +import java.util.Date; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @Component public class SipSubscribe { + private final Logger logger = LoggerFactory.getLogger(SipSubscribe.class); + private Map{
- if (responseEvent.getResponse().getStatusCode() == Response.OK) {
+ sipSubscribe.addOkSubscribe(callId, (SipSubscribe.EventResult eventResult) ->{
+ if (eventResult.statusCode == Response.OK) {
// 收到心跳响应信息,
parentPlatformCatch.setKeepAliveReply(0);
redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java
index 0b4bc886..20950ca2 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java
@@ -19,7 +19,7 @@ import org.springframework.stereotype.Component;
import java.util.*;
/**
- * @Description: 平台未注册事件,来源有二:
+ * @description: 平台未注册事件,来源有二:
* 1、平台新添加
* 2、平台心跳超时
* @author: panll
@@ -100,6 +100,6 @@ public class PlatformNotRegisterEventLister implements ApplicationListener