修复上级点播时如果推流信息中mediaServerID错误的情况
parent
8cf5b65e38
commit
724963324a
|
@ -64,7 +64,7 @@ public class SipLayer implements CommandLineRunner {
|
||||||
try {
|
try {
|
||||||
sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog()));
|
sipStack = (SipStackImpl)SipFactory.getInstance().createSipStack(DefaultProperties.getProperties(monitorIp, userSetting.getSipLog()));
|
||||||
} catch (PeerUnavailableException e) {
|
} catch (PeerUnavailableException e) {
|
||||||
logger.error("[Sip Server] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp);
|
logger.error("[SIP SERVER] SIP服务启动失败, 监听地址{}失败,请检查ip是否正确", monitorIp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,12 +76,12 @@ public class SipLayer implements CommandLineRunner {
|
||||||
tcpSipProvider.addSipListener(sipProcessorObserver);
|
tcpSipProvider.addSipListener(sipProcessorObserver);
|
||||||
tcpSipProviderMap.put(monitorIp, tcpSipProvider);
|
tcpSipProviderMap.put(monitorIp, tcpSipProvider);
|
||||||
|
|
||||||
logger.info("[Sip Server] tcp://{}:{} 启动成功", monitorIp, port);
|
logger.info("[SIP SERVER] tcp://{}:{} 启动成功", monitorIp, port);
|
||||||
} catch (TransportNotSupportedException
|
} catch (TransportNotSupportedException
|
||||||
| TooManyListenersException
|
| TooManyListenersException
|
||||||
| ObjectInUseException
|
| ObjectInUseException
|
||||||
| InvalidArgumentException e) {
|
| InvalidArgumentException e) {
|
||||||
logger.error("[Sip Server] tcp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
logger.error("[SIP SERVER] tcp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||||
, monitorIp, port);
|
, monitorIp, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,12 +93,12 @@ public class SipLayer implements CommandLineRunner {
|
||||||
|
|
||||||
udpSipProviderMap.put(monitorIp, udpSipProvider);
|
udpSipProviderMap.put(monitorIp, udpSipProvider);
|
||||||
|
|
||||||
logger.info("[Sip Server] udp://{}:{} 启动成功", monitorIp, port);
|
logger.info("[SIP SERVER] udp://{}:{} 启动成功", monitorIp, port);
|
||||||
} catch (TransportNotSupportedException
|
} catch (TransportNotSupportedException
|
||||||
| TooManyListenersException
|
| TooManyListenersException
|
||||||
| ObjectInUseException
|
| ObjectInUseException
|
||||||
| InvalidArgumentException e) {
|
| InvalidArgumentException e) {
|
||||||
logger.error("[Sip Server] udp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
logger.error("[SIP SERVER] udp://{}:{} SIP服务启动失败,请检查端口是否被占用或者ip是否正确"
|
||||||
, monitorIp, port);
|
, monitorIp, port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
||||||
continue;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
if (channel.getChannelId().length() != 20) {
|
if (channel.getChannelId().length() != 20) {
|
||||||
|
logger.warn("[编号长度异常] {} 长度错误,请使用20位长度的国标编号,当前长度:{}", channel.getChannelId(), channel.getChannelId().length());
|
||||||
|
catalogXml.append("</Item>\r\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
switch (Integer.parseInt(channel.getChannelId().substring(10, 13))){
|
switch (Integer.parseInt(channel.getChannelId().substring(10, 13))){
|
||||||
|
|
|
@ -183,16 +183,11 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
streamPushItem = streamPushService.getPush(gbStream.getApp(), gbStream.getStream());
|
streamPushItem = streamPushService.getPush(gbStream.getApp(), gbStream.getStream());
|
||||||
if (streamPushItem == null || streamPushItem.getServerId().equals(userSetting.getServerId())) {
|
if (streamPushItem != null) {
|
||||||
logger.info("[ app={}, stream={} ]找不到zlm {},返回410", gbStream.getApp(), gbStream.getStream(), mediaServerId);
|
mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId());
|
||||||
try {
|
|
||||||
responseAck(request, Response.GONE);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] invite GONE: {}", e.getMessage());
|
|
||||||
}
|
}
|
||||||
return;
|
if (mediaServerItem == null) {
|
||||||
}else {
|
mediaServerItem = mediaServerService.getDefaultMediaServer();
|
||||||
// TODO 可能漏回复消息
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -533,7 +533,7 @@ public class ZLMHttpHookListener {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
// 推流具有主动性,暂时不做处理
|
// TODO 推流具有主动性,暂时不做处理
|
||||||
// StreamPushItem streamPushItem = streamPushService.getPush(app, streamId);
|
// StreamPushItem streamPushItem = streamPushService.getPush(app, streamId);
|
||||||
// if (streamPushItem != null) {
|
// if (streamPushItem != null) {
|
||||||
// // TODO 发送停止
|
// // TODO 发送停止
|
||||||
|
|
|
@ -101,6 +101,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
// 行政区划默认去编号的前6位
|
// 行政区划默认去编号的前6位
|
||||||
parentPlatform.setAdministrativeDivision(parentPlatform.getServerGBId().substring(0,6));
|
parentPlatform.setAdministrativeDivision(parentPlatform.getServerGBId().substring(0,6));
|
||||||
}
|
}
|
||||||
|
parentPlatform.setTreeType("CivilCode");
|
||||||
parentPlatform.setCatalogId(parentPlatform.getDeviceGBId());
|
parentPlatform.setCatalogId(parentPlatform.getDeviceGBId());
|
||||||
int result = platformMapper.addParentPlatform(parentPlatform);
|
int result = platformMapper.addParentPlatform(parentPlatform);
|
||||||
// 添加缓存
|
// 添加缓存
|
||||||
|
|
Loading…
Reference in New Issue