Hi All. How to receive multiple pages with rxfax ? Here is what I have: exten => 10,1,Setvar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) exten => 10,2,Setvar(EMAILADDR=my@email.net) exten => 10,3,rxfax(${FAXFILE}) exten => 10,4,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} "${CALLERIDNUM} ${CALLERID}") mailfax is a program that converts from tiff into jpeg and send a fax to my email. When multiple pages were sent I received only the last one. On the asterisk console I could see that second page is using the same file name as the first one ( and this is a problem I think). Does anyone have a success with that ? -- Best regards Vlad
On Wed, 2004-10-13 at 17:00, Vladyslav wrote:> Hi All. > How to receive multiple pages with rxfax ? > > Here is what I have: > exten => 10,1,Setvar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) > exten => 10,2,Setvar(EMAILADDR=my@email.net) > exten => 10,3,rxfax(${FAXFILE}) > exten => 10,4,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} > "${CALLERIDNUM} ${CALLERID}") > > mailfax is a program that converts from tiff into jpeg and send a fax to > my email.Nope, this is your problem, you are converting from a image file format which supports the concept of multiple pages to a image format which doesn't. Your 'mailfax' program is throwing away all the images in the pdf file except the last one. You should either not convert (IMHO, this is not the best solution, as it is difficult to get a decent TIFF viewer) or convert to another format which does support multiple pages in a single file (think pdf). Regards, Adam
Vlad, That's because jpeg does not support multiple pages. Use pdf instead: #!/bin/sh FAXFILE=$1 RECIPIENT=$2 FAXSENDER=$3 /usr/local/bin/tiff2pdf $FAXFILE | mime-construct --to $RECIPIENT --subject "Fax from $FAXSENDER" --attachment fax.pdf --type application/pdf --header "From: asterisk@yourdomain" --file - If your tiff distribution does not have tiff2pdf, you could combine tiff2ps and ps2pdf (install ghostscript). Joris. On Oct 13, 2004, at 9:00 AM, Vladyslav wrote:> Hi All. > How to receive multiple pages with rxfax ? > > Here is what I have: > exten => 10,1,Setvar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) > exten => 10,2,Setvar(EMAILADDR=my@email.net) > exten => 10,3,rxfax(${FAXFILE}) > exten => 10,4,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} > "${CALLERIDNUM} ${CALLERID}") > > mailfax is a program that converts from tiff into jpeg and send a fax > to > my email. > > When multiple pages were sent I received only the last one. > On the asterisk console I could see that second page is using the same > file name as the first one ( and this is a problem I think). > > Does anyone have a success with that ? > -- > Best regards > Vlad > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Vladyslav wrote:>Hi All. >How to receive multiple pages with rxfax ? > >Here is what I have: >exten => 10,1,Setvar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif) >exten => 10,2,Setvar(EMAILADDR=my@email.net) >exten => 10,3,rxfax(${FAXFILE}) >exten => 10,4,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} >"${CALLERIDNUM} ${CALLERID}") > >mailfax is a program that converts from tiff into jpeg and send a fax to >my email. > >When multiple pages were sent I received only the last one. >On the asterisk console I could see that second page is using the same >file name as the first one ( and this is a problem I think). > >Does anyone have a success with that ? > >You can't properly convert a TIFF file to a JPEG file. JPEG files contain only one image. TIFF files contain entire documents. If you try to convert a multi-page TIFF file to a JPEG file the result will depend on the conversion tool. Most tools are too stupid to do anything sensible with multi-page TIFFs. You might get the first page, or the last, or even some random junk. Actually most image handling tools really suck, and they suck worst when handling TIFF. Regards, Steve
> You should either not convert (IMHO, this > is not the best solution, as it is difficult to get a decent TIFF > viewer) or convert to another format which does support multiple pages > in a single file (think pdf).http://www.hylafax.org/links.html#viewers A tiff viewer is like standard on any SANE operating system. XP and OS X have no issues with viewing tiff files. bkw