From 5c488cd03ba911224bca3a341b00455fbce2df09 Mon Sep 17 00:00:00 2001
From: swwheihei <swwheihei@163.com>
Date: 星期四, 11 六月 2020 13:33:38 +0800
Subject: [PATCH] Merge pull request #9 from lawrencehj/master

---
 src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 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 cfea026..b70c5eb 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java
@@ -59,10 +59,10 @@
 
 	@PostConstruct
 	private void initSipServer() {
-		Thread thread=new Thread(this);
-        thread.setDaemon(true);
-        thread.setName("sip server thread start");
-        thread.start();
+		Thread thread = new Thread(this);
+		thread.setDaemon(true);
+		thread.setName("sip server thread start");
+		thread.start();
 	}
 
 	@Override
@@ -84,7 +84,7 @@
 			 * 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.TRACE_LEVEL", "32");
 			properties.setProperty("gov.nist.javax.sip.SERVER_LOG", "sip_server_log");
 			properties.setProperty("gov.nist.javax.sip.DEBUG_LOG", "sip_debug_log");
 			sipStack = (SipStackImpl) sipFactory.createSipStack(properties);
@@ -99,13 +99,15 @@
 	}
 
 	private void startTcpListener() throws Exception {
-		ListeningPoint tcpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(), "TCP");
+		ListeningPoint tcpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(),
+				"TCP");
 		tcpSipProvider = sipStack.createSipProvider(tcpListeningPoint);
 		tcpSipProvider.addSipListener(this);
 	}
 
 	private void startUdpListener() throws Exception {
-		ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(), "UDP");
+		ListeningPoint udpListeningPoint = sipStack.createListeningPoint(sipConfig.getSipIp(), sipConfig.getSipPort(),
+				"UDP");
 		udpSipProvider = sipStack.createSipProvider(udpListeningPoint);
 		udpSipProvider.addSipListener(this);
 	}
@@ -127,13 +129,15 @@
 		if ((status >= 200) && (status < 300)) { // Success!
 			ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt);
 			processor.process(evt, this, sipConfig);
+		} else if (status == Response.TRYING) {
+			// trying涓嶄細鍥炲
 		} else {
 			logger.warn("鎺ユ敹鍒板け璐ョ殑response鍝嶅簲锛乻tatus锛�" + status + ",message:" + response.getContent().toString());
 		}
 		// trying涓嶄細鍥炲
-		if (status == Response.TRYING) {
+		// if (status == Response.TRYING) {
 
-		}
+		// }
 	}
 
 	/**

--
Gitblit v1.8.0