From 49e937c39637c897cccf430de85af33942887a29 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期一, 19 十二月 2022 15:51:59 +0800
Subject: [PATCH] 修复invite超时任务的设置

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
index c153933..6f40ef8 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -319,7 +319,7 @@
 		});
 
 		if ("rtsp".equals(param.getSchema())){
-			logger.info("on_stream_changed锛氭敞鍐�->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream());
+			logger.info("娴佸彉鍖栵細娉ㄥ唽->{}, app->{}, stream->{}", param.isRegist(), param.getApp(), param.getStream());
 			if (param.isRegist()) {
 				mediaServerService.addCount(param.getMediaServerId());
 			}else {
@@ -399,7 +399,11 @@
 									}
 								}
 
+							}else {
+								logger.info("[璇煶瀵硅] 鏈壘鍒伴�氶亾锛歿}", channelId);
 							}
+						}else{
+							logger.info("[璇煶瀵硅] 鏈壘鍒拌澶囷細{}", deviceId);
 						}
 					}
 				}
@@ -525,17 +529,22 @@
 								if (platform != null) {
 									commanderFroPlatform.streamByeCmd(platform, sendRtpItem);
 								}else {
-									if ("talk".equals(param.getApp()) && sendRtpItem.isOnlyAudio()) {
+									if (sendRtpItem.isOnlyAudio()) {
 										AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(sendRtpItem.getDeviceId(), sendRtpItem.getChannelId());
-										if (device != null && audioBroadcastCatch != null) {
-//											cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+										if (audioBroadcastCatch != null) {
+//											playService.stopAudioBroadcast(device.getDeviceId(), sendRtpItem.getChannelId());
+											if ("talk".equals(param.getApp())) {
+//												cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+											}else {
+//												cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
+											}
 										}
-									}else {
-										cmder.streamByeCmd(device, null, null, sendRtpItem.getCallId());
 									}
 
+
+
 								}
-							} catch (SipException | InvalidArgumentException | ParseException | SsrcTransactionNotFoundException e) {
+							} catch (SipException | InvalidArgumentException | ParseException e) {
 								logger.error("[鍛戒护鍙戦�佸け璐 鍥芥爣绾ц仈 鍙戦�丅YE: {}", e.getMessage());
 							}
 						}
@@ -646,6 +655,7 @@
 					// 淇敼鏁版嵁
 					streamProxyService.stop(param.getApp(), param.getStream());
 				}else {
+					// 鏃犱汉瑙傜湅涓嶅仛澶勭悊
 					ret.put("close", false);
 				}
 				return ret;

--
Gitblit v1.8.0