Review Board 1.7.16


Improve behavior of ast_answer() to not lose incoming frames

Review Request #196 - Created March 16, 2009 and submitted

Kevin Fleming
trunk
Reviewers
asterisk-dev
Asterisk
ast_answer(), when supplied a delay before returning to the caller, use ast_safe_sleep() to implement the delay. Unfortunately during this time any incoming frames are discarded, which is problematic for T.38 re-INVITES and other sorts of channel operations.

When a delay is not passed to ast_answer(), it still delays for up to 500 milliseconds, waiting for media to arrive. Again, though, it discards any control frames, or non-voice media frames.

This patch rectifies this situation, by storing all incoming frames during the delay period on a list, and then requeuing them onto the channel before returning to the caller.
Compile testing only.

Changes between revision 2 and 3

1 2 3
1 2 3

  1. /trunk/include/asterisk/channel.h: Loading...
  2. /trunk/main/channel.c: Loading...
  3. /trunk/main/features.c: Loading...
/trunk/main/channel.c
Diff Revision 2 Diff Revision 3
 
/trunk/main/features.c
Diff Revision 2 Diff Revision 3
 
  1. /trunk/include/asterisk/channel.h: Loading...
  2. /trunk/main/channel.c: Loading...
  3. /trunk/main/features.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.