From: Automerge script Date: Mon, 25 Jun 2012 15:23:43 +0000 (+0000) Subject: Merged revisions 369303 via svnmerge from X-Git-Tag: 10.7.0-digiumphones-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03b52a9b845a0231a64a4f7e7cc0acb6f6ce5385;p=thirdparty%2Fasterisk.git Merged revisions 369303 via svnmerge from file:///srv/subversion/repos/asterisk/branches/10 ................ r369303 | mmichelson | 2012-06-25 09:23:16 -0500 (Mon, 25 Jun 2012) | 14 lines Be more consistent with the return code for requests received from invalid domain. 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) ........ Merged revisions 369302 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@369322 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 54528d80cd..0ac36a139e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -23589,8 +23589,6 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int */ /* 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); @@ -23599,6 +23597,10 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int " '%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;