aboutsummaryrefslogtreecommitdiffstats
path: root/manager.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-29 05:04:48 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-29 05:04:48 +0000
commite4eae0813eeae9f935460e48a6d3332276d2120d (patch)
tree607fe7932d4d9f896b58fe3ea9f3ee5647ec157c /manager.c
parentd2ef14eece7f3f4581d89ac0a37a6e0fc4b45278 (diff)
Add manager action descriptions for 'Events', 'Logoff', and 'Hangup'.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3339 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'manager.c')
-rwxr-xr-xmanager.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/manager.c b/manager.c
index 6f0b79747..fc42e7ab9 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" );