login | register
Thu 07 of Aug, 2008 [23:52 UTC]

voip-info.org

Discuss [3] History

Asterisk zapata gain adjustment

Created by: jht2,Last modification on Tue 27 of May, 2008 [13:30 UTC] by mwatson
Setting the receive and transmit gain correctly is important to minimize echo and to enable clear conservations.

This is important for BOTH PRI and Analog lines into zaptel interfaces

If you have Asterisk v1.0.9 or earlier then you need to upgrade your zaptel driver to something newer. Old versions of Zaptel do not support so called quantitative mode.

The command is /usr/src/zaptel/ztmonitor 1 -vv

This is how it looks on screen

$ sudo ztmonitor 1 -vv

Visual Audio Levels.
--------------------
 Use zapata.conf file to adjust the gains if needed.

( # = Audio Level  * = Max Audio Hit )
<----------------(RX)----------------> <----------------(TX)---------------->
 ###########*                                                                  Rx:  3149 ( 3161) Tx:        0 (      0)


When you tune your lines you need something to listen to. The best source is to call a Phone Telco test number. Their system is calibrated with the proper gain and plays a 1004Hz as a sound. Your other fallback is to use the Milliwatt() application to make your own.

Having a telco test phone # and using procedure is the best method.

This simple and concise guide should help MANY people solve their echo problems.
Simple echo avoidance

Analog Lines Gain Tuning


Note : Adjusting the signal to 50% works with PRI's, your might try that also.

Phone telco 1004hz test phone number and adjust RX gain for approximately 14500 on the quantitative indicator. This equates to greater than 100% on the graphical indication. NOT 50%!

         Note:  This used to point to 071301.html, but that didn't exist.
dead link* An Asterisk-users mailing list post that attempts to explain why correct gain settings can positively influence echo problems (ie. network loss planning).
         Note: This used to point to 096426.html, but that doesn't exist.  There appears to be an off-by-6989 error in past links to lists.digium.com/pipermail/asterisk-users...

Acceptable value Both RX and TX should be in the middle.

PRI rx and tx gain tuning

Experience with configuring real asterisk production systems shows your best tuning is done as follows:
You should shoot for a ztmonitor reading of 50% on the graphical scale, NOT >100% as indicated above for analog lines.

1) In zapata.conf, make sure rxgain and txgain are both set to 0.0.
2) Run ztmonitor ztmonitor 1 -vv (where "1" is the appropriate zap channel you wish to monitor). Please be aware that in order to see the quantitative indicator, your terminal window must be greater in width than a normal 80X24 shell. Otherwise, you will see the graphical indicator, but not the quantitative numbers.
3) Based upon the results of ztmonitor, adjust the tx and rx gain settings in zapata.conf. Most reading suggests going no lower than -11.0 and no higher than 11.0, though it will take values from -100 to 100.
Make sure that rxgain=/txgain= lines are placed prior to channel= line in your zapata.conf otherwise the gain settings will not have any effect (at least for asterisk 1.4.11 and E1 card).
 Make sure you stop and restart asterisk each time you make a gain adjustment.
4) In addition, you may want to uncomment and adjust the "echotraining=" from 800 to 128, which is the amount of time, in milliseconds, given to train echo out on a call.

I can't stress enough to make sure your RESTART. IE STOP NOW and restart Asterisk when you make rx/tx gain changes. As of 1.4.13 Asterisk chaning rx/tx gain on the fly and just RELOAD asterisk DOES NOT WORK.

I can't speak for versions between 1.4.13 and 1.4.17, however issuing only a reload command DOES work in 1.4.18


External Links


See Also


Comments

Comments Filter
222

333

by PC_Clone, Thursday 13 of September, 2007 [15:57:51 UTC]
222

333Quantitative Mode?

by PC_Clone, Thursday 13 of September, 2007 [15:56:43 UTC]
Is there still a quantitative mode available?
222

333Gain settings...

by trumpetinc, Thursday 04 of May, 2006 [02:43:10 UTC]
I'm attempting to follow the procedure outlined in (1) - in order to achieve the target Rx value of 14844, I'm winding up with Rx levels way above the range of the 'slider' display. This seems to be in direct conflict with the 'Acceptable value' in (2) of 'in the middle'.

Who's right here? Should it be about in the middle, or should we be targeting 14844?