Commit 39a5c8e2cf18cab6469bc0204d2b3c4d7e9e2935
1 parent
dbe6ece6
fixed--解决ssrc默认开启失败的问题,解决信令超时设备下线的bug
Showing
2 changed files
with
9 additions
and
3 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
src/main/java/com/genersoft/iot/vmp/gb28181/event/SipSubscribe.java
| ... | ... | @@ -88,8 +88,8 @@ public class SipSubscribe { |
| 88 | 88 | this.type = "timeout"; |
| 89 | 89 | this.msg = "消息超时未回复"; |
| 90 | 90 | this.statusCode = -1024; |
| 91 | - this.callId = timeoutEvent.getClientTransaction().getDialog().getCallId().getCallId(); | |
| 92 | 91 | this.dialog = timeoutEvent.getClientTransaction().getDialog(); |
| 92 | + this.callId = this.dialog != null?timeoutEvent.getClientTransaction().getDialog().getCallId().getCallId(): null; | |
| 93 | 93 | }else if (event instanceof TransactionTerminatedEvent) { |
| 94 | 94 | TransactionTerminatedEvent transactionTerminatedEvent = (TransactionTerminatedEvent)event; |
| 95 | 95 | this.type = "transactionTerminated"; |
| ... | ... | @@ -109,8 +109,8 @@ public class SipSubscribe { |
| 109 | 109 | this.type = "deviceNotFoundEvent"; |
| 110 | 110 | this.msg = "设备未找到"; |
| 111 | 111 | this.statusCode = -1024; |
| 112 | - this.callId = deviceNotFoundEvent.getDialog().getCallId().getCallId(); | |
| 113 | 112 | this.dialog = deviceNotFoundEvent.getDialog(); |
| 113 | + this.callId = this.dialog != null ?deviceNotFoundEvent.getDialog().getCallId().getCallId() : null; | |
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | } |
| ... | ... | @@ -130,6 +130,9 @@ public class SipSubscribe { |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | public void removeErrorSubscribe(String key) { |
| 133 | + if(key == null){ | |
| 134 | + return; | |
| 135 | + } | |
| 133 | 136 | errorSubscribes.remove(key); |
| 134 | 137 | errorTimeSubscribes.remove(key); |
| 135 | 138 | } |
| ... | ... | @@ -139,6 +142,9 @@ public class SipSubscribe { |
| 139 | 142 | } |
| 140 | 143 | |
| 141 | 144 | public void removeOkSubscribe(String key) { |
| 145 | + if(key == null){ | |
| 146 | + return; | |
| 147 | + } | |
| 142 | 148 | okSubscribes.remove(key); |
| 143 | 149 | okTimeSubscribes.remove(key); |
| 144 | 150 | } | ... | ... |