Problem with ReceiveFAX app from FFA

Home » Asterisk Users » Problem with ReceiveFAX app from FFA
Asterisk Users 6 Comments

Hi all,
I am running to the following problem, when using the below dialplan to
receive fax, everything works perfect till this line
exten => receive,n,ReceiveFAX(${FAXFILE}):
and then the following line cannot be executed, it’s like asterisk can’t go
back to dialplan and continue, the good news is when i check what is
received in my fax folder i find that the file is a valid one (not corrupted
or empty), also when I use another way to execute fax2mail, it’s working
perfect and sent right to my email (test was done with the same file
received by ReceiveFAX), so I belive the problem is just when transiting
from the line that call ReceiveFAX and the line that call fax2mail (but both
work not in order or separately), the debugging of PRI channel is below
dialplan (maybe i will need to turn on debugging in receiveFAX app as well),
please advise!

I am using asterisk 1.6.2.11, FAX For Asterisk Components:
Applications: 1.6.2.0_1.2.1
Digium FAX Driver: 1.6.2.0_1.2.1 (optimized for barcelona_64)

[fax-rx]
exten => receive,1,NoOp(**** FAX RECEIVE ****)
exten => receive,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
exten => receive,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten =>
receive,n,Set(FAXFILE=/var/spool/asterisk/fax/${STRFTIME(,,%F_%T_${CALLERID(num)})}.tif)
exten =>
receive,n,Set(FAXFILENOEXT=/var/spool/asterisk/fax/${STRFTIME(,,%F_%T_${CALLERID(num)})})
exten => receive,n,Set(GLOBAL(LASTFAXCALLERNUM)=${CALLERID(num)})
exten => receive,n,Set(GLOBAL(LASTFAXCALLERNAME)=${CALLERID(name)})
exten => receive,n,NoOp(**** SETTING FAXOPT ****)
exten => receive,n,Set(FAXOPT(ecm)=yes)
exten => receive,n,Set(FAXOPT(headerinfo)=MY FAXBACK RX)
exten => receive,n,Set(FAXOPT(localstationid)=15184893772)
exten => receive,n,Set(FAXOPT(maxrate)=14400)
exten => receive,n,Set(FAXOPT(minrate)=2400)
exten => receive,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => receive,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => receive,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => receive,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => receive,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => receive,n,NoOp(**** RECEIVING FAX : ${FAXFILE} ****)
exten => receive,n,ReceiveFAX(${FAXFILE})
exten => receive,n,System(‘/usr/local/bin/fax2mail -p -f “${FAXFILENOEXT}”

6 thoughts on - Problem with ReceiveFAX app from FFA

  • Hi Guys,
    I solved temporarely my issue by kind of tricking Asterisk, I used the
    following line instead of the old:
    exten => h,n,System(‘/usr/local/
    bin/fax2mail -p -f “${FAXFILENOEXT}” –cid-number ${CALLERID(num)}

  • Why do you consider this a temporary fix? The far end machine will
    normally hang up at the end of the FAX, so the hangup option in the
    dialplan is exactly where you should expect to be.

    If you need a couple of tries for some of your FAXes, it doesn’t sound
    like FFA is working very well for you. Check the timing of your
    telephony channel. If you get more than 1% failures when sending FAXes
    to and from your own equipment you should be looking into the cause.

    Steve

  • I don’t know the specifics of how an Asterisk application should exit
    however WRT ReceiveFAX() using SPANDSP Technology I would expect the
    call to descend to any functions below ReceiveFAX() whether or not the
    facsimile was received successfully, the status codes from ReceiveFAX()
    can be used by whatever is called next, e.g. a script to e-mail the
    received facsimile or a report advising errors were encountered.

    I am using a macro to receive faxes, I have placed my System() call back
    to were the macro returns after execution due to the function not being
    called after ReceiveFAX() under certain conditions.

    This however does not guarantee getting an e-mail of what has been
    received if the sender decides to abort the transmission.

    I can reproduce this using HylaFAX to send a fax to an extension which
    Asterisk ReceiveFAX(,f) will accept, granted it will fall back
    to G.711 mode when receiving, when I abort the transmission using WHFC
    client, it is as though ReceiveFAX() goes of somewhere else or simply
    decides to forget where it came from as it does not appear to return
    hence the System() call is never made.

    I should point out I am using extensions.ael for my dialplan.

    I personally have considered this behaviour to possibly be a bug.

    Cheers,

    Larry.

  • @ Bryant: thanks so much for the interesting figure of use.

    @ Steve: don’t get that mad dude, my impression is only My impression and
    it only affects me, so nothing to worry about, i’d rather discuss asterisk
    issues instead of discussing my impression, but thanks for your help.