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 f32bd26a..5cd85d02 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -64,6 +64,7 @@ public class SipLayer{ * sip_server_log.log 和 sip_debug_log.log ERROR, INFO, WARNING, OFF, DEBUG, TRACE */ properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "ERROR"); + properties.setProperty("gov.nist.javax.sip.SIP_MESSAGE_VALVE", "com.genersoft.iot.vmp.gb28181.session.SipMessagePreprocessing"); // if (logger.isDebugEnabled()) { // properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "DEBUG"); // } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/SipMessagePreprocessing.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/SipMessagePreprocessing.java new file mode 100644 index 00000000..c3c12a5c --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/SipMessagePreprocessing.java @@ -0,0 +1,30 @@ +package com.genersoft.iot.vmp.gb28181.session; + +import gov.nist.javax.sip.message.SIPRequest; +import gov.nist.javax.sip.stack.MessageChannel; +import gov.nist.javax.sip.stack.SIPMessageValve; + +import javax.sip.SipStack; +import javax.sip.message.Response; + +public class SipMessagePreprocessing implements SIPMessageValve { + @Override + public boolean processRequest(SIPRequest sipRequest, MessageChannel messageChannel) { + return false; + } + + @Override + public boolean processResponse(Response response, MessageChannel messageChannel) { + return false; + } + + @Override + public void init(SipStack sipStack) { + + } + + @Override + public void destroy() { + + } +}