spandsp
spandsp is a library of DSP, Digital Signal Processing, functions for telephony. One of its common uses it to provide 'that thing' that is needed to turn images into audio and back (and a lot of other things) for sending and receiving faxes. There are two asterisk applications: app_rxfax and app_txfax that use Spandsp to send and receive faxes.
spandsp has been developed by Steve Underwood. spandsp's web site seems to be on http://www.soft-switch.org/ and its latest version can be downloaded from http://www.soft-switch.org/downloads/spandsp/. There's an alternate mirror at http://zarzamora.com.mx/mirror/ftp.soft-switch.org/pub/ but it is may be outdated (at least regarding spandsp) compared to the previous URLs.
AGX Extra Addons for Asterisk provide some fax applications that uses spandsp and works with Asterisk 1.4.
At the time of this writing, the latest version of spandsp is 0.0.5pre2. Some distributions/OSs may provide pre-packaged versions:
- Gentoo provides 0.0.2_pre20
- Debian provides 0.0.2_pre10-3 for sarge and 0.0.4pre16 for sid
- add your favourite distro here.
If you build spandsp from sources, it requires at least (be sure to have the dev or devel versions of those libraries installed if your distribution/OS provides them as separate packages):
The official installation instructions are located at http://www.soft-switch.org/installing-spandsp.html.
SpanDSP as a FAX machine for Asterisk 1.4.X
SpanDSP is limited to 9600 bit/s and without ECM (error correction)? No, this was true up to and including SpanDSP 0.0.2, but nowadays ECM capabilities have been added. Also V.17 support is included (14400 bit/s), however that might turn out to be not as reliable as desired.Although I have not yet tested this myself (I will later and hopefully update here later) here are some links that should be able to enable you to apply SpanDSP to Asterisk 1.4.X.
- http://www.soft-switch.org/downloads/snapshots/spandsp/test-apps-asterisk-1.4/ Code and patch for 1.4.X
- http://www.voipphreak.ca/archives/421 Tutorial
- http://www.en.sinologic.net/2007/06/24/tutorial-to-includes-spandsp-on-asterisk-14/ More Info
- AGX Extra Addons for Asterisk contains enhanced version of app_rxfax and app_txfax for 1.4
See also
- http://www.soft-switch.org Steve Underwood's Web Site
- Guide for spandsp by Scott
- app_rxfax and app_txfax
- Asterisk Fax
Page Changes
Multipages fax
Makefile patch for ast 1.2.1
+++ Makefile 2005-12-28 10:15:15.000000000 -0500 @@ -54,6 +54,10 @@
APPS+=app_osplookup.so
endif
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/spandsp.h $(CROSS_COMPILE_TARGET)/usr/include/spandsp.h),) + APPS+=app_rxfax.so app_txfax.so +endif + ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif
@@ -102,6 +106,12 @@
app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
+app_rxfax.so : app_rxfax.o + $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff + +app_txfax.so : app_txfax.o + $(CC) $(SOLINK) -o $@ $< -lspandsp -ltiff + app_sql_postgres.o: app_sql_postgres.c
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
rxfax/txfax: getting versions to match with asterisk 1.2.x versions
http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre21b/asterisk-1.2.x/
The patching will fail though, so you have to hand tweak the 'apps/Makefile' under the asterisk source dir. Call me if you need any assistance: pcleddy at dat yahoo place.
If you previously installed another version of spandsp, 'make uninstall' is implemented and works, wow!
Also make sure you add '/usr/local/lib' on it's own line in /etc/ld.so.conf, and then run 'ldconfig' command.
Did I probably forget something? Yes.