From 80d96042e7b6f2942585bde482f02a3392477033 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 24 十一月 2022 20:01:03 +0800 Subject: [PATCH] 优化语音对讲 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 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 feaaf90..88d7e14 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 @@ -525,17 +525,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()); } } -- Gitblit v1.8.0