[asterisk-dev] jitterbuffer and PLC
nakaji at 02.246.ne.jp
nakaji at 02.246.ne.jp
Wed Jan 20 19:14:21 CST 2010
Hi, I have a question about jitterbuffer and PLC.
I use Asterisk 1.6.2.0 and 1.6.0.20 or older.
I use uLaw.
I want to use PLC on uLaw ,but it looks like not working.
My system map:
=============================================================================
SIP or IAX /RTP SIP/RTP
voice-file - - - - - - - - - -> (voice packet) - - - - - - - > voice
[ asterisk 2 ] -- # LOSS # -- # A # -- [ asterisk 1 ] -- # B # -- [ X-lite ]
=============================================================================
I use two asterisk server.
'asterisk 2' do "Playback(some voice file)"
'asterisk 1' do "jitter".
'asterisk 1' and 'asterisk 2' has trunked by sip or iax2.
X-lite call 3003 to asterisk 1,
and asterisk 1 call 3000 to asterisk 2.
On the map,
at "LOSS" I caused packet loss 5%,
and at "A" and "B" I captured packet.
I thought number of packets at "B" would be same number from "asterisk 2".
And I thought number of packets at "A" would be 95% from "asterisk 2".
But the result is different!
At "A" and "B" is the same number of packets as 95%.
No PLC ,No interpolations has made.
But on CLI,messages was "like that jitter and PLC work right" .
And I continued trying.
Now I reached 2 results.
1).
Asterisk ver1.6 or more has bug ?
When you want to use jitter and PLC and want to see packet-log , you will
set ' jblog=yes ' on 'sip.conf '.
But Asterisk can't make log-file.
In " /tmp/ " packet-log-file will be made, if jb-modules work correct.
Core module like 'abstract_jb.c' is different ,may be. Near around line 500,
where jb write files.
Jb fails to write log in /tmp.
That codes is different from Asterisk ver 1.4.
I tested Asterisk ver 1.4.29, 1.6.0, 1.6.2.1(newest).
Only 1.4.29 , jblog=yes worked correct.
It looks like jb captured any frames.
ast_adaptive_jb_SIP#201-00000012--SIP#201-00000013.log
============================================
JB_PUT_FIRST {now=49}: Dropped frame with ts=392575 and len=20
JB_GET {now=49}: now < next=2147483647
JB_PUT {now=70}: Dropped frame with ts=392595 and len=20
JB_GET {now=70}: now < next=2147483647
JB_PUT {now=94}: Dropped frame with ts=392615 and len=20
JB_GET {now=94}: now < next=2147483647
JB_PUT {now=104}: Queued frame with ts=392635 and len=20
JB_GET {now=104}: now < next=144
JB_PUT {now=124}: Queued frame with ts=392655 and len=20
...
...
...
=============================================
But Asterisk ver 1.6.0,1.6.2.1 , jb can't write logs.
2).
When use Asterisk ver 1.4.29, jb looks like work correct. But actually , it
doesn't work,may be.
As I mentiond at No1, When I use Asterisk1.4.29, jb looks work correct.
Because packet-log-file will be made ( as written in aabstract_jb.c ).
And on CLI shows messages.
like this.
===============================================
[Jan 20 16:15:03] -- adaptive jitterbuffer created on channel
SIP/201-0000000e
*CLI>
*CLI> [Jan 20 16:15:23] -- adaptive jitterbuffer destroyed on channel
SIP/88208ABC-0000000f
===============================================
But actually, when I captured packet (by wireshark) ,and lossed 5% packets
before flow into Asterisk,
Same number of packets( as lossed 5% ) flow out from Asterisk.
No Interpolations has made,actually.
However, in jb's packet-log-file, "Interpolated frame " has written.
-------------------------------------------------------------------------
JB_GET {now=2001}: Delivered frame with ts=1720 and len=20
JB_GET {now=2003}: now < next=2021
JB_GET {now=2004}: now < next=2021
JB_PUT {now=2008}: Queued frame with ts=1780 and len=20
JB_GET {now=2009}: now < next=2021
JB_GET {now=2013}: now < next=2021
JB_GET {now=2020}: now < next=2021
JB_GET {now=2021}: Interpolated frame with len=20
JB_GET {now=2024}: now < next=2041
JB_GET {now=2033}: now < next=2041
JB_PUT {now=2033}: Queued frame with ts=1800 and len=20
JB_GET {now=2034}: now < next=2041
------------------------------------------------------------------------
But actually, PLC didn't work.
So if anyone who could work PLC correct, pls tell me the version and how to
set up.
or pls tell me where is wrong.
on my sip.conf
===============
jbenable=yes
jbforce=yes
jbmaxsize=100
jbresyncthreshold=2000
jbimpl=adaptive
jblog=yes
===============
I also tried,
jbresyncthreshold= -1 or 1000
jbimpl=fixed
Rgards;
More information about the asterisk-dev
mailing list