[asterisk-users] Fax .pdf from Asterisk

James Sharp james at fivecats.org
Thu May 3 23:37:14 CDT 2012


On 5/3/12 9:16 PM, Bruce B wrote:
> Lee,
>
> Much appreciated for the input.
>
> I am running all VoIP. SIP and IAX2 to our ITSPs. Please elaborate on
> HylaFax and IAXmodems. Is there a guide posted on to get it running, or
> is it part of the repository? Once installed how would one send .pdf as fax?

You can either use the "Free Fax for Asterisk" single channel at a time 
fax system or "app_fax" that uses the SpanDSP library.  I'm working on a 
similar system myself that uses the SpanDSP system because I could never 
get FFFA to talk T.38 right to my provider (Gafachi).

I use spoolfiles to create a call that lands in my dialplan and from 
there, I can pick up the fax results in the dialplan.


Here's my callfile

Channel: SIP/18888771655 at gafachi1a
CallerID: 18005551212
MaxRetries: 0
RetryTime: 60
WaitTime: 30
Context: faxout
Extension: 5
Priority: 1


And my extensions file

[faxout]
exten => 5,1,SendFAX(/tmp/test.tiff,a)
exten => 5,n,Noop(${LOCALSTATIONID});
exten => 5,n,Noop(${LOCALHEADERINFO});
exten => 5,n,Noop(${FAXSTATUS});
exten => 5,n,Noop(${FAXERROR});
exten => 5,n,Noop(${REMOTESTATIONID});
exten => 5,n,Noop(${FAXPAGES});
exten => 5,n,Noop(${FAXBITRATE});
exten => 5,n,Noop(${FAXRESOLUTION});

Note that I use the "a" option in SendFAX.  That makes it change 
behaviors on negotiating things like T.38.  It was needed for my 
provider, but it may not be needed for yours.  You may or may not 
need/even have access to T.38 faxing.



You will have to convert the PDF to a TIFF file before you can send it 
with either Fax subsystem.

gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=letter 
-sOutputFile=/tmp/test.tiff test.pdf



More information about the asterisk-users mailing list