Fax - Asterisk 1.4 and freepbx 2.2

When I was working with the beta versions of Asterisk 1.4 the fax (using spandsp 0.0.3) crashed Asterisk.

Does anyone have Asterisk 1.4 working with freepbx 2.2 and the fax working? Does spandsp have to be installed for freepbx configuration of fax to work properly with Asterisk 1.4?

I’m using sip only…

I’m in the same boat… and haven’t been able to make it work so far. Anyone else have success?

Tim

Using spandsp for fax with Asterisk 1.4 is better documented now. Here are the steps I went through based on what I found at various sites and trial/error. I’m using Asterisk 1.4.13, FreePBX 2.3.1, and CentOS 5.

  1. Download and install spandsp-0.0.3 from soft-switch. Make and install the package. Some people have reported success with spandsp-0.0.4pre but I stuck with the “released” version.

  2. Download the test applications from soft-switch. I used the files at http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4. Downlaod app_rxfax.c, app_txfax.c, and asterisk.patch. Copy the app_rxfax.c and app_txfax.c files to your asterisk apps source directory (e.g. /usr/src/asterisk/apps). Apply the patch to the makefile (e.g. go to /usr/src/asterisk and enter patch -P0 <asterisk.patch). I had to do manually apply the edits on the makefile since the patch did not work for me.

  3. Get the app_nv_faxdetect-1.0.6_1.c and app_nv_backgrounddetect-1.0.6_1.c. I got these from http://x68k.net/download/Asterisk.

  4. Add the line “/usr/local/lib” to the end of /etc/ld.so.conf and run ldconfig

  5. Make sure you have autoconf installed. I’m running CentOS 5 and had to get it from http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz. If you have to install it, run these commands in a directory (should use /usr/src)
    wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz
    tar –xvf autoconf-2.61.tar.gz
    cd autoconf-2.61
    ./configure --prefix=/usr/local
    LANG=c make
    LANG=c make install

  6. Edit the app_nv_faxdetect-1.0.6_1.c and app_nv_backgrounddetect-1.0.6_1.c and comment out all lines of LOCAL_USER_ADD(u), LOCAL_USER_REMOVE(u), and STANDARD_HANGUP_LOCALUSERS. Add the following line to the bottom.

AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, “NV BG Detection Application”);

  1. Assuming your asterisk source directory is /usr/src/asterisk, copy the app_nv_faxdetect-1.0.6_1.c and app_nv_backgrounddetect-1.0.6_1.c into /usr/src/asterisk/apps/app_nv_faxdetect. and /usr/src/asterisk/apps/app_nv_backgrounddetect.c respectively.

  2. Go to your asterisk source directory, /usr/src/asterisk.

  3. Enter these commands to create the configure file and configure asterisk

./bootstrap.sh
./configure
make menuselect

When the menu comes up after make menuselect then you need to make sure app_txfax and app_rxfax do not have the XXX by them. If so then something was done incorrectly. They should have a * by them to indicated they are included in the build.

  1. If you’ve successfully completed step 8, continue your build

make clean
make
make install

You should now be able to use nv_faxdetect on sip lines. I have had no problems once I got it working through these steps.

Just for grins, here’s another how-to that I came across recently. Don’t know if it works any better than the above (or if it works at all, for that matter) but I find that sometimes it’s helpful to see the various ways different people have accomplished the same thing:

TrixBox-2.3.0.3 with Postfix, Iaxmodem, Hylafax and Avantfax working perfectly
http://kirtsana.info/2007/11/08/trixbox-2303-with-postfix-iaxmodem-hylafax-and-avantfax-working-perfectly/
The above appears to be a copy of a Trixbox forum post (they do give credit to the original):
http://www.trixbox.org/forums/trixbox-forums/share-your-trixbox-success-stories/trixbox-2-3-0-3-postfix-iaxmodem-hylafax-an

Hi,

I’m trying to set up Spandsp with asterisk 1.4.15, but have come up against a problem - soft-switch appear to have removed the app_rxfax.c, app_txfax.c, and asterisk.patch files from their server. Does anyone have any idea where I can obtain the correct versions of these files?

Regards,
Dave.

I’ve managed to find a location where these files can be downloaded:

Once I obtained the app_rxfax.c and app_txfax.c files from the tarball I was able to successfully make asterisk-1.4.15

I patched asterisk-1.4.15 by following the manual instructions here:

http://www.voipphreak.ca/archives/421

Regards,
Dave.