summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_dictate.c4
-rw-r--r--apps/app_waitforsilence.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 849c0c527..671c8007c 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1593,6 +1593,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
res = -1; /* reset default */
}
+ if (ast_test_flag64(&opts, OPT_DTMF_EXIT)) {
+ __ast_answer(chan, 0, 0);
+ }
+
if (continue_exec)
*continue_exec = 0;
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index b780182e3..b187998a8 100644
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -127,7 +127,9 @@ static int dictate_exec(struct ast_channel *chan, void *data)
return -1;
}
- ast_answer(chan);
+ if (chan->_state != AST_STATE_UP) {
+ ast_answer(chan);
+ }
ast_safe_sleep(chan, 200);
for (res = 0; !res;) {
if (ast_strlen_zero(filename)) {
diff --git a/apps/app_waitforsilence.c b/apps/app_waitforsilence.c
index 1aa777575..f68b70ad3 100644
--- a/apps/app_waitforsilence.c
+++ b/apps/app_waitforsilence.c
@@ -210,7 +210,9 @@ static int waitfor_exec(struct ast_channel *chan, void *data, int wait_for_silen
int iterations = 1, i;
time_t waitstart;
- res = ast_answer(chan); /* Answer the channel */
+ if (chan->_state != AST_STATE_UP) {
+ res = ast_answer(chan); /* Answer the channel */
+ }
if (!data || ( (sscanf(data, "%d,%d,%d", &timereqd, &iterations, &timeout) != 3) &&
(sscanf(data, "%d,%d", &timereqd, &iterations) != 2) &&