From 4ac63a158d16a0d2bce63f8fbadb9b7896397cd1 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: Fri, 1 Apr 2022 17:13:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8getHostAddress=E4=BB=A3?= =?UTF-8?q?=E6=9B=BFgetHostName=E9=81=BF=E5=85=8D=E7=BB=8F=E8=BF=87DNS?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BF=87=E4=B9=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 2 +- .../gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java index 25a2f259..99ff6d70 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java @@ -725,7 +725,7 @@ public class SIPCommander implements ISIPCommander { Request byeRequest = dialog.createRequest(Request.BYE); SipURI byeURI = (SipURI) byeRequest.getRequestURI(); SIPRequest request = (SIPRequest)transaction.getRequest(); - byeURI.setHost(request.getRemoteAddress().getHostName()); + byeURI.setHost(request.getRemoteAddress().getHostAddress()); byeURI.setPort(request.getRemotePort()); ViaHeader viaHeader = (ViaHeader) byeRequest.getHeader(ViaHeader.NAME); String protocol = viaHeader.getTransport().toUpperCase(); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java index 0edbae42..0ea9ac46 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java @@ -442,7 +442,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { SipURI sipURI = (SipURI) notifyRequest.getRequestURI(); SIPRequest request = (SIPRequest) subscribeInfo.getTransaction().getRequest(); - sipURI.setHost(request.getRemoteAddress().getHostName()); + sipURI.setHost(request.getRemoteAddress().getHostAddress()); sipURI.setPort(request.getRemotePort()); ClientTransaction transaction = null; if ("TCP".equals(parentPlatform.getTransport())) { @@ -653,7 +653,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { SipURI byeURI = (SipURI) byeRequest.getRequestURI(); SIPRequest request = (SIPRequest) clientTransaction.getRequest(); - byeURI.setHost(request.getRemoteAddress().getHostName()); + byeURI.setHost(request.getRemoteAddress().getHostAddress()); byeURI.setPort(request.getRemotePort()); if ("TCP".equals(platform.getTransport())) { clientTransaction = tcpSipProvider.getNewClientTransaction(byeRequest);