diff --git a/main/pbx.c b/main/pbx.c index a4b490f590..7aea5d2a71 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -6702,6 +6702,11 @@ 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, and there are global variables, and the hint contains variable references, then expand them */