From 563fb03ea3819391b5bef3b5899680ed00956286 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Sat, 30 Sep 2023 16:49:16 +0800 Subject: [PATCH] createTryingInviteResponse --- .../sip/method/invite/response/InviteResponseBuilder.java | 4 ++++ .../cn/skcks/docking/gb28181/sip/process/RequestTest.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gb28181-sip/src/main/java/cn/skcks/docking/gb28181/sip/method/invite/response/InviteResponseBuilder.java b/gb28181-sip/src/main/java/cn/skcks/docking/gb28181/sip/method/invite/response/InviteResponseBuilder.java index 90e53b0..798846b 100644 --- a/gb28181-sip/src/main/java/cn/skcks/docking/gb28181/sip/method/invite/response/InviteResponseBuilder.java +++ b/gb28181-sip/src/main/java/cn/skcks/docking/gb28181/sip/method/invite/response/InviteResponseBuilder.java @@ -54,4 +54,8 @@ public class InviteResponseBuilder implements InviteBuilder { response, SipBuilder.createContactHeader(sipResponse.getFromHeader().getAddress())); } + + public Response createTryingInviteResponse(Request request){ + return SipResponseBuilder.createResponse(Response.TRYING,request); + } } diff --git a/gb28181-sip/src/test/java/cn/skcks/docking/gb28181/sip/process/RequestTest.java b/gb28181-sip/src/test/java/cn/skcks/docking/gb28181/sip/process/RequestTest.java index efa31ac..0239a5e 100644 --- a/gb28181-sip/src/test/java/cn/skcks/docking/gb28181/sip/process/RequestTest.java +++ b/gb28181-sip/src/test/java/cn/skcks/docking/gb28181/sip/process/RequestTest.java @@ -94,6 +94,8 @@ public class RequestTest { // 下载请求 Request downloadInviteRequest = inviteRequestBuilder.createDownloadInviteRequest(callId, 1, localId, receiveRtp, receiveRtpPort, playBackSsrc, MediaStreamMode.TCP_ACTIVE,startTime,endTime,4.0); log.info("\n{}", downloadInviteRequest); + Response tryingInviteResponse = inviteResponseBuilder.createTryingInviteResponse(downloadInviteRequest); + log.info("\n{}", tryingInviteResponse); inviteResponse = inviteResponseBuilder.createInviteResponse(downloadInviteRequest, senderRtp, senderRtpPort, SipUtil.nanoId()); log.info("\n{}", inviteResponse); }