--- chan_sip.c.orig 2014-05-14 02:40:00.000000000 +0900 +++ chan_sip.c 2014-06-07 19:41:15.000000000 +0900 @@ -18633,7 +18633,7 @@ return; } if (res < 0) { /* Something failed in authentication */ - ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", sip_get_header(req, "From")); + ast_log(LOG_NOTICE, "Failed to authenticate device %s host:%s\n", sip_get_header(req, "From"), ast_sockaddr_stringify(addr)); transmit_response(p, "403 Forbidden", req); sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); return; @@ -24827,7 +24827,7 @@ return 0; } if (res < 0) { /* Something failed in authentication */ - ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", sip_get_header(req, "From")); + ast_log(LOG_NOTICE, "Failed to authenticate device %s host:%s\n", sip_get_header(req, "From"), ast_sockaddr_stringify(addr)); transmit_response(p, "403 Forbidden", req); sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); return 0; @@ -25626,7 +25626,7 @@ goto request_invite_cleanup; } if (res < 0) { /* Something failed in authentication */ - ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", sip_get_header(req, "From")); + ast_log(LOG_NOTICE, "Failed to authenticate device %s host:%s\n", sip_get_header(req, "From"), ast_sockaddr_stringify(addr)); transmit_response_reliable(p, "403 Forbidden", req); p->invitestate = INV_COMPLETED; sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); @@ -27568,7 +27568,7 @@ p->lastinvite = seqno; return 0; } else if (auth_result < 0) { - ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", sip_get_header(req, "From")); + ast_log(LOG_NOTICE, "Failed to authenticate device %s host:%s\n", sip_get_header(req, "From"), ast_sockaddr_stringify(addr)); transmit_response(p, "403 Forbidden", req); sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); ast_string_field_set(p, theirtag, NULL); @@ -27783,7 +27783,7 @@ if (res == AUTH_CHALLENGE_SENT) /* authpeer = NULL here */ return 0; if (res != AUTH_SUCCESSFUL) { - ast_log(LOG_NOTICE, "Failed to authenticate device %s for SUBSCRIBE\n", sip_get_header(req, "From")); + ast_log(LOG_NOTICE, "Failed to authenticate device %s host:%s for SUBSCRIBE\n", sip_get_header(req, "From"), ast_sockaddr_stringify(addr)); transmit_response(p, "403 Forbidden", req); pvt_set_needdestroy(p, "authentication failed");