From a45fab423bab8e0ce6f1d2a270dfa19a6130193f Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 5 Jun 2023 15:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BD=E6=A0=87=E7=BA=A7?= =?UTF-8?q?=E8=81=94=E8=AF=AD=E9=9F=B3=E5=AF=B9=E8=AE=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/request/impl/InviteRequestProcessor.java | 2 ++ .../vmp/service/impl/MediaServerServiceImpl.java | 2 +- .../iot/vmp/service/impl/PlatformServiceImpl.java | 14 ++++++++++---- web_src/config/index.js | 4 ++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java index 97880a8b..da4086d9 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java @@ -926,6 +926,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements if (device == null) { device = storager.queryVideoDeviceByChannelId(requesterId); realChannelId = requesterId; + }else { + realChannelId = channelId; } if (device == null) { // 检查channelID是否可用 diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index cdec462f..8eef0d15 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -161,7 +161,7 @@ public class MediaServerServiceImpl implements IMediaServerService { @Override public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String ssrc, boolean ssrcCheck, boolean isPlayback, Integer port, Boolean onlyAuto) { - return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, null, null); + return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, port, onlyAuto, null, 0); } 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 b5d0d713..9ebe7896 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 @@ -458,7 +458,15 @@ public class PlatformServiceImpl implements IPlatformService { } // 默认不进行SSRC校验, TODO 后续可改为配置 boolean ssrcCheck = false; - SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, ssrcCheck, false, null, true); + int tcpMode; + if (userSetting.getBroadcastForPlatform().equalsIgnoreCase("TCP-PASSIVE")) { + tcpMode = 1; + }else if (userSetting.getBroadcastForPlatform().equalsIgnoreCase("TCP-ACTIVE")) { + tcpMode = 2; + } else { + tcpMode = 0; + } + SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, ssrcCheck, false, null, true, false, tcpMode); if (ssrcInfo == null || ssrcInfo.getPort() < 0) { logger.info("[国标级联] 发起语音喊话 开启端口监听失败, platform: {}, channel: {}", platform.getServerGBId(), channelId); SipSubscribe.EventResult eventResult = new SipSubscribe.EventResult<>(); @@ -546,9 +554,7 @@ public class PlatformServiceImpl implements IPlatformService { // 关闭rtp server mediaServerService.closeRTPServer(mediaServerItem, ssrcInfo.getStream()); // 重新开启ssrc server - mediaServerService.openRTPServer(mediaServerItem, ssrcInfo.getStream(), ssrcInResponse, false, false, ssrcInfo.getPort(), true); - - + mediaServerService.openRTPServer(mediaServerItem, ssrcInfo.getStream(), ssrcInResponse, false, false, ssrcInfo.getPort(), true, false, tcpMode); } } }, eventResult -> { diff --git a/web_src/config/index.js b/web_src/config/index.js index 3afb4c30..9d24d1ba 100644 --- a/web_src/config/index.js +++ b/web_src/config/index.js @@ -12,14 +12,14 @@ module.exports = { assetsPublicPath: '/', proxyTable: { '/debug': { - target: 'https://default.wvp-pro.cn:18082', + target: 'http://127.0.0.1:18082', changeOrigin: true, pathRewrite: { '^/debug': '/' } }, '/static/snap': { - target: 'https://default.wvp-pro.cn:18080', + target: 'http://127.0.0.1:18082', changeOrigin: true, // pathRewrite: { // '^/static/snap': '/static/snap'