TargetTuple remoteHost = ((SipServletRequestImpl) request).getInitialRemote();
String host = "";
if (remoteHost != null) {
host = remoteHost.getIP();
}
Principal authPrincipal = auth.authenticate(request, host,
identityAuthRealm, auth.INTERMEDIATE);
if (authPrincipal != null) {
((SipServletRequestImpl) request).setUserPrincipal(authPrincipal);
((SipServletRequestImpl) request).setUser(authPrincipal.getName());
} else {