[Asterisk-Dev] codec configuration thoughts

John Todd jtodd at loligo.com
Wed Sep 3 12:05:45 MST 2003


At 2:37 PM -0400 9/3/03, James Golovich wrote:
>
>I've been trying to come up with a way to pass config options to specific
>codecs (see bug #149) and I haven't run across anything that strikes me as
>the best way to do it.  So I thought I'd share some of my thoughts and
>maybe someone else will have some thoughts as well.
>
>One idea I had was to allow the setup of codec classes, setup in something
>like codecs.conf.  Each codec could have a numbered priority, or they
>could be listed in order of priority.  Hopefully this would make it
>possible to keep the existing way of handling things, but just add another
>option.
>
>[lowbandwidth]
>disallow => ulaw
>disallow => alaw
>allow => gsm
>allow => ilbc
>allow => speex,B8V1a1D1
>allow => speex,B15
>
>The options would hopefully be similar between all codecs, but if its just
>a string to be passed to the codec then it might make it easy.
>
>My hypothetical options:
>B6 = bitrate of 6kbits/sec (B2, B4, B6, B8, B11, B15, B18, B24 would be
>valid for speex)
>v1 = enable variable bit rate
>a1 = enable average bit rate
>c2 = set complexity (cpu usage) default is 2 (1-10 is valid)
>V1 = enable VAD
>D1 = enable discontinuous transmission
>p1 = enable perceptual enhancement
>
>Then in a user/peers configuration (in iax.conf,sip.conf,etc.) it could
>have an option like codecclass => lowbandwidth.  In theory there could
>also be a SetCodecClass application so the class could be changed by
>extensions.conf
>
>I really don't like the way this looks like it would work, but its the
>best I could come up with.  Hopefully someone will have a better idea
>about this
>
>James


This sounds reasonable, though I agree, there must be a "cleaner" way 
of doing it.  However, the different features in each codec does lend 
itself to a tightly locked feature list with each codec name, so 
perhaps this is the best that can be done.

One more option, culled from a message to the users- list came close 
on the heels of your post: the ability to specify the ms per block 
and/or the number of blocks per packet.

b1=blocks per packet (default: 1)
m2=ms per block, x10 (1=10ms, 2=20ms, etc)

I'm actually working on a rather large message that deals with 
sip.conf and using "include" statements in that configuration file as 
a possible method to make adding customers (and dealing with 
different equipment requirements) more template-based.

Extracting codecs out into their own configuration file and naming 
scheme seems like a good idea to me, since that promises to get 
complex very quickly otherwise.

JT




More information about the asterisk-dev mailing list