diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 4 | ||||
-rw-r--r-- | apps/app_dictate.c | 4 | ||||
-rw-r--r-- | apps/app_waitforsilence.c | 4 |
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 50404d204..36d073afb 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1353,6 +1353,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 86ccad875..abac0c8ed 100644 --- a/apps/app_dictate.c +++ b/apps/app_dictate.c @@ -116,7 +116,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 38d98fa5d..dd00506d5 100644 --- a/apps/app_waitforsilence.c +++ b/apps/app_waitforsilence.c @@ -153,7 +153,9 @@ static int waitforsilence_exec(struct ast_channel *chan, void *data) 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", &silencereqd, &iterations, &timeout) != 3) && (sscanf(data, "%d|%d", &silencereqd, &iterations) != 2) && |