문제

I want to write a script for sending a fax with Asterisk, but many faxes have an error when sending. I use Spandsp for Asterisk and I use gs for converting PDF to TIFF. I think it may be a problem of converting PDF to TIFF. I very try to convert's command for this, such as:

 gs -q -sDEVICE=tiffg3 -dNOPAUSE -dBATCH -sOutputFile=Sample.pdf.tif -f Sample.pdf

/usr/bin/acroread -toPostScript -size a4 <filename>
/usr/bin/gs -q -sDEVICE=tiffg32d -sPAPERSIZE=a4 -r204x196 -sOutputFile=<outputfile> -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dNOPAUSE -dBATCH -f <inputfile.ps>

and I tested anyways into link for converting, but it doesn't work fine, and most of sending fax have issue. Also, I have another problem in answer detection beep in my Asterisk when the trunk with Newrock gateway(analog), this is cause some fax doesn't send correctly!

도움이 되었습니까?

해결책

Check hylafax code. It have working script

I use code like this:

gs -sDEVICE=tiffg3 -sPAPERSIZE=$pagesize -r204x196 -dNOPAUSE -dNOPAGEPROMPT -dBATCH -sOutputFile=dest.tif \
-c save pop -f input.pdf -c quit 

But actualy it doesn't metter. More important how setup your routes/codecs.

Other problem is for sure offtopic here. You have read more books or hire expert.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top