Commit 1abfced3b459a9ec99fd0e9f606dc1133e5f3ef6
1 parent
5e738748
修复点播后bye信息的发送
Showing
1 changed file
with
9 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -26,6 +26,7 @@ import gov.nist.javax.sip.SipProviderImpl; |
| 26 | 26 | import gov.nist.javax.sip.SipStackImpl; |
| 27 | 27 | import gov.nist.javax.sip.message.MessageFactoryImpl; |
| 28 | 28 | import gov.nist.javax.sip.message.SIPRequest; |
| 29 | +import gov.nist.javax.sip.stack.SIPClientTransaction; | |
| 29 | 30 | import gov.nist.javax.sip.stack.SIPDialog; |
| 30 | 31 | import org.slf4j.Logger; |
| 31 | 32 | import org.slf4j.LoggerFactory; |
| ... | ... | @@ -433,7 +434,14 @@ public class SIPCommander implements ISIPCommander { |
| 433 | 434 | }), e ->{ |
| 434 | 435 | // 这里为例避免一个通道的点播只有一个callID这个参数使用一个固定值 |
| 435 | 436 | streamSession.put(device.getDeviceId(), channelId ,"play", stream, ssrcInfo.getSsrc(), mediaServerItem.getId(), ((ResponseEvent)e.event).getClientTransaction(), VideoStreamSessionManager.SessionType.play); |
| 436 | - streamSession.put(device.getDeviceId(), channelId ,"play", e.dialog); | |
| 437 | + Dialog sipDialog = null; | |
| 438 | + if (e.dialog == null) { | |
| 439 | + SIPClientTransaction clientTransaction = (SIPClientTransaction)((ResponseEvent)e.event).getClientTransaction(); | |
| 440 | + sipDialog = new SIPDialog(clientTransaction, clientTransaction.getLastResponse()); | |
| 441 | + }else { | |
| 442 | + sipDialog = e.dialog; | |
| 443 | + } | |
| 444 | + streamSession.put(device.getDeviceId(), channelId ,"play", sipDialog); | |
| 437 | 445 | okEvent.response(e); |
| 438 | 446 | }); |
| 439 | 447 | ... | ... |