From: Richard Mudgett Date: Tue, 25 Jan 2011 23:21:09 +0000 (+0000) Subject: DTMF attended transfers sometimes fail for no apparent reason. X-Git-Tag: 1.4.41-rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7a20eecb231496dc94aee0b05a121564e23abcb;p=thirdparty%2Fasterisk.git DTMF attended transfers sometimes fail for no apparent reason. The loop in feature_request_and_dial() can exit when Party C has answered without processing an AST_CONTROL_ANSWER. Also sometimes an AST_CONTROL_ANSWER never happens even though Party C has answered. Don't hangup Party C if he is up or we receive an AST_CONTROL_ANSWER. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@304005 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 349318c471..e04ac7c26e 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1956,9 +1956,8 @@ static struct ast_channel *feature_request_and_dial(struct ast_channel *caller, done: ast_indicate(caller, -1); - if (chan && ready) { - if (chan->_state == AST_STATE_UP) - state = AST_CONTROL_ANSWER; + if (chan && (ready || chan->_state == AST_STATE_UP)) { + state = AST_CONTROL_ANSWER; } else if (chan) { ast_hangup(chan); chan = NULL;