From e9e4e8d44a885b98e23c159015772c8d82a4878f Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: Thu, 25 Jun 2020 15:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9invite=E5=85=B6?= =?UTF-8?q?=E5=AE=83=E5=93=8D=E5=BA=94=E7=9A=84=E5=BA=94=E5=AF=B9=EF=BC=8C?= =?UTF-8?q?=E5=A6=82101=20Dialog=20Establishement=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/gb28181/SipLayer.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 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 b70c5eb..64525d7 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.gb28181; +import java.text.ParseException; import java.util.Properties; import javax.annotation.PostConstruct; @@ -128,11 +129,18 @@ public class SipLayer implements SipListener, Runnable { int status = response.getStatusCode(); if ((status >= 200) && (status < 300)) { // Success! ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt); - processor.process(evt, this, sipConfig); - } else if (status == Response.TRYING) { + try { + processor.process(evt, this, sipConfig); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // } else if (status == Response.TRYING) { // trying不会回复 + } else if ((status >= 100) && (status < 200)) { + // 增加其它无需回复的响应,如101、180等 } else { - logger.warn("接收到失败的response响应!status:" + status + ",message:" + response.getContent().toString()); + logger.warn("接收到失败的response响应!status:" + status + ",message:" + response.getReasonPhrase()/* .getContent().toString()*/); } // trying不会回复 // if (status == Response.TRYING) {