修复bug以及日志按照,错误/sip/数据库 分割
This commit is contained in:
@@ -2,8 +2,10 @@ package com.genersoft.iot.vmp.gb28181;
|
||||
|
||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.ISIPProcessorObserver;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import gov.nist.javax.sip.SipProviderImpl;
|
||||
import gov.nist.javax.sip.SipStackImpl;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -13,6 +15,7 @@ import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.sip.*;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Properties;
|
||||
import java.util.TooManyListenersException;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
@@ -52,7 +55,9 @@ public class SipLayer{
|
||||
* 完整配置参考 gov.nist.javax.sip.SipStackImpl,需要下载源码
|
||||
* gov/nist/javax/sip/SipStackImpl.class
|
||||
*/
|
||||
properties.setProperty("gov.nist.javax.sip.LOG_MESSAGE_CONTENT", "true");
|
||||
if (logger.isDebugEnabled()) {
|
||||
properties.setProperty("gov.nist.javax.sip.LOG_MESSAGE_CONTENT", "true");
|
||||
}
|
||||
// 接收所有notify请求,即使没有订阅
|
||||
properties.setProperty("gov.nist.javax.sip.DELIVER_UNSOLICITED_NOTIFY", "true");
|
||||
// 为_NULL _对话框传递_终止的_事件
|
||||
@@ -67,9 +72,10 @@ public class SipLayer{
|
||||
* 0; public static final int TRACE_MESSAGES = 16; public static final int
|
||||
* TRACE_EXCEPTION = 17; public static final int TRACE_DEBUG = 32;
|
||||
*/
|
||||
properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "0");
|
||||
properties.setProperty("gov.nist.javax.sip.SERVER_LOG", "sip_server_log");
|
||||
properties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "sip_debug_log");
|
||||
if (logger.isDebugEnabled()) {
|
||||
properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG");
|
||||
}
|
||||
properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "INFO");
|
||||
sipStack = (SipStackImpl) sipFactory.createSipStack(properties);
|
||||
|
||||
return sipStack;
|
||||
|
||||
Reference in New Issue
Block a user