aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-03 21:26:28 +0000
committerdbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-03 21:26:28 +0000
commit741c3d606f6a0d54b191040a022123b7f9dcd62c (patch)
treecfb6fb023f534e938a1b28056f5a32a9f4417953 /include
parent899c3fed766d6e8337e4c85ccc54c1de1599c695 (diff)
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 #14635) Reported by: jozza Review: https://reviewboard.asterisk.org/r/412/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@227448 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/manager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 33eb52c04..5b83c3ef5 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -73,6 +73,7 @@
#define EVENT_FLAG_DIALPLAN (1 << 11) /* Dialplan events (VarSet, NewExten) */
#define EVENT_FLAG_ORIGINATE (1 << 12) /* Originate a call to an extension */
#define EVENT_FLAG_AGI (1 << 13) /* AGI events */
+#define EVENT_FLAG_HOOKRESPONSE (1 << 14) /* Hook Response */
/*@} */
/*! \brief Export manager structures */
@@ -107,6 +108,15 @@ void ast_manager_register_hook(struct manager_custom_hook *hook);
*/
void ast_manager_unregister_hook(struct manager_custom_hook *hook);
+/*! \brief Registered hooks can call this function to invoke actions and they will receive responses through registered callback
+ * \param hookid the file identifier specified in manager_custom_hook struct when registering a hook
+ * \param msg ami action mesage string e.g. "Action: SipPeers\r\n"
+
+ * \retval 0 on Success
+ * \retval non-zero on Failure
+*/
+int ast_hook_send_action(struct manager_custom_hook *hook, const char *msg);
+
struct mansession;
struct message {