diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-07-20 13:10:22 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-07-20 13:10:22 +0000 |
commit | 684c83b29b88d219aa406d0aa1673ee338c9159d (patch) | |
tree | fb558b8a1f3aad37ad816d371d805c76f9476431 /include/asterisk/cel.h | |
parent | 4e15046cf6446e5f5acca0f4faccc9678e96836a (diff) |
Add transfer support to CEL
This adds CEL support for blind and attended transfers and call pickup.
During the course of adding this functionality I noticed that
CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly
useless without a bridge identifier, so I added that as well.
This adds tests for blind transfers, several types of attended
transfers, and call pickup.
The extra field in CEL records now consists of a JSON blob whose fields
are defined on a per-event basis.
Review: https://reviewboard.asterisk.org/r/2658/
(closes issue ASTERISK-21565)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/cel.h')
-rw-r--r-- | include/asterisk/cel.h | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/include/asterisk/cel.h b/include/asterisk/cel.h index 505204a4f..d17568824 100644 --- a/include/asterisk/cel.h +++ b/include/asterisk/cel.h @@ -67,8 +67,6 @@ enum ast_cel_event_type { AST_CEL_BLINDTRANSFER = 13, /*! \brief a transfer occurs */ AST_CEL_ATTENDEDTRANSFER = 14, - /*! \brief a transfer occurs */ - AST_CEL_TRANSFER = 15, /*! \brief a 3-way conference, usually part of a transfer */ AST_CEL_HOOKFLASH = 16, /*! \brief a 3-way conference, usually part of a transfer */ @@ -168,31 +166,6 @@ enum ast_cel_event_type ast_cel_str_to_event_type(const char *name); struct ast_channel *ast_cel_fabricate_channel_from_event(const struct ast_event *event); /*! - * \brief Report a channel event - * - * \param chan This argument is required. This is the primary channel associated with - * this channel event. - * \param event_type This is the type of call event being reported. - * \param userdefevname This is an optional custom name for the call event. - * \param extra This is an optional opaque field that will go into the "CEL_EXTRA" - * information element of the call event. - * \param peer2 All CEL events contain a "peer name" information element. The first - * place the code will look to get a peer name is from the bridged channel to - * chan. If chan has no bridged channel and peer2 is specified, then the name - * of peer2 will go into the "peer name" field. If neither are available, the - * peer name field will be blank. - * - * \since 1.8 - * - * \pre chan and peer2 are both unlocked - * - * \retval 0 success - * \retval non-zero failure - */ -int ast_cel_report_event(struct ast_channel *chan, enum ast_cel_event_type event_type, - const char *userdefevname, const char *extra, struct ast_channel *peer2); - -/*! * \brief Helper struct for getting the fields out of a CEL event */ struct ast_cel_event_record { @@ -312,8 +285,8 @@ struct ast_channel_snapshot; * with this channel event. * \param event_type The type of call event being reported. * \param userdefevname Custom name for the call event. (optional) - * \param extra An opaque field that will go into the "CEL_EXTRA" information - * element of the call event. (optional) + * \param extra An event-specific opaque JSON blob to be rendered and placed + * in the "CEL_EXTRA" information element of the call event. (optional) * \param peer_name The peer name to be placed into the event. (optional) * * \since 12 @@ -323,7 +296,7 @@ struct ast_channel_snapshot; */ struct ast_event *ast_cel_create_event(struct ast_channel_snapshot *snapshot, enum ast_cel_event_type event_type, const char *userdefevname, - const char *extra, const char *peer_name); + struct ast_json *extra, const char *peer_name); #if defined(__cplusplus) || defined(c_plusplus) } |