SANGOMA

Wanpipe Asterisk Faxing

  1. Fax Synchronization: T1/E1 & BRI -> Analog
  2. Asterisk T.38 Faxing with External Voice/Router Box
  3. Asterisk Faxing with Hylafax



Asterisk T.38 Faxing with External Voice/Router Box

A number of Sangoma customers are using Asterisk plus an External Voice Router Box; e.g., Mediatrix or Audio Codes, as a reliable T.38 faxing solution.

Network Diagram:

Telco <------ t1/e1 pri -----> [Sangoma Port1] <-----------------> [Zaptel/Asterisk]
                                                                                                         |
Fax <--> [ATA] <-- sip --> [ Router ] <-- t1/e1 pri -> [ Sang Port2 ] <-|

In this scenario, it is important to note that the External Router T.38 box must have a strong signal from Asterisk/Zaptel [ Sangoma Port2 ].   Customers have reported that txgain must be increased for proper fax operation.

  1. In /etc/asterisk/zapata.conf   
  2. For group2 [sangoma port2] section set
    txgain = 8
    rxgain = 1
  3. Adjust txgain util you get desired fax performance.
It is also recommended that Sangoma Port2 be configured to use the incoming clock from Sangoma Port1.
  1. in /etc/wanpipe/ directory
    wanpipe1.conf -> sangoma port1
    wanpipe2.conf -> sangoma port2
  2. Set wanpipe1.conf Port1 to receive incoming clock from Telco
    TE_CLOCK=NORMAL
  3. Set wanpipe2.conf Port2 to receive incoming clock from Port1
    TE_CLOCK=MASTER
    TE_REF_CLOCK=1
  4. Set the External Router T.38 box for Slave clocking.
This way, the whole system uses a single clock that is received from the telco.




Faxing using Asterisk-IAXmodem-HylaFax

Robust and reliable faxing can be achieved by using HylaFax. Iaxmodem is used to interface Asterisk with HylaFax.

PSTN <-> Sangoma Card <-> Zaptel <-> Asterisk <-> IAXmodem  

IAXmodem website: http://iaxmodem.sourceforge.net/
Softwitch (Spandsp) website: http://www.soft-switch.org/
HylaFax website: http://www.hylafax.org/

Please note that this is a quickstart guide, for more detailed configuration check the respective product websites and READMEs.

1. Package requirements

libtiff
libtiff-devel

2. Installing IAXmodem
   
Untar your IAXmodem tarball (/usr/src/)
    #> cd /usr/src/
    #> tar xvfz iaxmodem-0.1.14.tar.gz
    Install libiax2:

The libiax2 source is included with IAXmodem
#> cd /usr/src/iaxmodem-0.1.14/lib/libiax2
#> ./configure
#> make; make  install
    Install spandsp:
The spandsp source is included with IAXmodem
#> cd /usr/src/iaxmodem-0.1.14/lib/spandsp
#> ./configure
#> make; make  install
    Install IAXmodem and create a symbolic link for IAXmodem in /usr/sbin
#> cd /usr/src/iaxmodem-0.1.14/
#> ./build
#> ln -s /usr/sbin/iaxmodem iaxmodem
3. Running IAXmodem
IAXmodem can be run in daemon and non-daemon mode, it is recommended to run IAXmodem in non-daemon mode during the installation/configuration for easier debugging and then run it in daemon mode once all configuration is working.

Create the /etc/iaxmodem/ directory to store your  IAXmodem configuration files:
#> mkdir /etc/iaxmodem

You will need a separate configuration file for each fax line. Configuration for each fax line are  stored in /etc/iaxmodem/<name of fax device>.
Create a configuration file for a fax device called ttyIAX1
#> vi /etc/iaxmodem/ttyIAX1
---begin here---
device          /dev/ttyIAX1
uucp:uucp
mode            660
port            4571 ; you will need a different port for each device
refresh         60
server          127.0.0.1
peername        iaxmodem1
secret          password
cidname         John Doe
cidnumber       8005551212
codec           ulaw
---end here---

For more details about parameter options, see /usr/src/iaxmodem/README

Add an IAX account for this modem in Asterisk:
#> vi /etc/asterisk/iax.conf
---begin here---
[iaxmodem1]
type=friend
secret=password
host=dynamic
port=4671
context=outgoingfax
allow=all
---end here---

type "reload" in the Asterisk CLI to apply changes.

Start IAXmodem for ttyIAX1
#> iaxmodem ttyIAX1
Start hylafax for ttyIAX1

[THIS PAGE IS STILL UNDER CONSTRUCTION, PLEASE CHECK AGAIN FOR REST OF DOCUMENTATION]

Comments

From bsutton - 12/2/06 5:00 PM

