diff options
Diffstat (limited to 'apps/app_waitforsilence.c')
-rw-r--r-- | apps/app_waitforsilence.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) && |