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?
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.
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.
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.
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.
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.
Go to your asterisk source directory, /usr/src/asterisk.
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.
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:
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?