<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>On the default incoming context for your zap or whatever
cards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>exten => fax,1,Goto(fax,s,1)<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>then make this context</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>[macro-faxreceive]<BR>exten =>
s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${TIMESTAMP})<BR>exten =>
s,2,DBGet(EXTMAIL=${MACRO_EXTEN}/xEmail)<BR>exten => s,3,NoOP()<BR>exten
=> s,4,DBGet(EXTNAME=${MACRO_EXTEN}/xName)<BR>exten => s,5,NoOP()<BR>exten
=> s,6,rxfax(${FAXFILE}.tif)<BR>exten =>
s,103,SetVar(EXTMAIL=EMAIL-WHERE-TO-SEND-FAXES)<BR>exten =>
s,104,Goto(3)<BR>exten => s,105,SetVar(EXTNAME=Anton Krall)<BR>exten =>
s,106,Goto(5)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>[fax]<BR>exten => s,1,Macro(faxreceive)<BR>exten =>
h,1,System(/usr/local/bin/mailfax.sh "${CALLERIDNUM}" "${CALLEDFAX}"
"${EXTNAME}" "${EXTMAIL}" "${FAXFILE}")<BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>also make a mailfax.sh script file that does the processing
and conersion to pdf like this for example:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296583607-05052005><FONT face=Arial
color=#0000ff size=2>#!/bin/bash<BR>echo Received paramters $1 $2 $3 $4 $5
>>/var/log/faxmail.log<BR>DATETIME=`date +"%A %d %b %Y %H:%M"`<BR>if [ -e
$5.tif ]<BR>then<BR> echo fax file $5.tif found. Sending email to $4 ....
>>/var/log/faxmail.log<BR> PAGES=$(tiffinfo $5.tif | grep
"Page")<BR> DT=$(tiffinfo $5.tif | grep
"Date")<BR> COUNT=${PAGES#*-}<BR> rm -f $5.txt<BR>/usr/bin/tiff2ps
-2eaz -w 8.5 -h 11 $5.tif > $5.ps<BR>/usr/bin/ps2pdf $5.ps
$5.pdf<BR> echo "Estimado $3," >>$5.txt<BR> echo ""
>>$5.txt<BR> echo "Acaba de recibir un fax. A continuacion se
muestran los detalles:" >>$5.txt<BR> echo ""
>>$5.txt<BR> echo "De : $1"
>>$5.txt<BR> echo "Para : $2"
>>$5.txt<BR> echo "Fecha : $DATETIME"
>>$5.txt<BR> echo "Paginas : $COUNT" >>$5.txt<BR> echo ""
>>$5.txt<BR> echo "" >>$5.txt<BR> echo "Intruder
Consulting PBX" >>$5.txt<BR> echo sendEmail -f INSERT-FROM-EMAIL
-t $4 -u "New fax received" -a $5.pdf >>
/var/log/faxmail.log<BR> echo
"<<<<<<<<<<<<<<<<<<<<---------------->>>>>>>>>>>>>>>>>>>>>>>>>"
>> /var/log/faxmail.log<BR> /usr/local/bin/sendEmail -q
-f </FONT><A href="mailto:asterisk@intruder.com.mx"><FONT face=Arial
size=2>INSERT-FROM-EMAIL</FONT></A><FONT face=Arial color=#0000ff size=2> -t $4
-u "Nuevo Fax Recibido" -a $5.pdf -m < $5.txt<BR>rm -f
$5.*<BR>else<BR> rm -f $5.txt<BR> echo "Estimado $3,"
>>$5.txt<BR> echo "" >>$5.txt<BR> echo "Recibimos una
llamada que parecia ser un fax, sin embargo, ningun fax fue recibido. A
continuacion se muestran los det<BR>alles:" >>$5.txt<BR> echo ""
>>$5.txt<BR> echo "De : $1"
>>$5.txt<BR> echo "Para : $2"
>>$5.txt<BR> echo "Fecha : $DATETIME"
>>$5.txt<BR> echo "Paginas : $COUNT" >>$5.txt<BR> echo ""
>>$5.txt<BR> echo "" >>$5.txt<BR> echo "Intruder
Consulting PBX" >>$5.txt<BR> echo sendEmail -f </FONT><A
href="mailto:asterisk@intruder.com.mx"><FONT face=Arial
size=2>INSERT-FROM-EMAIL</FONT></A><FONT face=Arial color=#0000ff size=2> -t $4
-u "New fax received" -a $5.pdf >> /var/log/faxmail.log<BR> echo
"<<<<<<<<<<<<<<<<<<<<---------------->>>>>>>>>>>>>>>>>>>>>>>>>"
>> /var/log/faxmail.log<BR> /usr/local/bin/sendEmail -q
-f INSERT-FROM-EMAIL -t $4 -u "Recepcion Erronea de Fax" -m <
$5.txt<BR>rm -f $5.*<BR> exit<BR>fi<BR></FONT></DIV></SPAN><SPAN
class=296583607-05052005></SPAN><FONT face=Arial><FONT color=#0000ff><FONT
size=2>Hope this helps... works great for me.<SPAN
class=296583607-05052005></SPAN></FONT></FONT></FONT><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <B>On Behalf Of </B>Tim
Connolly<BR><B>Sent:</B> Jueves, 05 de Mayo de 2005 01:32 a.m.<BR><B>To:</B>
'Asterisk Users Mailing List - Non-Commercial Discussion'<BR><B>Subject:</B>
[Asterisk-Users] Working exten=> fax...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Can someone send me an example of
a CVS-head extension.conf excerpt that utilizes the faxdetect and “fax”
extension feature. I’m tired of seeing these:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Apr 29 17:33:15 NOTICE[3541]
chan_zap.c: Fax detected, but no fax
extension<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>