[Asterisk-Dev] Accept patch to make iax2's calc_timestamp suspicious about the ast_frame.delivery value?

steve at daviesfam.org steve at daviesfam.org
Fri Jun 18 00:10:19 MST 2004


Hi,

I was experimenting with the iax2 jitter buffering - and noticed that 
one of my systems was sometimes sending crazy timestamps.

I tracked this down to bogus values being copied out of the delivery field 
in calc_timestamp.  Clearly the originator of the frame hadn't initialised 
"delivery".

This is bad when you use the jitter buffer as the buffer starts tossing 
away all these "very old" frames and the result is silence...

I have a little patch that makes calc_timestamp ignore "delivery" if the
value isn't within a couple of seconds of now.  It also
ast_log(LOG_DEBUG)s them to help track down the source.

This worked like a charm for me.

In my case it was chan_capi that had not initialised the delivery value to
0 - and I see that there is a newer version of that now that does (added
in version 0.3.2)

Nevertheless - I think my change is good defensive code.  I suspect other
channels also do not initialise "delivery" - after a little look, one
example would be chan_modem_i4l.c.

Do you want the patch - I'll put it on bugs if people agree it has value.

Regards,
Steve



More information about the asterisk-dev mailing list