diff --git a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java index 8ab34bf4..48f1af51 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java @@ -14,6 +14,9 @@ public class MediaConfig { @Value("${media.hookIp:${sip.ip}}") private String hookIp; + @Value("${sip.ip}") + private String sipIp; + @Value("${media.sdpIp:${media.ip}}") private String sdpIp; @@ -68,7 +71,12 @@ public class MediaConfig { } public String getHookIp() { - return hookIp; + if (StringUtils.isEmpty(hookIp)){ + return sipIp; + }else { + return hookIp; + } + } public void setHookIp(String hookIp) { @@ -76,7 +84,11 @@ public class MediaConfig { } public String getSdpIp() { - return sdpIp; + if (StringUtils.isEmpty(sdpIp)){ + return ip; + }else { + return sdpIp; + } } public void setSdpIp(String sdpIp) { @@ -84,7 +96,11 @@ public class MediaConfig { } public String getStreamIp() { - return streamIp; + if (StringUtils.isEmpty(streamIp)){ + return ip; + }else { + return streamIp; + } } public void setStreamIp(String streamIp) { diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index c40a493e..776acbf2 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -149,7 +149,7 @@ public class DeviceQuery { msg.setData(String.format("同步通道失败,错误码: %s, %s", response.getStatusCode(), response.getReasonPhrase())); resultHolder.invokeResult(msg); }); - DeferredResult> result = new DeferredResult>(2*1000L); + DeferredResult> result = new DeferredResult>(15*1000L); result.onTimeout(()->{ logger.warn(String.format("设备通道信息同步超时")); // 释放rtpserver