Skip to content

Commit

Permalink
app_macro: Remove deprecated module.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mbradeen authored and Friendly Automation committed Jan 10, 2023
1 parent 6ecec51 commit e8f548c
Show file tree
Hide file tree
Showing 52 changed files with 143 additions and 1,615 deletions.
4 changes: 2 additions & 2 deletions addons/chan_ooh323.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))) {
Expand Down Expand Up @@ -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)))) {
Expand Down
2 changes: 0 additions & 2 deletions apps/app_chanspy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
166 changes: 20 additions & 146 deletions apps/app_dial.c

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions apps/app_directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ static int compare(const char *text, const char *template)

static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
{
if (!ast_goto_if_exists(chan, S_OR(dialcontext, ast_channel_context(chan)), ext, 1) ||
(!ast_strlen_zero(ast_channel_macrocontext(chan)) &&
!ast_goto_if_exists(chan, ast_channel_macrocontext(chan), ext, 1))) {
if (!ast_goto_if_exists(chan, S_OR(dialcontext, ast_channel_context(chan)), ext, 1)) {
return 0;
} else {
ast_log(LOG_WARNING, "Can't find extension '%s' in current context. "
Expand Down
6 changes: 2 additions & 4 deletions apps/app_followme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,7 @@ static int app_exec(struct ast_channel *chan, const char *data)

/* Update connected line to caller if available. */
if (targs->pending_out_connected_update) {
if (ast_channel_connected_line_sub(outbound, caller, &targs->connected_out, 0) &&
ast_channel_connected_line_macro(outbound, caller, &targs->connected_out, 1, 0)) {
if (ast_channel_connected_line_sub(outbound, caller, &targs->connected_out, 0)) {
ast_channel_update_connected_line(caller, &targs->connected_out, NULL);
}
}
Expand All @@ -1553,8 +1552,7 @@ static int app_exec(struct ast_channel *chan, const char *data)

/* Update connected line to winner if changed. */
if (targs->pending_in_connected_update) {
if (ast_channel_connected_line_sub(caller, outbound, &targs->connected_in, 0) &&
ast_channel_connected_line_macro(caller, outbound, &targs->connected_in, 0, 0)) {
if (ast_channel_connected_line_sub(caller, outbound, &targs->connected_in, 0)) {
ast_channel_update_connected_line(outbound, &targs->connected_in, NULL);
}
}
Expand Down
Loading

0 comments on commit e8f548c

Please sign in to comment.