From cb5afce55eec2badda5090c27564e43f201ac9af Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 12 三月 2024 23:55:00 +0800 Subject: [PATCH] 优化语音对讲定时任务的删除 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java old mode 100644 new mode 100755 index 1c0dd58..6ab75d2 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java +++ b/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.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.response.ResponseMessageHandler; +import com.genersoft.iot.vmp.gb28181.utils.SipUtils; import com.genersoft.iot.vmp.service.IPlayService; import gov.nist.javax.sip.message.SIPRequest; import org.dom4j.Element; @@ -63,7 +64,12 @@ return; } String result = getText(rootElement, "Result"); - logger.info("[璇煶骞挎挱]鍥炲锛歿}, {}/{}", result, device.getDeviceId(), channelId ); + Element infoElement = rootElement.element("Info"); + String reason = null; + if (infoElement != null) { + reason = getText(infoElement, "Reason"); + } + logger.info("[璇煶骞挎挱]鍥炲锛歿}, {}/{}", reason == null? result : result + ": " + reason, device.getDeviceId(), channelId ); // 鍥炲200 OK responseAck(request, Response.OK); @@ -72,7 +78,10 @@ audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite); audioBroadcastManager.update(audioBroadcastCatch); // 绛夊緟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, ()->{ logger.info("[璇煶骞挎挱]绛夊緟invite娑堟伅瓒呮椂锛歿}/{}", device.getDeviceId(), channelId); playService.stopAudioBroadcast(device.getDeviceId(), channelId); -- Gitblit v1.8.0