mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
Send 403 when authentication fails on a call
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6420,6 +6420,10 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
|
|||||||
if (res) {
|
if (res) {
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
ast_log(LOG_NOTICE, "Failed to authenticate user %s\n", get_header(req, "From"));
|
ast_log(LOG_NOTICE, "Failed to authenticate user %s\n", get_header(req, "From"));
|
||||||
|
if (ignore)
|
||||||
|
transmit_response(p, "403 Forbidden", req);
|
||||||
|
else
|
||||||
|
transmit_response_reliable(p, "403 Forbidden", req, 1);
|
||||||
p->needdestroy = 1;
|
p->needdestroy = 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user