Summary:ASTERISK-01293: [patch]Application to send event to manager clients
Reporter:maciejka (maciejka)Labels:
Date Opened:2004-03-25 13:30:31.000-0600Date Closed:2008-01-15 15:00:03.000-0600
Versions:Frequency of
Environment:Attachments:( 0) app_managerevent.c
( 1) app_managerevent.c
( 2) app_managerevent.patch
( 3) app_managerevent.patch
Description:There is a simple application attached that sends events to manager clients. It allows to add application level logic to manager clients.

For example:
exten => 5,2,ManagerEvent(eventtype, eventBody)
would send following event to manager clients:
Event: eventtype
Comments:By: twisted (twisted) 2004-04-18 12:22:12

About to close unless interest is expressed in this...  

Thank you

By: Olle Johansson (oej) 2004-04-18 15:16:03

I'll mail on the mailing list and see if anyone will test this. This is a very interesting patch.
* Is this the latest code _and_ does it work with the latest CVS?
* Have you sent in a disclaimer to Digium?

Please answer before I attract attention on the mailing list.

By: James Golovich (jamesgolovich) 2004-04-18 17:51:39

I haven't tested this out, but looking over the code it looks fine.  The only criticism I have is that the documentation it comes with is lacking.

By: Brian West (bkw918) 2004-04-19 10:34:12


Its a dupe...

By: mjohnston (mjohnston) 2004-04-21 14:43:24

The code is a dupe, but the note in bug 537 says it wasn't needed because "the decision for events was to provide some sort of interface to catch and handle internal call events".  I need an app like this for information other than internal call events - basically, it's either this or AGI to get the potentially-dynamic information out of the dialplan, and my outside code is in Python, so I don't want to be firing up AGIs all the time.

I'm attaching a patch that adds the Uniqueid field to the events and fixes up the documentation a bit.  If maciejka isn't disclaimed, I can touch up my independently-written code that does the same thing and submit that.  I haven't tried to fix tabs-vs-spaces in the original code, which is messed up.  Also, I'm not sure about the strncpy in there - if strlen(data) + AST_MAX_EXTENSION-1 is bigger than 512, info will be overrun.

By: maciejka (maciejka) 2004-05-06 06:15:23

I have just send an disclaimer to Digium.

By: maciejka (maciejka) 2004-05-11 17:09:50

One more patch that corrects strlen problem and source formatting.

By: Mark Spencer (markster) 2004-06-21 14:45:40

Patch isn't in the right format and doesn't apply anyway to app_managerevent.c

By: maciejka (maciejka) 2004-06-21 16:09:59

Current version of app_managerevent.c added.

By: Mark Spencer (markster) 2004-06-21 17:21:08

Would you have a problem with all event names being prefixed with "UserEvent" so that, for example calling it with "Foo" would cause "Event: UserEventFoo", so that tools like gastman which don't want user events can ignore them categorically?

By: maciejka (maciejka) 2004-06-21 18:48:51

No problem. It would be good to change app name to userevent accordingly.

By: Mark Spencer (markster) 2004-06-21 19:18:13

Added to CVS as app_userevent.  Thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:00:03.000-0600

Repository: asterisk
Revision: 3266

U   trunk/apps/Makefile
A   trunk/apps/app_userevent.c

r3266 | markster | 2008-01-15 15:00:02 -0600 (Tue, 15 Jan 2008) | 2 lines

Add userevent application (bug ASTERISK-1293)