[asterisk-commits] dlee: trunk r393768 - /trunk/res/res_stasis_http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 5 17:08:29 CDT 2013


Author: dlee
Date: Fri Jul  5 17:08:27 2013
New Revision: 393768

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393768
Log:
ARI: return a 503 if Asterisk isn't fully booted

Modified:
    trunk/res/res_stasis_http.c

Modified: trunk/res/res_stasis_http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_stasis_http.c?view=diff&rev=393768&r1=393767&r2=393768
==============================================================================
--- trunk/res/res_stasis_http.c (original)
+++ trunk/res/res_stasis_http.c Fri Jul  5 17:08:27 2013
@@ -851,6 +851,11 @@
 			conf->general->auth_realm);
 		response.message = ast_json_pack("{s: s}",
 			"error", "Authentication required");
+	} else if (!ast_fully_booted) {
+		response.response_code = 503;
+		response.response_text = "Service Unavailable";
+		response.message = ast_json_pack("{s: s}",
+			"error", "Asterisk not booted");
 	} else if (user->read_only && method != AST_HTTP_GET && method != AST_HTTP_OPTIONS) {
 		response.message = ast_json_pack("{s: s}",
 			"error", "Write access denied");




More information about the asterisk-commits mailing list