[Asterisk-Users] Calibrating both RX and TX gain?

Rich Adamson radamson at routers.com
Sun Oct 16 04:49:38 MST 2005


 
> > can one use a milliwatt test line from a telco in a different 
> > areacode/prefix?  does the long-distance transmission destroy levels 
> > unpredictably?

You can do that, but think about how you might determine the additional
loss associated with the different areacode/prefix milliwatt.

To get accurate readings, you'll probably have to use a transmission
test set of some sort; an inexpensive one runs about $300 new. The
model 4 from www.triplett.com is a better choice if you're going to
be doing a lot of asterisk/telephony business.

Here's a couple of ways to determine levels...

1. using the model 4 transmission test set, attach the tone generator
to one analog pstn line and the transmission level test jacks to a
second pstn line. Dial from one line to other and measure the tone.
Divide by two, and the result is the loss associated with a single
analog pstn line from your location to your central office.

2. use one of those analog pstn lines to dial the distant milliwatt
generator (regardless of where its located), and measure the level
of the tone.  Subtract the loss determined from step #1 and now you
have the loss associated with facilities interconnecting your central
office all the way to the distant milliwatt generator.

Another approach (although less accurate) is to use an ordinary cheap
Radio Shack multimeter. Set the meter to measure current (milliamps)
and place it directly across tip & ring on the analog pstn line.
Measure the current and use ohms law to determine the resistance of
the analog loop to the central office. As an example, if you measure
50 milliamps, then use ohm's law resistance = volts / current.
Therefore, 50 volts (central office battery) / .050 amps (which is
50 milliamps) equals 1,000 ohms of pstn analog cable resistance. 
Assuming the telco used 24 gauge copper cable (52 ohms per 1000 feet
of cable), the cable length from you to the central office is
19,230 feet (1000 ohms divided by 52 ohms equals 19,230 feet). The
24 gauge cable has a loss of 0.44 db per 1,000 feet, so calculate
the expected loss using 19.23 * 0.44 db equals 8.4 db of pstn cable
loss. "If" you had access to the central office milliwatt generator,
your transmission test set should measure 8.4 db of cable loss.

Then if you want to know what the loss is of the facilities 
associated with measuring the milliwatt generator at some distant
central office, use the number measured in step #1 above and subtract
the calculated 8.4 db of loss. Keep that result as it becomes the
value that you always deduct when measuring any analog cable loss
from your central office to that distant milliwatt generator.

That calculated approach is obviously less accurate then if actually
measuring the loss to your local milliwatt generator, as you're 
having to make an assumption as to the gauge of copper cable used
by your local telco for the analog pstn line, etc.

Its fairly common for telco engineers to use either 24 or 26 gauge
copper for local telco cables up to about 20,000 feet (distance from
your telco office to your home/office location). For home/office
locations that are further then about 20,000 feet, it's fairly
common for the telco engineers to install some sort of remote
equipment cabinet in your neighborhood, and feed that cabinet via
digital facilities (such as the gr303 protocol). In effect, placing
the equipment cabinet in the neighborhood makes the central office
appear much closer to you then what it actually is. However, the
same transmission level measurements and calculations still apply.

There are lots of ways to back into identifying transmission losses
associated with any piece of the telephony network, and some of 
those approaches will require at least some minimal assumptions.

One such assumption (which is very reasonable) is that telephony
networks interconnecting your central office to those in other parts
of the country (eg, remote milliwatt generators) should have less
then 2 db of loss. Therefore, if you measure the loss from your 
home/office to some distant milliwatt generator, deduct 2 db from
your measurement and the result will be a rather accurate value
associated with your analog pstn cable facilities.

If the echo canceller in asterisk were 100% accurate, etc, you 
would typically set the rxgain and txgain values in zapata.conf
to about 2 db less then your measured/calculated cable loss noted 
above. (E.g., if you measure a 8 db loss, then set rxgain & txgain 
to +6 db.)

Since we already know the canceller (etc) is not perfect, the
assumptions built into the above really have no significant impact.

The end result will be whatever loss values you measure/calculate,
you'll still have to play around with the rxgain & txgain to 
minimize the echo while also maximizing the audio levels. The
process will become a _qualitative_ eval process, not a quantitative
one. It doesn't make any real difference which tools you use to get 
there or exactly where the milliwatt generator happens to reside.

If you don't like (or understand) the above process, open a trouble
ticket with your local telco involving "low audio levels" and ask
them to dispatch a technician. When the technician measures the
loss, either ask him or watch over his shoulder to see what the
loss value actually is. That individual is also very likely to
share the telephone number for the milliwatt generator as well.

The technician will likely measure the loss at the telco demarc
point, but you might also be able to talk him into measuring the
same loss from an analog adapter attached to your asterisk box.
Something like a Sipura or Cisco adapter works rather well. If
you can talk him into doing that, your CDR record will show the
number he dialed for the milliwatt generator. (Obviously, the
difference between what he measures at the demarc and the analog
adapter is what is injected by your asterisk settings.)

Rich





More information about the asterisk-users mailing list