From 0984290ca2a75cf0316c3ca312bf8026b4edcf3e Mon Sep 17 00:00:00 2001 From: xiaoxie <hotcoffie@163.com> Date: 星期三, 01 十二月 2021 22:45:38 +0800 Subject: [PATCH] 继续优化docker配置: 1.启动命令增加ASSIST_JVM_CONFIG和WVP_JVM_CONFIG两个字段,方便配置JVM参数 2.修复一处错误,application.yml media.stream-ip的值应该等于media.ip而不是之前的sip.ip --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 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 c781a09..56ba0ba 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,5 @@ package com.genersoft.iot.vmp.gb28181.transmit.cmd.impl; -import com.genersoft.iot.vmp.conf.MediaConfig; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; @@ -12,7 +11,6 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Lazy; import org.springframework.lang.Nullable; @@ -23,8 +21,6 @@ import javax.sip.header.WWWAuthenticateHeader; import javax.sip.message.Request; import java.text.ParseException; -import java.util.Timer; -import java.util.TimerTask; import java.util.UUID; @Component @@ -85,7 +81,7 @@ 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 +91,8 @@ 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 +110,7 @@ }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); @@ -267,10 +263,10 @@ deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); deviceInfoXml.append("<SN>" +sn + "</SN>\r\n"); deviceInfoXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n"); - deviceInfoXml.append("<DeviceName>WVP-GB28181</DeviceName>\r\n"); - deviceInfoXml.append("<Manufacturer>WVP</Manufacturer>\r\n"); + deviceInfoXml.append("<DeviceName>" + parentPlatform.getName() + "</DeviceName>\r\n"); + deviceInfoXml.append("<Manufacturer>wvp</Manufacturer>\r\n"); deviceInfoXml.append("<Model>wvp-28181-2.0</Model>\r\n"); - deviceInfoXml.append("<Firmware>2.0.202103</Firmware>\r\n"); + deviceInfoXml.append("<Firmware>2.0.202107</Firmware>\r\n"); deviceInfoXml.append("<Result>OK</Result>\r\n"); deviceInfoXml.append("</Response>\r\n"); -- Gitblit v1.8.0