summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-01-31 16:38:49 -0600
committerRichard Mudgett <rmudgett@digium.com>2017-02-02 12:38:18 -0600
commitd23fed8f2a1cf7b7e4de020399e1b4b802e672c2 (patch)
tree5de41aa6c41d2b3a4b70f4c0d90d7283f43b952e /include/asterisk/channel.h
parent4c4be0e0be2543c9d2de4b2d9e9bb2d3f5b7142b (diff)
res_agi: Prevent an AGI from eating frames it should not. (Re-do)
A dialplan intercept routine is equivalent to an interrupt routine. As such, the routine must be done quickly and you do not have access to the media stream. These restrictions are necessary because the media stream is the responsibility of some other code and interfering with or delaying that processing is bad. A possible future dialplan processing architecture change may allow the interception routine to run in a different thread from the main thread handling the media and remove the execution time restriction. * Made res_agi.c:run_agi() running an AGI in an interception routine run in DeadAGI mode. No touchy channel frames. ASTERISK-25951 ASTERISK-26343 ASTERISK-26716 Change-Id: I638f147ca7a7f2590d7194a8ef4090eb191e4e43
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 268c993a7..a57a0b4cb 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -4707,4 +4707,21 @@ enum ast_channel_error {
*/
enum ast_channel_error ast_channel_errno(void);
+/*!
+ * \brief Am I currently running an intercept dialplan routine.
+ * \since 13.14.0
+ *
+ * \details
+ * A dialplan intercept routine is equivalent to an interrupt
+ * routine. As such, the routine must be done quickly and you
+ * do not have access to the media stream. These restrictions
+ * are necessary because the media stream is the responsibility
+ * of some other code and interfering with or delaying that
+ * processing is bad.
+ *
+ * \retval 0 Not in an intercept routine.
+ * \retval 1 In an intercept routine.
+ */
+int ast_channel_get_intercept_mode(void);
+
#endif /* _ASTERISK_CHANNEL_H */