From b46e5efad22fb810e49f0a2e7835d785e85b4860 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 1 Sep 2022 22:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95sip=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=A2=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/gb28181/SipLayer.java | 1 + .../session/SipMessagePreprocessing.java | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/main/java/com/genersoft/iot/vmp/gb28181/session/SipMessagePreprocessing.java 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() { + + } +}