Faxing

From VoiceRDWiki

Jump to: navigation, search

Contents

Faxing with Hylafax & IAXModem

Faxing over VOIP is a big problem. If you want to know why, go here: http://www.voip-info.org/wiki-Asterisk+fax

One way to overcome potential problems is by using a combination of Hylafax ( http://www.hylafax.org ) and IAXmodem ( https://sourceforge.net/projects/iaxmodem ). In short, you let your existing fax machine do outbound faxing, which tends to be more reliable than answering faxes over VOIP, and let asterisk/IAXmodem/hylafax answer faxes. This guide assumes that you have an existing fax machine.

Install IAXmodem

The procedure is as follows:

  • Install dependencies:
  tiff
  libtiff
  libtiff-devel
  libjpeg
  libjpeg-devel
  mgetty
  g3utils
  
  tar zxvf iaxmodem-*.*.*.tar.gz
  cd iaxmodem-*.*.*
  ./configure
  ./build static
  cp iaxmodem /usr/bin/
  cd lib/spandsp
  ./configure
  make
  make install
  mkdir /etc/iaxmodem
  cd /etc/iaxmodem/
  • edit iaxmodem-cfg.ttyIAX (from iaxmodem source tarball)
  peername user#
  password userpassword   
  cp iaxmodem-cfg.ttyIAX /etc/iaxmodem/ttyIAX
  • Start iaxmodem
  iaxmode ttyAIX

Install Hylafax

  rpm -Uhv hylafax.rpm
  • Setup hylafax
  faxsetup

Defaults are OK

  Area Code ? 
  Serial port that modem is connected to ? ttyIAX


  • Add an IAX user via the VoiceRD web interface using the same login info provided in /etc/iaxmodem/ttyIAX
 Make sure youre extconfig.conf file points the iaxpeers and iaxusers to ldap, and that the IAX ldap object has the correct settings. This was broken in some earlier releases. 
  • Start the hylafax service
  /usr/sbin/hylafax start
  • Start the iaxmodem service
  /usr/local/bin/iaxmodem ttyIAX)
  • Try to fax the new iaxmodem extension and see if it answers. If it works, you'll have a tiff file in /var/spool/hylafax/recvq
  • Change the Incoming Route to go to the new IAXmodem extension
  • Make sure that you put both Hylafax and IAXmodem in /etc/inittab so that they start on boot.
  edit /etc/inittab
  mo:35:respawn:/usr/sbin/faxgetty /dev/ttyIAX
  IAX:2345:respawn:/usr/local/bin/iaxmodem ttyIAX

Making hylafax do something

Note: In addition to saving the faxes as tiff files hylafax is typically used for other options. Use the following guides for additonal options: http://www.hylafax.org/content/How-To

We recommend your existing fax machine set up to default cups printer and add this bit to the end of the /var/spool/hylafax/bin/faxrcvd file:

   if [ -n "$SENDTO" ]; then
      echo ""
      echo "The facsimile was automatically dispatched to: $SENDTO."
      else
      /usr/bin/fax2ps $FILE | lpr
   fi


Good luck!

Personal tools