summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-02-18 04:43:33 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-02-18 04:43:33 +0000
commit26755e3882612cc81247e53c2ca73b432ac90f6a (patch)
tree1f70ab1c1a8d010ade37a053edebff107ad9fcc9 /include/asterisk
parent62ac882f8c18d7769ec96b7c14a6a1fe76e03a90 (diff)
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
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/channel.h28
1 files changed, 28 insertions, 0 deletions
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.