[asterisk-dev] [Code Review] Improve behavior of ast_answer() to not lose incoming frames
Kevin Fleming
kpfleming at digium.com
Tue Mar 17 06:42:02 CDT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/196/
-----------------------------------------------------------
(Updated 2009-03-17 06:42:02.490129)
Review request for Asterisk Developers.
Changes
-------
Minor update to ensure that when a delay is requested that the full delay is honored.
Summary
-------
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.
Diffs (updated)
-----
/trunk/include/asterisk/channel.h 182520
/trunk/main/channel.c 182520
/trunk/main/features.c 182520
Diff: http://reviewboard.digium.com/r/196/diff
Testing
-------
Compile testing only.
Thanks,
Kevin
More information about the asterisk-dev
mailing list