Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 7555) +++ channels/chan_sip.c (working copy) @@ -6291,6 +6291,15 @@ /* Auth is OK */ res = 0; } + if (res == -1) { + if (sipdebug) + ast_log(LOG_NOTICE, "Wrong Password received in authentication from '%s'\n", get_header(req, "To")); + transmit_response_with_auth(p, response, req, randdata, reliable, respheader, 0); + + /* Schedule auto destroy in 15 seconds */ + sip_scheddestroy(p, 15000); + return 1; + } } /* Failure */ return res; @@ -6439,10 +6448,6 @@ } if (res < 0) { switch (res) { - case -1: - /* Wrong password in authentication. Go away, don't try again until you fixed it */ - transmit_response(p, "403 Forbidden (Bad auth)", &p->initreq); - break; case -2: /* Username and digest username does not match. Asterisk uses the From: username for authentication. We need the