[asterisk-users] dialplan execution stops after ReceiveFax

Ruben Rögels ruben.roegels at jumping-frog.org
Wed Jun 29 04:13:56 CDT 2011


Hello,

I have a noticed strange behavior in Asterisk 1.6.18.2 with ReceiveFax
Digium FAX Driver: 1.6.2.0_1.3.0 (optimized for i686_32).

I use a context [capi-in] for icoming ISDN calls:


======
[capi-in]
; Faxe fuer Ruben
exten => 12345,1,Macro(faxin,ruben.roegels at jumping-frog.org,${EXTEN})
======

My macro for the fax receiving looks like that:

======
[macro-faxin]
; Faxe
; ARG1 = eMail-Adresse
exten => s,1,Verbose(${BOUNDARY} Eingehender Ruf von ${CALLERID(num)})
exten => s,n,Verbose(${BOUNDARY} BCHANNELINFO ${BCHANNELINFO})
; nur verarbeiten, wenn B-Kanal frei ist
exten => s,n,GotoIf($[${BCHANNELINFO} = 2]?hangup:free)
exten => s,n(free),NoOp()
exten => s,n,Set(TO=${ARG1})
exten => s,n,Verbose(1,${BOUNDARY} Eingehendes Fax ${CDR(uniqueid)})
exten => s,n,Set(FAXFILE=/var/spool/fax/fax-${TO}-${CDR(uniqueid)}.tif)
exten => s,n,Set(LOCALSTATIONID=jumping frog)
exten => s,n,Answer()
exten => s,n,Wait(3)
exten => s,n,ReceiveFAX(${FAXFILE},d)
exten => s,n,Verbose(1,${BOUNDARY} Nach dem Fax!)
exten => s,n,System(/usr/local/bin/fax2mail.sh ${FAXFILE} ${TO})
;exten => s,n,capicommand(receivefax,${FAXFILE},+004976138444421,Headline,k)
exten => s,n(hangup),HangUp()
exten => h,1,System(/usr/local/bin/fax2mail.sh ${FAXFILE} ${TO})
======

As you can see, the received fax file should be processed by a
bash-script, but after the call hangs up, the script is never executed.

The console log shows:

======
 -- Channel 'CAPI/ISDN1#02/38444421-5' FAX session '4' is complete,
result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1,
resolution: '204x98', transfer rate: '9600', remoteSID: '4932123847885'
  == Spawn extension (macro-faxin, s, 11) exited non-zero on
'CAPI/ISDN1#02/12345-5' in macro 'faxin'
  == Spawn extension (capi-in, 12345, 1) exited non-zero on
'CAPI/ISDN1#02/12345-5'
  == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 2
       > ISDN1#02: CAPI INFO 0x3490: Normal call clearing
======

Anyone seeing what I'm missing?

Thank you.


Regards,
Ruben



More information about the asterisk-users mailing list