Index: pbx/pbx_config.c =================================================================== --- pbx/pbx_config.c (revisiĆ³n: 110622) +++ pbx/pbx_config.c (copia de trabajo) @@ -1550,6 +1550,7 @@ char *cat, *chan; const char *zapchan; const char *hasexten; + const char *entrycontext; char tmp[256]; char iface[256]; char zapcopy[256]; @@ -1585,6 +1586,7 @@ if (hasexten && !ast_true(hasexten)) continue; hasvoicemail = ast_true(ast_config_option(cfg, cat, "hasvoicemail")); + entrycontext = ast_variable_retrieve(cfg, cat, "context"); zapchan = ast_variable_retrieve(cfg, cat, "zapchan"); if (!zapchan) zapchan = ast_variable_retrieve(cfg, "general", "zapchan"); @@ -1616,9 +1618,11 @@ if (!ast_strlen_zero(iface)) { /* Only create a context here when it is really needed. Otherwise default empty context created by pbx_config may conflict with the one explicitly created by pbx_ael */ - if (!con) + if (entrycontext) { + con = ast_context_find_or_create(&local_contexts, local_table, entrycontext, registrar); + } else { con = ast_context_find_or_create(&local_contexts, local_table, userscontext, registrar); - + } if (!con) { ast_log(LOG_ERROR, "Can't find/create user context '%s'\n", userscontext); return;