Merge pull request #524 from TristingChen/fixed--processTimeout

fixed--解决ssrc默认开启失败的问题,解决信令超时设备下线的bug
This commit is contained in:
648540858 2022-06-17 16:05:35 +08:00 committed by GitHub
commit f0096af3e2
2 changed files with 9 additions and 3 deletions

View File

@ -131,7 +131,7 @@ public class Device {
/** /**
* 是否开启ssrc校验默认关闭开启可以防止串流 * 是否开启ssrc校验默认关闭开启可以防止串流
*/ */
private boolean ssrcCheck; private boolean ssrcCheck = true;
/** /**
* 地理坐标系 目前支持 WGS84,GCJ02 TODO CGCS2000 * 地理坐标系 目前支持 WGS84,GCJ02 TODO CGCS2000

View File

@ -88,8 +88,8 @@ public class SipSubscribe {
this.type = "timeout"; this.type = "timeout";
this.msg = "消息超时未回复"; this.msg = "消息超时未回复";
this.statusCode = -1024; this.statusCode = -1024;
this.callId = timeoutEvent.getClientTransaction().getDialog().getCallId().getCallId();
this.dialog = timeoutEvent.getClientTransaction().getDialog(); this.dialog = timeoutEvent.getClientTransaction().getDialog();
this.callId = this.dialog != null?timeoutEvent.getClientTransaction().getDialog().getCallId().getCallId(): null;
}else if (event instanceof TransactionTerminatedEvent) { }else if (event instanceof TransactionTerminatedEvent) {
TransactionTerminatedEvent transactionTerminatedEvent = (TransactionTerminatedEvent)event; TransactionTerminatedEvent transactionTerminatedEvent = (TransactionTerminatedEvent)event;
this.type = "transactionTerminated"; this.type = "transactionTerminated";
@ -109,8 +109,8 @@ public class SipSubscribe {
this.type = "deviceNotFoundEvent"; this.type = "deviceNotFoundEvent";
this.msg = "设备未找到"; this.msg = "设备未找到";
this.statusCode = -1024; this.statusCode = -1024;
this.callId = deviceNotFoundEvent.getDialog().getCallId().getCallId();
this.dialog = deviceNotFoundEvent.getDialog(); this.dialog = deviceNotFoundEvent.getDialog();
this.callId = this.dialog != null ?deviceNotFoundEvent.getDialog().getCallId().getCallId() : null;
} }
} }
} }
@ -130,6 +130,9 @@ public class SipSubscribe {
} }
public void removeErrorSubscribe(String key) { public void removeErrorSubscribe(String key) {
if(key == null){
return;
}
errorSubscribes.remove(key); errorSubscribes.remove(key);
errorTimeSubscribes.remove(key); errorTimeSubscribes.remove(key);
} }
@ -139,6 +142,9 @@ public class SipSubscribe {
} }
public void removeOkSubscribe(String key) { public void removeOkSubscribe(String key) {
if(key == null){
return;
}
okSubscribes.remove(key); okSubscribes.remove(key);
okTimeSubscribes.remove(key); okTimeSubscribes.remove(key);
} }