Summary:ASTERISK-04239: [patch] new jb - prevent reset from clearing jb settings and fix error/warning output
Reporter:grolloj (grolloj)Labels:
Date Opened:2005-05-19 21:30:47Date Closed:2008-01-15 15:36:44.000-0600
Versions:Frequency of
Environment:Attachments:( 0) jb_reset_output.patch.txt
Description:Calls to the jb's jb_reset() function wiped out configuration options previously set with jb_setinfo(). The reset function is intended to clear out jitter calculations and history, not settings. I've changed the reset function to preserve the configuration settings (and did a little reorganization of how settings were stored internally to make this less prone to breakage in the future).

Also, the jb_setoutput() function took warn, err, and debug functions, in that order. err, warn, and debug functions were passed in. So I swapped the err and warn parameters in the jitterbuffer to match how chan_iax2 actually used the function.


Disclaimer on file

tzanger noticed a resyncing error reported when he sent dtmf over a call bridged between two asterisk servers. It seemed that, although the resync threshold was being set to it's default when initialized, it was zeroed out during the call. When a call is bridged and the peer has a jitterbuffer of its own, chan_iax2 will reset its jb and pass frames along immediately. However, when processing dtmf, a call drops out of the bridge setup momentarily. During this time, a few voice frames were sent through the newly reset jb. Since both calculated jitter and the resync threshold had been zeroed, it made any delay in receiving a frame enough to cause a resync.

Comments:By: stevekstevek (stevekstevek) 2005-05-25 16:35:09

This should go in asap..

It's pretty low-risk, and fixes a real, and common problem.

By: Andrew Kohlsmith (akohlsmith) 2005-05-27 09:58:19

I have just updated HEAD and applied this patch.  I will let you know how it goes.

By: Russell Bryant (russell) 2005-06-03 18:28:06

not an issue for 1.0 since the new jb is not in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:36:44.000-0600

Repository: asterisk
Revision: 5814

U   trunk/channels/chan_iax2.c
U   trunk/jitterbuf.c
U   trunk/jitterbuf.h

r5814 | markster | 2008-01-15 15:36:44 -0600 (Tue, 15 Jan 2008) | 2 lines

Blindly merge jitter buffer patch of bug ASTERISK-4239)