Fax for Asterisk Help Needed. Urgent! I will Paypal ya if needed

I am trying to receive faxes from our PRI via a Sangoma A101 Pri card using Fax for Asterisk.

Faxes work Fax Machine => ATA => Asterisk => ATA => Fax Machine
Faxes work Fax Machine => ATA => Asterisk => PRI Sangoma PSTN
Incoming Faxes fail after 1/2 page when they come from PSTN(Sangoma PRI Card) => Asterisk(Local)

The also fail the same PSTN => Asterisk => ATA => Fax Machine

Here is a transcript of one of the failed sessions.

[CODE]

– Accepting call from ‘XXXXXXXXXX’ to ‘XXXXXXX’ on channel 0/1, span 1
– Executing [[email protected]:1] Set(“DAHDI/1-1”, “__FROM_DID=8230553”) in new stack
– Executing [[email protected]:2] Gosub(“DAHDI/1-1”, “app-blacklist-check,s,1”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/1-1”, “0?blacklisted”) in new stack
– Executing [[email protected]:2] Set(“DAHDI/1-1”, “CALLED_BLACKLIST=1”) in new stack
– Executing [[email protected]:3] Return(“DAHDI/1-1”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“DAHDI/1-1”, “1 ?Set(CALLERID(name)=XXXXXXXXXX)”) in new stack
– Executing [[email protected]:4] Wait(“DAHDI/1-1”, “5”) in new stack
– Executing [[email protected]:5] Set(“DAHDI/1-1”, “__CALLINGPRES_SV=allowed”) in new stack
– Executing [[email protected]:6] Set(“DAHDI/1-1”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [[email protected]:7] Set(“DAHDI/1-1”, “FAX_DEST=ext-fax^2028^1”) in new stack
– Executing [[email protected]:8] Answer(“DAHDI/1-1”, “”) in new stack
– Executing [[email protected]:9] Wait(“DAHDI/1-1”, “4”) in new stack
– Redirecting DAHDI/1-1 to fax extension
== Spawn extension (from-pstn, fax, 1) exited non-zero on ‘DAHDI/1-1’
– Executing [[email protected]:1] Goto(“DAHDI/1-1”, “ext-fax,2028,1”) in new stack
– Goto (ext-fax,2028,1)
– Executing [[email protected]:1] NoOp(“DAHDI/1-1”, "Receiving Fax for: Extra (2028), From: "RAINEY ELEC " “) in new stack
– Executing [[email protected]:2] Set(“DAHDI/1-1”, "[email protected]”) in new stack
– Executing [[email protected]:3] Goto(“DAHDI/1-1”, “s,receivefax”) in new stack
– Goto (ext-fax,s,3)
– Executing [[email protected]:3] StopPlayTones(“DAHDI/1-1”, “”) in new stack
– Executing [[email protected]:4] ReceiveFAX(“DAHDI/1-1”, “/var/spool/asterisk/fax/1270763704.45.tif”) in new stack
– Channel ‘DAHDI/1-1’ receiving FAX ‘/var/spool/asterisk/fax/1270763704.45.tif’
– Channel ‘DAHDI/1-1’ FAX session ‘5’ started
– FAX handle 0: [ 000.000232 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
– FAX handle 0: [ 000.000408 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY rt: RRDYNHRY
– FAX handle 0: [ 000.000477 ], STAT_INFO_CSI
– FAX handle 0: [ 000.000625 ], STAT_INFO_DIS
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 000.079220 ], channel sent 4 frames (80 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 000.079512 ], stack sent 7 frames (140 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 000.118766 ], stack sent 2 frames (40 ms) of silence.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 003.138769 ], stack sent 151 frames (3020 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 003.178793 ], stack sent 2 frames (40 ms) of silence.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 003.279207 ], channel sent 160 frames (3200 ms) of silence.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 003.318740 ], channel sent 2 frames (40 ms) of energy.
– FAX handle 0: [ 005.196508 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 005.519318 ], stack sent 117 frames (2340 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 005.718736 ], channel sent 120 frames (2400 ms) of silence.
– FAX handle 0: [ 007.496015 ], STAT_INFO_TSI
– FAX handle 0: [ 007.916514 ], STAT_INFO_DCS
– FAX handle 0: [ 007.916603 ], STAT_EVT_DCS st: WT_DIS_RSP rt: WDSRNDCS
– FAX handle 0: [ 007.916664 ], STAT_NEG_V17_14400
– FAX handle 0: [ 007.916714 ], STAT_NEG_MMR
– FAX handle 0: [ 007.916760 ], STAT_NEG_A4
– FAX handle 0: [ 007.916807 ], STAT_NEG_RES_200x200
– FAX handle 0: [ 007.916861 ], STAT_NEG_ECM
– FAX handle 0: [ 007.916915 ], STAT_EVT_SW_ECM st: WT_DIS_RSP rt: WDSRNSWE
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 007.958710 ], channel sent 112 frames (2240 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 008.038738 ], channel sent 4 frames (80 ms) of silence.
– FAX handle 0: [ 008.236518 ], STAT_EVT_RX_IMG_STRT st: RCV_ECM_TRN rt: UNEXPECT
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 011.158717 ], channel sent 156 frames (3120 ms) of energy.
– FAX handle 0: [ 011.156204 ], STAT_EVT_RX_TRN_END st: RCV_ECM_TRN rt: RTCFNERT
– FAX handle 0: [ 011.156266 ], STAT_FRM_CFR
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 011.318773 ], stack sent 290 frames (5800 ms) of silence.
– FAX handle 0: [ 012.336046 ], STAT_EVT_TX_V21_DONE st: RCV_ECM_STRT rt: RECMNT21
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 012.658765 ], stack sent 67 frames (1340 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 013.318739 ], channel sent 108 frames (2160 ms) of silence.
– FAX handle 0: [ 013.516022 ], STAT_EVT_RX_IMG_STRT st: RCV_ECM_STRT rt: RECMNSRI
– FAX handle 0: [ 015.196021 ], STAT_EVT_RX_IMG_STRT st: RCV_ECM rt: UNEXPECT
– FAX handle 0: [ 015.196112 ], STAT_EVT_RX_IMG_END st: RCV_ECM rt: RECMNERI
– FAX handle 0: [ 015.196180 ], STAT_EVT_RX_IMG_END st: F_END_ECM rt: UNEXPECT
– FAX handle 0: [ 021.936014 ], STAT_EVT_T2_EXP st: F_END_ECM rt: XXXXNT2X
– FAX handle 0: [ 021.936090 ], STAT_EVT_GO_TO_B st: F_END_ECM rt: XXXXNGOB
– FAX handle 0: [ 023.976015 ], STAT_INFO_PPS_MPS
– FAX handle 0: [ 023.976098 ], STAT_EVT_PPS_MPS st: WT_HW_CLS rt: UNEXPECT
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 024.018711 ], channel sent 535 frames (10700 ms) of energy.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 027.058737 ], channel sent 152 frames (3040 ms) of silence.
> Channel ‘DAHDI/1-1’ fax session ‘5’, [ 028.438716 ], channel sent 69 frames (1380 ms) of energy.
– FAX handle 0: [ 028.442480 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt: WCLSNCLS
– FAX handle 0: [ 028.442793 ], STAT_SES_COMPLETE
– Channel ‘DAHDI/1-1’ FAX session ‘5’ is complete, result: ‘FAILED’ (FAX_FAILURE_PROTOCOL_ERROR), error: ‘T2_TIMEOUT’, pages: 0, resolution: ‘200x200’, transfer rate: ‘14400’, remoteSID: ‘XXX-XXX-XXXX’
– Executing [[email protected]:5] ExecIf(“DAHDI/1-1”, “0?Set(FAXSTATUS=FAILED LICENSE EXCEEDED)”) in new stack
– Executing [[email protected]:6] ExecIf(“DAHDI/1-1”, “1?Set(FAXSTATUS=“FAILED FAXOPT: error: T2_TIMEOUT status: FAILED statusstr: FAX_FAILURE_PROTOCOL_ERROR”)”) in new stack
– Executing [[email protected]:7] Hangup(“DAHDI/1-1”, “”) in new stack
== Spawn extension (ext-fax, s, 7) exited non-zero on ‘DAHDI/1-1’
– Executing [[email protected]:1] GotoIf(“DAHDI/1-1”, “1?failed”) in new stack
– Goto (ext-fax,h,103)
– Executing [[email protected]:103] NoOp(“DAHDI/1-1”, "FAX FAILED FAXOPT: error: T2_TIMEOUT status: FAILED statusstr: FAX_FAILURE_PROTOCOL_ERROR for: [email protected] , From: "RAINEY ELEC " ") in new stack
– Executing [[email protected]:104] Macro(“DAHDI/1-1”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“DAHDI/1-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“DAHDI/1-1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“DAHDI/1-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“DAHDI/1-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘DAHDI/1-1’ in macro ‘hangupcall’
== Spawn extension (ext-fax, h, 104) exited non-zero on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’
> doing dnsmgr_lookup for ‘trunk1.freepbx.com
[/CODE]

Any help would be appreciated and rewarded.

Thadd Brooks

  1. Disable hardware echo cancellation.
  2. increase rx/tx gain in chan_dahdi.conf
  3. Limit speed to min 2400 max 9600
  4. ensure ECM mode was on.

Any other ideas?

I managed to resolve it by upgrading to Version 1.2 of Fax for Asterisk.

Hope this helps.

Regards,
Dave.