aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-14 18:00:01 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-14 18:00:01 +0000
commitd429389fdfac843d51a29b787a993b422cc3e251 (patch)
treebf6655e0039fd8c12abb68799fdf35e6e0c2294c /main
parenta1f339232a61885e687ccb1f5443f90123c71c24 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@286679 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 2d6fb845b..bc8ec1755 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2352,7 +2352,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
ast_log(LOG_DEBUG, "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)) {
if (option_debug)
ast_log(LOG_DEBUG, "Dropping duplicate answer!\n");
ast_frfree(f);