Skip to content
Snippets Groups Projects
Commit d31be07a authored by Mark Spencer's avatar Mark Spencer
Browse files

Answer if channel isn't up (bug #486)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 669e9572
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment