修复国标级联语音对讲
parent
93de123330
commit
1710a63fc8
|
@ -345,7 +345,7 @@ public class SIPRequestHeaderPlarformProvider {
|
||||||
Address concatAddress = SipFactory.getInstance().createAddressFactory().createAddress(SipFactory.getInstance().createAddressFactory().createSipURI(sipConfig.getId(),localHostAddress));
|
Address concatAddress = SipFactory.getInstance().createAddressFactory().createAddress(SipFactory.getInstance().createAddressFactory().createSipURI(sipConfig.getId(),localHostAddress));
|
||||||
request.addHeader(SipFactory.getInstance().createHeaderFactory().createContactHeader(concatAddress));
|
request.addHeader(SipFactory.getInstance().createHeaderFactory().createContactHeader(concatAddress));
|
||||||
// Subject
|
// 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);
|
request.addHeader(subjectHeader);
|
||||||
ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("APPLICATION", "SDP");
|
ContentTypeHeader contentTypeHeader = SipFactory.getInstance().createHeaderFactory().createContentTypeHeader("APPLICATION", "SDP");
|
||||||
request.setContent(content, contentTypeHeader);
|
request.setContent(content, contentTypeHeader);
|
||||||
|
|
|
@ -187,19 +187,19 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In
|
||||||
|
|
||||||
|
|
||||||
if (ssrcTransaction.getPlatformId() != null ) {
|
if (ssrcTransaction.getPlatformId() != null ) {
|
||||||
Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getDeviceId());
|
Platform platform = platformService.queryPlatformByServerGBId(ssrcTransaction.getPlatformId());
|
||||||
if (ssrcTransaction.getType().equals(InviteSessionType.BROADCAST)) {
|
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());
|
CommonGBChannel channel = channelService.getOne(ssrcTransaction.getChannelId());
|
||||||
if (channel == null) {
|
if (channel == null) {
|
||||||
log.info("[收到bye] 未找到通道,设备:{}, 通道:{}", ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId());
|
log.info("[收到bye] 未找到通道,上级:{}, 通道:{}", ssrcTransaction.getPlatformId(), ssrcTransaction.getChannelId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String mediaServerId = ssrcTransaction.getMediaServerId();
|
String mediaServerId = ssrcTransaction.getMediaServerId();
|
||||||
platformService.stopBroadcast(platform, channel, ssrcTransaction.getStream(), false,
|
platformService.stopBroadcast(platform, channel, ssrcTransaction.getStream(), false,
|
||||||
mediaServerService.getOne(mediaServerId));
|
mediaServerService.getOne(mediaServerId));
|
||||||
Device device = deviceService.getDeviceByDeviceId(ssrcTransaction.getDeviceId());
|
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(channel.getGbId());
|
||||||
DeviceChannel deviceChannel = deviceChannelService.getOneForSourceById(ssrcTransaction.getChannelId());
|
Device device = deviceService.getDevice(channel.getGbDeviceDbId());
|
||||||
playService.stopAudioBroadcast(device, deviceChannel);
|
playService.stopAudioBroadcast(device, deviceChannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,6 @@ public class BroadcastNotifyMessageHandler extends SIPRequestProcessorParent imp
|
||||||
commanderForPlatform.broadcastResultCmd(platform, channel, sn, true, eventResult->{
|
commanderForPlatform.broadcastResultCmd(platform, channel, sn, true, eventResult->{
|
||||||
log.info("[国标级联] 语音喊话 回复失败 platform: {}, 错误:{}/{}", platform.getServerGBId(), eventResult.statusCode, eventResult.msg);
|
log.info("[国标级联] 语音喊话 回复失败 platform: {}, 错误:{}/{}", platform.getServerGBId(), eventResult.statusCode, eventResult.msg);
|
||||||
}, eventResult->{
|
}, eventResult->{
|
||||||
|
|
||||||
// 消息发送成功, 向上级发送invite,获取推流
|
// 消息发送成功, 向上级发送invite,获取推流
|
||||||
try {
|
try {
|
||||||
platformService.broadcastInvite(platform, channel, mediaServerForMinimumLoad, (hookData)->{
|
platformService.broadcastInvite(platform, channel, mediaServerForMinimumLoad, (hookData)->{
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class BroadcastResponseMessageHandler extends SIPRequestProcessorParent i
|
||||||
}
|
}
|
||||||
if (!audioBroadcastManager.exit(channel.getId())) {
|
if (!audioBroadcastManager.exit(channel.getId())) {
|
||||||
// 回复410
|
// 回复410
|
||||||
responseAck((SIPRequest) evt.getRequest(), Response.GONE);
|
responseAck((SIPRequest) evt.getRequest(), Response.BUSY_HERE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String result = getText(rootElement, "Result");
|
String result = getText(rootElement, "Result");
|
||||||
|
|
Loading…
Reference in New Issue