<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>hello everyone.</div> <div>i am using asterisk 11.16 in my home office and i am using fax to email with it. i am quite happy with the way it works, no problems at all. when a fax arrives in a particular DID then the system sends it with mailutils to my email address as pdf. there is not any email address setup in the system, simply mailutils.</div> <div> </div> <div>i would like to add email to fax functionality to the system. could someone point me to the right direction to see how please?</div></div></body></html>
On Wed, Jun 24, 2015 at 08:15:06AM +0200, tux john wrote:> i would like to add email to fax functionality to the system. could someone > point me to the right direction to see how please?I don't have a general solution, since I haven't needed to send faxes recently. But I did set up my dialplan so that I could test that it works. I used this: ---- ;; For outgoing faxes FAX_NAME = My Company Name FAX_NUMBER = My Phone Number FAX_FILE = /tmp/fax.tiff [services] ... exten => sendfax,1,Verbose(3,Sending fax) same => n,Set(FAXOPT(headerinfo)=${FAX_NAME}) same => n,Set(FAXOPT(localstationid)=${FAX_NUMBER}) same => n,SendFax(${FAX_FILE}) same => n,Verbose(3,Pages: ${FAXOPT(pages)} Status: ${FAXOPT(status)}) same => n,System(rm ${FAX_FILE}) same => n,Hangup() ---- To "dial" the sendfax extension, I created a call file manually that looked like this: Channel: DAHDI/g0/1-800-123-4567 Context: services Extension: sendfax In an automated system, you'd probably want to use the manager API, but you could also generated call files from scripts. Then I placed the fax file in /tmp/fax.tiff and the call file in /var/spool/asterisk/outgoing/ and Asterisk sent off the fax. There are some free fax echo numbers out there that are useful when debugging. If I wanted to drive this automatically from email, I would probably just use procmail and some scripts. Ghostscript produces the right kind of image file if you use "-sDEVICE=tiffg4". You'd have to define some syntax for specifying the outgoing number and cover page info in the email body, and extract the MIME attachment for the document from the email. Hope this helps. -- Eric Cooper e c c @ c m u . e d u
Hi Eric, This is not really easy. Especially the Mail2Tiff Conversion is tricky (lots of different MIME/File formats). When you have the correct tiff file the rest ist easy. Try to narrow it down to an empty Mail Body using (one) PDF attachment. We used a self written Java app to prepare the files. Markus Am 25.06.2015 um 18:09 schrieb Eric Cooper:> On Wed, Jun 24, 2015 at 08:15:06AM +0200, tux john wrote: >> i would like to add email to fax functionality to the system. could someone >> point me to the right direction to see how please? > I don't have a general solution, since I haven't needed to send faxes > recently. But I did set up my dialplan so that I could test that it > works. > > I used this: > ---- > ;; For outgoing faxes > FAX_NAME = My Company Name > FAX_NUMBER = My Phone Number > FAX_FILE = /tmp/fax.tiff > > [services] > ... > exten => sendfax,1,Verbose(3,Sending fax) > same => n,Set(FAXOPT(headerinfo)=${FAX_NAME}) > same => n,Set(FAXOPT(localstationid)=${FAX_NUMBER}) > same => n,SendFax(${FAX_FILE}) > same => n,Verbose(3,Pages: ${FAXOPT(pages)} Status: ${FAXOPT(status)}) > same => n,System(rm ${FAX_FILE}) > same => n,Hangup() > ---- > > To "dial" the sendfax extension, I created a call file manually that > looked like this: > Channel: DAHDI/g0/1-800-123-4567 > Context: services > Extension: sendfax > In an automated system, you'd probably want to use the manager API, > but you could also generated call files from scripts. Then I placed > the fax file in /tmp/fax.tiff and the call file in > /var/spool/asterisk/outgoing/ and Asterisk sent off the fax. There > are some free fax echo numbers out there that are useful when > debugging. > > If I wanted to drive this automatically from email, I would probably > just use procmail and some scripts. Ghostscript produces the right > kind of image file if you use "-sDEVICE=tiffg4". You'd have to define > some syntax for specifying the outgoing number and cover page info in > the email body, and extract the MIME attachment for the document from > the email. > > Hope this helps. > > -- > Eric Cooper e c c @ c m u . e d u >
On Wednesday 24 Jun 2015, tux john wrote:> hello everyone. > i am using asterisk 11.16 in my home office and i am using fax to email > with it. i am quite happy with the way it works, no problems at all. when > a fax arrives in a particular DID then the system sends it with mailutils > to my email address as pdf. there is not any email address setup in the > system, simply mailutils.> i would like to add email to fax functionality to the system. could someone > point me to the right direction to see how please?Beware! This is an exercise fraught with pitfalls for the unwary. Your users will expect to be able to e-mail any proprietary format and have it appear on the remote fax machine exactly as though it would on their own printer; and will blame you when it doesn't work because nothing else can read the files produced by an ancient piece of closed-source software that worked only with one particular obsolete version of Windows. The correct procedure if some pointy-haired type asks you to do this, is to run away as fast as possible. -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
On Thu, Jun 25, 2015 at 06:29:50PM +0100, A J Stiles wrote:> On Wednesday 24 Jun 2015, tux john wrote: > > i am using asterisk 11.16 in my home office and i am using fax to email > > with it. > [...] > Beware! This is an exercise fraught with pitfalls for the unwary. Your users > will expect to be able to e-mail any proprietary format and have it appear on > the remote fax machine exactly as though it would on their own printer; and > will blame you when it doesn't work because nothing else can read the files > produced by an ancient piece of closed-source software that worked only with > one particular obsolete version of Windows.Since the O.P. said he's using it for his home office, I think he'll be able to control user expectations :-) -- Eric Cooper e c c @ c m u . e d u