修复设备在事务内注销失败的问题
parent
88721511e7
commit
7f79b92568
|
@ -106,6 +106,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
|
|||
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());
|
||||
|
@ -120,6 +121,9 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue