Merge remote-tracking branch 'origin/master'
commit
f7e5fff446
|
@ -25,6 +25,7 @@ public class AudioBroadcastManager {
|
||||||
|
|
||||||
public void update(AudioBroadcastCatch audioBroadcastCatch) {
|
public void update(AudioBroadcastCatch audioBroadcastCatch) {
|
||||||
if (SipUtils.isFrontEnd(audioBroadcastCatch.getDeviceId())) {
|
if (SipUtils.isFrontEnd(audioBroadcastCatch.getDeviceId())) {
|
||||||
|
audioBroadcastCatch.setChannelId(audioBroadcastCatch.getDeviceId());
|
||||||
data.put(audioBroadcastCatch.getDeviceId(), audioBroadcastCatch);
|
data.put(audioBroadcastCatch.getDeviceId(), audioBroadcastCatch);
|
||||||
}else {
|
}else {
|
||||||
data.put(audioBroadcastCatch.getDeviceId() + audioBroadcastCatch.getChannelId(), audioBroadcastCatch);
|
data.put(audioBroadcastCatch.getDeviceId() + audioBroadcastCatch.getChannelId(), audioBroadcastCatch);
|
||||||
|
|
|
@ -977,7 +977,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
}
|
}
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
logger.info("收到设备" + requesterId + "的语音广播Invite请求");
|
logger.info("收到设备" + requesterId + "的语音广播Invite请求");
|
||||||
String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId() + broadcastCatch.getChannelId();
|
String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
|
||||||
|
if (!SipUtils.isFrontEnd(device.getDeviceId())) {
|
||||||
|
key += broadcastCatch.getChannelId();
|
||||||
|
}
|
||||||
dynamicTask.stop(key);
|
dynamicTask.stop(key);
|
||||||
try {
|
try {
|
||||||
responseAck(request, Response.TRYING);
|
responseAck(request, Response.TRYING);
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||||
import com.genersoft.iot.vmp.service.IPlayService;
|
import com.genersoft.iot.vmp.service.IPlayService;
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
|
@ -77,7 +78,10 @@ public class BroadcastResponseMessageHandler extends SIPRequestProcessorParent i
|
||||||
audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite);
|
audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite);
|
||||||
audioBroadcastManager.update(audioBroadcastCatch);
|
audioBroadcastManager.update(audioBroadcastCatch);
|
||||||
// 等待invite消息, 超时则结束
|
// 等待invite消息, 超时则结束
|
||||||
String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId() + channelId;
|
String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
|
||||||
|
if (!SipUtils.isFrontEnd(device.getDeviceId())) {
|
||||||
|
key += audioBroadcastCatch.getChannelId();
|
||||||
|
}
|
||||||
dynamicTask.startDelay(key, ()->{
|
dynamicTask.startDelay(key, ()->{
|
||||||
logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
||||||
playService.stopAudioBroadcast(device.getDeviceId(), channelId);
|
playService.stopAudioBroadcast(device.getDeviceId(), channelId);
|
||||||
|
|
Loading…
Reference in New Issue