--- app_managerevent.c Wed Apr 21 13:01:05 2004 +++ app_managerevent.c.new Wed Apr 21 13:22:23 2004 @@ -23,14 +23,22 @@ #include -static char *tdesc = "ManagerEvent Application"; +static char *tdesc = "Custom Manager Event Application"; static char *app = "ManagerEvent"; -static char *synopsis = "Send manager event"; +static char *synopsis = "Send an arbitrary event to the manager interface"; static char *descrip = -"ManagerEvent(event): Send manager event. Returns 0\n"; +" ManagerEvent(eventname[|body]): Sends an arbitrary event to the\n" +"manager interface, with an optional body representing additional\n" +"arguments. The format of the event will be:\n" +" Event: \n" +" Channel: \n" +" Uniqueid: \n" +" [body]\n" +"If the body is not specified, only Event, Channel, and Uniqueid fields\n" +"will be present. Returns 0."; STANDARD_LOCAL_USER; @@ -63,12 +71,12 @@ if(eventbody) { ast_log(LOG_DEBUG, "Sending manager event: %s, %s\n", eventname, eventbody); manager_event(EVENT_FLAG_CALL, eventname, - "Channel: %s\r\n%s\r\n", - chan->name, eventbody); + "Channel: %s\r\nUniqueid: %s\r\n%s\r\n", + chan->name, chan->uniqueid, eventbody); } else { ast_log(LOG_DEBUG, "Sending manager event: %s\n", eventname); manager_event(EVENT_FLAG_CALL, eventname, - "Channel: %s\r\n", chan->name); + "Channel: %s\r\nUniqueid: %s\r\n", chan->name, chan->uniqueid); } LOCAL_USER_REMOVE(u);