| | |
| | | device.getSipTransactionInfo() != null && |
| | | request.getCallIdHeader().getCallId().equals(device.getSipTransactionInfo().getCallId())) { |
| | | logger.info(title + "设备:{}, 注册续订: {}",device.getDeviceId(), device.getDeviceId()); |
| | | if (registerFlag) { |
| | | device.setExpires(request.getExpires().getExpires()); |
| | | device.setIp(remoteAddressInfo.getIp()); |
| | | device.setPort(remoteAddressInfo.getPort()); |
| | |
| | | device.setRegisterTime(DateUtil.getNow()); |
| | | SipTransactionInfo sipTransactionInfo = new SipTransactionInfo((SIPResponse)registerOkResponse); |
| | | deviceService.online(device, sipTransactionInfo); |
| | | }else { |
| | | deviceService.offline(deviceId, "主动注销"); |
| | | } |
| | | return; |
| | | } |
| | | String password = (device != null && !ObjectUtils.isEmpty(device.getPassword()))? device.getPassword() : sipConfig.getPassword(); |