diff options
author | Mark Spencer <markster@digium.com> | 2003-11-21 05:26:39 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-11-21 05:26:39 +0000 |
commit | d31be07a258edd8ed4ca1d83f33d1143671b6986 (patch) | |
tree | cf2600947f9f39185e17933ae3eef0decd7bc998 /apps | |
parent | 669e957291528b3a366f49881f653a91493f2d09 (diff) |
Answer if channel isn't up (bug #486)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_sayunixtime.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c index 2c5b07a9b..2419ce53c 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; |