From 408ead2dda99797d643f020971bdb50a7d4b196e Mon Sep 17 00:00:00 2001 From: James Golovich <james@gnuinter.net> Date: Tue, 29 Jun 2004 05:04:48 +0000 Subject: [PATCH] Add manager action descriptions for 'Events', 'Logoff', and 'Hangup'. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3339 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- manager.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/manager.c b/manager.c index 6f0b797478..fc42e7ab91 100755 --- a/manager.c +++ b/manager.c @@ -428,6 +428,12 @@ static int action_listcommands(struct mansession *s, struct message *m) return 0; } +static char mandescr_events[] = +"Description: Enable/Disable sending of events to this manager\n" +" client.\n" +"Variables:\n" +" EventMask: 'on' if events should be sent, 'off' if not\n"; + static int action_events(struct mansession *s, struct message *m) { char *mask = astman_get_header(m, "EventMask"); @@ -443,12 +449,21 @@ static int action_events(struct mansession *s, struct message *m) return 0; } +static char mandescr_logoff[] = +"Description: Logoff this manager session\n" +"Variables: NONE\n"; + static int action_logoff(struct mansession *s, struct message *m) { astman_send_response(s, m, "Goodbye", "Thanks for all the fish."); return -1; } +static char mandescr_hangup[] = +"Description: Hangup a channel\n" +"Variables: \n" +" Channel: The channel name to be hungup\n"; + static int action_hangup(struct mansession *s, struct message *m) { struct ast_channel *c = NULL; @@ -1249,9 +1264,9 @@ int init_manager(void) if (!registered) { /* Register default actions */ ast_manager_register2("Ping", 0, action_ping, "Ping", mandescr_ping); - ast_manager_register( "Events", 0, action_events, "Contol Event Flow" ); - ast_manager_register( "Logoff", 0, action_logoff, "Logoff Manager" ); - ast_manager_register( "Hangup", EVENT_FLAG_CALL, action_hangup, "Hangup Channel" ); + ast_manager_register2("Events", 0, action_events, "Contol Event Flow", mandescr_events); + ast_manager_register2("Logoff", 0, action_logoff, "Logoff Manager", mandescr_logoff); + ast_manager_register2("Hangup", EVENT_FLAG_CALL, action_hangup, "Hangup Channel", mandescr_hangup); ast_manager_register( "Status", EVENT_FLAG_CALL, action_status, "Status" ); ast_manager_register( "Setvar", EVENT_FLAG_CALL, action_setvar, "Set Channel Variable" ); ast_manager_register( "Getvar", EVENT_FLAG_CALL, action_getvar, "Gets a Channel Variable" ); -- GitLab