Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
mk1990
2022-05-18 14:36:47 +08:00
committed by GitHub
5 changed files with 370 additions and 75 deletions

View File

@@ -94,7 +94,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
String deviceId = uri.getUser();
AuthorizationHeader authHead = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME);
if (authHead == null) {
if (authHead == null && !StringUtils.isEmpty(sipConfig.getPassword())) {
logger.info("[注册请求] 未携带授权头 回复401: {}", requestAddress);
response = getMessageFactory().createResponse(Response.UNAUTHORIZED, request);
new DigestServerAuthenticationHelper().generateChallenge(getHeaderFactory(), response, sipConfig.getDomain());