bobbywan
17/03/2011, 16h07
Bonjour,
Je suis actuellement en train de configurer un serveur Asterisk et on m'a demandé de pouvoir utiliser un fax sur un PAP2T (si on m'avait prévenu avant j'aurai pris autre chose pour avoir le T.38 mais bon ^^). La réception de fax marche étonnamment bien, mais le fax ne s'imprime pas, il est stocké dans un dossier sur le serveur, mais j'ai l'impression qu'il n'est pas envoyé au fax.
J'ai utilisé la config par défaut proposée par digium pour FaxForAsterisk (à laquelle je ne comprends d'ailleurs pas grand chose), et je ne vois pas trop si ma config sais d'une manière où d'une autre qu'il faut l'envoyer sur l'extension du Fax
le fax dans mon sip.conf
[localFax]
type = friend
context = local
username = localFax
secret = ******************
host = dynamic
canreinvite = no
disallow = all
allow = alaw
subscribecontent = internal
mailbox = localFax@192.168.3.249
la partie fax de mon extensions.conf
[local]
include => fax-rx
include => fax-tx
exten => fax,1,NoOp(**** FAX DETECTED ****)
exten => fax,n,Goto(fax-rx,receive,1)
;reception
[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(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/faxin/${FAXFILE})
; Hangup! Print FAXOPTs
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)})
Et le fax debug lors de la reception d'un fax
WARNING[6204]: ast_expr2.fl:449 ast_yyerror: If you have questions, please refer to doc/tex/channelvariables.tex.
-- Executing [receive@fax-rx:2] Set("SIP/freephonie-out-00000014", "GLOBAL(FAXCOUNT)=") in new stack
== Setting global variable 'FAXCOUNT' to ''
-- Executing [receive@fax-rx:3] Set("SIP/freephonie-out-00000014", "FAXCOUNT=") in new stack
-- Executing [receive@fax-rx:4] Set("SIP/freephonie-out-00000014", "FAXFILE=fax--rx.tif") in new stack
-- Executing [receive@fax-rx:5] Set("SIP/freephonie-out-00000014", "GLOBAL(LASTFAXCALLERNUM)=0958******") in new stack
== Setting global variable 'LASTFAXCALLERNUM' to '0958******'
-- Executing [receive@fax-rx:6] Set("SIP/freephonie-out-00000014", "GLOBAL(LASTFAXCALLERNAME)=958******") in new stack
== Setting global variable 'LASTFAXCALLERNAME' to '958******'
-- Executing [receive@fax-rx:7] NoOp("SIP/freephonie-out-00000014", "**** SETTING FAXOPT ****") in new stack
-- Executing [receive@fax-rx:8] Set("SIP/freephonie-out-00000014", "FAXOPT(ecm)=yes") in new stack
-- Executing [receive@fax-rx:9] Set("SIP/freephonie-out-00000014", "FAXOPT(headerinfo)=MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:10] Set("SIP/freephonie-out-00000014", "FAXOPT(localstationid)=1234567890") in new stack
-- Executing [receive@fax-rx:11] Set("SIP/freephonie-out-00000014", "FAXOPT(maxrate)=14400") in new stack
-- Executing [receive@fax-rx:12] Set("SIP/freephonie-out-00000014", "FAXOPT(minrate)=2400") in new stack
-- Executing [receive@fax-rx:13] NoOp("SIP/freephonie-out-00000014", "FAXOPT(ecm) : yes") in new stack
-- Executing [receive@fax-rx:14] NoOp("SIP/freephonie-out-00000014", "FAXOPT(headerinfo) : MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:15] NoOp("SIP/freephonie-out-00000014", "FAXOPT(localstationid) : 1234567890") in new stack
-- Executing [receive@fax-rx:16] NoOp("SIP/freephonie-out-00000014", "FAXOPT(maxrate) : 14400") in new stack
-- Executing [receive@fax-rx:17] NoOp("SIP/freephonie-out-00000014", "FAXOPT(minrate) : 2400") in new stack
-- Executing [receive@fax-rx:18] NoOp("SIP/freephonie-out-00000014", "**** RECEIVING FAX : fax--rx.tif ****") in new stack
-- Executing [receive@fax-rx:19] ReceiveFAX("SIP/freephonie-out-00000014", "/home/faxin/fax--rx.tif") in new stack
-- Channel 'SIP/freephonie-out-00000014' receiving FAX '/home/faxin/fax--rx.tif'
-- Channel 'SIP/freephonie-out-00000014' FAX session '1' started
-- FAX handle 0: [ 000.000971 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
-- FAX handle 0: [ 000.001104 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY rt: RRDYNHRY
-- FAX handle 0: [ 000.001207 ], P30EVN_RECEIVE_STARTED
-- FAX handle 0: [ 000.001318 ], STAT_INFO_CSI
-- FAX handle 0: [ 000.001433 ], STAT_INFO_DIS
-- FAX handle 0: [ 005.245616 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- FAX handle 0: [ 007.274429 ], STAT_INFO_TSI
-- FAX handle 0: [ 007.525561 ], STAT_INFO_DCS
-- FAX handle 0: [ 007.525586 ], STAT_EVT_DCS st: WT_DIS_RSP rt: WDSRNDCS
-- FAX handle 0: [ 007.525594 ], STAT_NEG_V29_9600
-- FAX handle 0: [ 007.525598 ], STAT_NEG_MR
-- FAX handle 0: [ 007.525602 ], STAT_NEG_A4
-- FAX handle 0: [ 007.525606 ], STAT_NEG_RES_204x98
-- FAX handle 0: [ 009.434350 ], STAT_EVT_RX_TRN_END st: RCV_TRN rt: RTCFNERT
-- FAX handle 0: [ 009.434365 ], STAT_FRM_CFR
-- FAX handle 0: [ 010.631183 ], STAT_EVT_TX_V21_DONE st: RCV_IMG_STRT rt: RISTNT21
-- FAX handle 0: [ 011.154233 ], STAT_EVT_RX_IMG_STRT st: RCV_IMG_STRT rt: RISTNSRI
-- FAX handle 0: [ 011.154252 ], P30EVN_PHASE_C
-- FAX handle 0: [ 011.154312 ], P30EVN_DOC_START
-- FAX handle 0: [ 011.154319 ], P30EVN_PAGE_START
-- FAX handle 0: [ 038.734423 ], STAT_EVT_RX_IMG_END st: RCV_IMAGE rt: RIMGNERI
-- FAX handle 0: [ 039.831662 ], STAT_FRM_EOP
-- FAX handle 0: [ 039.831679 ], STAT_EVT_EOP st: F_END_NORM rt: FEIMNEOP
-- FAX handle 0: [ 039.831689 ], P30EVN_PAGE_END
-- FAX handle 0: [ 039.831695 ], STAT_FRM_MCF
-- FAX handle 0: [ 039.831710 ], P30EVN_DOC_END
-- FAX handle 0: [ 041.026254 ], STAT_EVT_TX_V21_DONE st: F_END_NORM rt: FECMNFCS
-- FAX handle 0: [ 042.555198 ], entering CLOSING state
-- FAX handle 0: [ 042.555211 ], STAT_FRM_DCN
-- FAX handle 0: [ 042.555221 ], entering CLOSING state
-- FAX handle 0: [ 042.555224 ], STAT_EVT_DCN st: F_END_NORM rt: FEIMNDCN
-- FAX handle 0: [ 045.055998 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt: WCLSNCLS
-- FAX handle 0: [ 045.056050 ], STAT_SES_COMPLETE
-- FAX handle 0: [ 045.056061 ], P30EVN_COMPLETE
-- Channel 'SIP/freephonie-out-00000014' FAX session '1' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x98', transfer rate: '9600', remoteSID: 'FreeFax 0958******'
== Spawn extension (fax-rx, receive, 19) exited non-zero on 'SIP/freephonie-out-00000014
C'est sans doute tout con, mais je touche pas à Asterisk depuis très longtemps, vos lumières m'éclaireraient donc beaucoup :)
Merci de votre aide !
Je suis actuellement en train de configurer un serveur Asterisk et on m'a demandé de pouvoir utiliser un fax sur un PAP2T (si on m'avait prévenu avant j'aurai pris autre chose pour avoir le T.38 mais bon ^^). La réception de fax marche étonnamment bien, mais le fax ne s'imprime pas, il est stocké dans un dossier sur le serveur, mais j'ai l'impression qu'il n'est pas envoyé au fax.
J'ai utilisé la config par défaut proposée par digium pour FaxForAsterisk (à laquelle je ne comprends d'ailleurs pas grand chose), et je ne vois pas trop si ma config sais d'une manière où d'une autre qu'il faut l'envoyer sur l'extension du Fax
le fax dans mon sip.conf
[localFax]
type = friend
context = local
username = localFax
secret = ******************
host = dynamic
canreinvite = no
disallow = all
allow = alaw
subscribecontent = internal
mailbox = localFax@192.168.3.249
la partie fax de mon extensions.conf
[local]
include => fax-rx
include => fax-tx
exten => fax,1,NoOp(**** FAX DETECTED ****)
exten => fax,n,Goto(fax-rx,receive,1)
;reception
[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(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/faxin/${FAXFILE})
; Hangup! Print FAXOPTs
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)})
Et le fax debug lors de la reception d'un fax
WARNING[6204]: ast_expr2.fl:449 ast_yyerror: If you have questions, please refer to doc/tex/channelvariables.tex.
-- Executing [receive@fax-rx:2] Set("SIP/freephonie-out-00000014", "GLOBAL(FAXCOUNT)=") in new stack
== Setting global variable 'FAXCOUNT' to ''
-- Executing [receive@fax-rx:3] Set("SIP/freephonie-out-00000014", "FAXCOUNT=") in new stack
-- Executing [receive@fax-rx:4] Set("SIP/freephonie-out-00000014", "FAXFILE=fax--rx.tif") in new stack
-- Executing [receive@fax-rx:5] Set("SIP/freephonie-out-00000014", "GLOBAL(LASTFAXCALLERNUM)=0958******") in new stack
== Setting global variable 'LASTFAXCALLERNUM' to '0958******'
-- Executing [receive@fax-rx:6] Set("SIP/freephonie-out-00000014", "GLOBAL(LASTFAXCALLERNAME)=958******") in new stack
== Setting global variable 'LASTFAXCALLERNAME' to '958******'
-- Executing [receive@fax-rx:7] NoOp("SIP/freephonie-out-00000014", "**** SETTING FAXOPT ****") in new stack
-- Executing [receive@fax-rx:8] Set("SIP/freephonie-out-00000014", "FAXOPT(ecm)=yes") in new stack
-- Executing [receive@fax-rx:9] Set("SIP/freephonie-out-00000014", "FAXOPT(headerinfo)=MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:10] Set("SIP/freephonie-out-00000014", "FAXOPT(localstationid)=1234567890") in new stack
-- Executing [receive@fax-rx:11] Set("SIP/freephonie-out-00000014", "FAXOPT(maxrate)=14400") in new stack
-- Executing [receive@fax-rx:12] Set("SIP/freephonie-out-00000014", "FAXOPT(minrate)=2400") in new stack
-- Executing [receive@fax-rx:13] NoOp("SIP/freephonie-out-00000014", "FAXOPT(ecm) : yes") in new stack
-- Executing [receive@fax-rx:14] NoOp("SIP/freephonie-out-00000014", "FAXOPT(headerinfo) : MY FAXBACK RX") in new stack
-- Executing [receive@fax-rx:15] NoOp("SIP/freephonie-out-00000014", "FAXOPT(localstationid) : 1234567890") in new stack
-- Executing [receive@fax-rx:16] NoOp("SIP/freephonie-out-00000014", "FAXOPT(maxrate) : 14400") in new stack
-- Executing [receive@fax-rx:17] NoOp("SIP/freephonie-out-00000014", "FAXOPT(minrate) : 2400") in new stack
-- Executing [receive@fax-rx:18] NoOp("SIP/freephonie-out-00000014", "**** RECEIVING FAX : fax--rx.tif ****") in new stack
-- Executing [receive@fax-rx:19] ReceiveFAX("SIP/freephonie-out-00000014", "/home/faxin/fax--rx.tif") in new stack
-- Channel 'SIP/freephonie-out-00000014' receiving FAX '/home/faxin/fax--rx.tif'
-- Channel 'SIP/freephonie-out-00000014' FAX session '1' started
-- FAX handle 0: [ 000.000971 ], STAT_EVT_STRT_RX st: IDLE rt: IDLENSRX
-- FAX handle 0: [ 000.001104 ], STAT_EVT_RX_HW_RDY st: WT_RX_HW_RDY rt: RRDYNHRY
-- FAX handle 0: [ 000.001207 ], P30EVN_RECEIVE_STARTED
-- FAX handle 0: [ 000.001318 ], STAT_INFO_CSI
-- FAX handle 0: [ 000.001433 ], STAT_INFO_DIS
-- FAX handle 0: [ 005.245616 ], STAT_EVT_TX_V21_DONE st: WT_DIS_RSP rt: WDSRNT21
-- FAX handle 0: [ 007.274429 ], STAT_INFO_TSI
-- FAX handle 0: [ 007.525561 ], STAT_INFO_DCS
-- FAX handle 0: [ 007.525586 ], STAT_EVT_DCS st: WT_DIS_RSP rt: WDSRNDCS
-- FAX handle 0: [ 007.525594 ], STAT_NEG_V29_9600
-- FAX handle 0: [ 007.525598 ], STAT_NEG_MR
-- FAX handle 0: [ 007.525602 ], STAT_NEG_A4
-- FAX handle 0: [ 007.525606 ], STAT_NEG_RES_204x98
-- FAX handle 0: [ 009.434350 ], STAT_EVT_RX_TRN_END st: RCV_TRN rt: RTCFNERT
-- FAX handle 0: [ 009.434365 ], STAT_FRM_CFR
-- FAX handle 0: [ 010.631183 ], STAT_EVT_TX_V21_DONE st: RCV_IMG_STRT rt: RISTNT21
-- FAX handle 0: [ 011.154233 ], STAT_EVT_RX_IMG_STRT st: RCV_IMG_STRT rt: RISTNSRI
-- FAX handle 0: [ 011.154252 ], P30EVN_PHASE_C
-- FAX handle 0: [ 011.154312 ], P30EVN_DOC_START
-- FAX handle 0: [ 011.154319 ], P30EVN_PAGE_START
-- FAX handle 0: [ 038.734423 ], STAT_EVT_RX_IMG_END st: RCV_IMAGE rt: RIMGNERI
-- FAX handle 0: [ 039.831662 ], STAT_FRM_EOP
-- FAX handle 0: [ 039.831679 ], STAT_EVT_EOP st: F_END_NORM rt: FEIMNEOP
-- FAX handle 0: [ 039.831689 ], P30EVN_PAGE_END
-- FAX handle 0: [ 039.831695 ], STAT_FRM_MCF
-- FAX handle 0: [ 039.831710 ], P30EVN_DOC_END
-- FAX handle 0: [ 041.026254 ], STAT_EVT_TX_V21_DONE st: F_END_NORM rt: FECMNFCS
-- FAX handle 0: [ 042.555198 ], entering CLOSING state
-- FAX handle 0: [ 042.555211 ], STAT_FRM_DCN
-- FAX handle 0: [ 042.555221 ], entering CLOSING state
-- FAX handle 0: [ 042.555224 ], STAT_EVT_DCN st: F_END_NORM rt: FEIMNDCN
-- FAX handle 0: [ 045.055998 ], STAT_EVT_HW_CLOSE st: WT_HW_CLS rt: WCLSNCLS
-- FAX handle 0: [ 045.056050 ], STAT_SES_COMPLETE
-- FAX handle 0: [ 045.056061 ], P30EVN_COMPLETE
-- Channel 'SIP/freephonie-out-00000014' FAX session '1' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x98', transfer rate: '9600', remoteSID: 'FreeFax 0958******'
== Spawn extension (fax-rx, receive, 19) exited non-zero on 'SIP/freephonie-out-00000014
C'est sans doute tout con, mais je touche pas à Asterisk depuis très longtemps, vos lumières m'éclaireraient donc beaucoup :)
Merci de votre aide !