[Asterisk-Dev] CVS HEAD (20040807) jitter buffer questions
Andrew Kohlsmith
akohlsmith-asterisk at benshaw.com
Wed Aug 11 06:14:04 MST 2004
I've been keeping an eye on the jitter buffer ever since upgrading and using
Steve's patch to fix the 65s dead air problem but I've been noticing
something...
... Asterisk frequently gets "lag" and "jitter" mixed up.
This directly affects the jitter buffer, as the jitter buffer only grows when
jitter grows.
To better explain what I mean I'll show you the output from 'iax2 show
channels':
*CLI> iax2 show channels
Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf
Format
192.168.2.2 benphone 00009/16384 00047/00050 00006ms 0001ms 0051ms
GSM
1 active IAX channel(s)
This is good.
*CLI> iax2 show channels
Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf
Format
192.168.2.2 benphone 00003/16385 00008/00005 00000ms 0000ms 0050ms
GSM
192.168.2.2 benphone 00009/16384 00072/00074 00002ms 0000ms 0050ms
GSM
66.225.202.72 benshaw 00013/00207 00005/00008 00000ms 0015ms 0080ms
GSM
This is not. How can I possibly have 0ms lag? This was a decent call, some
have like 182ms jitter which is even beyond normal lag measurements I have
seen (normally 26-35ms, sometimes as high as 50 to 80ms).
The measurements are consistent too -- I can run the command a 20 times in a
minute and get 0ms lag on the channel(s) every single time with the jitter
staying consistent. It's not a "one-off" thing.
Sometimes it's one channel where the others look "normal", sometimes it's a
half dozen channels showing 0ms lag and high jitter with the few remaining
channels showing normal, sometimes they're all normal.
*CLI> iax2 show channels
Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf
Format
192.168.2.2 benphone 00003/16385 00017/00015 00000ms 0000ms 0050ms
GSM
192.168.2.2 benphone 00009/16384 00088/00090 -00001ms 0000ms
0050ms GSM
66.225.202.72 benshaw 00013/00207 00015/00017 00000ms 0015ms 0080ms
GSM
Similar here -- I see the meter itself is fixed (not 6553434665234265ms lag
<g>) but how is negative lag possible? I believe I have also seen negative
*jitter* -- and this causes the jitter buffer to grow without necessity.
Relevant iax2.conf settings:
pingtime=5
lagrqtime=5
jitterbuffer=yes
dropcount=2
maxjitterbuffer=500
maxexcessbuffer=100
minexcessbuffer=50
jittershrinkrate=1
All peers have trunk=off (I was getting "bunched and gappy" audio the odd
time... definitely not every time but especially noticeable right after a
clean shutdown and restart of Asterisk)...
By "bunched and gappy" I mean the received audio sounded like this:
"....Hellohow....areyouto.....dayIhaven't.....heardfromy.....ouina.....while"
I understand that a few months ago this was a consistent bug when enabling
trunking and jitter buffer but I've been running trunking and jitter buffer
for a while now without issue (well just the once in a while issue I just
mentioned here).
I'll be able to provide iax2 debug logs and packet dumps if anyone's
interested.
Regards,
Andrew
More information about the asterisk-dev
mailing list