Commit a45fab423bab8e0ce6f1d2a270dfa19a6130193f
1 parent
30ae9e92
修复国标级联语音对讲
Showing
4 changed files
with
15 additions
and
7 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| @@ -926,6 +926,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | @@ -926,6 +926,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | ||
| 926 | if (device == null) { | 926 | if (device == null) { |
| 927 | device = storager.queryVideoDeviceByChannelId(requesterId); | 927 | device = storager.queryVideoDeviceByChannelId(requesterId); |
| 928 | realChannelId = requesterId; | 928 | realChannelId = requesterId; |
| 929 | + }else { | ||
| 930 | + realChannelId = channelId; | ||
| 929 | } | 931 | } |
| 930 | if (device == null) { | 932 | if (device == null) { |
| 931 | // 检查channelID是否可用 | 933 | // 检查channelID是否可用 |
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
| @@ -161,7 +161,7 @@ public class MediaServerServiceImpl implements IMediaServerService { | @@ -161,7 +161,7 @@ public class MediaServerServiceImpl implements IMediaServerService { | ||
| 161 | 161 | ||
| 162 | @Override | 162 | @Override |
| 163 | public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String ssrc, boolean ssrcCheck, boolean isPlayback, Integer port, Boolean onlyAuto) { | 163 | public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, String ssrc, boolean ssrcCheck, boolean isPlayback, Integer port, Boolean onlyAuto) { |
| 164 | - return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, null, null); | 164 | + return openRTPServer(mediaServerItem, streamId, ssrc, ssrcCheck, isPlayback, port, onlyAuto, null, 0); |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | 167 |
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
| @@ -458,7 +458,15 @@ public class PlatformServiceImpl implements IPlatformService { | @@ -458,7 +458,15 @@ public class PlatformServiceImpl implements IPlatformService { | ||
| 458 | } | 458 | } |
| 459 | // 默认不进行SSRC校验, TODO 后续可改为配置 | 459 | // 默认不进行SSRC校验, TODO 后续可改为配置 |
| 460 | boolean ssrcCheck = false; | 460 | boolean ssrcCheck = false; |
| 461 | - SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, ssrcCheck, false, null, true); | 461 | + int tcpMode; |
| 462 | + if (userSetting.getBroadcastForPlatform().equalsIgnoreCase("TCP-PASSIVE")) { | ||
| 463 | + tcpMode = 1; | ||
| 464 | + }else if (userSetting.getBroadcastForPlatform().equalsIgnoreCase("TCP-ACTIVE")) { | ||
| 465 | + tcpMode = 2; | ||
| 466 | + } else { | ||
| 467 | + tcpMode = 0; | ||
| 468 | + } | ||
| 469 | + SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, ssrcCheck, false, null, true, false, tcpMode); | ||
| 462 | if (ssrcInfo == null || ssrcInfo.getPort() < 0) { | 470 | if (ssrcInfo == null || ssrcInfo.getPort() < 0) { |
| 463 | logger.info("[国标级联] 发起语音喊话 开启端口监听失败, platform: {}, channel: {}", platform.getServerGBId(), channelId); | 471 | logger.info("[国标级联] 发起语音喊话 开启端口监听失败, platform: {}, channel: {}", platform.getServerGBId(), channelId); |
| 464 | SipSubscribe.EventResult<Object> eventResult = new SipSubscribe.EventResult<>(); | 472 | SipSubscribe.EventResult<Object> eventResult = new SipSubscribe.EventResult<>(); |
| @@ -546,9 +554,7 @@ public class PlatformServiceImpl implements IPlatformService { | @@ -546,9 +554,7 @@ public class PlatformServiceImpl implements IPlatformService { | ||
| 546 | // 关闭rtp server | 554 | // 关闭rtp server |
| 547 | mediaServerService.closeRTPServer(mediaServerItem, ssrcInfo.getStream()); | 555 | mediaServerService.closeRTPServer(mediaServerItem, ssrcInfo.getStream()); |
| 548 | // 重新开启ssrc server | 556 | // 重新开启ssrc server |
| 549 | - mediaServerService.openRTPServer(mediaServerItem, ssrcInfo.getStream(), ssrcInResponse, false, false, ssrcInfo.getPort(), true); | ||
| 550 | - | ||
| 551 | - | 557 | + mediaServerService.openRTPServer(mediaServerItem, ssrcInfo.getStream(), ssrcInResponse, false, false, ssrcInfo.getPort(), true, false, tcpMode); |
| 552 | } | 558 | } |
| 553 | } | 559 | } |
| 554 | }, eventResult -> { | 560 | }, eventResult -> { |
web_src/config/index.js
| @@ -12,14 +12,14 @@ module.exports = { | @@ -12,14 +12,14 @@ module.exports = { | ||
| 12 | assetsPublicPath: '/', | 12 | assetsPublicPath: '/', |
| 13 | proxyTable: { | 13 | proxyTable: { |
| 14 | '/debug': { | 14 | '/debug': { |
| 15 | - target: 'https://default.wvp-pro.cn:18082', | 15 | + target: 'http://127.0.0.1:18082', |
| 16 | changeOrigin: true, | 16 | changeOrigin: true, |
| 17 | pathRewrite: { | 17 | pathRewrite: { |
| 18 | '^/debug': '/' | 18 | '^/debug': '/' |
| 19 | } | 19 | } |
| 20 | }, | 20 | }, |
| 21 | '/static/snap': { | 21 | '/static/snap': { |
| 22 | - target: 'https://default.wvp-pro.cn:18080', | 22 | + target: 'http://127.0.0.1:18082', |
| 23 | changeOrigin: true, | 23 | changeOrigin: true, |
| 24 | // pathRewrite: { | 24 | // pathRewrite: { |
| 25 | // '^/static/snap': '/static/snap' | 25 | // '^/static/snap': '/static/snap' |