[Asterisk-Users] Receive fax then send onwards
Bradley Schatz
blschatz at gmail.com
Sat Aug 13 02:05:07 MST 2005
Hi,
I have managed to successfully receive faxes from a fax machine
attached to a Linksys PAP2, and send those faxes off via email using
rxfax (spandsp). From within the same process, I would now like to
automatically send the tiff file onwards as a fax using txfax out via
a zaptel interface. I have pasted my first cut at this below.
The problem here is that the SIP connection context on which I
received the fax seems to be where txfax wants to send the fax. I
imagine that I am missing something pretty fundamental in my
understanding of asterisk.
How do I create a new channel with the zaptel interface such that the
send will work?
Thanks,
bradley
[fax]
exten => _XXXXXXXX,1,Answer
exten => _XXXXXXXX,2,NoOp(${EXTEN})
exten => _XXXXXXXX,3,SetVar(DESTINATION=${EXTEN})
exten => _XXXXXXXX,4,SetVar(FAXFILE=/var/spool/asterisk-fax/${UNIQUEID}.tif)
exten => _XXXXXXXX,5,rxfax(${FAXFILE})
exten => h,1,system(/var/lib/asterisk/scripts/mailfax ${FAXFILE}
blschatz at gmail.com ${DESTINATION} )
exten => h,2,Goto(fax-send,${DESTINATION},1)
[fax-send]
;exten => _XXXXXXXX,1,Dial(${TRUNK}/${EXTEN},30)
exten => _XXXXXXXX,2,NoOp(${EXTEN})
exten => _XXXXXXXX,1,txfax(${FAXFILE}|caller|debug)
exten => _XXXXXXXX,2,Hangup()
More information about the asterisk-users
mailing list