Commit 97fef952ee4206ccce4d37b7a0ef9d12dcaa12ec
1 parent
7d7528cc
优化sip协议栈调用
Showing
2 changed files
with
3 additions
and
3 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
| @@ -63,7 +63,7 @@ public class SipLayer implements CommandLineRunner { | @@ -63,7 +63,7 @@ public class SipLayer implements CommandLineRunner { | ||
| 63 | private void addListeningPoint(String monitorIp, int port){ | 63 | private void addListeningPoint(String monitorIp, int port){ |
| 64 | SipStackImpl sipStack; | 64 | SipStackImpl sipStack; |
| 65 | try { | 65 | try { |
| 66 | - sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog())); | 66 | + sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties( userSetting.getSipLog())); |
| 67 | sipStack.setMessageParserFactory(new GbStringMsgParserFactory()); | 67 | sipStack.setMessageParserFactory(new GbStringMsgParserFactory()); |
| 68 | } catch (PeerUnavailableException e) { | 68 | } catch (PeerUnavailableException e) { |
| 69 | logger.error("[SIP SERVER] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp); | 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,10 +12,10 @@ import java.util.Properties; | ||
| 12 | */ | 12 | */ |
| 13 | public class DefaultProperties { | 13 | public class DefaultProperties { |
| 14 | 14 | ||
| 15 | - public static Properties getProperties(String ip, boolean sipLog) { | 15 | + public static Properties getProperties(boolean sipLog) { |
| 16 | Properties properties = new Properties(); | 16 | Properties properties = new Properties(); |
| 17 | properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP"); | 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 | properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off"); | 20 | properties.setProperty("javax.sip.AUTOMATIC_DIALOG_SUPPORT", "off"); |
| 21 | /** | 21 | /** |