[Asterisk-Users] G729 Codec+packet loss concealment

steve at daviesfam.org steve at daviesfam.org
Tue Aug 3 04:18:18 MST 2004


On Tue, 3 Aug 2004, Andrew Kohlsmith wrote:

> On Tuesday 03 August 2004 02:58, clive18 at webmail.co.za wrote:
> > From what I have heard, Asterisk does not allow for iLBC to
> > take advantage of the lost packet concealment.
> > I understand this has something to do with the jitter
> > processing.
> 
> Can you provide a source for that statement?  I am not disputing it but I'd 
> like to have it in the archives for one, but also to verify the claim too.

I am the source for that statement.  Is that a problem? ;-)

My qualification is having worked on the IAX2 jitter buffer, consequently 
having studied how audio flows from the received frames through the jitter 
buffer and then via ast_translate() into the codec.

To use the iLBC codec's lost packet concealment, you must call the codec
every 20msec (or whatever).  If you have a new frame, you pass it - and
you get that back decoded.  If you haven't, you call iLBC_decode anyway,
passing mode=0 and get a reconstructed frame back.

In Asterisk, bridging is "self-clocked" by the incoming frames. So unless
a frame arrives, nothing happens.  Each arriving frame gets pushed through
the codec decode function.  But if a frame doesn't turn up... well,
then... nothing will happen.

You can confirm this by examining codecs/codec_ilbc.c where you will see 
that there is only one call to iLBC_decode(), and that call has a 
hardcoded mode=1.  So Asterisk will never use the iLBC packet loss 
concealment capability.

At the moment, anyway - this can arguably be fixed, but its not a trivial 
fix.

Regards,
Steve



More information about the asterisk-users mailing list