| | |
| | | sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> { |
| | | logger.error("发送NOTIFY通知消息失败。错误:{} {}", eventResult.statusCode, eventResult.msg); |
| | | }, (eventResult -> { |
| | | logger.info("[发送NOTIFY通知]类型: {},发送成功: {}", type, channels.size()); |
| | | try { |
| | | sendNotifyForCatalogAddOrUpdate(type, parentPlatform, deviceChannels, subscribeInfo, |
| | | finalIndex + parentPlatform.getCatalogGroup()); |
| | |
| | | }else { |
| | | channels = deviceChannels.subList(index, deviceChannels.size()); |
| | | } |
| | | logger.info("[发送NOTIFY通知]类型: {},发送数量: {}", type, channels.size()); |
| | | Integer finalIndex = index; |
| | | String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, channels, type); |
| | | sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> { |
| | |
| | | if ( parentPlatform ==null) { |
| | | return ; |
| | | } |
| | | logger.info("[国标级联] 发送录像数据通道: {}", recordInfo.getChannelId()); |
| | | String characterSet = parentPlatform.getCharacterSet(); |
| | | StringBuffer recordXml = new StringBuffer(600); |
| | | recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n") |
| | |
| | | |
| | | recordXml.append("</RecordList>\r\n") |
| | | .append("</Response>\r\n"); |
| | | |
| | | logger.info("[国标级联] 发送录像数据通道:{}, 内容: {}", recordInfo.getChannelId(), recordXml); |
| | | // callid |
| | | CallIdHeader callIdHeader = sipSender.getNewCallIdHeader(parentPlatform.getDeviceIp(),parentPlatform.getTransport()); |
| | | |
| | | Request request = headerProviderPlatformProvider.createMessageRequest(parentPlatform, recordXml.toString(), fromTag, SipUtils.getNewViaTag(), callIdHeader); |
| | | sipSender.transmitRequest(parentPlatform.getDeviceIp(), request); |
| | | sipSender.transmitRequest(parentPlatform.getDeviceIp(), request, null, eventResult -> { |
| | | logger.info("[国标级联] 发送录像数据通道:{}, 发送成功", recordInfo.getChannelId()); |
| | | }); |
| | | |
| | | } |
| | | |