Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.872 diff -u -r1.872 chan_sip.c --- channels/chan_sip.c 29 Sep 2005 17:41:00 -0000 1.872 +++ channels/chan_sip.c 4 Oct 2005 16:04:40 -0000 @@ -3091,12 +3091,14 @@ /* Found the call */ ast_mutex_lock(&p->lock); ast_mutex_unlock(&iflock); + ast_log(LOG_DEBUG, "**** Found existing SIP dialog for incoming request %s\n", callid); return p; } p = p->next; } ast_mutex_unlock(&iflock); p = sip_alloc(callid, sin, 1, intended_method); + ast_log(LOG_DEBUG, "**** Creating new SIP dialog for incoming request %s\n", callid); if (p) ast_mutex_lock(&p->lock); return p; @@ -6177,13 +6179,14 @@ ast_md5_hash(resp_hash, resp); if (wrongnonce) { - ast_log(LOG_NOTICE, "stale nonce received from '%s'\n", get_header(req, "To")); snprintf(randdata, randlen, "%08x", rand()); if (ua_hash && !strncasecmp(ua_hash, resp_hash, strlen(resp_hash))) { + ast_log(LOG_NOTICE, "stale nonce received from '%s' (got %s, expected %s)\n", get_header(req, "To"), nonce, randdata); /* We got working auth token, based on stale nonce . */ transmit_response_with_auth(p, response, req, randdata, reliable, respheader, 1); } else { + ast_log(LOG_NOTICE, "Bad authentication from '%s' (got %s, expected %s)\n", get_header(req, "To"), nonce, randdata); /* Everything was wrong, so give the device one more try */ transmit_response_with_auth(p, response, req, randdata, reliable, respheader, 0); }