From e8f548c1557620df8a7231cbede6cb9b052d352b Mon Sep 17 00:00:00 2001 From: Mike Bradeen Date: Mon, 12 Dec 2022 10:12:57 -0700 Subject: [PATCH] app_macro: Remove deprecated module. For most modules that interacted with app_macro, this change is limited to no longer looking for the current context from the macrocontext when set. Additionally, the following modules are impacted: app_dial - no longer supports M^ connected/redirecting macro app_minivm - samples written using macro will no longer work. The sample needs a re-write app_queue - can no longer a macro on the called party's channel. Use gosub which is currently supported ccss - no callback macro, gosub only app_voicemail - no macro support channel - remove macrocontext and priority, no connected line or redirection macro options options - stdexten is deprecated to gosub as the default and only pbx - removed macrolock pbx_dundi - no longer look for macro snmp - removed macro context, exten, and priority ASTERISK-30304 Change-Id: I830daab293117179b8d61bd4df0d971a1b3d07f6 --- addons/chan_ooh323.c | 4 +- apps/app_chanspy.c | 2 - apps/app_dial.c | 166 +---- apps/app_directory.c | 4 +- apps/app_followme.c | 6 +- apps/app_macro.c | 691 ------------------ apps/app_meetme.c | 2 - apps/app_minivm.c | 26 +- apps/app_mixmonitor.c | 3 - apps/app_queue.c | 85 +-- apps/app_stack.c | 2 - apps/app_voicemail.c | 49 +- channels/chan_dahdi.c | 4 +- channels/chan_pjsip.c | 2 +- configs/samples/asterisk.conf.sample | 2 - configs/samples/ccss.conf.sample | 13 +- configs/samples/extensions.ael.sample | 28 - configs/samples/extensions.conf.sample | 3 +- configs/samples/extensions_minivm.conf.sample | 3 + configs/samples/features.conf.sample | 4 +- configs/samples/minivm.conf.sample | 2 +- configs/samples/queues.conf.sample | 6 - configs/samples/users.conf.sample | 2 +- doc/UPGRADE-staging/app_macro_removal.txt | 37 + funcs/func_callcompletion.c | 1 - include/asterisk/app.h | 46 -- include/asterisk/ccss.h | 16 - include/asterisk/channel.h | 69 -- include/asterisk/extconf.h | 1 - include/asterisk/options.h | 2 - include/asterisk/pbx.h | 24 - main/app.c | 70 -- main/bridge_basic.c | 4 - main/bridge_channel.c | 11 +- main/ccss.c | 47 +- main/cdr.c | 2 +- main/channel.c | 114 +-- main/channel_internal_api.c | 27 - main/dial.c | 6 +- main/features.c | 7 +- main/pbx.c | 46 -- main/pbx_builtins.c | 14 +- main/pickup.c | 3 +- menuselect/example_menuselect-tree | 2 - menuselect/test/menuselect-tree | 2 - pbx/pbx_ael.c | 10 +- pbx/pbx_config.c | 10 +- pbx/pbx_dundi.c | 52 +- res/res_fax.c | 2 +- res/snmp/agent.c | 20 - tests/test_voicemail_api.c | 2 - utils/extconf.c | 2 - 52 files changed, 143 insertions(+), 1615 deletions(-) delete mode 100644 apps/app_macro.c create mode 100644 doc/UPGRADE-staging/app_macro_removal.txt diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 4df1859e9b..143c5bc189 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -5047,7 +5047,7 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p) p->faxdetected = 1; ooRequestChangeMode(p->callToken, 1); } else if ((dfr->subclass.integer == 'f') && !p->faxdetected) { - const char *target_context = S_OR(ast_channel_macrocontext(p->owner), ast_channel_context(p->owner)); + const char *target_context = ast_channel_context(p->owner); if ((strcmp(ast_channel_exten(p->owner), "fax")) && (ast_exists_extension(p->owner, target_context, "fax", 1, S_COR(ast_channel_caller(p->owner)->id.number.valid, ast_channel_caller(p->owner)->id.number.str, NULL)))) { @@ -5123,7 +5123,7 @@ void onModeChanged(ooCallData *call, int t38mode) { if ((p->faxdetect & FAXDETECT_T38) && !p->faxdetected) { const char *target_context; ast_debug(1, "* Detected T.38 Request\n"); - target_context = S_OR(ast_channel_macrocontext(p->owner), ast_channel_context(p->owner)); + target_context = ast_channel_context(p->owner); if ((strcmp(ast_channel_exten(p->owner), "fax")) && (ast_exists_extension(p->owner, target_context, "fax", 1, S_COR(ast_channel_caller(p->owner)->id.number.valid, ast_channel_caller(p->owner)->id.number.str, NULL)))) { diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 2d720ee5f9..e8167d8ab5 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -907,8 +907,6 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, ast_channel_lock(chan); if ((c = pbx_builtin_getvar_helper(chan, "SPY_EXIT_CONTEXT"))) { ast_copy_string(exitcontext, c, sizeof(exitcontext)); - } else if (!ast_strlen_zero(ast_channel_macrocontext(chan))) { - ast_copy_string(exitcontext, ast_channel_macrocontext(chan), sizeof(exitcontext)); } else { ast_copy_string(exitcontext, ast_channel_context(chan), sizeof(exitcontext)); } diff --git a/apps/app_dial.c b/apps/app_dial.c index bc6eee4584..1a69edf417 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -208,7 +208,7 @@ and start execution at that location. NOTE: Any channel variables you want the called channel to inherit from the caller channel must be prefixed with one or two underbars ('_'). - NOTE: Using this option from a Macro() or GoSub() might not make sense as there would be no return points. + NOTE: Using this option from a GoSub() might not make sense as there would be no return points. -