When Asterisk receives an INVITE from an external domain when allowexternaldomains=no
send a 403 instead of a 404. This is consistent with Asterisk's behavior when receiving
a REGISTER in this situation.
(Closes issue ASTERISK-19601)
Reported by Matthew Jordan
Patches:
ASTERISK-19601-no401.patch uploaded by Mark Michelson (License #5049)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@369302
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
*/
/* Fall through */
case SIP_GET_DEST_EXTEN_NOT_FOUND:
- case SIP_GET_DEST_REFUSED:
- default:
{
char *decoded_exten = ast_strdupa(p->exten);
transmit_response_reliable(p, "404 Not Found", req);
" '%s' rejected because extension not found in context '%s'.\n",
S_OR(p->username, p->peername), ast_sockaddr_stringify(&p->recv), decoded_exten, p->context);
}
+ break;
+ case SIP_GET_DEST_REFUSED:
+ default:
+ transmit_response_reliable(p, "403 Forbidden", req);
} /* end switch */
p->invitestate = INV_COMPLETED;