优化使用来源ip作为流ip

This commit is contained in:
648540858
2022-11-10 09:40:01 +08:00
parent eb2a4139fa
commit 8870f5f5a1
15 changed files with 343 additions and 151 deletions

View File

@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import javax.sip.*;
import java.util.*;
@@ -107,6 +108,9 @@ public class SipLayer implements CommandLineRunner {
}
public SipProviderImpl getUdpSipProvider(String ip) {
if (ObjectUtils.isEmpty(ip)) {
return null;
}
return udpSipProviderMap.get(ip);
}
@@ -125,6 +129,9 @@ public class SipLayer implements CommandLineRunner {
}
public SipProviderImpl getTcpSipProvider(String ip) {
if (ObjectUtils.isEmpty(ip)) {
return null;
}
return tcpSipProviderMap.get(ip);
}
}