summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2009-06-26 15:28:53 +0000
committerRussell Bryant <russell@russellbryant.com>2009-06-26 15:28:53 +0000
commit0264eef1156b8ef7369884dd5c663646f1b2b429 (patch)
treea28e9113cf1daf97e45a8fc6d41a52c76ac69836 /include/asterisk
parente06c6f97c4c222b4c802ac2b85f76a331991dffb (diff)
Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/_private.h2
-rw-r--r--include/asterisk/cdr.h15
-rw-r--r--include/asterisk/cel.h276
-rw-r--r--include/asterisk/channel.h53
-rw-r--r--include/asterisk/event.h11
-rw-r--r--include/asterisk/event_defs.h158
-rw-r--r--include/asterisk/utils.h1
7 files changed, 492 insertions, 24 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h
index e60ba0690..fc65a463c 100644
--- a/include/asterisk/_private.h
+++ b/include/asterisk/_private.h
@@ -42,6 +42,8 @@ int ast_timing_init(void); /*!< Provided by timing.c */
int ast_indications_init(void); /*!< Provided by indications.c */
int ast_indications_reload(void);/*!< Provided by indications.c */
void ast_stun_init(void); /*!< Provided by stun.c */
+int ast_cel_engine_init(void); /*!< Provided by cel.c */
+int ast_cel_engine_reload(void); /*!< Provided by cel.c */
/*!
* \brief Reload asterisk modules.
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h
index 1f71039eb..21b701459 100644
--- a/include/asterisk/cdr.h
+++ b/include/asterisk/cdr.h
@@ -94,16 +94,20 @@ struct ast_cdr {
/*! Total time call is up, in seconds */
long int billsec;
/*! What happened to the call */
- long int disposition;
+ long int disposition;
/*! What flags to use */
- long int amaflags;
+ long int amaflags;
/*! What account number to use */
- char accountcode[AST_MAX_ACCOUNT_CODE];
+ char accountcode[AST_MAX_ACCOUNT_CODE];
+ /*! Account number of the last person we talked to */
+ char peeraccount[AST_MAX_ACCOUNT_CODE];
/*! flags */
- unsigned int flags;
+ unsigned int flags;
/*! Unique Channel Identifier
* 150 = 127 (max systemname) + "-" + 10 (epoch timestamp) + "." + 10 (monotonically incrementing integer) + NULL */
char uniqueid[150];
+ /* Linked group Identifier */
+ char linkedid[32];
/*! User field */
char userfield[AST_MAX_USER_FIELD];
@@ -353,6 +357,9 @@ void ast_cdr_merge(struct ast_cdr *to, struct ast_cdr *from);
/*! \brief Set account code, will generate AMI event */
int ast_cdr_setaccount(struct ast_channel *chan, const char *account);
+/*! \brief Set the peer account */
+int ast_cdr_setpeeraccount(struct ast_channel *chan, const char *account);
+
/*! \brief Set AMA flags for channel */
int ast_cdr_setamaflags(struct ast_channel *chan, const char *amaflags);
diff --git a/include/asterisk/cel.h b/include/asterisk/cel.h
new file mode 100644
index 000000000..14f886db2
--- /dev/null
+++ b/include/asterisk/cel.h
@@ -0,0 +1,276 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2008 - 2009, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief Call Event Logging API
+ */
+
+#ifndef __AST_CEL_H__
+#define __AST_CEL_H__
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+#include "asterisk/event.h"
+
+/*! \brief AMA Flags */
+enum ast_cel_ama_flag {
+ AST_CEL_AMA_FLAG_OMIT,
+ AST_CEL_AMA_FLAG_BILLING,
+ AST_CEL_AMA_FLAG_DOCUMENTATION,
+ /*! \brief Must be final entry */
+ AST_CEL_AMA_FLAG_TOTAL,
+};
+
+/*!
+ * \brief CEL event types
+ */
+enum ast_cel_event_type {
+ /*! \brief channel birth */
+ AST_CEL_CHANNEL_START = 1,
+ /*! \brief channel end */
+ AST_CEL_CHANNEL_END = 2,
+ /*! \brief hangup terminates connection */
+ AST_CEL_HANGUP = 3,
+ /*! \brief A ringing phone is answered */
+ AST_CEL_ANSWER = 4,
+ /*! \brief an app starts */
+ AST_CEL_APP_START = 5,
+ /*! \brief an app ends */
+ AST_CEL_APP_END = 6,
+ /*! \brief a bridge is established */
+ AST_CEL_BRIDGE_START = 7,
+ /*! \brief a bridge is torn down */
+ AST_CEL_BRIDGE_END = 8,
+ /*! \brief a conference is started */
+ AST_CEL_CONF_START = 9,
+ /*! \brief a conference is ended */
+ AST_CEL_CONF_END = 10,
+ /*! \brief a channel is parked */
+ AST_CEL_PARK_START = 11,
+ /*! \brief channel out of the park */
+ AST_CEL_PARK_END = 12,
+ /*! \brief a transfer occurs */
+ 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 */
+ AST_CEL_3WAY_START = 17,
+ /*! \brief a 3-way conference, usually part of a transfer */
+ AST_CEL_3WAY_END = 18,
+ /*! \brief channel enters a conference */
+ AST_CEL_CONF_ENTER = 19,
+ /*! \brief channel exits a conference */
+ AST_CEL_CONF_EXIT = 20,
+ /*! \brief a user-defined event, the event name field should be set */
+ 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 */
+ AST_CEL_FORWARD = 25,
+};
+
+/*!
+ * \brief Check to see if CEL is enabled
+ *
+ * \since 1.6.3
+ *
+ * \retval zero not enabled
+ * \retval non-zero enabled
+ */
+unsigned int ast_cel_check_enabled(void);
+
+/*!
+ * \brief Allocate a CEL record
+ *
+ * \since 1.6.3
+ *
+ * \note The CEL record must be destroyed with ast_cel_destroy().
+ *
+ * \retval non-NULL an allocated ast_cel structure
+ * \retval NULL error
+ */
+struct ast_cel *ast_cel_alloc(void);
+
+/*!
+ * \brief Destroy a CEL record.
+ *
+ * \param cel the record to destroy
+ *
+ * \since 1.6.3
+ *
+ * \return nothing.
+ */
+void ast_cel_destroy(struct ast_cel *cel);
+
+/*!
+ * \brief Get the name of a CEL event type
+ *
+ * \param type the type to get the name of
+ *
+ * \since 1.6.3
+ *
+ * \return the string representation of the type
+ */
+const char *ast_cel_get_type_name(enum ast_cel_event_type type);
+
+/*!
+ * \brief Get the event type from a string
+ *
+ * \param name the event type name as a string
+ *
+ * \since 1.6.3
+ *
+ * \return the ast_cel_event_type given by the string
+ */
+enum ast_cel_event_type ast_cel_str_to_event_type(const char *name);
+
+/*!
+ * \brief Convert AMA flag to printable string
+ *
+ * \param[in] flag the flag to convert to a string
+ *
+ * \since 1.6.3
+ *
+ * \return the string representation of the flag
+ */
+const char *ast_cel_get_ama_flag_name(enum ast_cel_ama_flag flag);
+
+/*!
+ * \brief Check and potentially retire a Linked ID
+ *
+ * \param chan channel that is being destroyed or its linkedid is changing
+ *
+ * \since 1.6.3
+ *
+ * If at least one CEL backend is looking for CEL_LINKEDID_END
+ * events, this function will check if the given channel is the last
+ * active channel with that linkedid, and if it is, emit a
+ * CEL_LINKEDID_END event.
+ *
+ * \return nothing
+ */
+void ast_cel_check_retire_linkedid(struct ast_channel *chan);
+
+/*!
+ * \brief Create a fake channel from data in a CEL event
+ *
+ * This function creates a fake channel containing the serialized channel data
+ * in the given cel event. It must be released with ast_channel_release.
+ *
+ * \param event the CEL event
+ *
+ * \since 1.6.3
+ *
+ * \return a channel with the data filled in, or NULL on error
+ *
+ * \todo This function is \b very expensive, especially given that some CEL backends
+ * use it on \b every CEL event. This function really needs to go away at
+ * some point.
+ */
+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.6.3
+ *
+ * \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 {
+ /*!
+ * \brief struct ABI version
+ * \note This \b must be incremented when the struct changes.
+ */
+ #define AST_CEL_EVENT_RECORD_VERSION 2
+ /*!
+ * \brief struct ABI version
+ * \note This \b must stay as the first member.
+ */
+ uint32_t version;
+ enum ast_cel_event_type event_type;
+ struct timeval event_time;
+ const char *event_name;
+ const char *user_defined_name;
+ const char *caller_id_name;
+ const char *caller_id_num;
+ const char *caller_id_ani;
+ const char *caller_id_rdnis;
+ const char *caller_id_dnid;
+ const char *extension;
+ const char *context;
+ const char *channel_name;
+ const char *application_name;
+ const char *application_data;
+ const char *account_code;
+ const char *peer_account;
+ const char *unique_id;
+ const char *linked_id;
+ uint amaflag;
+ const char *user_field;
+ const char *peer;
+ const char *extra;
+};
+
+/*!
+ * \brief Fill in an ast_cel_event_record from a CEL event
+ *
+ * \param[in] event the CEL event
+ * \param[out] r the ast_cel_event_record to fill in
+ *
+ * \since 1.6.3
+ *
+ * \retval 0 success
+ * \retval non-zero failure
+ */
+int ast_cel_fill_record(const struct ast_event *event, struct ast_cel_event_record *r);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* __AST_CEL_H__ */
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index d35601d42..8976997e5 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -361,7 +361,7 @@ struct ast_channel_tech {
int properties; /*!< Technology Properties */
/*! \brief Requester - to set up call data structures (pvt's) */
- struct ast_channel *(* const requester)(const char *type, int format, void *data, int *cause);
+ struct ast_channel *(* const requester)(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause);
int (* const devicestate)(void *data); /*!< Devicestate call back */
@@ -612,9 +612,13 @@ struct ast_channel {
AST_STRING_FIELD(language); /*!< Language requested for voice prompts */
AST_STRING_FIELD(musicclass); /*!< Default music class */
AST_STRING_FIELD(accountcode); /*!< Account code for billing */
+ AST_STRING_FIELD(peeraccount); /*!< Peer account code for billing */
+ AST_STRING_FIELD(userfield); /*!< Userfield for CEL billing */
AST_STRING_FIELD(call_forward); /*!< Where to forward to if asked to dial on this interface */
AST_STRING_FIELD(uniqueid); /*!< Unique Channel Identifier */
+ AST_STRING_FIELD(linkedid); /*!< Linked Channel Identifier -- gets propagated by linkage */
AST_STRING_FIELD(parkinglot); /*! Default parking lot, if empty, default parking lot */
+ AST_STRING_FIELD(hangupsource); /*! Who is responsible for hanging up this channel */
AST_STRING_FIELD(dialcontext); /*!< Dial: Extension context that we were called from */
);
@@ -913,17 +917,30 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state);
* \note By default, new channels are set to the "s" extension
* and "default" context.
*/
-struct ast_channel * attribute_malloc __attribute__((format(printf, 12, 13)))
+struct ast_channel * attribute_malloc __attribute__((format(printf, 13, 14)))
__ast_channel_alloc(int needqueue, int state, const char *cid_num,
const char *cid_name, const char *acctcode,
const char *exten, const char *context,
- const int amaflag, const char *file, int line,
- const char *function, const char *name_fmt, ...);
+ const char *linkedid, const int amaflag,
+ const char *file, int line, const char *function,
+ const char *name_fmt, ...);
-#define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, amaflag, ...) \
- __ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, amaflag, \
+#define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, linkedid, amaflag, ...) \
+ __ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, linkedid, amaflag, \
__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
+/*!
+ * \brief Create a fake channel structure
+ *
+ * \retval NULL failure
+ * \retval non-NULL successfully allocated channel
+ *
+ * \note This function should ONLY be used to create a fake channel
+ * that can then be populated with data for use in variable
+ * substitution when a real channel does not exist.
+ */
+struct ast_channel *ast_dummy_channel_alloc(void);
+
/*!
* \brief Queue one or more frames to a channel's frame queue
*
@@ -1035,7 +1052,7 @@ void ast_change_name(struct ast_channel *chan, const char *newname);
*/
struct ast_channel *ast_channel_release(struct ast_channel *chan);
-/*!
+/*!
* \brief Requests a channel
*
* \param type type of channel to request
@@ -1050,7 +1067,7 @@ struct ast_channel *ast_channel_release(struct ast_channel *chan);
* \retval NULL failure
* \retval non-NULL channel on success
*/
-struct ast_channel *ast_request(const char *type, int format, void *data, int *status);
+struct ast_channel *ast_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *status);
/*!
* \brief Request a channel of a given type, with data as optional information used
@@ -1067,7 +1084,7 @@ struct ast_channel *ast_request(const char *type, int format, void *data, int *s
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
-struct ast_channel *ast_request_and_dial(const char *type, int format, void *data,
+struct ast_channel *ast_request_and_dial(const char *type, int format, const struct ast_channel *requestor, void *data,
int timeout, int *reason, const char *cid_num, const char *cid_name);
/*!
@@ -1084,7 +1101,7 @@ struct ast_channel *ast_request_and_dial(const char *type, int format, void *dat
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
-struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data,
+struct ast_channel *__ast_request_and_dial(const char *type, int format, const struct ast_channel *requestor, void *data,
int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh);
/*!
@@ -1188,6 +1205,16 @@ int ast_softhangup(struct ast_channel *chan, int cause);
*/
int ast_softhangup_nolock(struct ast_channel *chan, int cause);
+/*! \brief Set the source of the hangup in this channel and it's bridge
+ * \param chan channel to set the field on
+ * \param source a string describing the source of the hangup for this channel
+ *
+ * Hangupsource is generally the channel name that caused the bridge to be
+ * hung up, but it can also be other things such as "dialplan/agi"
+ * This can then be logged in the CDR or CEL
+ */
+void ast_set_hangupsource(struct ast_channel *chan, const char *source, int force);
+
/*! \brief Check to see if a channel is needing hang up
* \param chan channel on which to check for hang up
* This function determines if the channel is being requested to be hung up.
@@ -2281,6 +2308,12 @@ struct ast_channel *ast_channel_get_by_exten(const char *exten, const char *cont
/*! @} End channel search functions. */
/*!
+ \brief propagate the linked id between chan and peer
+ */
+void ast_channel_set_linkgroup(struct ast_channel *chan, struct ast_channel *peer);
+
+
+/*!
* \since 1.6.3
* \brief Copy the source caller information to the destination caller.
*
diff --git a/include/asterisk/event.h b/include/asterisk/event.h
index c2afc57ef..8c23c949c 100644
--- a/include/asterisk/event.h
+++ b/include/asterisk/event.h
@@ -111,7 +111,7 @@ typedef void (*ast_event_cb_t)(const struct ast_event *event, void *userdata);
* pointer to the peer.
*/
struct ast_event_sub *ast_event_subscribe(enum ast_event_type event_type,
- ast_event_cb_t cb, void *userdata, ...);
+ ast_event_cb_t cb, char *description, void *userdata, ...);
/*!
* \brief Allocate a subscription, but do not activate it
@@ -242,6 +242,15 @@ int ast_event_sub_activate(struct ast_event_sub *sub);
struct ast_event_sub *ast_event_unsubscribe(struct ast_event_sub *event_sub);
/*!
+ * \brief Get description for a subscription
+ *
+ * \param sub subscription
+ *
+ * \return string description of the subscription
+ */
+const char *ast_event_subscriber_get_description(struct ast_event_sub *sub);
+
+/*!
* \brief Check if subscribers exist
*
* \param event_type This is the type of event that the caller would like to
diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h
index 9bebfb69d..99edb6f55 100644
--- a/include/asterisk/event_defs.h
+++ b/include/asterisk/event_defs.h
@@ -48,8 +48,10 @@ enum ast_event_type {
/*! The state of a device has changed on _one_ server. This should not be used
* directly, in general. Use AST_EVENT_DEVICE_STATE instead. */
AST_EVENT_DEVICE_STATE_CHANGE = 0x06,
+ /*! Channel Event Logging events */
+ AST_EVENT_CEL = 0x07,
/*! Number of event types. This should be the last event type + 1 */
- AST_EVENT_TOTAL = 0x07,
+ AST_EVENT_TOTAL = 0x08,
};
/*! \brief Event Information Element types */
@@ -92,7 +94,7 @@ enum ast_event_ie_type {
* Used by: AST_EVENT_SUB
* Payload type: UINT (ast_event_ie_type)
*/
- AST_EVENT_IE_EXISTS = 0x06,
+ AST_EVENT_IE_EXISTS = 0x6,
/*!
* \brief Device Name
* Used by AST_EVENT_DEVICE_STATE_CHANGE
@@ -113,13 +115,151 @@ enum ast_event_ie_type {
* Payload type: str
*/
AST_EVENT_IE_CONTEXT = 0x09,
- /*!
- * \brief Entity ID
- * Used by All events
- * Payload type: RAW
- * This IE indicates which server the event originated from
- */
- AST_EVENT_IE_EID = 0x0A,
+ /*!
+ * \brief Channel Event Type
+ * Used by: AST_EVENT_CEL
+ * Payload type: UINT
+ */
+ AST_EVENT_IE_CEL_EVENT_TYPE = 0x0a,
+ /*!
+ * \brief Channel Event Time (seconds)
+ * Used by: AST_EVENT_CEL
+ * Payload type: UINT
+ */
+ AST_EVENT_IE_CEL_EVENT_TIME = 0x0b,
+ /*!
+ * \brief Channel Event Time (micro-seconds)
+ * Used by: AST_EVENT_CEL
+ * Payload type: UINT
+ */
+ AST_EVENT_IE_CEL_EVENT_TIME_USEC = 0x0c,
+ /*!
+ * \brief Channel Event User Event Name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_USEREVENT_NAME = 0x0d,
+ /*!
+ * \brief Channel Event CID name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CIDNAME = 0x0e,
+ /*!
+ * \brief Channel Event CID num
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CIDNUM = 0x0f,
+ /*!
+ * \brief Channel Event extension name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_EXTEN = 0x10,
+ /*!
+ * \brief Channel Event context name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CONTEXT = 0x11,
+ /*!
+ * \brief Channel Event channel name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CHANNAME = 0x12,
+ /*!
+ * \brief Channel Event app name
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_APPNAME = 0x13,
+ /*!
+ * \brief Channel Event app args/data
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_APPDATA = 0x14,
+ /*!
+ * \brief Channel Event AMA flags
+ * Used by: AST_EVENT_CEL
+ * Payload type: UINT
+ */
+ AST_EVENT_IE_CEL_AMAFLAGS = 0x15,
+ /*!
+ * \brief Channel Event AccountCode
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_ACCTCODE = 0x16,
+ /*!
+ * \brief Channel Event UniqueID
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_UNIQUEID = 0x17,
+ /*!
+ * \brief Channel Event Userfield
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_USERFIELD = 0x18,
+ /*!
+ * \brief Channel Event CID ANI field
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CIDANI = 0x19,
+ /*!
+ * \brief Channel Event CID RDNIS field
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CIDRDNIS = 0x1a,
+ /*!
+ * \brief Channel Event CID dnid
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_CIDDNID = 0x1b,
+ /*!
+ * \brief Channel Event Peer -- for Things involving multiple channels, like BRIDGE
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_PEER = 0x1c,
+ /*!
+ * \brief Channel Event LinkedID
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_LINKEDID = 0x1d,
+ /*!
+ * \brief Channel Event peeraccount
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_PEERACCT = 0x1e,
+ /*!
+ * \brief Channel Event extra data
+ * Used by: AST_EVENT_CEL
+ * Payload type: STR
+ */
+ AST_EVENT_IE_CEL_EXTRA = 0x1f,
+ /*!
+ * \brief Description
+ * Used by: AST_EVENT_SUB, AST_EVENT_UNSUB
+ * Payload type: STR
+ */
+ AST_EVENT_IE_DESCRIPTION = 0x20,
+ /*!
+ * \brief Entity ID
+ * Used by All events
+ * Payload type: RAW
+ * This IE indicates which server the event originated from
+ */
+ AST_EVENT_IE_EID = 0x21,
};
#define AST_EVENT_IE_MAX AST_EVENT_IE_EID
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index abbeba2ab..6f9684409 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -27,6 +27,7 @@
#include <time.h> /* we want to override localtime_r */
#include <unistd.h>
+#include <string.h>
#include "asterisk/lock.h"
#include "asterisk/time.h"