jorge.amador at withus.pt wrote: > Hi Benny, > > I probably missed your response from November 3rd, I'm sorry. But thanks > for the hint anyway. Now I have a different problem when I try to > register to a server. I get the following message: > > SIP/2.0 401 Unauthorized > ... > User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu > WWW-Authenticate: digest realm="sapo.pt", qop="auth", > nonce="475fff9401615d41eeb3848f8e1dab0a62652c25f7fe9240510f75440529019e1fa8f5ef06ba70e97d9e81b89859f19c68957abe", > opaque="", stale=false, algorithm=md5 > Content-Length: 0 > > > --end msg-- > pjsua-i686-pc-linux-gnu: ../src/pjsip/sip_auth_client.c:135: > pjsip_auth_create_digest: Assertion `cred_info->data.slen == 32' failed. > > > and then the app crashes. Any hint about this? Thanks and best regards, You need to initialize the credential's data_type to PJSIP_CRED_DATA_PLAIN_PASSWD, for example: cred.realm = ... cred.scheme = pj_str("Digest"); cred.username = ... cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; cred.data = "your plain text password"; If you specify data_type=PJSIP_CRED_DATA_DIGEST, then pjsip expects the "data" field to contain HA1, which is MD5 hash of {username ":" realm ":" password}, and which length is always 32 characters (hence the assertion). cheers, -benny > Jorge Amador