[asterisk-dev] ast_read and frames of type AST_FRAME_NULL?
Tim Ringenbach
tim.ringenbach at gmail.com
Tue Jun 22 20:16:40 CDT 2010
On Tue, Jun 22, 2010 at 6:45 PM, Bryan Field-Elliot <
bryan+asterisk-dev at nextalarm.com <bryan%2Basterisk-dev at nextalarm.com>>wrote:
>
> On Jun 22, 2010, at 4:12 PM, Russell Bryant wrote:
>
> Your timeout to ast_waitfor() is 100ms. As it is written, you will be
> calling ast_read() on the channel every time it times out, and not just
> when you're actually supposed to.
>
>
>
> Thank you, but I think there is more going on here. I just raised it to 250
> (I have played with other values before), and am getting the same results --
> far more AST_FRAME_NULLs than seems right. With a value of 250, I should
> be getting no more than 4 AST_FRAME_NULL's per second of each call, correct?
> I'm seeing calls complete with several hundred null frames being discarded,
> even though the calls are only around 30 seconds in length.
>
I think Russell means you're only supposed to call ast_read() if r > 0, not
if r == 0. Other places in the code (like app_waitforring.c and
app_meetme.c) seem to follow this convention.
--Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100622/d36a1b26/attachment-0001.htm
More information about the asterisk-dev
mailing list