1.4.4 + Spandsp

Can anyone confirm that they got Spandsp to successfully work with 1.4.4 using rxfax/txfax? I can get it to compile correctly, but Asterisk continues to crash. Any help or input would be appreciated.

Thanks.

Using asterisk-1.4.4 and spandsp-0.0.3. Compilation without problems.
But when calling RxFax, Asterisk dies ‘the hard way’ .
Plus the mISDN stack is complete bogus - I need a reboot to get things back to work
(unloading the drivers crashes the kernel).

Turns out that this is not just a ‘compille and go’ thing :cry:
Fortunately there are instructions at voip-info.org/wiki/view/app_ … +app_txfax for spandsp & 1.4.4 at the bottom of the page.

Be carefull though ! Follow every step (involves installing autoconf 2.60 manualy and running the bootstrap.sh script). The problem is that the spandsp patch changes the configure.ac file so you need to remake the configure script before recompiiling asterisk.

So it’s a WFM

Hope this helps :wink:

Most excellent. I will try this later today when I have time. So you can confirm that faxing works for you in 1.4.4 now?

Using asterisk 1.4.4 and spandsp-0.0.4 RxFax receives a fax from a classic PSTN fax machine and the content is OK.

I noticed that the comands after the RxFax command are not executed but for me that is an unimportant detail for the moment.

I haven’t given TxFax a try but I assume the results will be ok too.

Good luck !

I understand that it is expected behaviour that commands after RxFax command in your dialplan are not executed.

Instead, you should handle your faxfiles in the hangup extension.

Your dialplan would then look like this:

exten => 333,n,Set(CalledExt=2|g) ; this is wrong when receiving multiple faxes at the same time;
exten => 333,n,Answer()
exten => 333,n,Playtones(ring)
exten => 333,n,Dial(mISDN/1/0761234,20,rwW) ; connection incoming calls to this msn TOps, with voicemailbox 2 = Hans
exten => 333,n,Voicemail(2,su)
exten => 333,n,Hangup


exten => fax,1,StopPlaytones
exten => fax,n,Set(FAXFILE=/var/spool/asterisk/fax/${STRFTIME(${EPOCH},,%Y%m%H%M%S)}-${CALLERID(number)})
exten => fax,n,Set(receivedfax=1)
exten => fax,n,rxfax(${FAXFILE}.tif)

exten => h,1,GotoIf($["${receivedfax}" = "1"]?h,receivedfax:h,receivedavoice)
exten => h,n(receivedfax),DeadAGI(fax2mail|-t|-f|${FAXFILE}|--cid-number|${CALLERID(number)}|--cid-name|${CALLERID(name)}|--dest-exten|${CalledExt})
exten => h,n(receivedavoice),Hangup

Although you would want the CalledExt variable to be local (per channel), this is not possible because it is emptied as soon as the channel hangs up and thus not available to fax2mail. Perhaps anyone knows a more elegant solution?

I also noticed that in misdn.conf there is a non-documented faxdetect, so for misdn you do no longer need NVFaxdetect.

Also, when following the instructions above to install spandsp and rxfax, I did NOT experience the problems a certain Leonardo reports on the link below, with asterisk-1.4.4 . Just following the asterisk-1.4.2 instructions of Ray Collet worked fine for me with asterisk-1.4.4 and autoconf 2.61 .

Haven’t tried txfax yet, but rxfax is now running beautifully!