[Home]

Summary:ASTERISK-13720: [patch] Changes to manager interface for registering event hooks
Reporter:Joze Zivic (jozza)Labels:
Date Opened:2009-03-10 04:42:32Date Closed:2009-11-03 15:31:53.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) manager.patch
Description:In manager.c, there is a function ast_manager_register_hook that registers a function to be called whenever an ami event is sent to the client. The problem was that hooks would only receive events if there was a physical tcp connection to the ami interface. I changed that, so hooked functions always receive ami events, regardless of any physical ami connections, and can also send actions to ami. The main purpose for that was, so custom modules can use ami information and further implement their own protocols, like csta for example.


****** ADDITIONAL INFORMATION ******

I have made the changes to manager interface to support this feature. I need further instructions on how to upload the changes with svn. I dont know which version this is, so i added revision number
Comments:By: Donny Kavanagh (donnyk) 2009-03-10 08:30:25

Jozza,

As we discussed on irc, now that you've got your changes made to your SVN copy, you need to run a 'svn diff' to produce your diff file, eg 'svn diff > mypatch.patch' read the file over to make sure you don't see any obvious mistakes then you can attach it to this bug.  Be sure to sign the digium license if you have not already.

By: Joze Zivic (jozza) 2009-03-11 03:53:22

I attached my patch.

By: Joshua C. Colp (jcolp) 2009-03-11 09:02:46

Unfortunately your license was not accepted and thus we can not see your patch. Please resubmit your license if possible and reattach your patch once done.

By: Joze Zivic (jozza) 2009-03-13 03:36:54

Well, i don't know how to get the licence accepted...

By: Joze Zivic (jozza) 2009-03-18 04:19:06

helloooooo

By: Leif Madsen (lmadsen) 2009-03-23 13:37:09

jozza: you should have received an email describing why your license was rejected.

By: Joze Zivic (jozza) 2009-03-25 14:53:29

License got accepted finally. I have attached same file three times, cause i couldn't remove it before.

By: Digium Subversion (svnbot) 2009-11-03 15:31:51.000-0600

Repository: asterisk
Revision: 227448

U   trunk/include/asterisk/manager.h
U   trunk/main/manager.c
A   trunk/tests/test_amihooks.c

------------------------------------------------------------------------
r227448 | dbrooks | 2009-11-03 15:31:51 -0600 (Tue, 03 Nov 2009) | 11 lines

AMI hook interface

This patch, originally submitted by jozza, enables custom modules to send actions to AMI
and receive messages from AMI via a hook interface. Included is a simple test module to
illustrate the interface.

(closes issue ASTERISK-13720)
Reported by: jozza

Review: https://reviewboard.asterisk.org/r/412/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=227448