From e1fcc1f21f6622871a5507fcd50aacfa99181879 Mon Sep 17 00:00:00 2001
From: 64850858 <648540858@qq.com>
Date: 星期四, 08 七月 2021 14:48:00 +0800
Subject: [PATCH] 补充swf文件
---
src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
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 25a35a4..0dca4af 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
@@ -72,7 +72,7 @@
private SipStack createSipStack() throws PeerUnavailableException {
Properties properties = new Properties();
properties.setProperty("javax.sip.STACK_NAME", "GB28181_SIP");
- properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getSipIp());
+ properties.setProperty("javax.sip.IP_ADDRESS", sipConfig.getMonitorIp());
properties.setProperty("gov.nist.javax.sip.LOG_MESSAGE_CONTENT", "false");
/**
* sip_server_log.log 鍜� sip_debug_log.log public static final int TRACE_NONE =
@@ -92,7 +92,7 @@
ListeningPoint tcpListeningPoint = null;
SipProvider tcpSipProvider = null;
try {
- tcpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(), "TCP");
+ tcpListeningPoint = sipStack.createListeningPoint(sipConfig.getMonitorIp(), sipConfig.getSipPort(), "TCP");
tcpSipProvider = sipStack.createSipProvider(tcpListeningPoint);
tcpSipProvider.addSipListener(this);
logger.info("Sip Server TCP 鍚姩鎴愬姛 port {" + sipConfig.getSipPort() + "}");
@@ -105,7 +105,7 @@
@Bean("udpSipProvider")
@DependsOn("sipStack")
private SipProvider startUdpListener() throws Exception {
- ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(), "UDP");
+ ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getMonitorIp(), sipConfig.getSipPort(), "UDP");
SipProvider udpSipProvider = sipStack.createSipProvider(udpListeningPoint);
udpSipProvider.addSipListener(this);
logger.info("Sip Server UDP 鍚姩鎴愬姛 port {" + sipConfig.getSipPort() + "}");
@@ -118,7 +118,7 @@
*/
@Override
public void processRequest(RequestEvent evt) {
- logger.debug(evt.getRequest().toString());
+// logger.debug(evt.getRequest().toString());
// 鐢变簬jainsip鏄崟绾跨▼绋嬪簭锛屼负鎻愰珮鎬ц兘骞跺彂澶勭悊
processThreadPool.execute(() -> {
if (processorFactory != null) {
@@ -130,9 +130,9 @@
@Override
public void processResponse(ResponseEvent evt) {
Response response = evt.getResponse();
- logger.debug(evt.getResponse().toString());
+// logger.debug(evt.getResponse().toString());
int status = response.getStatusCode();
- if ((status >= 200) && (status < 300)) { // Success!
+ if (((status >= 200) && (status < 300)) || status == 401) { // Success!
ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt);
try {
processor.process(evt, this, sipConfig);
@@ -149,8 +149,6 @@
}
}
}
- // } else if (status == Response.TRYING) {
- // trying涓嶄細鍥炲
} else if ((status >= 100) && (status < 200)) {
// 澧炲姞鍏跺畠鏃犻渶鍥炲鐨勫搷搴旓紝濡�101銆�180绛�
} else {
--
Gitblit v1.8.0