From 07a8ef9e256c70a3a5b15782add81dcad1e2ffc2 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期五, 14 六月 2024 00:03:57 +0800
Subject: [PATCH] SIP只有一个监听时,直接返回

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/BroadcastResponseMessageHandler.java |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 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..c910451
--- 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
@@ -1,13 +1,11 @@
 package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.cmd;
 
-import com.genersoft.iot.vmp.common.VideoManagerConstants;
 import com.genersoft.iot.vmp.conf.DynamicTask;
 import com.genersoft.iot.vmp.gb28181.bean.AudioBroadcastCatch;
 import com.genersoft.iot.vmp.gb28181.bean.AudioBroadcastCatchStatus;
 import com.genersoft.iot.vmp.gb28181.bean.Device;
 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
 import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
-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.impl.message.IMessageHandler;
 import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler;
@@ -63,7 +61,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);
@@ -71,12 +74,6 @@
                 AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(device.getDeviceId(), channelId);
                 audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.WaiteInvite);
                 audioBroadcastManager.update(audioBroadcastCatch);
-                // 绛夊緟invite娑堟伅锛� 瓒呮椂鍒欑粨鏉�
-                String key = VideoManagerConstants.BROADCAST_WAITE_INVITE +  device.getDeviceId() + channelId;
-                dynamicTask.startDelay(key, ()->{
-                    logger.info("[璇煶骞挎挱]绛夊緟invite娑堟伅瓒呮椂锛歿}/{}", device.getDeviceId(), channelId);
-                    playService.stopAudioBroadcast(device.getDeviceId(), channelId);
-                }, 2000);
             }else {
                 playService.stopAudioBroadcast(device.getDeviceId(), channelId);
             }

--
Gitblit v1.8.0