iLBC 20ms


#1

I’m trying to get iLBC 20ms working with Asterisk.
I modified these files below and I also did a lot of modifications in codec/codec_ilbc.c and format/format_ilbc.c where I changed 240->160 samples and 50->38 datalen.
I’m using app_conference and everything is fine when I must translate iLBC -> uLaw but it’s crap when it’s uLaw -> iLBC. Is there any others files that I must modified to get 20ms ilbc working ?

rtp.c

case AST_FORMAT_ILBC:
		if (!rtp->smoother) {
			rtp->smoother = ast_smoother_new(38);
		}

frame.c

case AST_FORMAT_ILBC:
		samples = 160 * (f->datalen / 38);
		break;

#2

That’s ok, it worked


#3

[quote] I’m trying to get iLBC 20ms working with Asterisk.
[/quote]
Just curious, why would you want to get iLBC working with 20ms and not the default?


#4

'm an asterisk user. This is the first time I’m trying to do some thing with the asterisk code. I want to encode 2 iLBC frames per IAX audio packet. I do not want to change the decoding. Seems like there is no simple way to do this. The 50 bytes and 240 samples are harcoded (assumed) for every iLBC frame and not configurable. I need to encode 100 byte iLBC audio frame (or 2 50 byte packet) per IAX audio frame.

I do not know where to start. Please any one any direction and files i should look ? SHould I modify some code in ILBC or can i just modify chan_iax2.c ?

Ideally i would like to have this IAX framing size to be a configurable some where

There is no RTP in IAX, it would have been simpler to modify if I’m using any other protocol other than IAX.

Thanks in advance
Mani