问题
I'm trying to implement a system that works with faxes. We have a gatewary, phone to T.38 (fax over IP). I need a library that will let me do the other end, T.38 to TIFF image. I'm doing this on a mac, and we work with C, C++, php, java.
A program that will quietly turn T.38 into T.37 (fax over email) would work just as well.
Does anyone know of either of these?
回答1:
Hylafax may work for you, if you're willing to use linux somewhere.
I use asterisk + iaxmodem + hylafax. Hylafax is designed to receive/send faxes. Received faxes are saved as tiffs or pdf's or sent to an arbitrary script of your own making for processing. Hylafax expects to use real modems. Iaxmodem simulates a real modem while really being an IAX2 (voip protocol like sip) connection to asterisk.
If you're really hardcore, you could look at extracting the 'conversion' part out of hylafax and turning it into a library for your own use on the mac. It is open source.
回答2:
A T.38 gateway is really just the modem section to take FAX analog "audio" data on the phone line and turns it a straight binary digital packet stream of lower level T.30 HDLC data. The T.38 standard does specify some level of application level decoding to extend the timers in certain FAX acknolwedgement handshakes....in effect the T.38 gateway buys some time at his end with the FAX machine at the other end of the phone call while stuff makes it through the IP network...especially if there is packet loss etc. However, all of that is going on between the T.38 gateway and the FAX machine....not towards the IP network.
So, if you really want to peer into the IP packet end of the T.38 gateway and actually want to get access to the FAX'ed document images and render that as TIFF, what you really are looking for is T.30 FAX Termination since T.30 specifies the format of the HDLC data and how to encode/decode that content. In effect, you have to implement the FAX machine's logic to capture the documents into TIFF in the same way that a real FAX machine would have captured the images and printed to paper.
ie: What you are really for is a T.30 implementation, not a T.38 implementation. Note that part of the the T.30 standard also references T.4 which describes how the the actual image data is compressed within the context of T.30.
Relative to going from T.38 to T.37, while I suppose that would be theoretically possible, understand that just like T.38, the T.37 standard assumes that one end of such a gateway is the analog domain. That is, the standard of T.37 specifies how to go from analog to an email message in the same way that T.38 goes from analog to real-time digital packet stream. In the context of the standards there is no "double hop" from T.38 to T.37 to get to your FAX images....so I think finding an existing implementation seems unlikely.
In the end, what you need is a T.30 FAX termination implementation since the T.38 gateway you are talking to is already doing the modem part for you. Alternatively, another way of looking at this is that you want a T.37 gateway instead of a T.38 gateway.
回答3:
Asterisk the open source PBX uses the SpanDSP library to implement faxing. It looks like that library has modules to handle T.38 and the other protocols InSciTek Jeff mentioned.
回答4:
OPAL is a library that supports T.38 (Only up to 14400) (It can also use spandsp to deal with G711 audio containing fax tones). Commercial options also exist, mostly from Dialogic and Commetrex.
来源:https://stackoverflow.com/questions/547201/looking-for-a-t-38-library