From 858093fe9a1c23d2be22ecb75ceab1139931454e Mon Sep 17 00:00:00 2001 From: 64850858 <648540858@qq.com> Date: Wed, 9 Jun 2021 10:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=A0=87=E7=BA=A7=E8=81=94=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=A4=A7=E5=8D=8ENVR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/cmd/impl/SIPCommanderFroPlatform.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 c781a093..795d0eb7 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 @@ -85,7 +85,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { public boolean register(ParentPlatform parentPlatform, @Nullable String callId, @Nullable WWWAuthenticateHeader www, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) { try { Request request = null; - + String tm = Long.toString(System.currentTimeMillis()); if (www == null ) { // //callid CallIdHeader callIdHeader = null; @@ -95,7 +95,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { if(parentPlatform.getTransport().equals("UDP")) { callIdHeader = udpSipProvider.getNewCallId(); } - request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, 1L, null, null, callIdHeader); + + request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, 1L, "FromRegister" + tm, null, callIdHeader); // 将 callid 写入缓存, 等注册成功可以更新状态 redisCatchStorage.updatePlatformRegisterInfo(callIdHeader.getCallId(), parentPlatform.getServerGBId()); @@ -113,8 +114,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { }else { CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() : udpSipProvider.getNewCallId(); - - request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, null, null, callId, www, callIdHeader); + request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, "FromRegister" + tm, null, callId, www, callIdHeader); } transmitRequest(parentPlatform, request, null, okEvent);