Index: pbx/pbx_realtime.c =================================================================== --- pbx/pbx_realtime.c (revision 153040) +++ pbx/pbx_realtime.c (working copy) @@ -67,7 +67,7 @@ */ -static struct ast_variable *realtime_switch_common(const char *table, const char *context, const char *exten, int priority, int mode) +static struct ast_variable *realtime_switch_common(const char *table, const char *context, const char *exten, const char *options, int priority, int mode) { struct ast_variable *var; struct ast_config *cfg; @@ -75,6 +75,10 @@ char *ematch; char rexten[AST_MAX_EXTENSION + 20]=""; int match; + int no_patterns = 0; + if(options && !strcmp(options, "no-patterns")) { + no_patterns = 1; + } snprintf(pri, sizeof(pri), "%d", priority); switch(mode) { case MODE_MATCHMORE: @@ -91,7 +95,7 @@ ast_copy_string(rexten, exten, sizeof(rexten)); } var = ast_load_realtime(table, ematch, rexten, "context", context, "priority", pri, SENTINEL); - if (!var) { + if (!var && !no_patterns) { cfg = ast_load_realtime_multientry(table, "exten LIKE", "\\_%", "context", context, "priority", pri, SENTINEL); if (cfg) { char *cat = ast_category_browse(cfg, NULL); @@ -116,6 +120,8 @@ } ast_config_destroy(cfg); } + }else if(!var) { + ast_log(LOG_DEBUG, "Skipping extension pattern lookup for %s@%s\n", exten, context); } return var; } @@ -137,7 +143,7 @@ } ctx = S_OR(ctx, context); table = S_OR(table, "extensions"); - var = realtime_switch_common(table, ctx, exten, priority, mode); + var = realtime_switch_common(table, ctx, exten, opts, priority, mode); } return var; }