--- channels/chan_sip.c 2009-04-02 10:20:22.000000000 -0700 +++ channels/chan_sip.c 2009-06-16 14:22:35.000000000 -0700 @@ -8780,8 +8780,11 @@ static enum check_auth_result check_auth if (sipdebug) ast_log(LOG_NOTICE, "Correct auth, but based on stale nonce received from '%s'\n", get_header(req, "To")); /* We got working auth token, based on stale nonce . */ - ast_string_field_build(p, randdata, "%08lx", ast_random()); + /* Since we never received our "current" nonce let's NOT generate a new one */ + //ast_string_field_build(p, randdata, "%08lx", ast_random()); transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, TRUE); + if (sipdebug) + ast_log(LOG_NOTICE, "For User: %s, Sent Register Response for stale nonce %s\n", username, p->randdata); } else { /* Everything was wrong, so give the device one more try with a new challenge */ if (!ast_test_flag(req, SIP_PKT_IGNORE)) {