[asterisk-commits] mmichelson: trunk r369304 - in /trunk: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 25 09:30:23 CDT 2012
Author: mmichelson
Date: Mon Jun 25 09:30:19 2012
New Revision: 369304
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369304
Log:
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
........
Merged revisions 369303 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=369304&r1=369303&r2=369304
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jun 25 09:30:19 2012
@@ -23903,8 +23903,6 @@
*/
/* 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);
@@ -23913,6 +23911,10 @@
" '%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;
More information about the asterisk-commits
mailing list