From 7c019dbeef4ee1f79bd09d87abf18112b4ffc376 Mon Sep 17 00:00:00 2001 From: 刘跃龙 <yjkhtddx@sina.com> Date: 星期四, 16 二月 2023 18:18:10 +0800 Subject: [PATCH] RTP推流地址应使用SDP中Connection中的IP地址,原来使用Origin中的IP地址,在流媒体服务和信令服务不在同一台设备上时,媒体流数据将发给信令服务器,导致无法播放BUG。 --- src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java index 24b88e5..cfac446 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -1,6 +1,7 @@ package com.genersoft.iot.vmp.gb28181; import com.genersoft.iot.vmp.conf.SipConfig; +import com.genersoft.iot.vmp.conf.UserSetting; import com.genersoft.iot.vmp.gb28181.conf.DefaultProperties; import com.genersoft.iot.vmp.gb28181.transmit.ISIPProcessorObserver; import gov.nist.javax.sip.SipProviderImpl; @@ -28,6 +29,9 @@ @Autowired private ISIPProcessorObserver sipProcessorObserver; + + @Autowired + private UserSetting userSetting; private final Map<String, SipProviderImpl> tcpSipProviderMap = new ConcurrentHashMap<>(); private final Map<String, SipProviderImpl> udpSipProviderMap = new ConcurrentHashMap<>(); @@ -61,7 +65,7 @@ private void addListeningPoint(String monitorIp, int port){ SipStackImpl sipStack; try { - sipStack = (SipStackImpl)sipFactory.createSipStack(DefaultProperties.getProperties(monitorIp, false)); + sipStack = (SipStackImpl)sipFactory.createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog())); } catch (PeerUnavailableException e) { logger.error("[Sip Server] SIP鏈嶅姟鍚姩澶辫触锛� 鐩戝惉鍦板潃{}澶辫触,璇锋鏌p鏄惁姝g‘", monitorIp); return; -- Gitblit v1.8.0