Skip to end of metadata
Go to start of metadata



Apply automatic gain control to audio on a channel.


The AGC function will apply automatic gain control to the audio on the channel that it is executed on. Using rx for audio received and tx for audio transmitted to the channel. When using this function you set a target audio level. It is primarily intended for use with analog lines, but could be useful for other channels as well. The target volume is set with a number between 1-32768. The larger the number the louder (more gain) the channel will receive.


exten => 1,1,Set(AGC(rx)=8000)

exten => 1,2,Set(AGC(tx)=off)


  • channeldirection - This can be either rx or tx

See Also

Import Version

This documentation was imported from Asterisk Version GIT-master-7d17164

  • No labels


  1. Is it safe to say that this function only applies to channels using codec_speex? I was looking at this today and trying out different values to see their effect and couldn't objectively pin down anything before I noticed that this function was being provided by func_speex... and while I'm not 100% certain that this means it only works in the context of speex related audio, that seems like a practical assumption.

    1. I'm not sure, but it sounds worth filing an issue for. If what you say is the case then the documentation should be modified.