From fc7f1b3459d9c65a37cae25bc254a6a3d62cc6db Mon Sep 17 00:00:00 2001 From: xubinbin <1323875150@qq.com> Date: Fri, 23 Sep 2022 10:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=8A=E7=BA=A7=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=8F=91=E9=80=81=E7=9A=84invite=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=B8=8D=E6=90=BA=E5=B8=A6=E2=80=9Cy=3D=E2=80=9Dsdp=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=97=B6=EF=BC=8C=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E2=80=9Cy=3D0000000000=E2=80=9D=E8=A7=86=E9=A2=91=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/event/request/impl/InviteRequestProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java index ff3c78f0..7c394460 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java @@ -332,14 +332,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n"); content.append("a=sendonly\r\n"); content.append("a=rtpmap:96 PS/90000\r\n"); - content.append("y=" + ssrc + "\r\n"); + content.append("y=" + sendRtpItem.getSsrc() + "\r\n"); content.append("f=\r\n"); try { // 超时未收到Ack应该回复bye,当前等待时间为10秒 dynamicTask.startDelay(callIdHeader.getCallId(), () -> { logger.info("Ack 等待超时"); - mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), ssrc); + mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), sendRtpItem.getSsrc()); // 回复bye cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId()); }, 60 * 1000); @@ -421,6 +421,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false); logger.info(JSONObject.toJSONString(ssrcInfo)); sendRtpItem.setStreamId(ssrcInfo.getStream()); + sendRtpItem.setSsrc(ssrc.equals(ssrcDefault) ? ssrcInfo.getSsrc() : ssrc); // 写入redis, 超时时回复 redisCatchStorage.updateSendRTPSever(sendRtpItem);