|  |  | 
 |  |  | import com.genersoft.iot.vmp.gb28181.bean.Device; | 
 |  |  | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; | 
 |  |  | import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; | 
 |  |  | import com.genersoft.iot.vmp.gb28181.session.SSRCFactory; | 
 |  |  | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; | 
 |  |  | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; | 
 |  |  | 
 |  |  |     private IRedisCatchStorage redisCatchStorage; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SSRCFactory ssrcFactory; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private UserSetting userSetting; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  | 
 |  |  |  | 
 |  |  |         for (Device device : deviceList) { | 
 |  |  |             if (deviceService.expire(device)){ | 
 |  |  |                 deviceService.offline(device.getDeviceId()); | 
 |  |  |                 deviceService.offline(device.getDeviceId(), "注册已过期"); | 
 |  |  |             }else { | 
 |  |  |                 deviceService.online(device); | 
 |  |  |                 deviceService.online(device, null); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         // 重置cseq计数 | 
 |  |  | 
 |  |  |         if (sendRtpItems.size() > 0) { | 
 |  |  |             for (SendRtpItem sendRtpItem : sendRtpItems) { | 
 |  |  |                 MediaServerItem mediaServerItem = mediaServerService.getOne(sendRtpItem.getMediaServerId()); | 
 |  |  |                 redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(),sendRtpItem.getChannelId(), sendRtpItem.getCallId(),sendRtpItem.getStreamId()); | 
 |  |  |                 redisCatchStorage.deleteSendRTPServer(sendRtpItem.getPlatformId(),sendRtpItem.getChannelId(), sendRtpItem.getCallId(),sendRtpItem.getStream()); | 
 |  |  |                 if (mediaServerItem != null) { | 
 |  |  |                     ssrcFactory.releaseSsrc(sendRtpItem.getMediaServerId(), sendRtpItem.getSsrc()); | 
 |  |  |                     Map<String, Object> param = new HashMap<>(); | 
 |  |  |                     param.put("vhost","__defaultVhost__"); | 
 |  |  |                     param.put("app",sendRtpItem.getApp()); | 
 |  |  |                     param.put("stream",sendRtpItem.getStreamId()); | 
 |  |  |                     param.put("stream",sendRtpItem.getStream()); | 
 |  |  |                     param.put("ssrc",sendRtpItem.getSsrc()); | 
 |  |  |                     JSONObject jsonObject = zlmresTfulUtils.stopSendRtp(mediaServerItem, param); | 
 |  |  |                     if (jsonObject != null && jsonObject.getInteger("code") == 0) { |