[svn-commits] mjordan: branch 13 r424625 - in /branches/13: ./ res/res_pjsip/pjsip_options.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Oct 5 19:59:45 CDT 2014


Author: mjordan
Date: Sun Oct  5 19:59:43 2014
New Revision: 424625

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424625
Log:
res_pjsip/pjsip_options: Do not 404 an OPTIONS request not sent to an endpoint

An OPTIONS request that is sent to Asterisk but not to a specific endpoint is
currently sent a 404 in response. This is because, not surprisingly, an empty
extension is never going to be found in the dialplan.

This patch makes it so that we only attempt to look up the endpoint in the
dialplan if it is specified in the OPTIONS request URI.

#SIPit31

ASTERISK-24370 #close
Reported by: Matt Jordan
........

Merged revisions 424624 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip/pjsip_options.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip/pjsip_options.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip/pjsip_options.c?view=diff&rev=424625&r1=424624&r2=424625
==============================================================================
--- branches/13/res/res_pjsip/pjsip_options.c (original)
+++ branches/13/res/res_pjsip/pjsip_options.c Sun Oct  5 19:59:43 2014
@@ -641,7 +641,7 @@
 
 	if (ast_shutting_down()) {
 		send_options_response(rdata, 503);
-	} else if (!ast_exists_extension(NULL, endpoint->context, exten, 1, NULL)) {
+	} else if (!ast_strlen_zero(exten) && !ast_exists_extension(NULL, endpoint->context, exten, 1, NULL)) {
 		send_options_response(rdata, 404);
 	} else {
 		send_options_response(rdata, 200);




More information about the svn-commits mailing list