From 26755e3882612cc81247e53c2ca73b432ac90f6a Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Mon, 18 Feb 2008 04:43:33 +0000 Subject: Context tracing for channels (closes issue #11268) Reported by: moy Patches: chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103754 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/channel.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include') diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index da48c51de..0faddb870 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -826,6 +826,34 @@ void ast_channel_unregister(const struct ast_channel_tech *tech); */ const struct ast_channel_tech *ast_get_channel_tech(const char *name); +#ifdef CHANNEL_TRACE +/*! \brief Update the context backtrace if tracing is enabled + * \return Returns 0 on success, -1 on failure + */ +int ast_channel_trace_update(struct ast_channel *chan); + +/*! \brief Enable context tracing in the channel + * \return Returns 0 on success, -1 on failure + */ +int ast_channel_trace_enable(struct ast_channel *chan); + +/*! \brief Disable context tracing in the channel. + * \note Does not remove current trace entries + * \return Returns 0 on success, -1 on failure + */ +int ast_channel_trace_disable(struct ast_channel *chan); + +/*! \brief Whether or not context tracing is enabled + * \return Returns -1 when the trace is enabled. 0 if not. + */ +int ast_channel_trace_is_enabled(struct ast_channel *chan); + +/*! \brief Put the channel backtrace in a string + * \return Returns the amount of lines in the backtrace. -1 on error. + */ +int ast_channel_trace_serialize(struct ast_channel *chan, struct ast_str **out); +#endif + /*! \brief Hang up a channel * \note This function performs a hard hangup on a channel. Unlike the soft-hangup, this function * performs all stream stopping, etc, on the channel that needs to end. -- cgit v1.2.3