| | |
| | | if (!device.getStreamMode().equalsIgnoreCase("TCP-ACTIVE")) { |
| | | return; |
| | | } |
| | | String substring = contentString.substring(0, contentString.indexOf("y=")); |
| | | |
| | | String substring; |
| | | if (contentString.indexOf("y=") > 0) { |
| | | substring = contentString.substring(0, contentString.indexOf("y=")); |
| | | }else { |
| | | substring = contentString; |
| | | } |
| | | try { |
| | | SessionDescription sdp = SdpFactory.getInstance().createSessionDescription(substring); |
| | | int port = -1; |
| | |
| | | // 处理收到200ok后的TCP主动连接以及SSRC不一致的问题 |
| | | InviteOKHandler(eventResult, ssrcInfo, mediaServerItem, device, channelId, |
| | | playBackTimeOutTaskKey, callback, inviteInfo, InviteSessionType.PLAYBACK); |
| | | |
| | | }, errorEvent); |
| | | } catch (InvalidArgumentException | SipException | ParseException e) { |
| | | logger.error("[命令发送失败] 录像回放: {}", e.getMessage()); |
| | |
| | | ResponseEvent responseEvent = (ResponseEvent) eventResult.event; |
| | | String contentString = new String(responseEvent.getResponse().getRawContent()); |
| | | String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString); |
| | | // 兼容回复的消息中缺少ssrc(y字段)的情况 |
| | | if (ssrcInResponse == null) { |
| | | ssrcInResponse = ssrcInfo.getSsrc(); |
| | | } |
| | | if (ssrcInfo.getSsrc().equals(ssrcInResponse)) { |
| | | // ssrc 一致 |
| | | if (mediaServerItem.isRtpEnable()) { |