| | |
| | | private Boolean sipLog = Boolean.FALSE; |
| | | private Boolean sendToPlatformsWhenIdLost = Boolean.FALSE; |
| | | |
| | | private Boolean refuseChannelStatusChannelFormNotify = Boolean.FALSE; |
| | | |
| | | private String serverId = "000000"; |
| | | |
| | | private String thirdPartyGBIdReg = "[\\s\\S]*"; |
| | |
| | | public void setSendToPlatformsWhenIdLost(Boolean sendToPlatformsWhenIdLost) { |
| | | this.sendToPlatformsWhenIdLost = sendToPlatformsWhenIdLost; |
| | | } |
| | | |
| | | public Boolean getRefuseChannelStatusChannelFormNotify() { |
| | | return refuseChannelStatusChannelFormNotify; |
| | | } |
| | | |
| | | public void setRefuseChannelStatusChannelFormNotify(Boolean refuseChannelStatusChannelFormNotify) { |
| | | this.refuseChannelStatusChannelFormNotify = refuseChannelStatusChannelFormNotify; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | case CatalogEvent.OFF : |
| | | // 离线 |
| | | logger.info("[收到通道离线通知] 来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId()); |
| | | storager.deviceChannelOffline(deviceId, channel.getChannelId()); |
| | | if (userSetting.getRefuseChannelStatusChannelFormNotify()) { |
| | | storager.deviceChannelOffline(deviceId, channel.getChannelId()); |
| | | }else { |
| | | logger.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId()); |
| | | } |
| | | break; |
| | | case CatalogEvent.VLOST: |
| | | // 视频丢失 |
| | | logger.info("[收到通道视频丢失通知] 来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId()); |
| | | storager.deviceChannelOffline(deviceId, channel.getChannelId()); |
| | | if (userSetting.getRefuseChannelStatusChannelFormNotify()) { |
| | | storager.deviceChannelOffline(deviceId, channel.getChannelId()); |
| | | }else { |
| | | logger.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), channel.getChannelId()); |
| | | } |
| | | break; |
| | | case CatalogEvent.DEFECT: |
| | | // 故障 |
| | |
| | | |
| | | @Override |
| | | public void sendAlarmMsg(AlarmChannelMessage msg) { |
| | | // 此消息用于对接第三方服务下级来的消息内容 |
| | | String key = VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM; |
| | | logger.info("[redis发送通知] 报警{}: {}", key, JSON.toJSON(msg)); |
| | | RedisUtil.convertAndSend(key, (JSONObject)JSON.toJSON(msg)); |
| | |
| | | sip-log: true |
| | | # 消息通道功能-缺少国标ID是否给所有上级发送消息 |
| | | send-to-platforms-when-id-lost: true |
| | | # 保持通道状态,不接受notify通道状态变化, 兼容海康平台发送错误消息 |
| | | refuse-channel-status-channel-form-notify: false |
| | | # 跨域配置,配置你访问前端页面的地址即可, 可以配置多个 |
| | | allowed-origins: |
| | | - http://localhost:8008 |