修复国标级联语音对讲

pull/1669/head
648540858 2024-10-23 16:38:06 +08:00
parent 93de123330
commit 1710a63fc8
4 changed files with 7 additions and 8 deletions

View File

@ -345,7 +345,7 @@ public class SIPRequestHeaderPlarformProvider {
Address concatAddress = SipFactory.getInstance().createAddressFactory().createAddress(SipFactory.getInstance().createAddressFactory().createSipURI(sipConfig.getId(),localHostAddress));
request.addHeader(SipFactory.getInstance().createHeaderFactory().createContactHeader(concatAddress));
// Subject
SubjectHeader subjectHeader = SipFactory.getInstance().createHeaderFactory().createSubjectHeader(String.format("%s:%s,%s:%s", channelId, ssrc, sipConfig.getId(), 0));
SubjectHeader subjectHeader = SipFactory.getInstance().createHeaderFactory().createSubjectHeader(String.format("%s:%s,%s:%s", sipConfig.getId(), ssrc, channelId, 0));
request.addHeader(subjectHeader);
ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("APPLICATION", "SDP");
request.setContent(content, contentTypeHeader);

View File

@ -187,19 +187,19 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
if (ssrcTransaction.getPlatformId() != null ) {
Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId());
Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getPlatformId());
if (ssrcTransaction.getType().equals(InviteSessionType.BROADCAST)) {
log.info("[收到bye] 上级停止语音对讲,来自:{}, 通道已停止推流: {}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId());
log.info("[收到bye] 上级停止语音对讲,来自:{}, 通道已停止推流: {}", ssrcTransaction.getPlatformId(), ssrcTransaction.getChannelId());
CommonGBChannel channel = channelService.getOne(ssrcTransaction.getChannelId());
if (channel == null) {
log.info("[收到bye] 未找到通道,设备:{} 通道:{}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId());
log.info("[收到bye] 未找到通道,上级:{} 通道:{}", ssrcTransaction.getPlatformId(), ssrcTransaction.getChannelId());
return;
}
String mediaServerId = ssrcTransaction.getMediaServerId();
platformService.stopBroadcast(platform, channel, ssrcTransaction.getStream(), false,
mediaServerService.getOne(mediaServerId));
Device device = deviceService.getDeviceByDeviceId(ssrcTransaction.getDeviceId());
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(ssrcTransaction.getChannelId());
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
Device device = deviceService.getDevice(channel.getGbDeviceDbId());
playService.stopAudioBroadcast(device, deviceChannel);
}

View File

@ -123,7 +123,6 @@ public class BroadcastNotifyMessageHandler extends SIPRequestProcessorParent imp
commanderForPlatform.broadcastResultCmd(platform, channel, sn, true, eventResult->{
log.info("[国标级联] 语音喊话 回复失败 platform {} 错误:{}/{}", platform.getServerGBId(), eventResult.statusCode, eventResult.msg);
}, eventResult->{
// 消息发送成功, 向上级发送invite获取推流
try {
platformService.broadcastInvite(platform, channel, mediaServerForMinimumLoad, (hookData)->{

View File

@ -65,7 +65,7 @@ public class BroadcastResponseMessageHandler extends SIPRequestProcessorParent i
}
if (!audioBroadcastManager.exit(channel.getId())) {
// 回复410
responseAck((SIPRequest) evt.getRequest(), Response.GONE);
responseAck((SIPRequest) evt.getRequest(), Response.BUSY_HERE);
return;
}
String result = getText(rootElement, "Result");