diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c index 2c5b07a9b7..2419ce53cf 100755 --- a/apps/app_sayunixtime.c +++ b/apps/app_sayunixtime.c @@ -82,7 +82,11 @@ static int sayunixtime_exec(struct ast_channel *chan, void *data) } } - res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY, chan->language, format, zone); + if (chan->_state != AST_STATE_UP) { + res = ast_answer(chan); + } + if (!res) + res = ast_say_date_with_format(chan, unixtime, AST_DIGIT_ANY, chan->language, format, zone); LOCAL_USER_REMOVE(u); return res;