修复上级点播时如果推流信息中mediaServerID错误的情况
| | |
| | | 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;
|
| | | }
|
| | |
|
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | | }
|
| | |
| | | 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))){ |
| | |
| | | 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()); |
| | | if (streamPushItem != null) { |
| | | mediaServerItem = mediaServerService.getOne(streamPushItem.getMediaServerId()); |
| | | } |
| | | return; |
| | | }else { |
| | | // TODO 可能漏回复消息 |
| | | if (mediaServerItem == null) { |
| | | mediaServerItem = mediaServerService.getDefaultMediaServer(); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | }
|
| | | return ret;
|
| | | }
|
| | | // 推流具有主动性,暂时不做处理
|
| | | // TODO 推流具有主动性,暂时不做处理
|
| | | // StreamPushItem streamPushItem = streamPushService.getPush(app, streamId);
|
| | | // if (streamPushItem != null) {
|
| | | // // TODO 发送停止
|
| | |
| | | // 行政区划默认去编号的前6位 |
| | | parentPlatform.setAdministrativeDivision(parentPlatform.getServerGBId().substring(0,6)); |
| | | } |
| | | parentPlatform.setTreeType("CivilCode"); |
| | | parentPlatform.setCatalogId(parentPlatform.getDeviceGBId()); |
| | | int result = platformMapper.addParentPlatform(parentPlatform); |
| | | // 添加缓存 |