AsterFax the Email to Fax Gateway for Asterisk.
---------------   We have moved -----------------

AsterFax and Asterisk IT have both been renamed.

Asterfax is now known as Noojee Fax

Asterisk IT is now known as Noojee Telephony Solutions.

Noojee Fax documentation and support can now be obtained via:

---------------   We have moved -----------------

Asterisk IT is the primary developer and sponsor of AsterFax the Open Source Email to Fax Gateway for Asterisk.
Asterisk I.T. offer a range of support options for AsterFax as well as general Asterisk consulting services.  Contact for more information.
You can also receive support from the Asterfax and Asterisk communities by by posting at the relevant forum.

AsterFax - Asterisk Fax Logo

Guide to setting rxgain in Asterisk

Kris Boutilier has posted details to the Asterisk-Users list on how to use the milliwatt services of your telco and multiple lines to set the gain structure correctly in Asterisk:

I went through something similar recently though involving having a channel bank between myself and the world. The techniques used there should be applicable to simpler hardware.

To do this in a quantitative fashion you need a few different tools:
  • A recent patch to ztmonitor (or current CVS head) that adds an option to display a numerical representation, as well as the bar graph. See: bug_id=0002783
  • A phone number for a 'type 102 milliwatt test line' at _your_ serving central office. Try calling the repair number for your telco - by assignment they're usually found in xxx-958-nnnn or xxx-959-nnnn ranges in North America. I don't recommend using a distant test line as there may be unknown influencing factors.
  • And optionally, another patch to chan_zap.c that allows the gains of a channel to be twiddled on the fly without reloading. See: bug_id=0002784
The steps I followed to set the rxgain were:

1. Edit /etc/asterisk/zapata.conf and ensure Tx and Rx gains are 0.0 across the board. I also recommend disabling the echo canceller and training during the tests.

2. Access the Channel Bank console and ensure hardware gains are 0.0 (or as close as possible) across the board - for simplicity I stick to adjusting within Asterisk.

3. Start 'ztmonitor' on the target trunk in 'quantitative' mode.

4. Dial the CO Milliwatt test line from inside Asterisk via the target trunk. Note the Rx level - it should be near 14844

5. If level is < optimal make the the rxgain for the channel more +ve. If > than optimal, more -ve.
note - restart will be required to apply gains if not using cli patch.

6. Once optimal rxgain has been determined, set it in zapata.conf and restart asterisk.

Now, to set the txgain you need to have at least two lines on the asterisk server so you can loop a call through the serving central office and back to your own milliwatt source - to be able to listen to the effect you have on your own outbound audio.

7. Modify the dialplan to have incoming calls on the target trunk go to a context that goes something like:

exten => .....,1,Answer()
exten => .....,2,Milliwatt()

8. This time start 'ztmonitor' but refer to the second trunk, not the trunk that terminates on Milliwatt().

9. Dial the target trunk from inside Aaterisk via the second trunk. Note the Rx level - it should be near 14844

10. If level is < optimal make the the txgain for the target trunk more +ve. If > than optimal, more -ve.

11. Once optimal txgain has been determined, set it in zapata.conf and restart asterisk.

Esentially, in the first step we're concerned with compensating for the line/interface loss by twiddling the Zap rxgain, thus:

                     |  CB   |       |  Zap  |
| | | chan1 |
|-------| |-------|
Reference >-| TxTLP |>-Rx-->|Rxgain |
Signal >-(loss)-/ | | | | <-> Internal
| RxTLP |<-Tx--<|Txgain | data
| | | | stream

In the second step we're ensuring the interface has symmetric loss by following the path:
                     |  CB   |       |  Zap  |
| | | chan1 |
|-------| |-------|
| TxTLP |>-Rx-->|Rxgain |
-----<-(loss)-\ | | | | <-> Internal
/ <-| RxTLP |<-Tx--<|Txgain | data
| | | | | stream
| | | | chan2 |
| |-------| |-------|
\ >-| TxTLP |>-Rx-->|Rxgain |
->----(loss)--/ | | | | <-> Internal
compensated by | RxTLP |<-Tx--<|Txgain | data
chan2 rxgain | | | | stream

We trust that once the call is inside or beyond the serving CO then it's all inside a digital domain and there is no loss. If you should end up on a call where the far end analog circuit has signficant loss then at least your amplitude will be comparable to everone elses.

Hope that helps.

Kris Boutilier
Information Systems Coordinator
Sunshine Coast Regional District

AsterFax UserGuide
Configuring Email Clients
Supported File Formats
Installing AsterFax
Configuring AsterFax
Testing AsterFax
Trouble Shooting AsterFax
Running AsterFax
Configuring SendMail
Configuring GhostScript
Configuring OpenOffice
Add your own File format

AsterFax is Sponsored by Asterisk I.T.
©2006  Asterisk I.T. all rights reserved. Some parts of this site may be the copyright of other authors. If you want to copy parts of this page you may do so provided you have gained permission from Asterisk I.T. first. Email
AsterFax™ is a trade mark of Asterisk I.T..
I'm not a great believer in Trade Marking Open Source software but unfortunately someone has been running a scam to redirect traffic to a bogus AsterFax web site. As such I've trade marked AsterFax's name to provide protection from such people.