]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 286679 via svnmerge from
authorMatthew Nicholson <mnicholson@digium.com>
Tue, 14 Sep 2010 18:02:24 +0000 (18:02 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Tue, 14 Sep 2010 18:02:24 +0000 (18:02 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r286679 | mnicholson | 2010-09-14 13:00:01 -0500 (Tue, 14 Sep 2010) | 7 lines

  Only drop duplicate answer frames if the channel is bridged.

  Back in r3710 ast_read() was modified to drop answer frames on channels that were in the UP state.  This modification prevented bridges that were up before the answer from being broken and reestablished by an ANSWER control frame.  That change also prevents pickup of channels called from the ast_dial framework from working properly.  The ast_dial framework expects to see an ANSWER frame after dialing and the pickup code queues one but ast_read() drops it.  This new change only drops ANSWER frames when the channel is bridged, allowing the answer queued by the pickup code to properly pass through ast_read() on to the ast_dial framework.

  ABE-2473
  (related to issue #2342)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@286681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 6536944f0b4d1128ac8fd6bc2c17d37b08048418..dc77a21e7d42191283809ca5b61fad7868fff33f 100644 (file)
@@ -2892,7 +2892,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                        ast_debug(1, "Ignoring answer on an inbound call!\n");
                                        ast_frfree(f);
                                        f = &ast_null_frame;
-                               } else if (prestate == AST_STATE_UP) {
+                               } else if (prestate == AST_STATE_UP && ast_bridged_channel(chan)) {
                                        ast_debug(1, "Dropping duplicate answer!\n");
                                        ast_frfree(f);
                                        f = &ast_null_frame;