I'm using Jitsi nightly build with 3CX Phone System as a SIP server.
There's a problem with authentication. It takes about 4-7 tries before
server accepts the password. I enter 4-7 times the same correct password in
the authentication dialog. Option to store the password doesn't help.
I tried to look into the logs and packets, but I see no difference between
the accepted REGISTER message and the one that is rejected. The only thing
I've noticed is that when I try to enter the password as fast as possible
between each password prompt it can succeed after just 2 retries.
Do you think it's a problem with the server ? The time between resent is
probably important in this case as in Android version I've entered
programatically the password in place where it should ask for it and it
Also there is a strange thing I don't understand in
The "nc_value" and "cnonce" have predifined static values. Shouldn't they
come from the server's message ?
Here's the code:
String response = null;
// JvB: authHeader.getQop() is a quoted _list_ of qop values
// (e.g. "auth,auth-int") Client is supposed to pick one
String qopList = authHeader.getQop();
String qop = (qopList != null) ? "auth" : null;
String nc_value = "00000001";
String cnonce = "xyz";
response = MessageDigestAlgorithm.calculateResponse(
nc_value, // JvB added
cnonce, // JvB added
catch (NullPointerException exc)
throw new OperationFailedException(
"The authenticate header was malformatted"
AuthorizationHeader authorization = null;
if (authHeader instanceof ProxyAuthenticateHeader)
authorization = headerFactory.createAuthorizationHeader(
if (authHeader.getAlgorithm() != null)
if (authHeader.getOpaque() != null)
// jvb added
authorization.setNonceCount( Integer.parseInt(nc_value) );
catch (ParseException ex)
throw new SecurityException(
"Failed to create an authorization header!");
3cxSipAuth.log (76.1 KB)
3cxSipAuth.pcap (34.1 KB)