Problem with spandsp

Hello I am trying to install spandsp on my box. I copied over app_rxfax and patched the make file. Everything i compile asterisk It fails. I do not have the error message handy but i can see one thing in patch file. It has a file called osp.h listed there. I searched my system and it does not exist. Does anyone know if osp.h is relevant to my issues?

I am using asterisk 1.2.13 on top of centos 4.4

here is the make file patch i am talking about

— Makefile.orig 2006-02-09 10:31:21.000000000 +0800
+++ Makefile 2006-05-28 17:57:43.000000000 +0800
@@ -52,10 +52,14 @@

ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
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

CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
@@ -100,10 +104,16 @@
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so

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$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c

app_sql_postgres.so: app_sql_postgres.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq

Thanks

did you install spandsp first ? without seeing the error in compilation we’re a bit blind.

I followed the instructions here
soft-switch.org/installing-spandsp.html

I installed spandsp. I copied the App files over and i patched the Make file. All that is documented on that page i have done.

This is what i get

app_rxfax.c: In function phase_e_handler': app_rxfax.c:105: error: structure has no member namedcolumn_resolution’
app_rxfax.c:105: error: structure has no member named row_resolution' app_rxfax.c:116: error: structure has no member namedrow_resolution’
app_rxfax.c:122: error: structure has no member named row_resolution' app_rxfax.c: In functionphase_d_handler’:
app_rxfax.c:147: error: structure has no member named columns' app_rxfax.c:147: error: structure has no member namedrows’
app_rxfax.c:148: error: structure has no member named column_resolution' app_rxfax.c:148: error: structure has no member namedrow_resolution’
app_rxfax.c: In function rxfax_exec': app_rxfax.c:281: warning: passing arg 1 offax_init’ from incompatible pointer type
app_rxfax.c:281: error: too many arguments to function fax_init' app_rxfax.c:304: warning: passing arg 1 offax_rx’ from incompatible pointer type
app_rxfax.c:307: warning: passing arg 1 of fax_tx' from incompatible pointer type app_rxfax.c:344: warning: passing arg 1 offax_release’ from incompatible pointer type
app_rxfax.c: At top level:
app_rxfax.c:81: warning: ‘t30_flush’ defined but not used
make[1]: *** [app_rxfax.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk-1.2.13/apps’
make: *** [subdirs] Error 1
[root@asterisk asterisk-1.2.13]#

any ideas?

i would try an earlier version of spandsp. it’s been a while since i compiled 1.2.x with spandsp, but i seem to remember having problems with versions after pre23 (april ??). worth a try.

Hi

Here is a scrip to automate it. You just need to download spandsp and untar it to the dir. It may need the dirs editing to suit your build

cd spandsp-0.0.2 ./configure --prefix=/usr make make install cd /usr/src/asterisk-1.2.10/apps wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/app_rxfax.c wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/app_txfax.c wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/asterisk-1.2.x/apps_Makefile.patch cp Makefile OLD_Makefile patch <apps_Makefile.patch cd .. make install

This is what I use.

thank you sir you are the king!. that worked.