Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0

pull/810/head
648540858 2023-03-31 09:00:36 +08:00
commit e166cc366c
1 changed files with 7 additions and 1 deletions

View File

@ -94,7 +94,13 @@ public class SIPRequestHeaderPlarformProvider {
SipURI requestURI = sipLayer.getSipFactory().createAddressFactory().createSipURI(parentPlatform.getServerGBId(), parentPlatform.getServerIP() + ":" + parentPlatform.getServerPort());
if (www == null) {
AuthorizationHeader authorizationHeader = sipLayer.getSipFactory().createHeaderFactory().createAuthorizationHeader("Digest");
authorizationHeader.setUsername(parentPlatform.getDeviceGBId());
String username = parentPlatform.getUsername();
if ( username == null || username == "" )
{
authorizationHeader.setUsername(parentPlatform.getDeviceGBId());
} else {
authorizationHeader.setUsername(username);
}
authorizationHeader.setURI(requestURI);
authorizationHeader.setAlgorithm("MD5");
registerRequest.addHeader(authorizationHeader);