Fax issue on ReceiveFAX with SpanDSP

Hi there,

I’m running a Debian Lenny 2.6.26-2-amd64 with Asterisk
I compiled the module app_fax and installed SpanDSP 0.0.6pre18.

This is my extensions.conf

exten => _X.,1,Answer
exten => _31852014810,2,Dial(IAX2/waddinxdrunen/110,90)
exten => _31852012802,2,Dial(SIP/40001&SIP/40002&SIP/30001&SIP/30002,90)
exten => _31852010359,2,Goto(fax,${EXTEN},1)
exten => _X.,3,Log(Klaar!)
exten => _X.,4,Hangup

exten => s,1,Set(FAXFILE=/var/spool/asterisk/fax/${STRFTIME(${EPOCH},GMT+2,%C%y%m%d%H%M)}-${CALLERID(num)}-${UNIQUEID})
exten => s,2,Log(NOTICE, Fax wordt opgeslagen als ${FAXFILE}.tiff)
exten => s,3,receivefax(${FAXFILE}.tiff)
exten => h,4,Log(NOTICE,Klaar met ontvangen van fax van ${CALLERID(num)}

exten => _X.,1,Log(NOTICE,Fax context bereikt)
exten => _X.,2,Log(NOTICE,Er komt een fax binnen van nummer ${CALLERID(num)} aan ${EXTEN})
exten => _X.,3,Set(CALLEDFAX=${EXTEN})
exten => _X.,4,Log(NOTICE,Start met ontvangen van fax)
exten => _X.,5,Macro(faxreceive)

exten => _X.,6,System(/usr/lib/asterisk/scripts/fax2email.sh "${CALLERID(num)}" "${CALLEDFAX}" "Agritect FAX" "dveenker@agritect.nl" "${FAXFILE}")

Almost everything is working perfectly. I even receive fax files as TIFF. After revceiving the fax the script fax2email.sh is not executed. At some places I placed some “Log”-commands just to see how far the extensions.conf is running. Unfortunately it only runs until:

After that … silence. I’m almost there but I can’t seem to find my mistake …
Here’s my detailed logging !

(Please don’t be misleaded by the Dutch text from the Log app. It just some “Hi there, test test” kind of messages :smiley: )

[Nov 22 17:34:26] DEBUG[12693] app_fax.c: Channel hangup [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Loop finished, res=-1 [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Fax phase E handler. result=0 [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Fax transmitted successfully. [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Remote station ID: [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Pages transferred: 1 [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Image resolution: 8031 x 7700 [Nov 22 17:34:26] DEBUG[12693] app_fax.c: Transfer Rate: 14400 [Nov 22 17:34:26] DEBUG[12693] channel.c: Set channel SIP/999154917-00000000 to write format ulaw [Nov 22 17:34:26] DEBUG[12693] channel.c: Set channel SIP/999154917-00000000 to read format ulaw [Nov 22 17:34:26] WARNING[12693] app_fax.c: Transmission error [Nov 22 17:34:26] VERBOSE[12693] app_macro.c: == Spawn extension (macro-faxreceive, s, 3) exited non-zero on 'SIP/999154917-00000000' in macro 'faxreceive' [Nov 22 17:34:26] DEBUG[12693] pbx.c: Spawn extension (fax,31852010359,5) exited non-zero on 'SIP/999154917-00000000' [Nov 22 17:34:26] VERBOSE[12693] pbx.c: == Spawn extension (fax, 31852010359, 5) exited non-zero on 'SIP/999154917-00000000'

Can anyone here help me out ?
Great Thanks in advance !

Anything to be run after the caller hangs up has to be in the h extension.

Nope, in that case this line …

… should produce some text to both the console and my logfile /var/log/asterisk/all.
But no message to find at both places.

It feels like the extensions.conf ‘thread’ is stopped after I call the app …

You need h,1; h,2; and h;3 lines before your h,4 line.