From eaccb1630b277d2465dc0c53b6d76134afbc3cc7 Mon Sep 17 00:00:00 2001 From: zxb <919411476@qq.com> Date: Tue, 5 Sep 2023 11:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=A0=87=E7=BA=A7=E8=81=94=20?= =?UTF-8?q?=E7=BB=AD=E8=AE=A2=E5=A4=B1=E8=B4=A5=E4=B8=8D=E8=A6=81=E4=B8=BB?= =?UTF-8?q?=E5=8A=A8=E6=96=AD=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/gb28181/bean/SipTransactionInfo.java | 1 - .../transmit/event/request/impl/RegisterRequestProcessor.java | 3 ++- .../genersoft/iot/vmp/service/impl/PlatformServiceImpl.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SipTransactionInfo.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SipTransactionInfo.java index c04a6959..bd16f161 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SipTransactionInfo.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/SipTransactionInfo.java @@ -1,6 +1,5 @@ package com.genersoft.iot.vmp.gb28181.bean; -import gov.nist.javax.sip.message.SIPRequest; import gov.nist.javax.sip.message.SIPResponse; public class SipTransactionInfo { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java index 30c3be22..a60a36a3 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java @@ -48,7 +48,7 @@ import java.util.Locale; @RequiredArgsConstructor public class RegisterRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor { public static final String METHOD = "REGISTER"; - + private final SipConfig sipConfig; private final SIPProcessorObserver sipProcessorObserver; @@ -215,6 +215,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen GbSipDate gbSipDate = new GbSipDate(Calendar.getInstance(Locale.ENGLISH).getTimeInMillis()); dateHeader.setDate(gbSipDate); response.addHeader(dateHeader); + log.debug("dateHeader => {}",dateHeader); // 添加Contact头 response.addHeader(request.getHeader(ContactHeader.NAME)); diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java index b75b4771..9fba55d0 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java @@ -274,7 +274,8 @@ public class PlatformServiceImpl implements IPlatformService { commanderForPlatform.register(parentPlatform, sipTransactionInfo, eventResult -> { logger.info("[国标级联] 平台:{}注册失败,{}:{}", parentPlatform.getServerGBId(), eventResult.statusCode, eventResult.msg); - offline(parentPlatform, false); + // 国标级联 续订失败不要主动断开 + // offline(parentPlatform, false); }, null); } catch (InvalidArgumentException | ParseException | SipException e) { logger.error("[命令发送失败] 国标级联定时注册: {}", e.getMessage());