From 07a8ef9e256c70a3a5b15782add81dcad1e2ffc2 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Fri, 14 Jun 2024 00:03:57 +0800 Subject: [PATCH] =?UTF-8?q?SIP=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E6=97=B6=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 55070447..0b672d33 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -142,6 +142,9 @@ public class SipLayer implements CommandLineRunner { if (ObjectUtils.isEmpty(ip)) { return null; } + if (udpSipProviderMap.size() == 1) { + return udpSipProviderMap.values().stream().findFirst().get(); + } return udpSipProviderMap.get(ip); } @@ -163,6 +166,9 @@ public class SipLayer implements CommandLineRunner { if (ObjectUtils.isEmpty(ip)) { return null; } + if (tcpSipProviderMap.size() == 1) { + return tcpSipProviderMap.values().stream().findFirst().get(); + } return tcpSipProviderMap.get(ip); }