diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-07-01 21:16:00 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-07-01 21:16:00 +0000 |
commit | 37db658b1f45d826c64db5163e888d1bcc985acc (patch) | |
tree | 8be9a538613903d24d3e7dea1b5e3814847363a9 /main | |
parent | 1b07e8753812451cd85ec84b0eaca3b9c06b5882 (diff) |
Place the delay in __ast_answer prior to the channel-specific answer
callback. This change differs from commit 127113 in that now the
channel is not set to AST_STATE_UP until after the answer callback.
(closes issue #12924)
Reported by: snyfer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c index f94afd9cd..240d1699a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -1699,7 +1699,6 @@ int __ast_answer(struct ast_channel *chan, unsigned int delay) if (delay) { int needanswer = (chan->tech->answer != NULL); - ast_setstate(chan, AST_STATE_UP); ast_cdr_answer(chan->cdr); ast_channel_unlock(chan); ast_safe_sleep(chan, delay); @@ -1712,6 +1711,7 @@ int __ast_answer(struct ast_channel *chan, unsigned int delay) res = chan->tech->answer(chan); ast_channel_unlock(chan); } + ast_setstate(chan, AST_STATE_UP); } else { if (chan->tech->answer) { res = chan->tech->answer(chan); |