From 1458014fe304e6a492a66c9a7b69600d47efc1d8 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 30 六月 2023 15:24:07 +0800 Subject: [PATCH] 修复合并主线后语音对讲失败的问题 --- src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 2a31c92..316e74c 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -235,8 +235,10 @@ sendRtpItem.setUsePs(false); sendRtpItem.setReceiveStream(stream + "_talk"); - - int port = zlmrtpServerFactory.keepPort(mediaServerItem, playSsrc, null); + String callId = SipUtils.getNewCallId(); + int port = zlmrtpServerFactory.keepPort(mediaServerItem, playSsrc, 0, ssrcFromCallback ->{ + return redisCatchStorage.querySendRTPServer(device.getDeviceId(), channelId, null, callId) != null; + }); //绔彛鑾峰彇澶辫触鐨剆srcInfo 娌℃湁蹇呰鍙戦�佺偣鎾寚浠� if (port <= 0) { logger.info("[璇煶瀵硅] 绔彛鍒嗛厤寮傚父锛宒eviceId={},channelId={}", device.getDeviceId(), channelId); @@ -264,7 +266,7 @@ } }, userSetting.getPlayTimeout()); - String callId = SipUtils.getNewCallId(); + zlmrtpServerFactory.releasePort(mediaServerItem, playSsrc); Map<String, Object> param = new HashMap<>(12); -- Gitblit v1.8.0