Pattern pt = Pattern.compile("Digest algorithm=\"SHA1-sess-v4\",nonce=\"(.*?)\",key=\"(.*?)\",signature=\"(.*?)\"");
Matcher mc = pt.matcher(wwwHeader.getValue());
if(mc.matches()) {
String passHex = PasswordEncrypterV4.encryptV4(this.user.getUserId(),this.user.getPassword());
AuthGeneratorV4 auth = new AuthGeneratorV4();
String aeskey = ConvertHelper.byte2HexStringWithoutSpace(user.getAesKey());
String response = auth.generate(mc.group(2), passHex, mc.group(1), aeskey);
String authString ="Digest response=\""+response+"\",algorithm=\"SHA1-sess-v4\"";
req.addHeader(SipcHeader.AUTHORIZATION, authString);
req.addHeader("AK", "ak-value");
String body = MessageTemplate.TMPL_USER_AUTH;