[asterisk-users] Codec choice

Steve Edwards asterisk.org at sedwards.com
Thu Aug 19 17:54:13 CDT 2010

> On Thu, Aug 19, 2010 at 3:14 AM, Deepika Nijhawan
>> Does anyone has an idea how to tell asterisk to use codec A for first 
>> 50 calls and then codec B for rest of the calls.

On Thu, 19 Aug 2010, Sherwood McGowan wrote:

> the easiest way I can think of is to use a global variable that you 
> increment each time a new call spawns, and once it's over your threshold 
> (50 in this case) use the CHANNEL() function to set the audio format to 
> the codec you want (google voip-info function CHANNEL)

Your question is not specific enough. Do you mean the "first 50 calls" or 
"50 simultaneous calls?"

I suspect the latter and the GROUP() and GROUP_COUNT() functions are the 
way to go.

Thanks in advance,
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

More information about the asterisk-users mailing list