From fc7f1b3459d9c65a37cae25bc254a6a3d62cc6db Mon Sep 17 00:00:00 2001
From: xubinbin <1323875150@qq.com>
Date: 星期五, 23 九月 2022 10:55:42 +0800
Subject: [PATCH] 处理上级平台发送的invite请求不携带“y=”sdp信息时,使用默认“y=0000000000”视频无法播放的问题。

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
index 4165004..86861af 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/timeout/impl/TimeoutProcessorImpl.java
@@ -26,11 +26,17 @@
 
     @Override
     public void process(TimeoutEvent event) {
-        // TODO Auto-generated method stub
-        CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
-        String callId = callIdHeader.getCallId();
-        SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
-        SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
-        errorSubscribe.response(timeoutEventEventResult);
+        try {
+            // TODO Auto-generated method stub
+            CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
+            String callId = callIdHeader.getCallId();
+            SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
+            SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
+            errorSubscribe.response(timeoutEventEventResult);
+            sipSubscribe.removeErrorSubscribe(callId);
+            sipSubscribe.removeOkSubscribe(callId);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 }

--
Gitblit v1.8.0