[asterisk-commits] mmichelson: trunk r127157 - /trunk/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 1 16:16:00 CDT 2008


Author: mmichelson
Date: Tue Jul  1 16:16:00 2008
New Revision: 127157

URL: http://svn.digium.com/view/asterisk?view=rev&rev=127157
Log:
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


Modified:
    trunk/main/channel.c

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=127157&r1=127156&r2=127157
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Tue Jul  1 16:16:00 2008
@@ -1699,7 +1699,6 @@
 		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 @@
 				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);




More information about the asterisk-commits mailing list