修复上级点播时如果推流信息中mediaServerID错误的情况
This commit is contained in:
parent
8cf5b65e38
commit
724963324a
@ -64,7 +64,7 @@ public class SipLayer implements CommandLineRunner {
|
||||
try {
|
||||
sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog()));
|
||||
} catch (PeerUnavailableException e) {
|
||||
logger.error("[Sip Server] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp);
|
||||
logger.error("[SIP SERVER] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -76,12 +76,12 @@ public class SipLayer implements CommandLineRunner {
|
||||
tcpSipProvider.addSipListener(sipProcessorObserver);
|
||||
tcpSipProviderMap.put(monitorIp, tcpSipProvider);
|
||||
|
||||
logger.info("[Sip Server] tcp://{}:{} 启动成功", monitorIp, port);
|
||||
logger.info("[SIP SERVER] tcp://{}:{} 启动成功", monitorIp, port);
|
||||
} catch (TransportNotSupportedException
|
||||
| TooManyListenersException
|
||||
| ObjectInUseException
|
||||
| InvalidArgumentException e) {
|
||||
logger.error("[Sip Server] tcp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||
logger.error("[SIP SERVER] tcp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||
, monitorIp, port);
|
||||
}
|
||||
|
||||
@ -93,12 +93,12 @@ public class SipLayer implements CommandLineRunner {
|
||||
|
||||
udpSipProviderMap.put(monitorIp, udpSipProvider);
|
||||
|
||||
logger.info("[Sip Server] udp://{}:{} 启动成功", monitorIp, port);
|
||||
logger.info("[SIP SERVER] udp://{}:{} 启动成功", monitorIp, port);
|
||||
} catch (TransportNotSupportedException
|
||||
| TooManyListenersException
|
||||
| ObjectInUseException
|
||||
| InvalidArgumentException e) {
|
||||
logger.error("[Sip Server] udp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||
logger.error("[SIP SERVER] udp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||
, monitorIp, port);
|
||||
}
|
||||
}
|
||||
|
@ -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))){
|
||||
|
@ -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 {
|
||||
|
@ -533,7 +533,7 @@ public class ZLMHttpHookListener {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
// 推流具有主动性,暂时不做处理
|
||||
// TODO 推流具有主动性,暂时不做处理
|
||||
// StreamPushItem streamPushItem = streamPushService.getPush(app, streamId);
|
||||
// if (streamPushItem != null) {
|
||||
// // TODO 发送停止
|
||||
|
@ -101,6 +101,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||
// 行政区划默认去编号的前6位
|
||||
parentPlatform.setAdministrativeDivision(parentPlatform.getServerGBId().substring(0,6));
|
||||
}
|
||||
parentPlatform.setTreeType("CivilCode");
|
||||
parentPlatform.setCatalogId(parentPlatform.getDeviceGBId());
|
||||
int result = platformMapper.addParentPlatform(parentPlatform);
|
||||
// 添加缓存
|
||||
|
Loading…
Reference in New Issue
Block a user