Commit f7e5fff44623eb0a01b1bc0f9a2e98d329e61a37

Authored by 648540858
2 parents dc8869be cb5afce5

Merge remote-tracking branch 'origin/master'

src/main/java/com/genersoft/iot/vmp/gb28181/session/AudioBroadcastManager.java
... ... @@ -25,6 +25,7 @@ public class AudioBroadcastManager {
25 25  
26 26 public void update(AudioBroadcastCatch audioBroadcastCatch) {
27 27 if (SipUtils.isFrontEnd(audioBroadcastCatch.getDeviceId())) {
  28 + audioBroadcastCatch.setChannelId(audioBroadcastCatch.getDeviceId());
28 29 data.put(audioBroadcastCatch.getDeviceId(), audioBroadcastCatch);
29 30 }else {
30 31 data.put(audioBroadcastCatch.getDeviceId() + audioBroadcastCatch.getChannelId(), audioBroadcastCatch);
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
... ... @@ -977,7 +977,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
977 977 }
978 978 if (device != null) {
979 979 logger.info("收到设备" + requesterId + "的语音广播Invite请求");
980   - String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId() + broadcastCatch.getChannelId();
  980 + String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
  981 + if (!SipUtils.isFrontEnd(device.getDeviceId())) {
  982 + key += broadcastCatch.getChannelId();
  983 + }
981 984 dynamicTask.stop(key);
982 985 try {
983 986 responseAck(request, Response.TRYING);
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java
... ... @@ -11,6 +11,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
11 11 import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
12 12 import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
13 13 import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler;
  14 +import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
14 15 import com.genersoft.iot.vmp.service.IPlayService;
15 16 import gov.nist.javax.sip.message.SIPRequest;
16 17 import org.dom4j.Element;
... ... @@ -77,7 +78,10 @@ public class BroadcastResponseMessageHandler extends SIPRequestProcessorParent i
77 78 audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite);
78 79 audioBroadcastManager.update(audioBroadcastCatch);
79 80 // 等待invite消息, 超时则结束
80   - String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId() + channelId;
  81 + String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
  82 + if (!SipUtils.isFrontEnd(device.getDeviceId())) {
  83 + key += audioBroadcastCatch.getChannelId();
  84 + }
81 85 dynamicTask.startDelay(key, ()->{
82 86 logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
83 87 playService.stopAudioBroadcast(device.getDeviceId(), channelId);
... ...