diff --git a/include/asterisk/features.h b/include/asterisk/features.h index 76a141df15..42dc57fba2 100644 --- a/include/asterisk/features.h +++ b/include/asterisk/features.h @@ -34,7 +34,6 @@ #define FEATURE_EXTEN_LEN 32 #define FEATURE_MOH_LEN 80 /* same as MAX_MUSICCLASS from channel.h */ -#define PARK_APP_NAME "Park" #define DEFAULT_PARKINGLOT "default" /*!< Default parking lot */ #define AST_FEATURE_RETURN_HANGUP -1 diff --git a/main/features.c b/main/features.c index 73974ca568..af4e5f441b 100644 --- a/main/features.c +++ b/main/features.c @@ -416,7 +416,7 @@ typedef enum { FEATURE_INTERPRET_CHECK, /* Used by feature_check */ } feature_interpret_op; -static char *parkedcall = "ParkedCall"; +static const char *parkedcall = "ParkedCall"; static char pickup_ext[AST_MAX_EXTENSION]; /*!< Call pickup extension */ @@ -630,7 +630,7 @@ AST_DEFINE_APP_ARGS_TYPE(park_app_args, ); /* module and CLI command definitions */ -static char *parkcall = PARK_APP_NAME; +static const char *parkcall = "Park"; static struct ast_app *monitor_app = NULL; static int monitor_ok = 1; @@ -783,7 +783,7 @@ static struct ast_exten *get_parking_exten(const char *exten_str, struct ast_cha } app_at_exten = ast_get_extension_app(exten); - if (!app_at_exten || strcasecmp(PARK_APP_NAME, app_at_exten)) { + if (!app_at_exten || strcasecmp(parkcall, app_at_exten)) { return NULL; } @@ -4968,7 +4968,7 @@ static int park_call_exec(struct ast_channel *chan, const char *data) res = 0; } else { /* Park succeeded. */ - res = 1; + res = -1; } return res; diff --git a/res/res_agi.c b/res/res_agi.c index edb7b9c38b..91dea088c9 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -61,7 +61,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/ast_version.h" #include "asterisk/speech.h" #include "asterisk/manager.h" -#include "asterisk/features.h" #include "asterisk/term.h" #include "asterisk/xmldoc.h" #include "asterisk/srv.h" @@ -2480,9 +2479,6 @@ static int handle_exec(struct ast_channel *chan, AGI *agi, int argc, const char ast_verb(3, "AGI Script Executing Application: (%s) Options: (%s)\n", argv[1], argc >= 3 ? argv[2] : ""); if ((app_to_exec = pbx_findapp(argv[1]))) { - if(!strcasecmp(argv[1], PARK_APP_NAME)) { - ast_masq_park_call(chan, NULL, 0, NULL); - } if (!(workaround = ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS))) { ast_set_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS); }