[Asterisk-Users] Re: Re: Fax questions

Jesse Guardiani jesse at wingnet.net
Tue Apr 26 11:05:16 MST 2005


On Mon, 18 Apr 2005 22:24:06 +0800, Ronald Wiplinger wrote:

> Jesse Guardiani wrote:
> 
> Thank you for you time to help setting up fax.
> I still have some questions.

Sorry for the delay in responding. I don't scan this list
every day. I merely check in from time to time. If you'd
like a quick response next time, please CC my actual address
at jesse at wingnet.net. See below for comments:


>>[macro-faxreceive]
>>exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
>>exten => s,2,DBGet(EMAILADDR=extensionemail/${MACRO_EXTEN})
>>exten => s,3,rxfax(${FAXFILE})
>>exten => s,103,SetVar(EMAILADDR=jesse at wingnet.net)
>>exten => s,104,Goto(3)
>>
>>[fax]
>>exten => 2201,1,Macro(faxreceive)
>>exten => 2202,1,Macro(faxreceive)
>>exten => 2203,1,Macro(faxreceive)
>>
>>exten => h,1,system(/usr/local/sbin/mailfax ${FAXFILE} ${EMAILADDR} "${CALLERIDNUM} ${CALLERIDNAME}")
>>
>>
>>  
>>
> has the sender dial the extensions 2201 ~ 2203 ?

Whoops! Looks like I forgot to include this:

; Fax tone detected
exten => fax,1,Goto(fax,2201,1)


I use the above from inside an IVR, that's why I've
modularized it into a fax context with a high numbered
extension.


> You said it would automatically go to [fax] if in zapata.conf is set
> faxdetect=both
> 
> If so, than we could use NO number, but "s" as extension, would that be 
> right?
> 
> 
>>NOTE: asterisk automatically jumps to the [fax] context if you are using
>>faxdetect in your zapata.conf
>>
>>NOTE2: mailfax is a custom script I wrote. This is what it looks like:
>>
>>---------------------- START mailfax script ------------------------------
>>#!/bin/sh
>>
>>FAXFILE=$1
>>RECIPIENT=$2
>>FAXSENDER=$3
>>FAXID=`date +%j%H%M%S`
>>tempfoo="fax"
>>TMPFILE=`mktemp /tmp/${tempfoo}XXXXXX`
>>TMPFILE_A=`mktemp /tmp/${tempfoo}XXXXXX`.pdf
>>
>>
>>/usr/bin/tiff2pdf -p letter "${FAXFILE}" > "${TMPFILE_A}"
>>metasend -b -t "$RECIPIENT" -s "Fax from $FAXSENDER" \
>>  -f "${TMPFILE}" -m 'text/plain' -n \
>>  -m 'application/pdf;name="fax'${FAXID}'.pdf"' -f "${TMPFILE_A}" \
>>  -D 'PDF Fax Document'
>>
>>rm "${TMPFILE}"
>>rm "${TMPFILE_A}"
>>---------------------- END mailfax script ------------------------------
>>
>>  
>>
> I don't have found metasend on my system. Do you know where it is?

You mentioned before that you were running SuSe, right? Quick google
search for `metamail suse` reveals this:
    http://www.novell.com/products/linuxpackages/professional/metamail.html

Also, a quick google search for `metamail` reveals the project's homepage:
    http://bmrc.berkeley.edu/~trey/emacs/metamail.html


>>I based this config on the excellent information found at the following
>>website:
>>    http://scottstuff.net/scott/archives/000152.html
>>
>>  
>>
> At this web site I find also a line:
> 
> |*CLI> database put extensionemail 2202 bob at example.com
> 
> How does that fit together with|
> macro-faxreceive,103   ???

Read the page carefully and it tells you, I think. He's using an internal
asterisk database to do DID stuff so he can mail it to different
addresses based on either the called or calling number, if I remember
correctly. I'm not doing that. I'm merely detecting a fax tone, jumping to
the fax context, receiving the fax, then mailing it to a single address.

You can get as complicated or simple with it as you like.


> This methode would cover the part of receiving a fax via a zap device, how to exend it to receive a fax from a remote gateway via G711?

Read this and the corresponding pages it points to:
http://www.voip-info.org/wiki-FoIP


-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net






More information about the asterisk-users mailing list