| | |
| | | |
| | | sipSubscribe.addErrorSubscribe(callIdHeader.getCallId(), (event)->{ |
| | | if (event != null) { |
| | | logger.info("向上级平台 [ {} ] 注册发上错误: {} ", |
| | | logger.info("向上级平台 [ {} ] 注册发生错误: {} ", |
| | | parentPlatform.getServerGBId(), |
| | | event.msg); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public boolean sendNotifyForCatalogAddOrUpdate(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo) { |
| | | if (parentPlatform == null) { |
| | | return false; |
| | | } |
| | | if (deviceChannels == null || deviceChannels.size() == 0) { |
| | | if (parentPlatform == null || deviceChannels == null || deviceChannels.size() == 0 || subscribeInfo == null) { |
| | | return false; |
| | | } |
| | | for (DeviceChannel channel : deviceChannels) { |
| | |
| | | |
| | | Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader); |
| | | transmitRequest(parentPlatform, request); |
| | | Thread.sleep(100); |
| | | Thread.sleep(10); |
| | | } catch (SipException | ParseException | InvalidArgumentException e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | |
| | | |
| | | @Override |
| | | public boolean sendNotifyForCatalogOther(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo) { |
| | | if (parentPlatform == null) { |
| | | return false; |
| | | } |
| | | if (deviceChannels == null || deviceChannels.size() == 0) { |
| | | if (parentPlatform == null |
| | | || deviceChannels == null |
| | | || deviceChannels.size() == 0 |
| | | || subscribeInfo == null) { |
| | | return false; |
| | | } |
| | | |
| | |
| | | |
| | | Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader); |
| | | transmitRequest(parentPlatform, request); |
| | | Thread.sleep(100); |
| | | Thread.sleep(200); |
| | | } catch (SipException | ParseException | InvalidArgumentException e) { |
| | | e.printStackTrace(); |
| | | return false; |