[Asterisk-Users] echo / delay problem

Kris Boutilier Kris.Boutilier at scrd.bc.ca
Tue Mar 22 11:43:22 MST 2005


> -----Original Message-----
> From: Barry FAWTHROP [mailto:brif8 at hotmail.com]
> Sent: Tuesday, March 22, 2005 7:12 AM
> To: asterisk-users at lists.digium.com
> Subject: Re: [Asterisk-Users] echo / delay problem
> 
> 
> I'm in the US, using cards bought direct from Digium.
> I have lowered the rxgain and txgain to -8 and that seems to 
> be helping futher.
> I wish I could understand why?

Consider the following bad ASCII diagram of the amplitude of the signal as it travels from your handset to the remote end, becomes an echo and comes back to your handset:

1.00| ----
    |     |
0.75|	    | (effect of txgain -8.0)
    |     |
0.50|	     ------^-----		    
    |                  |
0.25|                  | (effect of rxgain -8.0)
    |                  |
0.00|				----
----|--------------------------------------------------------->
	|    |    |    |    |
	|    |    |    |    \Echo level arriving at local handset
	|    |    |    \Echo level arriving from remote end
	|    |    | Signal level arriving at remote end
	|     \-Signal level leaving to the PSTN 
	\-Signal level leaving local handset


Now consider the amplitude of the legitimate speech originating at the remote end:

1.00| -----------------
    |                  |
0.75|	                 | (effect of rxgain -8.0)
    |                  |
0.50|	                  ----	    
    |                  
0.25|                  
    |                  
0.00|				
----|---------------------------------------------------------->
	|   			 |
	|                  \Echo level arriving at handset
	\-Signal level leaving remote handset

It follows then that a signal that is attenuated going out and then further attenuated coming back in to your system (ie. the echo) will be relatively quieter than a signal that is just attenuated once (ie. the remote end conversation). Remember that a gain expressed in Db is a logarithmic measure so two passes are more than double the attenuation. 

This is known as a 'loss plan' in telco spheres and was traditionally used in analog systems to make echo (and sideton) more managable. Theres some interesting blurb on loss planning at: http://telecom.tbi.net/lossplan.htm  or consult Google.

It's also important to understand that the training algorithms in many echo cancellers rely on being able to differentiate between the echo and legitimate far end signal and one of the mechanisms used is to measure the average relative signal levels. Thus an outgoing signal that is too 'hot' (ie. has excessive amplitude) may not be properly echo-supressed as the signal cannot be differentiated from the far end signal, thus getting your gains correct is an important part of PSTN interfacing.

Hope that helps.

Kris Boutilier
Information Services Coordinator
Sunshine Coast Regional District



More information about the asterisk-users mailing list