dialplan execution stops after ReceiveFax

Home » Asterisk Users » dialplan execution stops after ReceiveFax
Asterisk Users 1 Comment


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

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

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

My macro for the fax receiving looks like that:

; Faxe
; ARG1 = eMail-Adresse
exten => s,1,Verbose(${BOUNDARY} Eingehender Ruf von ${CALLERID(num)})
; 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:


One thought on - dialplan execution stops after ReceiveFax

  • Hi Ruben,

    You should be looking at this thread

    Presently I don’t have the time to generate and send logs however soon
    after my last post I did perform additional testing.

    I am using ReceiveFAX using SPANDSP technology.

    The occasions the System() call would not be executed, whether it was in
    ‘h’ of the dialplan or the main part of the macro after ReceiveFAX(),
    was when a T.38 fax was being received, when it was a G.711 fax no
    matter what I did to the call it would always execute the System() call
    whether it was in the macro or the ‘h’.