summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/asterisk/channel.h6
-rw-r--r--main/channel.c14
-rw-r--r--main/channel_internal_api.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index f80ccfe58..165e6e589 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -904,7 +904,7 @@ struct ast_channel {
char __do_not_use_exten[AST_MAX_EXTENSION]; /*!< Dialplan: Current extension number */
char __do_not_use_macrocontext[AST_MAX_CONTEXT]; /*!< Macro: Current non-macro context. See app_macro.c */
char __do_not_use_macroexten[AST_MAX_EXTENSION]; /*!< Macro: Current non-macro extension. See app_macro.c */
- char __do_not_use_emulate_dtmf_digit; /*!< Digit being emulated */
+ char __do_not_use_dtmf_digit_to_emulate; /*!< Digit being emulated */
};
/*! \brief ast_channel_tech Properties */
@@ -3646,8 +3646,8 @@ void ast_channel_macrocontext_set(struct ast_channel *chan, const char *value);
const char *ast_channel_macroexten(const struct ast_channel *chan);
void ast_channel_macroexten_set(struct ast_channel *chan, const char *value);
-char ast_channel_emulate_dtmf_digit(const struct ast_channel *chan);
-void ast_channel_emulate_dtmf_digit_set(struct ast_channel *chan, char value);
+char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan);
+void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value);
int ast_channel_amaflags(const struct ast_channel *chan);
void ast_channel_amaflags_set(struct ast_channel *chan, int value);
int ast_channel_epfd(const struct ast_channel *chan);
diff --git a/main/channel.c b/main/channel.c
index a5cb64112..35396308b 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3850,7 +3850,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
/* There was no begin, turn this into a begin and send the end later */
f->frametype = AST_FRAME_DTMF_BEGIN;
ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
- ast_channel_emulate_dtmf_digit_set(chan, f->subclass.integer);
+ ast_channel_dtmf_digit_to_emulate_set(chan, f->subclass.integer);
chan->dtmf_tv = ast_tvnow();
if (f->len) {
if (f->len > AST_MIN_DTMF_DURATION)
@@ -3897,7 +3897,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
if (f->len < AST_MIN_DTMF_DURATION && !ast_test_flag(chan, AST_FLAG_END_DTMF_ONLY)) {
ast_log(LOG_DTMF, "DTMF end '%c' has duration %ld but want minimum %d, emulating on %s\n", f->subclass.integer, f->len, AST_MIN_DTMF_DURATION, ast_channel_name(chan));
ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
- ast_channel_emulate_dtmf_digit_set(chan, f->subclass.integer);
+ ast_channel_dtmf_digit_to_emulate_set(chan, f->subclass.integer);
ast_channel_emulate_dtmf_duration_set(chan, AST_MIN_DTMF_DURATION - f->len);
ast_frfree(f);
f = &ast_null_frame;
@@ -3940,17 +3940,17 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
struct timeval now = ast_tvnow();
if (!ast_channel_emulate_dtmf_duration(chan)) {
ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
- ast_channel_emulate_dtmf_digit_set(chan, 0);
+ ast_channel_dtmf_digit_to_emulate_set(chan, 0);
} else if (ast_tvdiff_ms(now, chan->dtmf_tv) >= ast_channel_emulate_dtmf_duration(chan)) {
ast_channel_emulate_dtmf_duration_set(chan, 0);
ast_frfree(f);
f = &chan->dtmff;
f->frametype = AST_FRAME_DTMF_END;
- f->subclass.integer = ast_channel_emulate_dtmf_digit(chan);
+ f->subclass.integer = ast_channel_dtmf_digit_to_emulate(chan);
f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
chan->dtmf_tv = now;
ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
- ast_channel_emulate_dtmf_digit_set(chan, 0);
+ ast_channel_dtmf_digit_to_emulate_set(chan, 0);
ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass.integer, ast_channel_name(chan));
if (ast_channel_audiohooks(chan)) {
struct ast_frame *old_frame = f;
@@ -3969,7 +3969,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
* between DTMF digits. */
if (ast_test_flag(chan, AST_FLAG_EMULATE_DTMF) && !ast_channel_emulate_dtmf_duration(chan)) {
ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
- ast_channel_emulate_dtmf_digit_set(chan, 0);
+ ast_channel_dtmf_digit_to_emulate_set(chan, 0);
}
if (dropaudio || ast_test_flag(chan, AST_FLAG_IN_DTMF)) {
@@ -3986,7 +3986,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
ast_frfree(f);
f = &chan->dtmff;
f->frametype = AST_FRAME_DTMF_END;
- f->subclass.integer = ast_channel_emulate_dtmf_digit(chan);
+ f->subclass.integer = ast_channel_dtmf_digit_to_emulate(chan);
f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
chan->dtmf_tv = now;
if (ast_channel_audiohooks(chan)) {
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index 5a2061952..d0cc10bf9 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -354,13 +354,13 @@ void ast_channel_macroexten_set(struct ast_channel *chan, const char *value)
}
-char ast_channel_emulate_dtmf_digit(const struct ast_channel *chan)
+char ast_channel_dtmf_digit_to_emulate(const struct ast_channel *chan)
{
- return chan->__do_not_use_emulate_dtmf_digit;
+ return chan->__do_not_use_dtmf_digit_to_emulate;
}
-void ast_channel_emulate_dtmf_digit_set(struct ast_channel *chan, char value)
+void ast_channel_dtmf_digit_to_emulate_set(struct ast_channel *chan, char value)
{
- chan->__do_not_use_emulate_dtmf_digit = value;
+ chan->__do_not_use_dtmf_digit_to_emulate = value;
}
int ast_channel_amaflags(const struct ast_channel *chan)
{