[Asterisk-Dev] MELP and MELPe (1.2kbps) codecs for Asterisk

Steve Kann stevek at stevek.com
Tue Nov 23 13:06:31 MST 2004


Daniel Pocock wrote:

>
>>
>> 2) Presently, even IAX2 with 20ms frames has about 12kbps of overhead 
>> (IP,UDP,IAX2).  So for GSM you have about 25kbps.  Even using the 
>> magical 0bps codec, you still end up using 12kbps on the wire, unless 
>> you use larger frame sizes.  [IAX2 trunking, of course, helps a _lot_ 
>> where trunking is viable].
>
>
> The MELP frame size for 2.4kbps is 22.5ms, and for 1.2kbps it puts 
> 67.5ms into a frame.  Can IAX2 support these sizes?  I believe the 
> overhead should be 3.55kbps with a 67.5ms frame size, total link 
> capacity required = 4.75kbps (or 600 bytes per second).  
> Theoretically, that could work over a 9600 baud PPP connection in 
> Africa, and still leave some spare bandwidth for instant messaging. 

IAX2 can support whatever frame size you want.  There's a couple of issues:

1) In general, there's no way to configure this in *, and in practice, 
there's a default frame size for each codec throughout * (30ms for iLBC, 
20ms for everything else).  This could be changed, though.  For example, 
I have a custom build of app_conference which works with 40ms speex 
frames, for this reason.

2) With larger frame sizes, you obviously add latency to the conversation.

3) With larger frame sizes, you have worse effects from packet loss:  
I.e. it's much worse to lose one 60ms frame, than to lose three 
non-consecutive 20ms frames.

Also, one thing to consider other than those samples is how well this 
codec performs in such lossy conditions. 

as far as 67.5ms, that seems to be 540 samples, so you could probably 
make things work with that, although since timestamps are in ms, you'd 
have to round them off: i.e. 0, 68, 135, etc.


-SteveK




More information about the asterisk-dev mailing list