Merge pull request #620 from xu-bin-bin/wvp-28181-2.0

处理上级平台发送的invite请求不携带“y=”sdp信息时,使用默认“y=0000000000”视频无法播放的问题。
This commit is contained in:
648540858 2022-09-23 23:18:06 +08:00 committed by GitHub
commit d176b5231b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,14 +332,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n"); content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n");
content.append("a=sendonly\r\n"); content.append("a=sendonly\r\n");
content.append("a=rtpmap:96 PS/90000\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"); content.append("f=\r\n");
try { try {
// 超时未收到Ack应该回复bye,当前等待时间为10秒 // 超时未收到Ack应该回复bye,当前等待时间为10秒
dynamicTask.startDelay(callIdHeader.getCallId(), () -> { dynamicTask.startDelay(callIdHeader.getCallId(), () -> {
logger.info("Ack 等待超时"); logger.info("Ack 等待超时");
mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), ssrc); mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), sendRtpItem.getSsrc());
// 回复bye // 回复bye
try { try {
cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId()); cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId());
@ -425,6 +425,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false); SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false);
logger.info(JSONObject.toJSONString(ssrcInfo)); logger.info(JSONObject.toJSONString(ssrcInfo));
sendRtpItem.setStreamId(ssrcInfo.getStream()); sendRtpItem.setStreamId(ssrcInfo.getStream());
sendRtpItem.setSsrc(ssrc.equals(ssrcDefault) ? ssrcInfo.getSsrc() : ssrc);
// 写入redis 超时时回复 // 写入redis 超时时回复
redisCatchStorage.updateSendRTPSever(sendRtpItem); redisCatchStorage.updateSendRTPSever(sendRtpItem);