Commit 97fef952ee4206ccce4d37b7a0ef9d12dcaa12ec

Authored by 648540858
1 parent 7d7528cc

优化sip协议栈调用

src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
... ... @@ -63,7 +63,7 @@ public class SipLayer implements CommandLineRunner {
63 63 private void addListeningPoint(String monitorIp, int port){
64 64 SipStackImpl sipStack;
65 65 try {
66   - sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog()));
  66 + sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties( userSetting.getSipLog()));
67 67 sipStack.setMessageParserFactory(new GbStringMsgParserFactory());
68 68 } catch (PeerUnavailableException e) {
69 69 logger.error("[SIP SERVER] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp);
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/conf/DefaultProperties.java
... ... @@ -12,10 +12,10 @@ import java.util.Properties;
12 12 */
13 13 public class DefaultProperties {
14 14  
15   - public static Properties getProperties(String ip, boolean sipLog) {
  15 + public static Properties getProperties(boolean sipLog) {
16 16 Properties properties = new Properties();
17 17 properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP");
18   - properties.setProperty("javax.sip.IP_ADDRESS", ip);
  18 +// properties.setProperty("javax.sip.IP_ADDRESS", ip);
19 19 // 关闭自动会话
20 20 properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off");
21 21 /**
... ...