mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
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
This commit is contained in:
committed by
Friendly Automation
parent
6ecec51e6a
commit
e8f548c155
@@ -4786,29 +4786,9 @@ static int dundi_helper(struct ast_channel *chan, const char *context, const cha
|
||||
int res;
|
||||
int x;
|
||||
int found = 0;
|
||||
if (!strncasecmp(context, "macro-", 6)) {
|
||||
if (!chan) {
|
||||
ast_log(LOG_NOTICE, "Can't use macro mode without a channel!\n");
|
||||
return -1;
|
||||
}
|
||||
/* If done as a macro, use macro extension */
|
||||
if (!strcasecmp(exten, "s")) {
|
||||
exten = pbx_builtin_getvar_helper(chan, "ARG1");
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = ast_channel_macroexten(chan);
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = ast_channel_exten(chan);
|
||||
if (ast_strlen_zero(exten)) {
|
||||
ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (ast_strlen_zero(data))
|
||||
data = "e164";
|
||||
} else {
|
||||
if (ast_strlen_zero(data))
|
||||
data = context;
|
||||
}
|
||||
if (ast_strlen_zero(data))
|
||||
data = context;
|
||||
|
||||
res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
|
||||
for (x=0;x<res;x++) {
|
||||
if (ast_test_flag(results + x, flag))
|
||||
@@ -4838,29 +4818,9 @@ static int dundi_exec(struct ast_channel *chan, const char *context, const char
|
||||
const char *dundiargs;
|
||||
struct ast_app *dial;
|
||||
|
||||
if (!strncasecmp(context, "macro-", 6)) {
|
||||
if (!chan) {
|
||||
ast_log(LOG_NOTICE, "Can't use macro mode without a channel!\n");
|
||||
return -1;
|
||||
}
|
||||
/* If done as a macro, use macro extension */
|
||||
if (!strcasecmp(exten, "s")) {
|
||||
exten = pbx_builtin_getvar_helper(chan, "ARG1");
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = ast_channel_macroexten(chan);
|
||||
if (ast_strlen_zero(exten))
|
||||
exten = ast_channel_exten(chan);
|
||||
if (ast_strlen_zero(exten)) {
|
||||
ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (ast_strlen_zero(data))
|
||||
data = "e164";
|
||||
} else {
|
||||
if (ast_strlen_zero(data))
|
||||
data = context;
|
||||
}
|
||||
if (ast_strlen_zero(data))
|
||||
data = context;
|
||||
|
||||
res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
|
||||
if (res > 0) {
|
||||
sort_results(results, res);
|
||||
|
Reference in New Issue
Block a user