Fax Pro retries even after success on first fax

Whenever I send a fax from my extension (411), it succeeds but still re-sends to the maximum number of retries. Below is the asterisk log data from both attempts; they’re identical as far as I can tell other than the data that is unique per call anyway. I would debug the code but, well, you know…

This is with the per-extension number set; global was 0. I can test with global enabled and local disabled if necessary. Originally, I had the retry count set to 3. When I got 4 copies from 1 fax, I changed it to 1 and got 2 copies. Above is the data from after that change was made.

Attempt 1:

-- Executing [[email protected]:1] NoOp("Local/**destination**@from-internal-00000174;1", "Sending fax from 411 to **destination**") in new stack -- Executing [[email protected]:2] System("Local/**destination**@from-internal-00000174;1", "/var/lib/asterisk/bin/faxpro_helper.php --faxid="1416411218621" --stationid="**myfaxnumber**" --status="In Progress" ") in new stack -- Executing [[email protected]:1] Macro("Local/**destination**@from-internal-00000174;2", "hangupcall,") in new stack -- Executing [[email protected]:1] GotoIf("Local/**destination**@from-internal-00000174;2", "1?theend") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [[email protected]:3] ExecIf("Local/**destination**@from-internal-00000174;2", "0?Set(CDR(recordingfile)=)") in new stack -- Executing [[email protected]:4] Hangup("Local/**destination**@from-internal-00000174;2", "") in new stack == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Local/**destination**@from-internal-00000174;2' in macro 'hangupcall' == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'Local/**destination**@from-internal-00000174;2' == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'Local/**destination**@from-internal-00000174;2' in macro 'dialout-trunk' == Spawn extension (restrictedroute-1, **destination**, 6) exited non-zero on 'Local/**destination**@from-internal-00000174;2' -- Executing [[email protected]:3] SendFAX("SIP/SIPBOUND-0000902c", "/var/spool/asterisk/tmp/fax-1416411218855.tif,zf") in new stack -- Channel 'SIP/SIPBOUND-0000902c' sending FAX: -- /var/spool/asterisk/tmp/fax-1416411218855.tif -- Channel 'SIP/SIPBOUND-0000902c' FAX session '5' started -- Channel 'SIP/SIPBOUND-0000902c' FAX session '5' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 2, resolution: '204x196', transfer rate: '14400', remoteSID: '**destination**' -- Auto fallthrough, channel 'SIP/SIPBOUND-0000902c' status is 'UNKNOWN' -- Executing [[email protected]:1] System("SIP/SIPBOUND-0000902c", "/var/lib/asterisk/bin/faxpro_helper.php --faxid="1416411218621" --stationid="**myfaxnumber**" --status="FAX_SUCCESS" --action="sent" ") in new stack
Attempt 2:

-- Executing [[email protected]:1] NoOp("Local/**destination**@from-internal-00000175;1", "Sending fax from 411 to **destination**") in new stack -- Executing [[email protected]:2] System("Local/**destination**@from-internal-00000175;1", "/var/lib/asterisk/bin/faxpro_helper.php --faxid="1416411218621" --stationid="**myfaxnumber**" --status="In Progress" ") in new stack -- Executing [[email protected]:1] Macro("Local/**destination**@from-internal-00000175;2", "hangupcall,") in new stack -- Executing [[email protected]:1] GotoIf("Local/**destination**@from-internal-00000175;2", "1?theend") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [[email protected]:3] ExecIf("Local/**destination**@from-internal-00000175;2", "0?Set(CDR(recordingfile)=)") in new stack -- Executing [[email protected]:4] Hangup("Local/**destination**@from-internal-00000175;2", "") in new stack == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Local/**destination**@from-internal-00000175;2' in macro 'hangupcall' == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'Local/**destination**@from-internal-00000175;2' == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'Local/**destination**@from-internal-00000175;2' in macro 'dialout-trunk' == Spawn extension (restrictedroute-1, **destination**, 6) exited non-zero on 'Local/**destination**@from-internal-00000175;2' -- Executing [[email protected]:3] SendFAX("SIP/SIPBOUND-00009032", "/var/spool/asterisk/tmp/fax-1416411218855.tif,zf") in new stack -- Channel 'SIP/SIPBOUND-00009032' sending FAX: -- /var/spool/asterisk/tmp/fax-1416411218855.tif -- Channel 'SIP/SIPBOUND-00009032' FAX session '6' started -- FAX handle 0: [ 037.737158 ], entering CLOSING state -- Channel 'SIP/SIPBOUND-00009032' FAX session '6' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 2, resolution: '204x196', transfer rate: '14400', remoteSID: '**destination**' -- Auto fallthrough, channel 'SIP/SIPBOUND-00009032' status is 'UNKNOWN' -- Executing [[email protected]:1] System("SIP/SIPBOUND-00009032", "/var/lib/asterisk/bin/faxpro_helper.php --faxid="1416411218621" --stationid="**myfaxnumber**" --status="FAX_SUCCESS" --action="sent" ") in new stack

Versions please…

Sorry Andrew!

Fax Configuration: 12.0.5
Fax Configuration Professional: 12.0.28
FreePBX: 12.0.10

Sorry but this is not happening to me nor my testing group. @GRZMRC

Hmmm…perhaps it’s trunk or device related…I’ll see what I can do on my end, thanks.

I had this issue in past release. You have to upgrade.
I’m on
freepbx 6.12.65-22
fax pro 12.0.29
and all works well

Just upgraded and problem is persisting. It almost feels like a race condition where the success is getting beat by the timeout :slight_smile:

I will restart the server/asterisk later tonight and see if there’s some data stuck somewhere.

Let’s revisit this. Can you show me your fac configuration settings. Like timeouts and such so I can try to replicate.

Thanks Andrew,

At the time, the max transmission rate may have been 14400 instead of 9600, but other than that everything is essentially default and there’s no timeout settings for sending in the GUI (just the incoming detection time on the inbound routes page). I assume they’re hard-coded somewhere in the obfuscated code :confounded:

Fax retries and timeouts are done on a per extension basis. Those are the settings I need to see

Ext Settings

Fax Config

Ah so you’ve got retries at 0 everywhere. hmmm. will investigate

I do now because I had to, changing this value is what results in the problem.

I played with this for a couple of hours fixing other bugs and I still couldn’t replicate this. the only reason a fax would go into retry mode is if the returned status was not “OK”. If you change the retries per extension to 3 instead of use global what happens?

here is an example of a good result in the Asterisk Full log

System("Local/[email protected];1", "/var/lib/asterisk/bin/faxpro_helper.php --faxid="1419044554785" --stationid="unknown" --status="OK" --action="sent" ")

Notice the status=“OK” bit.

I suppose if “/var/lib/asterisk/bin/faxpro_helper.php” can’t be executed that could be another issue however I check those permissions before sending.

That aside I have released a new fax and fax pro to fix a few issues (unrelated to this ticket)

That’s how I had it set originally.

3 retries = 4 faxes received.

I’m getting a “FAX_SUCCESS” status back instead of “OK”; what would cause that? I’m using the free fax for asterisk addon from Digium; would that make a difference?

That would do it. Let me get a fix out for that today

Thanks Andrew. Would you recommend another fax module instead? I spun up a new VM to play around with and can give other options a try.

Reposting the problem line from my OP:

You’re the best!

We support both and they both work. The only difference is that digium fax is only for one line (one license == one line). SpanDSP works on multiple lines and is free and open source. There is no need to register anything. It’s up to you though.

The fix is in faxpro version 12.0.33

Hi Andrew,

Per your PM, I switched to SpanDSP today and low and behold it works brilliantly.

I noticed on the UCP that the status changed from “Success” to “OK” as well.

I would highly recommend adding something for SpanDSP the CentOS/Ubuntu install guides for newcomers to be introduced to this right off the bat :smile: