diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-05-10 13:13:06 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-05-10 13:13:06 +0000 |
commit | 7ce05bfb9b5f06c18451e37bb5b91cd543d6ba84 (patch) | |
tree | b4e833909ec2ba776d39848ecf8d28f74b341424 /include | |
parent | 2cfedc12adf64cc24e855bd9ea30df3aa1b759ce (diff) |
Add channel events for res_stasis apps
This change adds a framework in res_stasis for handling events from
channel topics. JSON event generation and validation code is created
from event documentation in rest-api/api-docs/events.json to assist in
JSON event generation, ensure consistency, and ensure that accurate
documentation is available for ALL events that are received by
res_stasis applications.
The userevent application has been refactored along with the code that
handles userevent channel blob events to pass the headers as key/value
pairs in the JSON blob. As a side-effect, app_userevent now handles
duplicate keys by overwriting the previous value.
Review: https://reviewboard.asterisk.org/r/2428/
(closes issue ASTERISK-21180)
Patch-By: Kinsey Moore <kmoore@digium.com>
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/stasis_channels.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h index af571eda1..e361fc680 100644 --- a/include/asterisk/stasis_channels.h +++ b/include/asterisk/stasis_channels.h @@ -307,6 +307,34 @@ void ast_channel_publish_dial(struct ast_channel *caller, struct ast_json *ast_channel_snapshot_to_json(const struct ast_channel_snapshot *snapshot); /*! + * \brief Compares the context, exten and priority of two snapshots. + * \since 12 + * + * \param old_snapshot Old snapshot + * \param new_snapshot New snapshot + * + * \return True (non-zero) if context, exten or priority are identical. + * \return False (zero) if context, exten and priority changed. + */ +int ast_channel_snapshot_cep_equal( + const struct ast_channel_snapshot *old_snapshot, + const struct ast_channel_snapshot *new_snapshot); + +/*! + * \brief Compares the callerid info of two snapshots. + * \since 12 + * + * \param old_snapshot Old snapshot + * \param new_snapshot New snapshot + * + * \return True (non-zero) if callerid are identical. + * \return False (zero) if callerid changed. + */ +int ast_channel_snapshot_caller_id_equal( + const struct ast_channel_snapshot *old_snapshot, + const struct ast_channel_snapshot *new_snapshot); + +/*! * \brief Dispose of the stasis channel topics and message types */ void ast_stasis_channels_shutdown(void); |