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 13:02:03 -0600
commit97c308471d2ead6473499b0026b72f8ed7b516eb (patch)
treeec54c9c2dd18d99fb429e9e12f5ebe3835ff6074 /include/asterisk/channel.h
parent72e3fc58455e08307a06e57099c8362879688ea0 (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 9cf313fc4..e5f792f1f 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -4717,4 +4717,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 */