Index: channels/chan_sip.c - Asterisk 1.8x =================================================================== @@ Line change starting at: +16186 @@ if (sip_cfg.allowguest) { get_rpid(p, req); p->rtptimeout = global_rtptimeout; p->rtpholdtimeout = global_rtpholdtimeout; p->rtpkeepalive = global_rtpkeepalive; if (!dialog_initialize_rtp(p)) { res = AUTH_SUCCESSFUL; } else { res = AUTH_RTP_FAILED; + ast_log(LOG_NOTICE, "Unauthenticated call receiving from '%s' failed for '%s' - %s\n", + get_header(req, "To"), ast_sockaddr_stringify(addr), + reason); + append_history(p, "RegRequest", "Failed : Account %s : %s", get_header(req, "To"), reason); } } else if (sip_cfg.alwaysauthreject) { res = AUTH_FAKE_AUTH; /* reject with fake authorization request */ + ast_log(LOG_NOTICE, "Unauthenticated call receiving from '%s' failed for '%s' - %s\n", + get_header(req, "To"), ast_sockaddr_stringify(addr), + reason); + append_history(p, "RegRequest", "Failed : Account %s : %s", get_header(req, "To"), reason); } else { res = AUTH_SECRET_FAILED; /* we don't want any guests, authentication will fail */ + ast_log(LOG_NOTICE, "Unauthenticated call receiving from '%s' failed for '%s' - %s\n", + get_header(req, "To"), ast_sockaddr_stringify(addr), + reason); + append_history(p, "RegRequest", "Failed : Account %s : %s", get_header(req, "To"), reason); }