diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-19 20:20:55 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-19 20:20:55 +0000 |
commit | d36381e62947e1ce3e89a098d87c6875e645b97a (patch) | |
tree | c02d2c76dbd79ae9f09c138fcb82c45cb433555b /apps | |
parent | f97dfd22780310a6de5bde8aa8825eda1ac2ebb3 (diff) |
Add 'voicemail reload' command.
Reported by: eliel
Patch by: eliel
(Closes issue #11365)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 98f142a8e..d6999189c 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -7761,9 +7761,33 @@ static char *handle_voicemail_show_zones(struct ast_cli_entry *e, int cmd, struc return res; } +/*! \brief Reload voicemail configuration from the CLI */ +static char *handle_voicemail_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + switch (cmd) { + case CLI_INIT: + e->command = "voicemail reload"; + e->usage = + "Usage: voicemail reload\n" + " Reload voicemail configuration\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + + if (a->argc != 2) + return CLI_SHOWUSAGE; + + ast_cli(a->fd, "Reloading voicemail configuration...\n"); + load_config(1); + + return CLI_SUCCESS; +} + static struct ast_cli_entry cli_voicemail[] = { AST_CLI_DEFINE(handle_voicemail_show_users, "List defined voicemail boxes"), AST_CLI_DEFINE(handle_voicemail_show_zones, "List zone message formats"), + AST_CLI_DEFINE(handle_voicemail_reload, "Reload voicemail configuration"), }; static void poll_subscribed_mailboxes(void) |