aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_waitforsilence.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_waitforsilence.c')
-rw-r--r--apps/app_waitforsilence.c4
1 files changed, 3 insertions, 1 deletions
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) &&