diff --git a/main/features.c b/main/features.c index 9724cc85c6..f540c455b2 100644 --- a/main/features.c +++ b/main/features.c @@ -2911,8 +2911,10 @@ static struct ast_parkinglot *build_parkinglot(char *name, struct ast_variable * /* Add a parking extension into the context */ if (!oldparkinglot) { - if (ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, NULL, parkcall, strdup(""), ast_free, registrar) == -1) - error = 1; + if (!ast_strlen_zero(ast_parking_ext())) { + if (ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, NULL, parkcall, strdup(""), ast_free, registrar) == -1) + error = 1; + } } ao2_unlock(parkinglot); diff --git a/main/pbx.c b/main/pbx.c index 7b904c8ff4..9772ca53c7 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6808,6 +6808,12 @@ int ast_add_extension2(struct ast_context *con, struct ast_exten dummy_exten = {0}; char dummy_name[1024]; + if (ast_strlen_zero(extension)) { + ast_log(LOG_ERROR,"You have to be kidding-- add exten '' to context %s? Figure out a name and call me back. Action ignored.\n", + con->name); + return -1; + } + /* If we are adding a hint evalulate in variables and global variables */ if (priority == PRIORITY_HINT && strstr(application, "${") && !strstr(extension, "_")) { struct ast_channel c = {0, };