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 | 926 | if (device == null) { |
| 927 | 927 | device = storager.queryVideoDeviceByChannelId(requesterId); |
| 928 | 928 | realChannelId = requesterId; |
| 929 | + }else { | |
| 930 | + realChannelId = channelId; | |
| 929 | 931 | } |
| 930 | 932 | if (device == null) { |
| 931 | 933 | // 检查channelID是否可用 | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
| ... | ... | @@ -161,7 +161,7 @@ public class MediaServerServiceImpl implements IMediaServerService { |
| 161 | 161 | |
| 162 | 162 | @Override |
| 163 | 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 | 458 | } |
| 459 | 459 | // 默认不进行SSRC校验, TODO 后续可改为配置 |
| 460 | 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 | 470 | if (ssrcInfo == null || ssrcInfo.getPort() < 0) { |
| 463 | 471 | logger.info("[国标级联] 发起语音喊话 开启端口监听失败, platform: {}, channel: {}", platform.getServerGBId(), channelId); |
| 464 | 472 | SipSubscribe.EventResult<Object> eventResult = new SipSubscribe.EventResult<>(); |
| ... | ... | @@ -546,9 +554,7 @@ public class PlatformServiceImpl implements IPlatformService { |
| 546 | 554 | // 关闭rtp server |
| 547 | 555 | mediaServerService.closeRTPServer(mediaServerItem, ssrcInfo.getStream()); |
| 548 | 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 | 560 | }, eventResult -> { | ... | ... |
web_src/config/index.js
| ... | ... | @@ -12,14 +12,14 @@ module.exports = { |
| 12 | 12 | assetsPublicPath: '/', |
| 13 | 13 | proxyTable: { |
| 14 | 14 | '/debug': { |
| 15 | - target: 'https://default.wvp-pro.cn:18082', | |
| 15 | + target: 'http://127.0.0.1:18082', | |
| 16 | 16 | changeOrigin: true, |
| 17 | 17 | pathRewrite: { |
| 18 | 18 | '^/debug': '/' |
| 19 | 19 | } |
| 20 | 20 | }, |
| 21 | 21 | '/static/snap': { |
| 22 | - target: 'https://default.wvp-pro.cn:18080', | |
| 22 | + target: 'http://127.0.0.1:18082', | |
| 23 | 23 | changeOrigin: true, |
| 24 | 24 | // pathRewrite: { |
| 25 | 25 | // '^/static/snap': '/static/snap' | ... | ... |