diff --git a/res/res_stasis_http.c b/res/res_stasis_http.c index 4b2e1ccd75c25b32abe2264c9be8abaeed45aab3..e30dc7100941a010c03b0e36d672a3ed9c4ebaea 100644 --- a/res/res_stasis_http.c +++ b/res/res_stasis_http.c @@ -851,6 +851,11 @@ static int stasis_http_callback(struct ast_tcptls_session_instance *ser, 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");