From a1e219ef51dc37fbf570382d2d3861bd876414b2 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 25 Jun 2013 13:03:17 +0000 Subject: CEL refactoring cleanup This change removes AST_CEL_BRIDGE_UPDATE since it should no longer be used because masquerade situations are now accounted for in other ways. This also refactors usage of AST_CEL_FORWARD to be produced by a Dial message which has been extended with a "forward" field. (closes issue ASTERISK-21566) Review: https://reviewboard.asterisk.org/r/2635/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392829 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/cel.h | 22 ++++++++++++++++++++-- include/asterisk/stasis_channels.h | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asterisk/cel.h b/include/asterisk/cel.h index 4f2445b93..d40920aa5 100644 --- a/include/asterisk/cel.h +++ b/include/asterisk/cel.h @@ -83,8 +83,6 @@ enum ast_cel_event_type { AST_CEL_USER_DEFINED = 21, /*! \brief the last channel with the given linkedid is retired */ AST_CEL_LINKEDID_END = 22, - /*! \brief a masquerade happened to alter the participants on a bridge */ - AST_CEL_BRIDGE_UPDATE = 23, /*! \brief a directed pickup was performed on this channel */ AST_CEL_PICKUP = 24, /*! \brief this call was forwarded somewhere else */ @@ -245,6 +243,26 @@ struct ast_cel_event_record { */ int ast_cel_fill_record(const struct ast_event *event, struct ast_cel_event_record *r); +/*! + * \brief Publish a CEL event + * \since 12 + * + * \param chan This is the primary channel associated with this channel event. + * \param event_type This is the type of call event being reported. + * \param blob This contains any additional parameters that need to be conveyed for this event. + */ +void ast_cel_publish_event(struct ast_channel *chan, + enum ast_cel_event_type event_type, + struct ast_json *blob); + +/*! + * \brief Get the CEL topic + * + * \retval The CEL topic + * \retval NULL if not allocated + */ +struct stasis_topic *ast_cel_topic(void); + #if defined(__cplusplus) || defined(c_plusplus) } #endif diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h index ca075ae69..24fe01cea 100644 --- a/include/asterisk/stasis_channels.h +++ b/include/asterisk/stasis_channels.h @@ -454,6 +454,24 @@ void ast_channel_publish_dial(struct ast_channel *caller, const char *dialstring, const char *dialstatus); +/*! + * \since 12 + * \brief Publish in the \ref ast_channel_topic or \ref ast_channel_topic_all + * topics a stasis message for the channels involved in a dial operation that + * is forwarded. + * + * \param caller The channel performing the dial operation + * \param peer The channel being dialed + * \param dialstring The information passed to the dialing application when beginning a dial + * \param dialstatus The current status of the dial operation + * \param forward The call forward string provided by the dialed channel + */ +void ast_channel_publish_dial_forward(struct ast_channel *caller, + struct ast_channel *peer, + const char *dialstring, + const char *dialstatus, + const char *forward); + /*! * \since 12 * \brief Publish in the \ref ast_channel_topic a \ref ast_channel_snapshot -- cgit v1.2.3