From c81cc4313a62522c3822a2d88af67a6b2e151cd9 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期日, 26 九月 2021 15:33:00 +0800 Subject: [PATCH] Merge pull request #174 from chenparty/wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/InviteRequestProcessor.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/InviteRequestProcessor.java index fcc1487..3014b2d 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/InviteRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/InviteRequestProcessor.java @@ -385,7 +385,9 @@ Response response = getMessageFactory().createResponse(statusCode, evt.getRequest()); ServerTransaction serverTransaction = getServerTransaction(evt); serverTransaction.sendResponse(response); - if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); + if (statusCode >= 200) { + if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); + } } private void responseAck(RequestEvent evt, int statusCode, String msg) throws SipException, InvalidArgumentException, ParseException { @@ -393,7 +395,9 @@ response.setReasonPhrase(msg); ServerTransaction serverTransaction = getServerTransaction(evt); serverTransaction.sendResponse(response); - if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); + if (statusCode >= 200) { + if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); + } } /** -- Gitblit v1.8.0