tags:

views:

583

answers:

3

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?

+4  A: 

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.

Tall Jeff
Yes, we're planning on using Hylafax to deal with the T.30. The problem is getting the T.38 into T.30 for Hylafax to read...
Brian Postow
+1  A: 

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.

Jay Hofacker
We're not using PBX, so that doesn't really solve it...
Brian Postow
A: 

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.

Nathan
Hylafax is what we plan to use for the T.30 part. We're on macs here so we hope at least that it's close enough to linux to work fine... The problem is turning the T.38 into the straight T.30 for Hylafax...
Brian Postow
oh, and we're not using a PBX, so asterisk ard iaxmodem don't help us...
Brian Postow
Understood about asterisk and iaxmodem, I just wanted to be clear about the setup that I was using hylafax with.
Nathan
Yeah, I think that T38modem, a sourceforge project that says it works with hylafax might be the way to go, but I havent gotten it to compile on my mac yet...
Brian Postow