Commit e166cc366cadf42c58e74fb75e39cc394334bf4d
Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0
Showing
1 changed file
with
7 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java
| ... | ... | @@ -94,7 +94,13 @@ public class SIPRequestHeaderPlarformProvider { |
| 94 | 94 | SipURI requestURI = sipLayer.getSipFactory().createAddressFactory().createSipURI(parentPlatform.getServerGBId(), parentPlatform.getServerIP() + ":" + parentPlatform.getServerPort()); |
| 95 | 95 | if (www == null) { |
| 96 | 96 | AuthorizationHeader authorizationHeader = sipLayer.getSipFactory().createHeaderFactory().createAuthorizationHeader("Digest"); |
| 97 | - authorizationHeader.setUsername(parentPlatform.getDeviceGBId()); | |
| 97 | + String username = parentPlatform.getUsername(); | |
| 98 | + if ( username == null || username == "" ) | |
| 99 | + { | |
| 100 | + authorizationHeader.setUsername(parentPlatform.getDeviceGBId()); | |
| 101 | + } else { | |
| 102 | + authorizationHeader.setUsername(username); | |
| 103 | + } | |
| 98 | 104 | authorizationHeader.setURI(requestURI); |
| 99 | 105 | authorizationHeader.setAlgorithm("MD5"); |
| 100 | 106 | registerRequest.addHeader(authorizationHeader); | ... | ... |