From c12f4a886d87ff68145191946e275d6420ddaa19 Mon Sep 17 00:00:00 2001 From: Naveen Albert Date: Fri, 11 Aug 2023 21:42:00 +0000 Subject: [PATCH] res_agi: Remove deprecated DeadAGI application. DeadAGI was deprecated 7 years ago, in Asterisk 15, as it duplicates functionality in the AGI app. This removes the application. Resolves: #258 UpgradeNote: The DeadAGI application, which was deprecated in Asterisk 15, has now been removed. The same functionality is available in the AGI app. --- res/res_agi.c | 46 ++-------------------------------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/res/res_agi.c b/res/res_agi.c index 815443b861..5f30fa0e3b 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1316,8 +1316,7 @@ signals a desire to stop (either by exiting or, in the case of a net script, by closing the connection). A locally executed AGI script will receive SIGHUP on - hangup from the channel except when using DeadAGI - (or when the channel is already hungup). A fast AGI server will + hangup from the channel, except when it is already hung up. A fast AGI server will correspondingly receive a HANGUP inline with the command dialog. Both of these signals may be disabled by setting the AGISIGHUP channel variable to no before executing the AGI application. @@ -1354,7 +1353,6 @@ AsyncAGIStart AsyncAGIEnd EAGI - DeadAGI asterisk.conf @@ -1379,36 +1377,6 @@ AGI - DeadAGI - - - - - 1.0.0 - - - Executes AGI on a hungup channel. - - - - - - - - This application is deprecated and may be removed in a future version - of Asterisk. Use the replacement application AGI instead - of DeadAGI. - - - Execute AGI on a 'dead' or hungup channel. See the documentation for the - AGI dialplan application for more information on invoking - AGI on a channel. - This application sets the following channel variable upon completion: - - - - AGI - EAGI @@ -1555,8 +1523,6 @@ static char *app = "AGI"; static char *eapp = "EAGI"; -static char *deadapp = "DeadAGI"; - static int agidebug = 0; #define TONE_BLOCK_SIZE 200 @@ -4338,7 +4304,7 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi const char *sighup_str; const char *exit_on_hangup_str; int exit_on_hangup; - /*! Running in an interception routine is like DeadAGI mode. No touchy the channel frames. */ + /*! Running in an interception routine is like when channel is hung up. No touchy the channel frames. */ int in_intercept = ast_channel_get_intercept_mode(); ast_channel_lock(chan); @@ -4816,12 +4782,6 @@ static int eagi_exec(struct ast_channel *chan, const char *data) return res; } -static int deadagi_exec(struct ast_channel *chan, const char *data) -{ - ast_log(LOG_WARNING, "DeadAGI has been deprecated, please use AGI in all cases!\n"); - return agi_exec(chan, data); -} - static struct ast_cli_entry cli_agi[] = { AST_CLI_DEFINE(handle_cli_agi_add_cmd, "Add AGI command to a channel in Async AGI"), AST_CLI_DEFINE(handle_cli_agi_debug, "Enable/Disable AGI debugging"), @@ -4880,7 +4840,6 @@ static int unload_module(void) ast_cli_unregister_multiple(cli_agi, ARRAY_LEN(cli_agi)); ast_agi_unregister_multiple(commands, ARRAY_LEN(commands)); ast_unregister_application(eapp); - ast_unregister_application(deadapp); ast_manager_unregister("AGI"); ast_unregister_application(app); AST_TEST_UNREGISTER(test_agi_null_docs); @@ -4899,7 +4858,6 @@ static int load_module(void) err |= ast_cli_register_multiple(cli_agi, ARRAY_LEN(cli_agi)); err |= ast_agi_register_multiple(ast_module_info->self, commands, ARRAY_LEN(commands)); - err |= ast_register_application_xml(deadapp, deadagi_exec); err |= ast_register_application_xml(eapp, eagi_exec); err |= ast_manager_register_xml("AGI", EVENT_FLAG_AGI, action_add_agi_cmd); err |= ast_register_application_xml(app, agi_exec); -- 2.47.2