修复国标级联语音对讲

结构优化
648540858 2023-06-05 15:01:20 +08:00
parent 30ae9e929f
commit a45fab423b
4 changed files with 15 additions and 7 deletions

View File

@ -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是否可用

View File

@ -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);
}

View File

@ -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<Object> 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 -> {

View File

@ -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'