From 5bda3a2d5193753a56d7878e33a2dd353653004a Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Sun, 7 Jan 2024 00:46:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4=E4=B8=BA?= =?UTF-8?q?=20udp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/register/request/RegisterRequestProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/register/request/RegisterRequestProcessor.java b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/register/request/RegisterRequestProcessor.java index 542910e..8b8f537 100644 --- a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/register/request/RegisterRequestProcessor.java +++ b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/register/request/RegisterRequestProcessor.java @@ -133,6 +133,7 @@ public class RegisterRequestProcessor implements MessageProcessor { private void registerDevice(String deviceId, DockingDevice device, SIPRequest request, String senderIp, RemoteInfo remoteInfo) { Response response = generateRegisterResponse(request); + log.debug("response.getStatusCode {}", response.getStatusCode()); if(response.getStatusCode() != Response.OK){ sender.send(senderIp, response); return; @@ -140,14 +141,14 @@ public class RegisterRequestProcessor implements MessageProcessor { if (device == null) { device = new DockingDevice(); - device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode()); + device.setStreamMode(MediaStreamMode.UDP.getMode()); device.setCharset(GB28181Constant.CHARSET); device.setGeoCoordSys(GB28181Constant.GEO_COORD_SYS); device.setDeviceId(deviceId); device.setOnLine(false); } else { if (ObjectUtils.isEmpty(device.getStreamMode())) { - device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode()); + device.setStreamMode(MediaStreamMode.UDP.getMode()); } if (ObjectUtils.isEmpty(device.getCharset())) { device.setCharset(GB28181Constant.CHARSET);