[asterisk-commits] tilghman: trunk r94053 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 19 14:20:56 CST 2007


Author: tilghman
Date: Wed Dec 19 14:20:55 2007
New Revision: 94053

URL: http://svn.digium.com/view/asterisk?view=rev&rev=94053
Log:
Add 'voicemail reload' command.
Reported by: eliel
Patch by: eliel
(Closes issue #11365)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=94053&r1=94052&r2=94053
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Wed Dec 19 14:20:55 2007
@@ -7761,9 +7761,33 @@
 	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)




More information about the asterisk-commits mailing list