[Asterisk-Dev] audio and iax2 spec

Steve Kann stevek at stevek.com
Wed Apr 27 16:30:44 MST 2005


Derek Smithies wrote:

>Hi,
> iax2 spec, it seems, uses (by default) 8khz, 16 bit samples.
>
>How does one specify (with iax2) that the audio codec is using a different 
>frequency/sample size.
>  
>
No known (to me, at least) implementation will do anything with the 
SAMPLE_RATE stuff. The sample size is determined by the format you use.

>Further, is it possible to request more audio frames per ethernet packet?
>  
>
No, but you can send as many (possibly compressed) samples as you'd like 
within one voice frame..

>You see, a mini frame of gsm is 79 bytes long. At 50 frames a second, that 
>is 31.6kbits/sec, which is not bandwidth friendly. 
>
>>From the table at http://www.openh323.org/docs/bandwidth.html 
>h.323 uses for gsm with 4 gsm frames/packet less than 20kbit/sec
>  
>
>These figures have been discussed before on this list. I do remember 
>someone saying that you can have more audio frames/packet.
>  
>

yes.

>Questions:
>  How does one (in iax2) specify a different frame rate sameple size etc 
>    for the audio codec?
>
>  How does one (in iax2) request that the remote endpoint places 3 audio 
>    frames in a packet ?
>  
>
You can't do any of these things at the moment.

You can instruct iaxclient to use more samples in frames it sends by 
calling void iaxc_set_min_outgoing_framesize(int samples). It will then 
include at least that many samples in each frame it sends (it might 
round up to the next multiple of the codec's minimum frame size -- i.e. 
you ask for 210ms worth, and the codec only supports 20ms frames, you'll 
get 220ms worth).

In asterisk, it's a bit more difficult to make this kind of thing happen.





More information about the asterisk-dev mailing list