summaryrefslogtreecommitdiff
path: root/main/channel_internal_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r--main/channel_internal_api.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index e3543d8ec..c7ed84c34 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -193,6 +193,8 @@ struct ast_channel {
char macrocontext[AST_MAX_CONTEXT]; /*!< Macro: Current non-macro context. See app_macro.c */
char macroexten[AST_MAX_EXTENSION]; /*!< Macro: Current non-macro extension. See app_macro.c */
char dtmf_digit_to_emulate; /*!< Digit being emulated */
+ char sending_dtmf_digit; /*!< Digit this channel is currently sending out. (zero if not sending) */
+ struct timeval sending_dtmf_tv; /*!< The time this channel started sending the current digit. (Invalid if sending_dtmf_digit is zero.) */
};
/* AST_DATA definitions, which will probably have to be re-thought since the channel will be opaque */
@@ -523,6 +525,25 @@ void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
{
chan->dtmf_digit_to_emulate = value;
}
+
+char ast_channel_sending_dtmf_digit(const struct ast_channel *chan)
+{
+ return chan->sending_dtmf_digit;
+}
+void ast_channel_sending_dtmf_digit_set(struct ast_channel *chan, char value)
+{
+ chan->sending_dtmf_digit = value;
+}
+
+struct timeval ast_channel_sending_dtmf_tv(const struct ast_channel *chan)
+{
+ return chan->sending_dtmf_tv;
+}
+void ast_channel_sending_dtmf_tv_set(struct ast_channel *chan, struct timeval value)
+{
+ chan->sending_dtmf_tv = value;
+}
+
int ast_channel_amaflags(const struct ast_channel *chan)
{
return chan->amaflags;