You can also use AsterFax to do faxing with sangoma cards without all of the fiddling around to get it to work.

 AsterFax was designed to do faxing with Asterisk and ships as a RPM which installs all of the necessary dependancies such as ghostscript etc. Its soon to be included in Trixbox as the standard fax solution.

http://www.asteriskit.com.au/Page/AsterFax

From yuan - 11/7/06 2:06 PM

Hi there,
Thought I should share my experience from this weekend.
You might know this already, but it would be nice to have it on your Wiki...
Upgrading CentOS (the mother of all Trixbox/freePBX installs) with the latest updates also updates "libtiff" and "libtiff-devel" to version 3.6.1
(The word -devel is very appropriate in this context...)
Version 3.6.1 breaks spandsp, hence rxfax/txfax.
Fix:
        yum -y remove libtiff
Yes, you will have to manually install Ghostscript, libtiff and (who needs) cups.
Manually install Ghostscript
        wget http://easynews.dl.sourceforge.net/sourceforge/ghostscript/ghostscript-8.54.tar.gz
(earlier version have reported PDF problems)
Manually install libtiff:
I installed it in /usr:

        ./configure --prefix=/usr
        make clean
        make
        make install

You can then either use the current version of Spandsp (re-compile is required anyway though), or upgrade to the latest stable version.
I would not recommend to use the latest snapshot, as it appears there it not only fixes stuff, but also break some stuff.
With this fix I was now able to fax through misc fax machines->A200->VoIP->A104d->Asterisk/rxfax. Good stuff.
Next issue will be to fiddle with the echo cancellation settings...
Thanks,
Bjorn Asmul
www.atlasvoice.com
416-642-6900 ext.101

From patrickd - 10/24/07 1:35 AM

Has anyone experienced issues using an A101D-X card with IAXmodem+Hylafax over ISDN PRI? This setup seems to be a lot more sensitive than a traditional POTS line and analog fax machine. Remote users can always send to our eFax setup without issue, but a significant percentage report their faxes failing.

I've checked the Hylafax logs and mailing lists and they suggest either an incompatibility with the card or distortion on the line. However, the latter is not the case as subsequent retries to other numbers (e.g. eFax) work fine. Here is an excerpt of the error:
Oct 24 09:31:05.85: [ 1140]: RECV training at v.29 9600 bit/s

Oct 24 09:31:05.85: [ 1140]: <-- [10:AT+FRM=96\r]
Oct 24 09:31:06.17: [ 1140]: --> [7:CONNECT]
Oct 24 09:31:07.69: [ 1140]: RECV: TCF 1819 bytes, 3% non-zero, 791 zero-run
Oct 24 09:31:07.69: [ 1140]: RECV: reject TCF (zero run too short, min 1200)
Oct 24 09:31:07.69: [ 1140]: --> [10:NO CARRIER]
Oct 24 09:31:07.69: [ 1140]: <-- [9:AT+FRS=7\r]
Oct 24 09:31:07.75: [ 1140]: --> [2:OK]

The training continues on to 4800 and 2400 bit/s but never succeeds:

Oct 24 09:31:24.55: [ 1140]: REMOTE wants A4 page width (215 mm)
Oct 24 09:31:24.55: [ 1140]: REMOTE wants unlimited page length
Oct 24 09:31:24.55: [ 1140]: REMOTE wants 7.7 line/mm
Oct 24 09:31:24.55: [ 1140]: REMOTE wants 2-D MMR
Oct 24 09:31:24.55: [ 1140]: REMOTE wants T.30 Annex A, 256-byte ECM
Oct 24 09:31:24.55: [ 1140]: RECV recv DCS (command signal)
Oct 24 09:31:24.55: [ 1140]: RECV training at v.27ter fallback mode 2400 bit/s
Oct 24 09:31:24.55: [ 1140]: <-- [10:AT+FRM=24\r]
Oct 24 09:31:25.77: [ 1140]: --> [7:CONNECT]
Oct 24 09:31:27.31: [ 1140]: RECV: TCF 457 bytes, 2% non-zero, 241 zero-run
Oct 24 09:31:27.31: [ 1140]: RECV: reject TCF (zero run too short, min 300)
...
Oct 24 09:31:30.05: [ 1140]: RECV recv DCN (disconnect)
Oct 24 09:31:30.05: [ 1140]: RECV FAX: RSPREC error/got DCN (sender abort)
Oct 24 09:31:30.05: [ 1140]: RECV FAX: end
Oct 24 09:31:30.05: [ 1140]: RSPREC error/got DCN (sender abort)
Oct 24 09:31:30.05: [ 1140]: SESSION END

From Corsari - 10/17/07 11:43 AM

What about ISDN BRI faxing with just hylafax and one sangoma card?

This is ment as: without Asterisk

 Thank you for any tip, or, thank you if you add this section in the faxing solutions.

 Regards

Frenk 

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 3/12/08 9:54 AM