Commit 858093fe9a1c23d2be22ecb75ceab1139931454e
1 parent
ecb5b691
国标级联兼容大华NVR
Showing
1 changed file
with
4 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| ... | ... | @@ -85,7 +85,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 85 | 85 | public boolean register(ParentPlatform parentPlatform, @Nullable String callId, @Nullable WWWAuthenticateHeader www, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) { |
| 86 | 86 | try { |
| 87 | 87 | Request request = null; |
| 88 | - | |
| 88 | + String tm = Long.toString(System.currentTimeMillis()); | |
| 89 | 89 | if (www == null ) { |
| 90 | 90 | // //callid |
| 91 | 91 | CallIdHeader callIdHeader = null; |
| ... | ... | @@ -95,7 +95,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 95 | 95 | if(parentPlatform.getTransport().equals("UDP")) { |
| 96 | 96 | callIdHeader = udpSipProvider.getNewCallId(); |
| 97 | 97 | } |
| 98 | - request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, 1L, null, null, callIdHeader); | |
| 98 | + | |
| 99 | + request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, 1L, "FromRegister" + tm, null, callIdHeader); | |
| 99 | 100 | // 将 callid 写入缓存, 等注册成功可以更新状态 |
| 100 | 101 | redisCatchStorage.updatePlatformRegisterInfo(callIdHeader.getCallId(), parentPlatform.getServerGBId()); |
| 101 | 102 | |
| ... | ... | @@ -113,8 +114,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 113 | 114 | }else { |
| 114 | 115 | CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() |
| 115 | 116 | : udpSipProvider.getNewCallId(); |
| 116 | - | |
| 117 | - request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, null, null, callId, www, callIdHeader); | |
| 117 | + request = headerProviderPlarformProvider.createRegisterRequest(parentPlatform, "FromRegister" + tm, null, callId, www, callIdHeader); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | transmitRequest(parentPlatform, request, null, okEvent); | ... | ... |