Commit b079039f818cbb33939a89167ee1853868004d67
1 parent
bf0efc27
修复国标级联上级主动结束时ssrc未释放的问题
Showing
3 changed files
with
5 additions
and
2 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| @@ -631,6 +631,7 @@ public class SIPCommander implements ISIPCommander { | @@ -631,6 +631,7 @@ public class SIPCommander implements ISIPCommander { | ||
| 631 | streamSession.removeByCallId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getCallId()); | 631 | streamSession.removeByCallId(ssrcTransaction.getDeviceId(), ssrcTransaction.getChannelId(), ssrcTransaction.getCallId()); |
| 632 | Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo()); | 632 | Request byteRequest = headerProvider.createByteRequest(device, channelId, ssrcTransaction.getSipTransactionInfo()); |
| 633 | sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent); | 633 | sipSender.transmitRequest(sipLayer.getLocalIp(device.getLocalIp()), byteRequest, null, okEvent); |
| 634 | + | ||
| 634 | } | 635 | } |
| 635 | } | 636 | } |
| 636 | 637 |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/ByeRequestProcessor.java
| @@ -31,7 +31,6 @@ import javax.sip.header.CallIdHeader; | @@ -31,7 +31,6 @@ import javax.sip.header.CallIdHeader; | ||
| 31 | import javax.sip.message.Response; | 31 | import javax.sip.message.Response; |
| 32 | import java.text.ParseException; | 32 | import java.text.ParseException; |
| 33 | import java.util.HashMap; | 33 | import java.util.HashMap; |
| 34 | -import java.util.List; | ||
| 35 | import java.util.Map; | 34 | import java.util.Map; |
| 36 | 35 | ||
| 37 | /** | 36 | /** |
| @@ -117,6 +116,9 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In | @@ -117,6 +116,9 @@ public class ByeRequestProcessor extends SIPRequestProcessorParent implements In | ||
| 117 | redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), | 116 | redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(), sendRtpItem.getChannelId(), |
| 118 | callIdHeader.getCallId(), null); | 117 | callIdHeader.getCallId(), null); |
| 119 | zlmServerFactory.stopSendRtpStream(mediaInfo, param); | 118 | zlmServerFactory.stopSendRtpStream(mediaInfo, param); |
| 119 | + if (userSetting.getUseCustomSsrcForParentInvite()) { | ||
| 120 | + mediaServerService.releaseSsrc(mediaInfo.getId(), sendRtpItem.getSsrc()); | ||
| 121 | + } | ||
| 120 | if (sendRtpItem.getPlayType().equals(InviteStreamType.PUSH)) { | 122 | if (sendRtpItem.getPlayType().equals(InviteStreamType.PUSH)) { |
| 121 | ParentPlatform platform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId()); | 123 | ParentPlatform platform = platformService.queryPlatformByServerGBId(sendRtpItem.getPlatformId()); |
| 122 | if (platform != null) { | 124 | if (platform != null) { |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| @@ -447,7 +447,7 @@ public class ZLMHttpHookListener { | @@ -447,7 +447,7 @@ public class ZLMHttpHookListener { | ||
| 447 | } | 447 | } |
| 448 | if (!param.isRegist()) { | 448 | if (!param.isRegist()) { |
| 449 | List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream()); | 449 | List<SendRtpItem> sendRtpItems = redisCatchStorage.querySendRTPServerByStream(param.getStream()); |
| 450 | - if (sendRtpItems.size() > 0) { | 450 | + if (!sendRtpItems.isEmpty()) { |
| 451 | for (SendRtpItem sendRtpItem : sendRtpItems) { | 451 | for (SendRtpItem sendRtpItem : sendRtpItems) { |
| 452 | if (sendRtpItem != null && sendRtpItem.getApp().equals(param.getApp())) { | 452 | if (sendRtpItem != null && sendRtpItem.getApp().equals(param.getApp())) { |
| 453 | String platformId = sendRtpItem.getPlatformId(); | 453 | String platformId = sendRtpItem.getPlatformId(); |