Index: manager.c =================================================================== RCS file: /usr/cvsroot/asterisk/manager.c,v retrieving revision 1.88 diff -u -r1.88 manager.c --- manager.c 23 Mar 2005 05:56:31 -0000 1.88 +++ manager.c 31 Mar 2005 20:30:50 -0000 @@ -109,6 +109,7 @@ return res; } +/*--- authority_to_str: Convert authority code to string with serveral options */ static char *authority_to_str(int authority, char *res, int reslen) { int running_total = 0, i; @@ -1375,6 +1376,7 @@ return NULL; } +/*--- manager_event: Send AMI event to client */ int manager_event(int category, char *event, char *fmt, ...) { struct mansession *s; @@ -1388,6 +1390,7 @@ ast_mutex_lock(&s->lock); if (!s->blocking) { ast_cli(s->fd, "Event: %s\r\n", event); + ast_cli(s->fd, "AMICategory: %s\r\n", authority_to_str(category, tmp, sizeof(tmp))); va_start(ap, fmt); vsnprintf(tmp, sizeof(tmp), fmt, ap); va_end(ap); @@ -1512,7 +1515,7 @@ ast_manager_register2( "Getvar", EVENT_FLAG_CALL, action_getvar, "Gets a Channel Variable", mandescr_getvar ); ast_manager_register( "Redirect", EVENT_FLAG_CALL, action_redirect, "Redirect" ); ast_manager_register2("Originate", EVENT_FLAG_CALL, action_originate, "Originate Call", mandescr_originate); - ast_manager_register2( "Command", EVENT_FLAG_COMMAND, action_command, "Execute Command", mandescr_command ); + ast_manager_register2( "Command", EVENT_FLAG_COMMAND, action_command, "Execute Asterisk CLI Command", mandescr_command ); ast_manager_register2( "ExtensionState", EVENT_FLAG_CALL, action_extensionstate, "Check Extension Status", mandescr_extensionstate ); ast_manager_register2( "AbsoluteTimeout", EVENT_FLAG_CALL, action_timeout, "Set Absolute Timeout", mandescr_timeout ); ast_manager_register2( "MailboxStatus", EVENT_FLAG_CALL, action_mailboxstatus, "Check Mailbox", mandescr_mailboxstatus );