From 1abfced3b459a9ec99fd0e9f606dc1133e5f3ef6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 22 Sep 2022 11:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E6=92=AD=E5=90=8Eby?= =?UTF-8?q?e=E4=BF=A1=E6=81=AF=E7=9A=84=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 0368ee4a..d08201f8 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 @@ -26,6 +26,7 @@ import gov.nist.javax.sip.SipProviderImpl; import gov.nist.javax.sip.SipStackImpl; import gov.nist.javax.sip.message.MessageFactoryImpl; import gov.nist.javax.sip.message.SIPRequest; +import gov.nist.javax.sip.stack.SIPClientTransaction; import gov.nist.javax.sip.stack.SIPDialog; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -433,7 +434,14 @@ public class SIPCommander implements ISIPCommander { }), e ->{ // 这里为例避免一个通道的点播只有一个callID这个参数使用一个固定值 streamSession.put(device.getDeviceId(), channelId ,"play", stream, ssrcInfo.getSsrc(), mediaServerItem.getId(), ((ResponseEvent)e.event).getClientTransaction(), VideoStreamSessionManager.SessionType.play); - streamSession.put(device.getDeviceId(), channelId ,"play", e.dialog); + Dialog sipDialog = null; + if (e.dialog == null) { + SIPClientTransaction clientTransaction = (SIPClientTransaction)((ResponseEvent)e.event).getClientTransaction(); + sipDialog = new SIPDialog(clientTransaction, clientTransaction.getLastResponse()); + }else { + sipDialog = e.dialog; + } + streamSession.put(device.getDeviceId(), channelId ,"play", sipDialog); okEvent.response(e); });