diff --git a/main/pbx.c b/main/pbx.c index 8204cb5004..7140851954 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -5358,6 +5358,11 @@ enum ast_pbx_result ast_pbx_start(struct ast_channel *c) return AST_PBX_FAILED; } + if (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) { + ast_log(LOG_WARNING, "PBX requires Asterisk to be fully booted\n"); + return AST_PBX_FAILED; + } + if (increase_call_count(c)) return AST_PBX_CALL_LIMIT; @@ -5375,6 +5380,11 @@ enum ast_pbx_result ast_pbx_run_args(struct ast_channel *c, struct ast_pbx_args { enum ast_pbx_result res = AST_PBX_SUCCESS; + if (!ast_test_flag(&ast_options, AST_OPT_FLAG_FULLY_BOOTED)) { + ast_log(LOG_WARNING, "PBX requires Asterisk to be fully booted\n"); + return AST_PBX_FAILED; + } + if (increase_call_count(c)) { return AST_PBX_CALL_LIMIT; }