修复上级点播时如果推流信息中mediaServerID错误的情况

This commit is contained in:
648540858
2023-06-26 19:06:14 +08:00
parent 8cf5b65e38
commit 724963324a
5 changed files with 14 additions and 16 deletions

View File

@@ -214,6 +214,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
continue;
}else {
if (channel.getChannelId().length() != 20) {
logger.warn("[编号长度异常] {} 长度错误请使用20位长度的国标编号,当前长度:{}", channel.getChannelId(), channel.getChannelId().length());
catalogXml.append("</Item>\r\n");
continue;
}
switch (Integer.parseInt(channel.getChannelId().substring(10, 13))){

View File

@@ -183,16 +183,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
return;
} else {
streamPushItem = streamPushService.getPush(gbStream.getApp(), gbStream.getStream());
if (streamPushItem == null || streamPushItem.getServerId().equals(userSetting.getServerId())) {
logger.info("[ app={}, stream={} ]找不到zlm {}返回410", gbStream.getApp(), gbStream.getStream(), mediaServerId);
try {
responseAck(request, Response.GONE);
} catch (SipException | InvalidArgumentException | ParseException e) {
logger.error("[命令发送失败] invite GONE: {}", e.getMessage());
}
return;
}else {
// TODO 可能漏回复消息
if (streamPushItem != null) {
mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId());
}
if (mediaServerItem == null) {
mediaServerItem = mediaServerService.getDefaultMediaServer();
}
}
} else {