MediaStatus 未找到对应信息时 依然需要向发送 bye 结束

防止某些设备未收到bye 不会自动结束一直卡死 无法后续点播
This commit is contained in:
zxb 2023-10-13 10:47:39 +08:00
parent 98f1ffa838
commit 0c1860368c

View File

@ -124,6 +124,26 @@ public class MediaStatusNotifyMessageHandler extends SIPRequestProcessorParent i
}
}
}else {
try {
cmder.streamByeCmd(device, getText(rootElement, "DeviceID"), null, callIdHeader.getCallId());
} catch (InvalidArgumentException | ParseException | SsrcTransactionNotFoundException | SipException e) {
logger.error("[录像流]推送完毕,收到关流通知, 发送BYE失败 {}", e.getMessage());
}
// 如果级联播放需要给上级发送此通知 TODO 多个上级同时观看一个下级 可能存在停错的问题需要将点播CallId进行上下级绑定
SendRtpItem sendRtpItem = redisCatchStorage.querySendRTPServer(null, getText(rootElement, "DeviceID"), null, null);
if (sendRtpItem != null) {
ParentPlatform parentPlatform = storage.queryParentPlatByServerGBId(sendRtpItem.getPlatformId());
if (parentPlatform == null) {
logger.warn("[级联消息发送]发送MediaStatus发现上级平台{}不存在", sendRtpItem.getPlatformId());
return;
}
try {
sipCommanderFroPlatform.sendMediaStatusNotify(parentPlatform, sendRtpItem);
} catch (SipException | InvalidArgumentException | ParseException e) {
logger.error("[命令发送失败] 国标级联 录像播放完毕: {}", e.getMessage());
}
}
logger.info("[录像流]推送完毕,关流通知, 但是未找到对应的下载信息");
}
}