pbx_lua: fix regression with global sym export and context clash by pbx_config.
[asterisk/asterisk.git] / main / pbx.c
index 4004e14..2dda200 100644 (file)
@@ -8828,6 +8828,11 @@ static void context_merge(struct ast_context **extcontexts, struct ast_hashtab *
                        ast_hashtab_end_traversal(prio_iter);
                }
                ast_hashtab_end_traversal(exten_iter);
+       } else if (new) {
+               /* If the context existed but had no extensions, we still want to merge
+                * the includes, switches and ignore patterns.
+                */
+               context_merge_incls_swits_igps_other_registrars(new, context, registrar);
        }
 
        if (!insert_count && !new && (strcmp(context->registrar, registrar) != 0 ||