I downloaded and installed the Free Fax For Asterisk.
My system has this configuration:
FAX <–> ATA SIP <–> Asterisk 1.6.1.0
I would receive a fax from a Fax machine but i have every time this problem.
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using UDPTL TOS bits 184
== Using UDPTL CoS mark 5
-- Executing [2200@from-internal:1] NoOp("SIP/1101-083a0378", "**** FAX DETECTED ****") in new stack
-- Executing [2200@from-internal:2] Goto("SIP/1101-083a0378", "fax-rx,receive,1") in new stack
-- Goto (fax-rx,receive,1)
-- Executing [receive@fax-rx:1] NoOp("SIP/1101-083a0378", "**** FAX RECEIVE ****") in new stack
-- Executing [receive@fax-rx:2] Set("SIP/1101-083a0378", "GLOBAL(FAXCOUNT)=2") in new stack
== Setting global variable 'FAXCOUNT' to '2'
-- Executing [receive@fax-rx:3] Set("SIP/1101-083a0378", "FAXCOUNT=2") in new stack
-- Executing [receive@fax-rx:4] Set("SIP/1101-083a0378", "FAXFILE=fax-2-rx.tif") in new stack
-- Executing [receive@fax-rx:5] Set("SIP/1101-083a0378", "GLOBAL(LASTFAXCALLERNUM)=1101") in new stack
== Setting global variable 'LASTFAXCALLERNUM' to '1101'
-- Executing [receive@fax-rx:6] Set("SIP/1101-083a0378", "GLOBAL(LASTFAXCALLERNAME)=device") in new stack
== Setting global variable 'LASTFAXCALLERNAME' to 'device'
-- Executing [receive@fax-rx:7] NoOp("SIP/1101-083a0378", "**** SETTING FAXOPT ****") in new stack
-- Executing [receive@fax-rx:8] Set("SIP/1101-083a0378", "FAXOPT(filename)=fax-2-rx.tif") in new stack
-- Executing [receive@fax-rx:9] Set("SIP/1101-083a0378", "FAXOPT(ecm)=yes") in new stack
-- Executing [receive@fax-rx:10] Set("SIP/1101-083a0378", "FAXOPT(headerinfo)=MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:11] Set("SIP/1101-083a0378", "FAXOPT(localstationid)=1234567890") in new stack
-- Executing [receive@fax-rx:12] Set("SIP/1101-083a0378", "FAXOPT(maxrate)=14400") in new stack
-- Executing [receive@fax-rx:13] Set("SIP/1101-083a0378", "FAXOPT(minrate)=2400") in new stack
-- Executing [receive@fax-rx:14] NoOp("SIP/1101-083a0378", "FAXOPT(ecm) : yes") in new stack
-- Executing [receive@fax-rx:15] NoOp("SIP/1101-083a0378", "FAXOPT(headerinfo) : MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:16] NoOp("SIP/1101-083a0378", "FAXOPT(localstationid) : 1234567890") in new stack
-- Executing [receive@fax-rx:17] NoOp("SIP/1101-083a0378", "FAXOPT(maxrate) : 14400") in new stack
-- Executing [receive@fax-rx:18] NoOp("SIP/1101-083a0378", "FAXOPT(minrate) : 2400") in new stack
-- Executing [receive@fax-rx:19] NoOp("SIP/1101-083a0378", "**** RECEIVING FAX : fax-2-rx.tif ****") in new stack
-- Executing [receive@fax-rx:20] ReceiveFAX("SIP/1101-083a0378", "/home/tvox/fax_files/fax-2-rx.tif,d") in new stack
-- Channel 'SIP/1101-083a0378' receiving fax '/home/tvox/fax_files/fax-2-rx.tif'
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.003692 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.004333 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY rt: RRDYNHRY
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.004717 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.005084 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '1' started
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.005829 ], >>>>>> (to stack) completed sending ' 0' frames ( 0 ms) of 'energy ', now sending 'energy '.
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.006247 ], <<<<<< (to chan) completed sending ' 0' frames ( 0 ms) of 'energy ', now sending 'energy '.
-- Channel 'SIP/1101-083a0378' fax session '1', [ 000.145118 ], STAT_EVT_TMR_INT_EXP st: WT_DIS_RSP rt: XXXXNTIX
-- Channel 'SIP/1101-083a0378' switched to T.38 fax session '2'.
-- Channel 'SIP/1101-083a0378' fax session '2', [ 000.004172 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 000.004833 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY rt: RRDYNHRY
-- Channel 'SIP/1101-083a0378' fax session '2', [ 000.005194 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 000.005605 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2' started
-- Channel 'SIP/1101-083a0378' fax session '2', [ 005.248645 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '1', [ 006.643320 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt: WCLSNCLS
-- Channel 'SIP/1101-083a0378' fax session '1', [ 006.643539 ], STAT_SES_COMPLETE
-- Channel 'SIP/1101-083a0378' fax session '1' is complete, result: 'FAILED' (FAX_FAILURE_TRAINING), error: 'CANCELED', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
-- Channel 'SIP/1101-083a0378' fax session '2', [ 008.504653 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 008.504732 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 008.504756 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 008.504842 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 010.668104 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 014.004383 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 014.004452 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 014.004477 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 014.004556 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 016.168996 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 019.504334 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 019.504410 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 019.504434 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 019.504523 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 021.667818 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 025.005133 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 025.005198 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 025.005222 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 025.005302 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 027.168551 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 030.504533 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 030.504989 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 030.505269 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 030.505655 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 032.668198 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 036.004976 ], STAT_EVT_T4_EXP st: WT_DIS_RSP rt: XXXXNT4X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 036.005619 ], STAT_EVT_FSC_ERR st: WT_DIS_RSP rt: RXXXNFRX
-- Channel 'SIP/1101-083a0378' fax session '2', [ 036.005941 ], STAT_INFO_CSI
-- Channel 'SIP/1101-083a0378' fax session '2', [ 036.006545 ], STAT_INFO_DIS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 038.168434 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 040.004122 ], STAT_EVT_T1_EXP st: WT_DIS_RSP rt: WDSRNT1X
-- Channel 'SIP/1101-083a0378' fax session '2', [ 040.004554 ], STAT_FRM_DCN
-- Channel 'SIP/1101-083a0378' fax session '2', [ 041.197306 ], STAT_EVT_TX_V21_DONE st: SEND_DCN rt: XDCNNT21
-- Channel 'SIP/1101-083a0378' fax session '2', [ 043.697212 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt: WCLSNCLS
-- Channel 'SIP/1101-083a0378' fax session '2', [ 043.697828 ], STAT_SES_COMPLETE
-- Channel 'SIP/1101-083a0378' fax session '2' is complete, result: 'FAILED' (FAX_NO_FAX), error: 'T1_TIMEOUT', pages: 0, resolution: 'unknown', transfer rate: '2400', remoteSID: ''
-- Auto fallthrough, channel 'SIP/1101-083a0378' status is 'UNKNOWN'
-- Executing [h@fax-rx:1] NoOp("SIP/1101-083a0378", "FAXOPT(ecm) : no") in new stack
-- Executing [h@fax-rx:2] NoOp("SIP/1101-083a0378", "FAXOPT(filename) : /home/tvox/fax_files/fax-2-rx.tif") in new stack
-- Executing [h@fax-rx:3] NoOp("SIP/1101-083a0378", "FAXOPT(headerinfo) : MY FAXBACK RX") in new stack
-- Executing [h@fax-rx:4] NoOp("SIP/1101-083a0378", "FAXOPT(localstationid) : 1234567890") in new stack
-- Executing [h@fax-rx:5] NoOp("SIP/1101-083a0378", "FAXOPT(maxrate) : 14400") in new stack
-- Executing [h@fax-rx:6] NoOp("SIP/1101-083a0378", "FAXOPT(minrate) : 2400") in new stack
-- Executing [h@fax-rx:7] NoOp("SIP/1101-083a0378", "FAXOPT(pages) : 0") in new stack
-- Executing [h@fax-rx:8] NoOp("SIP/1101-083a0378", "FAXOPT(rate) : 2400") in new stack
-- Executing [h@fax-rx:9] NoOp("SIP/1101-083a0378", "FAXOPT(remotestationid) : ") in new stack
-- Executing [h@fax-rx:10] NoOp("SIP/1101-083a0378", "FAXOPT(resolution) : unknown") in new stack
-- Executing [h@fax-rx:11] NoOp("SIP/1101-083a0378", "FAXOPT(status) : FAILED") in new stack
-- Executing [h@fax-rx:12] NoOp("SIP/1101-083a0378", "FAXOPT(statusstr) : FAX_NO_FAX") in new stack
-- Executing [h@fax-rx:13] NoOp("SIP/1101-083a0378", "FAXOPT(error) : T1_TIMEOUT") in new stack
Asterisk configuration:
##################################Ã
sip.conf
[general]
vmexten=*97
bindport=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
limitonpeers=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
t38pt_udptl=yes
; fax machine
[1101]
type=friend
secret=1101
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
nat=yes
mailbox=1101@device
host=dynamic
dtmfmode=inband
dial=SIP/1101
context=from-internal
canreinvite=no
call-limit=50
disallow=all
allow=alaw
##################################
extensions.conf -- from manual
[from-internal]
exten => 2200,1,NoOp(**** FAX DETECTED ****)
exten => 2200,n,Goto(fax-rx,receive,1)
[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=fax-${FAXCOUNT}-rx.tif)
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(filename)=${FAXFILE})
exten => receive,n,Set(FAXOPT(ecm)=yes)
exten => receive,n,Set(FAXOPT(headerinfo)=MY FAXBACK RX)
exten => receive,n,Set(FAXOPT(localstationid)=1234567890)
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(/home/nmazzon/fax_files/${FAXFILE},d)
exten => h,1,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)})
exten => h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)})
exten => h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)})
exten => h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)})
exten => h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)})
exten => h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)})
exten => h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)})
exten => h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})
My ATA is a Patton FXS 4112 with T.38 support.
I tried app_fax with spandsp but there was the same problem…
Any suggestions?