[asterisk-users] low success rate for ReceiveFax
Roi Stork
roi.stork at gmail.com
Thu Jun 28 02:21:11 CDT 2012
I have set the clock source from MASTER to NORMAL in the sangoma card
settings, and I'm still getting 3RD_T2_TIMEOUT error codes:
-- Channel 'DAHDI/i1/-4' FAX session '3' is complete, result:
'FAILED' (FAX_FAILURE_PROTOCOL_ERROR), error: '3RD_T2_TIMEOUT', pages:
0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
-- Auto fallthrough, channel 'DAHDI/i1/-4' status is 'UNKNOWN'
-- Executing [h at fax-rx:1] AGI("DAHDI/i1/-4",
"receivefax.php,65126150,fax-65126150-1340867263-rx.tif,FAILED,") in
new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/receivefax.php
-- <DAHDI/i1/-4>AGI Script receivefax.php completed, returning 0
-- Executing [h at fax-rx:2] NoOp("DAHDI/i1/-4", "FAXOPT(ecm) : yes")
in new stack
-- Executing [h at fax-rx:3] NoOp("DAHDI/i1/-4", "FAXOPT(filename) :
/var/spool/asterisk/fax/fax-65126150-1340867263-rx.tif") in new stack
-- Executing [h at fax-rx:4] NoOp("DAHDI/i1/-4", "FAXOPT(headerinfo)
: MY FAXBACK RX") in new stack
-- Executing [h at fax-rx:5] NoOp("DAHDI/i1/-4",
"FAXOPT(localstationid) : 1234567890") in new stack
-- Executing [h at fax-rx:6] NoOp("DAHDI/i1/-4", "FAXOPT(maxrate) :
14400") in new stack
-- Executing [h at fax-rx:7] NoOp("DAHDI/i1/-4", "FAXOPT(minrate) :
2400") in new stack
-- Executing [h at fax-rx:8] NoOp("DAHDI/i1/-4", "FAXOPT(pages) : 0")
in new stack
-- Executing [h at fax-rx:9] NoOp("DAHDI/i1/-4", "FAXOPT(rate) :
2400") in new stack
-- Executing [h at fax-rx:10] NoOp("DAHDI/i1/-4",
"FAXOPT(remotestationid) : ") in new stack
-- Executing [h at fax-rx:11] NoOp("DAHDI/i1/-4", "FAXOPT(resolution)
: unknown") in new stack
-- Executing [h at fax-rx:12] NoOp("DAHDI/i1/-4", "FAXOPT(status) :
FAILED") in new stack
-- Executing [h at fax-rx:13] NoOp("DAHDI/i1/-4", "FAXOPT(statusstr)
: FAX_FAILURE_PROTOCOL_ERROR") in new stack
-- Executing [h at fax-rx:14] NoOp("DAHDI/i1/-4", "FAXOPT(error) :
3RD_T2_TIMEOUT") in new stack
Here are the fax settings:
FAX For Asterisk Settings:
ECM: Enabled
Status Events: Off
Minimum Bit Rate: 2400
Maximum Bit Rate: 14400
Modem Modulations Allowed: V17,V27,V29
FAX Technology Modules:
DIGIUM (Digium FAX Driver) Settings:
Maximum T.38 Packet Delay: 800
T.38 Session Packet Capture: On
G.711 Session Audio Capture: On
And here's the Wanpipe Config:
CommPort = PRI
AUTO_PCISLOT = NO
PCISLOT = 4
PCIBUS = 5
FE_MEDIA = E1
FE_LCODE = HDB3
FE_FRAME = CRC4
FE_LINE = 4
TE_CLOCK = NORMAL
TE_REF_CLOCK = 0
TE_SIG_MODE = CCS
TE_HIGHIMPEDANCE = NO
TE_RX_SLEVEL = 430
HW_RJ45_PORT_MAP = DEFAULT
LBO = 120OH
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_SPAN = 1
TDMV_DCHAN = 16
TE_AIS_MAINTENANCE = NO #NO: defualt YES: Start port in AIS
Blue Alarm and keep line down
#wanpipemon -i w1g1 -c Ttx_ais_off to
disable AIS maintenance mode
#wanpipemon -i w1g1 -c Ttx_ais_on to enable AIS maintenance mode
TDMV_HW_DTMF = YES # YES: receive dtmf events from hardware
TDMV_HW_FAX_DETECT = YES # YES: receive fax
1100hz events from hardware
HWEC_OPERATION_MODE = OCT_NORMAL # OCT_NORMAL: echo cancelation
enabled with nlp (default)
# OCT_SPEECH: improves software tone detection by disabling
NLP (echo possible)
# OCT_NO_ECHO:disables echo cancelation but allows VQE/tone
functions.
HWEC_DTMF_REMOVAL = NO # NO: default YES: remove dtmf out of
incoming media (must have hwdtmf enabled)
HWEC_NOISE_REDUCTION = NO # NO: default YES: reduces noise on
the line - could break fax
HWEC_ACUSTIC_ECHO = NO # NO: default YES: enables acustic
echo cancelation
HWEC_NLP_DISABLE = NO # NO: default YES: guarantees
software tone detection (possible echo)
HWEC_TX_AUTO_GAIN = 0 # 0: disable -40-0: default tx audio
level to be maintained (-20 default)
HWEC_RX_AUTO_GAIN = 0 # 0: disable -40-0: default tx audio
level to be maintained (-20 default)
HWEC_TX_GAIN = 0 # 0: disable -24-24: db
values to be applied to tx signal
HWEC_RX_GAIN = 0 # 0: disable -24-24: db
values to be applied to tx signal
[w1g1]
ACTIVE_CH = ALL
TDMV_HWEC = YES
MTU = 8
On Tue, Jun 26, 2012 at 10:22 PM, Steve Underwood <steveu at coppice.org> wrote:
> On 06/26/2012 11:47 AM, Roi Stork wrote:
>>
>> In what way was my question not meaningful? Not enough details?
>
> Enoughj? You didn't give any.
>
>> Here's our current receive fax route:
>> sender fax machine -> telco -> E1 line -> sangoma card -> asterisk
>>
>> We're currently using free fax for asterisk.
>
> This constitutes a meaningful question.
>
>>
>> I have read that fax over voip is not reliable, but is it the same
>> case for faxes going through dahdi channels?
>> It's strange because I previously tested using another asterisk server
>> to send fax using SIP to the receiving server above, and the
>> completion rate is better than using an actual fax machine.
>
> With a direct PSTN connection like that a success rate of 99% should be
> considered very bad. The log below suggests you have hiccups on the audio,
> and the single commonest reason for that in a setup like yours is you are
> not sourcing the clock for your Sangoma card's E1 interface from the PSTN.
>
> Steve
>
>>
>> >From the asterisk console I can see the receiving fax session running,
>> but halfway it stops due to timeout or hangup.
>> Below is a fax session output which was marked as failed:
>>
>>
>> -- Channel 'DAHDI/i1/-4' receiving FAX
>> '/var/spool/asterisk/fax/fax-65126150-1340338724-rx.tif'
>>
>> -- Channel 'DAHDI/i1/-4' FAX session '0' started
>>
>> -- FAX handle 0: [ 000.000051 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
>>
>> -- FAX handle 0: [ 000.000098 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY
>> rt: RRDYNHRY
>>
>> -- FAX handle 0: [ 000.000129 ], P30EVN_RECEIVE_STARTED
>>
>> -- FAX handle 0: [ 000.000148 ], STAT_INFO_CSI
>>
>> -- FAX handle 0: [ 000.000174 ], STAT_INFO_DIS
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 000.079050 ], channel sent 3
>>> frames (60 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 000.093757 ], stack sent 4
>>> frames (80 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 000.153752 ], stack sent 3
>>> frames (60 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 000.459077 ], channel sent 19
>>> frames (380 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 003.154772 ], stack sent 150
>>> frames (3000 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 003.199289 ], channel sent 137
>>> frames (2740 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 003.211770 ], stack sent 3
>>> frames (60 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 003.259286 ], channel sent 3
>>> frames (60 ms) of silence.
>>
>> -- FAX handle 0: [ 005.250881 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP
>> rt: WDSRNT21
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 005.571646 ], stack sent 118
>>> frames (2360 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 005.599474 ], channel sent 117
>>> frames (2340 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 005.799493 ], channel sent 10
>>> frames (200 ms) of silence.
>>
>> -- FAX handle 0: [ 007.213920 ], STAT_INFO_DCS
>>
>> -- FAX handle 0: [ 007.213946 ], STAT_EVT_DCS st: WT_DIS_RSP rt: WDSRNDCS
>>
>> -- FAX handle 0: [ 007.213969 ], STAT_NEG_V29_9600
>>
>> -- FAX handle 0: [ 007.213983 ], STAT_NEG_MMR
>>
>> -- FAX handle 0: [ 007.213995 ], STAT_NEG_A4
>>
>> -- FAX handle 0: [ 007.214007 ], STAT_NEG_RES_204x98
>>
>> -- FAX handle 0: [ 007.214019 ], STAT_NEG_ECM
>>
>> -- FAX handle 0: [ 007.214031 ], STAT_EVT_SW_ECM st: WT_DIS_RSP rt:
>> WDSRNSWE
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 007.279603 ], channel sent 74
>>> frames (1480 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 007.439604 ], channel sent 8
>>> frames (160 ms) of silence.
>>
>> -- FAX handle 0: [ 007.553962 ], STAT_EVT_RX_IMG_STRT st: RCV_ECM_TRN
>> rt: UNEXPECT
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 009.219725 ], channel sent 89
>>> frames (1780 ms) of energy.
>>
>> -- FAX handle 0: [ 009.253979 ], STAT_EVT_RX_TRN_END st: RCV_ECM_TRN
>> rt: RTCFNERT
>>
>> -- FAX handle 0: [ 009.254005 ], STAT_FRM_CFR
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 009.414674 ], stack sent 192
>>> frames (3840 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 009.459747 ], channel sent 12
>>> frames (240 ms) of silence.
>>
>> -- FAX handle 0: [ 010.439088 ], STAT_EVT_TX_V21_DONE st: RCV_ECM_STRT
>> rt: RECMNT21
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 010.772670 ], stack sent 68
>>> frames (1360 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 010.799850 ], channel sent 67
>>> frames (1340 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 011.019872 ], channel sent 11
>>> frames (220 ms) of silence.
>>
>> -- FAX handle 0: [ 011.132976 ], STAT_EVT_RX_IMG_STRT st: RCV_ECM_STRT
>> rt: RECMNSRI
>>
>> -- FAX handle 0: [ 011.133002 ], P30EVN_PHASE_C
>>
>> -- FAX handle 0: [ 011.133018 ], P30EVN_DOC_START
>>
>> -- FAX handle 0: [ 011.133049 ], P30EVN_PAGE_START
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 014.740131 ], channel sent 186
>>> frames (3720 ms) of energy.
>>
>> -- FAX handle 0: [ 014.812946 ], STAT_EVT_RX_IMG_END st: RCV_ECM rt:
>> RECMNERI
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 014.860152 ], channel sent 6
>>> frames (120 ms) of silence.
>>
>> -- FAX handle 0: [ 016.273967 ], STAT_INFO_PPS_EOP
>>
>> -- FAX handle 0: [ 016.273993 ], STAT_EVT_PPS_EOP st: F_END_ECM rt:
>> FEEMNP_P
>>
>> -- FAX handle 0: [ 016.274055 ], P30EVN_PAGE_END
>>
>> -- FAX handle 0: [ 016.274071 ], P30EVN_DOC_END
>>
>> -- FAX handle 0: [ 016.274086 ], STAT_FRM_MCF
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 016.340258 ], channel sent 74
>>> frames (1480 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 016.434711 ], stack sent 283
>>> frames (5660 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 016.480280 ], channel sent 7
>>> frames (140 ms) of silence.
>>
>> -- FAX handle 0: [ 017.459594 ], STAT_EVT_TX_V21_DONE st: F_END_ECM rt:
>> FECMNFCS
>>
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 017.793706 ], stack sent 68
>>> frames (1360 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 017.820355 ], channel sent 67
>>> frames (1340 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 018.020382 ], channel sent 10
>>> frames (200 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 019.400471 ], channel sent 69
>>> frames (1380 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 019.420496 ], channel sent 1
>>> frames (20 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 019.460489 ], channel sent 2
>>> frames (40 ms) of energy.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 019.780498 ], channel sent 16
>>> frames (320 ms) of silence.
>>> Channel 'DAHDI/i1/-4' fax session '0', [ 019.820519 ], channel sent 2
>>> frames (40 ms) of energy.
>>
>> -- Span 1: Channel 0/7 got hangup request, cause 16
>>
>> -- FAX handle 0: [ 019.879779 ], STAT_EVT_TMR_INT_EXP st: F_END_ECM rt:
>> XXXXNTIX
>>
>> -- FAX handle 0: [ 022.382966 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt:
>> WCLSNCLS
>>
>> -- FAX handle 0: [ 022.383063 ], STAT_SES_COMPLETE
>>
>> -- FAX handle 0: [ 022.383083 ], P30EVN_COMPLETE
>>
>> == Spawn extension (fax-rx, receive, 19) exited non-zero on 'DAHDI/i1/-4'
>>
>>
>>
>> On Fri, Jun 22, 2012 at 12:25 PM, Steve Underwood <steveu at coppice.org>
>> wrote:
>>>
>>> On 06/22/2012 11:58 AM, Roi Stork wrote:
>>>>
>>>> Hi,
>>>>
>>>> Im able to send faxes with no errors, but the success rate for the
>>>> receiving side is less than 50%.
>>>>
>>>> Asterisk usually returns records these errors as partial fax and fax
>>>> protocol error.
>>>>
>>>> A lot of the error values returned by FAXOPT are 3RD_T2_TIMEOUT and
>>>> T2_TIMEOUT.
>>>>
>>>> Any suggestions on how to improve the fax receiving rate?
>>>>
>>> "I have a problem. Can you fix it?" is not really a meaningful question.
>>>
>>> Steve
>>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list