mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
More removal of deprecated stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
*
|
*
|
||||||
* \brief App to set callerid
|
* \brief App to set callerid presentation
|
||||||
*
|
*
|
||||||
* \author Mark Spencer <markster@digium.com>
|
* \author Mark Spencer <markster@digium.com>
|
||||||
*
|
*
|
||||||
@@ -85,75 +85,16 @@ static int setcallerid_pres_exec(struct ast_channel *chan, void *data)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *app = "SetCallerID";
|
|
||||||
|
|
||||||
static char *synopsis = "Set CallerID";
|
|
||||||
|
|
||||||
static char *descrip =
|
|
||||||
" SetCallerID(clid[|a]): Set Caller*ID on a call to a new\n"
|
|
||||||
"value. Sets ANI as well if a flag is used. \n";
|
|
||||||
|
|
||||||
static int setcallerid_exec(struct ast_channel *chan, void *data)
|
|
||||||
{
|
|
||||||
int res = 0;
|
|
||||||
char *tmp = NULL;
|
|
||||||
char name[256];
|
|
||||||
char num[256];
|
|
||||||
struct ast_module_user *u;
|
|
||||||
char *opt;
|
|
||||||
int anitoo = 0;
|
|
||||||
static int dep_warning = 0;
|
|
||||||
|
|
||||||
if (ast_strlen_zero(data)) {
|
|
||||||
ast_log(LOG_WARNING, "SetCallerID requires an argument!\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
u = ast_module_user_add(chan);
|
|
||||||
|
|
||||||
if (!dep_warning) {
|
|
||||||
dep_warning = 1;
|
|
||||||
ast_log(LOG_WARNING, "SetCallerID is deprecated. Please use Set(CALLERID(all)=...) or Set(CALLERID(ani)=...) instead.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = ast_strdupa(data);
|
|
||||||
|
|
||||||
opt = strchr(tmp, '|');
|
|
||||||
if (opt) {
|
|
||||||
*opt = '\0';
|
|
||||||
opt++;
|
|
||||||
if (*opt == 'a')
|
|
||||||
anitoo = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ast_callerid_split(tmp, name, sizeof(name), num, sizeof(num));
|
|
||||||
ast_set_callerid(chan, num, name, anitoo ? num : NULL);
|
|
||||||
|
|
||||||
ast_module_user_remove(u);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int unload_module(void)
|
static int unload_module(void)
|
||||||
{
|
{
|
||||||
int res;
|
int res = ast_unregister_application(app2);
|
||||||
|
|
||||||
res = ast_unregister_application(app2);
|
|
||||||
res |= ast_unregister_application(app);
|
|
||||||
|
|
||||||
ast_module_user_hangup_all();
|
ast_module_user_hangup_all();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
int res;
|
return ast_register_application(app2, setcallerid_pres_exec, synopsis2, descrip2);
|
||||||
|
|
||||||
res = ast_register_application(app2, setcallerid_pres_exec, synopsis2, descrip2);
|
|
||||||
res |= ast_register_application(app, setcallerid_exec, synopsis, descrip);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set CallerID Application");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Set CallerID Presentation Application");
|
||||||
|
@@ -6492,7 +6492,6 @@ static int vm_exec(struct ast_channel *chan, void *data)
|
|||||||
char *tmp;
|
char *tmp;
|
||||||
struct leave_vm_options leave_options;
|
struct leave_vm_options leave_options;
|
||||||
struct ast_flags flags = { 0 };
|
struct ast_flags flags = { 0 };
|
||||||
static int deprecate_warning = 0;
|
|
||||||
char *opts[OPT_ARG_ARRAY_SIZE];
|
char *opts[OPT_ARG_ARRAY_SIZE];
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(argv0);
|
AST_APP_ARG(argv0);
|
||||||
@@ -6526,32 +6525,6 @@ static int vm_exec(struct ast_channel *chan, void *data)
|
|||||||
leave_options.record_gain = (signed char) gain;
|
leave_options.record_gain = (signed char) gain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/* old style options parsing */
|
|
||||||
int old = 0;
|
|
||||||
char *orig_argv0 = args.argv0;
|
|
||||||
while (*(args.argv0)) {
|
|
||||||
if (*(args.argv0) == 's') {
|
|
||||||
old = 1;
|
|
||||||
ast_set_flag(&leave_options, OPT_SILENT);
|
|
||||||
} else if (*(args.argv0) == 'b') {
|
|
||||||
old = 1;
|
|
||||||
ast_set_flag(&leave_options, OPT_BUSY_GREETING);
|
|
||||||
} else if (*(args.argv0) == 'u') {
|
|
||||||
old = 1;
|
|
||||||
ast_set_flag(&leave_options, OPT_UNAVAIL_GREETING);
|
|
||||||
} else if (*(args.argv0) == 'j') {
|
|
||||||
old = 1;
|
|
||||||
ast_set_flag(&leave_options, OPT_PRIORITY_JUMP);
|
|
||||||
} else
|
|
||||||
break;
|
|
||||||
(args.argv0)++;
|
|
||||||
}
|
|
||||||
if (!deprecate_warning && old) {
|
|
||||||
deprecate_warning = 1;
|
|
||||||
ast_log(LOG_WARNING, "Prefixing the mailbox with an option is deprecated ('%s').\n", orig_argv0);
|
|
||||||
ast_log(LOG_WARNING, "Please move all leading options to the second argument.\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
@@ -6825,24 +6798,14 @@ static char *complete_voicemail_show_users(const char *line, const char *word, i
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_cli_entry cli_show_voicemail_users_deprecated = {
|
|
||||||
{ "show", "voicemail", "users", NULL },
|
|
||||||
handle_voicemail_show_users, NULL,
|
|
||||||
NULL, complete_voicemail_show_users };
|
|
||||||
|
|
||||||
static struct ast_cli_entry cli_show_voicemail_zones_deprecated = {
|
|
||||||
{ "show", "voicemail", "zones", NULL },
|
|
||||||
handle_voicemail_show_zones, NULL,
|
|
||||||
NULL, NULL };
|
|
||||||
|
|
||||||
static struct ast_cli_entry cli_voicemail[] = {
|
static struct ast_cli_entry cli_voicemail[] = {
|
||||||
{ { "voicemail", "list", "users", NULL },
|
{ { "voicemail", "list", "users", NULL },
|
||||||
handle_voicemail_show_users, "List defined voicemail boxes",
|
handle_voicemail_show_users, "List defined voicemail boxes",
|
||||||
voicemail_show_users_help, complete_voicemail_show_users, &cli_show_voicemail_users_deprecated },
|
voicemail_show_users_help, complete_voicemail_show_users, NULL },
|
||||||
|
|
||||||
{ { "voicemail", "list", "zones", NULL },
|
{ { "voicemail", "list", "zones", NULL },
|
||||||
handle_voicemail_show_zones, "List zone message formats",
|
handle_voicemail_show_zones, "List zone message formats",
|
||||||
voicemail_show_zones_help, NULL, &cli_show_voicemail_zones_deprecated },
|
voicemail_show_zones_help, NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int load_config(void)
|
static int load_config(void)
|
||||||
|
Reference in New Issue
Block a user