Hi everybody,
first of all i would like to thank Stefano Marinelli and Max CtRiX who have
kindly share with me their scripts where some peoples wanted that i had to go
to learn to write a "hello word" program. I think that none of them has written
asterisk code wich send us to CW today. If Mark Spencer thought like them i
don't think that we would have this forum where everybody come to learn i
think. I think that if you can't help somebody, don't be nasty please.
(i'm going well now :-) ).
So i have worked on the two scripts and try to adapt them to my needs. I have
used Max's script and use the mpack command of Stefano and all is ok. So i'm
now able to send an attached file in fax and a message text as body.
The only problem, i have is that my mails are sent to spam seen that their are
sent with the from address : callwea...@faxserver.
Could somebody help me to have a valid sender as [email protected] using mpack?
i have try to find the mpack config files but the only one i have find is
compiled so unreadable.
Thanks.
> From: [email protected]
> Subject: Callweaver-users Digest, Vol 28, Issue 8
> To: [email protected]
> Date: Wed, 8 Jul 2009 12:00:01 +0200
>
> Send Callweaver-users mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.callweaver.org/mailman/listinfo/callweaver-users
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Callweaver-users digest..."
>
>
> Today's Topics:
>
> 1. Re: setup fax2mail gateway (Stefano Marinelli)
> 2. Re: setup fax2mail gateway (Gerald Cox)
> 3. Re: setup fax2mail gateway (Steve Totaro)
> 4. Re: setup fax2mail gateway (Steve Totaro)
> 5. Re: setup fax2mail gateway (Stefano Marinelli)
> 6. Re: setup fax2mail gateway (Max CtRiX)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 07 Jul 2009 17:34:08 +0200
> From: Stefano Marinelli <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi everybody
>
> Steve Totaro ha scritto:
> > Inline
> >
> > On Tue, Jul 7, 2009 at 4:55 AM, Gerald Cox<[email protected]> wrote:
> >> Steve: no. Not easier to monitor a directory. I've got that setup as
> >> well.
> >
> > If you have that setup as well, why not share your method and really
> > help the guy? Not everyone was cut out or has the desire to learn to
> > code.
>
> I've been following this thread but it's becoming hot...so I hope nobody
> will care if I'm going to cut and paste my setup.
> It's far from being perfect, but works and it's ok.
> If that guy will learn or not how to do some basic programming, I don't
> care. Just my two cents :-)
>
> P.S.: I've some nice OGIs I've created to manage calls from an hotel...
> so consider this script as a bad bad bad ugly ugly ugly code...it was my
> first Callweaver dialplan, and still works :)
>
> ...after FaxDetect...
>
> [fax]
> exten => s,1,Ringing
> exten => s,n,Wait,8
> exten => s,n,Set(LOCALSTATIONID=MyLocation)
> exten => s,n,Set(LOCALHEADERINFO=Fax Server)
> exten => s,n,Set(FAXFILE=/tmp/${UNIQUEID}.tif)
> exten => s,n,Set(FAXFILENOEXT=/tmp/${UNIQUEID})
> exten => s,n,Set(SIP_CODEC=ulaw)
> exten => s,n,SipDTMFMode(inband)
> exten => s,n,RxFAX(${FAXFILE},ecm)
> exten => s,n,NoOp(RX: REMOTESTATIONID is ${REMOTESTATIONID})
> exten => s,n,NoOp(RX: PHASEESTATUS is ${PHASEESTATUS})
> exten => s,n,Hangup
>
> exten => h,1,System(tiff2pdf -z ${FAXFILE} > ${FAXFILE}.pdf)
> exten => h,n,System(/usr/bin/mpack "-a -s 'Incoming Fax From:
> ${CALLERID}, ${REMOTESTATIONID}, Received: ${DATETIME}' ${FAXFILE}.pdf
> [email protected]")
>
> Stefano
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 07 Jul 2009 03:37:58 -0600
> From: Gerald Cox <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain
>
>
> On Tue, 2009-07-07 at 11:27 -0400, Steve Totaro wrote:
>
> > If you have that setup as well, why not share your method and really
> > help the guy? Not everyone was cut out or has the desire to learn to
> > code.
>
> I'd rather just show him the easier way, and if he has the desire to
> learn the harder, more efficient way, we'll talk then.
>
> Get the easier working before working on the harder.
>
> Come on dude. Knock it off. This is a help mailing list, not a start
> chit mailing list.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 7 Jul 2009 13:22:38 -0400
> From: Steve Totaro <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Jul 7, 2009 at 5:37 AM, Gerald Cox<[email protected]> wrote:
> >
> > On Tue, 2009-07-07 at 11:27 -0400, Steve Totaro wrote:
> >
> >> If you have that setup as well, why not share your method and really
> >> help the guy? ?Not everyone was cut out or has the desire to learn to
> >> code.
> >
> > I'd rather just show him the easier way, and if he has the desire to
> > learn the harder, more efficient way, we'll talk then.
>
> Show him a site on shell programming and "Hello World" is the "Easier Way"?
>
> >
> > Get the easier working before working on the harder.
>
> Get the best working and move on is my theory. Why double your
> workload. DRIFT = "Do it right the first time".
>
> >
> > Come on dude. ?Knock it off. ?This is a help mailing list, not a start
> > chit mailing list.
> >
>
> Come on dude nothing. You helped in absolutely no way except to point
> him to a site on how to do shell programming.
>
> I could point him to a link on bits and bytes.
>
> Bottom line, my chit chat got Stefano to really help the guy, so
> indirectly, I have done much more to help than you.
>
> End of discussion.
>
> --
> Thanks,
> Steve Totaro
> +18887771888 (Toll Free)
> +12409381212 (Cell)
> +12024369784 (Skype)
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 7 Jul 2009 13:27:22 -0400
> From: Steve Totaro <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Jul 7, 2009 at 11:34 AM, Stefano
> Marinelli<[email protected]> wrote:
> > Hi everybody
> >
> > Steve Totaro ha scritto:
> >> Inline
> >>
> >> On Tue, Jul 7, 2009 at 4:55 AM, Gerald Cox<[email protected]> wrote:
> >>> Steve: no. ?Not easier to monitor a directory. ?I've got that setup as
> >>> well.
> >>
> >> If you have that setup as well, why not share your method and really
> >> help the guy? ?Not everyone was cut out or has the desire to learn to
> >> code.
> >
> > I've been following this thread but it's becoming hot...so I hope nobody
> > will care if I'm going to cut and paste my setup.
> > It's far from being perfect, but works and it's ok.
> > If that guy will learn or not how to do some basic programming, I don't
> > care. Just my two cents :-)
> >
> > P.S.: I've some nice OGIs I've created to manage calls from an hotel...
> > so consider this script as a bad bad bad ugly ugly ugly code...it was my
> > first Callweaver dialplan, and still works :)
> >
> > ...after FaxDetect...
> >
> > [fax]
> > exten => s,1,Ringing
> > exten => s,n,Wait,8
> > exten => s,n,Set(LOCALSTATIONID=MyLocation)
> > exten => s,n,Set(LOCALHEADERINFO=Fax Server)
> > exten => s,n,Set(FAXFILE=/tmp/${UNIQUEID}.tif)
> > exten => s,n,Set(FAXFILENOEXT=/tmp/${UNIQUEID})
> > exten => s,n,Set(SIP_CODEC=ulaw)
> > exten => s,n,SipDTMFMode(inband)
> > exten => s,n,RxFAX(${FAXFILE},ecm)
> > exten => s,n,NoOp(RX: REMOTESTATIONID is ${REMOTESTATIONID})
> > exten => s,n,NoOp(RX: PHASEESTATUS is ${PHASEESTATUS})
> > exten => s,n,Hangup
> >
> > exten => h,1,System(tiff2pdf -z ${FAXFILE} > ${FAXFILE}.pdf)
> > exten => h,n,System(/usr/bin/mpack "-a -s 'Incoming Fax From:
> > ${CALLERID}, ${REMOTESTATIONID}, Received: ${DATETIME}' ${FAXFILE}.pdf
> > [email protected]")
> >
> > Stefano
>
> Stefano,
>
> Thanks for this.
>
> I use HylaFax almost exclusively but charge a premium for it.
>
> With this bit of code stashed away, you have also helped me out and I
> am sure I will use it at some point, not to mention that it will be
> indexed by google and used many times in the future I am sure.
>
> Still most of my customers are connected to the PSTN and with T.38,
> ATAs, and old skool fax machines..... ;)
>
> --
> Thanks,
> Steve Totaro
> +18887771888 (Toll Free)
> +12409381212 (Cell)
> +12024369784 (Skype)
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 07 Jul 2009 19:38:04 +0200
> From: Stefano Marinelli <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Steve Totaro ha scritto:
> > I use HylaFax almost exclusively but charge a premium for it.
>
> I have to use it because Hylafax doesn't seem to work when bridged (via
> or T38Gateway) with a VOIP channel, so this solution is simple and
> practival.
>
> > With this bit of code stashed away, you have also helped me out and I
> > am sure I will use it at some point, not to mention that it will be
> > indexed by google and used many times in the future I am sure.
>
> :)
>
> > Still most of my customers are connected to the PSTN and with T.38,
> > ATAs, and old skool fax machines..... ;)
>
> Yes, it's full of them out there.
>
> Just my two cents.
> Stefano
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 07 Jul 2009 20:51:14 +0200
> From: Max CtRiX <[email protected]>
> Subject: Re: [Callweaver-users] setup fax2mail gateway
> To: Users Mailing List - Non-Commercial Discussion
> <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> vamara coulibaly ha scritto:
> > Hi Gerald,
> > The problem is that i not very good in writting scripts. so what i need
> > (if possible) is a script wich can send fax by mail when i sent a fax to
> > an extensions, for example sending a fax to extensions 123 send it to my
> > mail box.
> > Please help me.
>
> something like this.
> fix line wraps
>
>
> [mailfaxin]
> exten => s,1,NoOp(Receiving fax context)
> exten => s,n,Set(FAXFILE=/var/spool/callweaver/incomingfax/${UNIQUEID}.tif)
>
> exten => s,n,Set(FAXFILENOEXT=/var/spool/callweaver/incomingfax/${UNIQUEID})
>
> exten => s,n,Set(SIP_CODEC=alaw)
> exten => s,n,SipDTMFMode(inband)
> exten => s,n,RxFAX(${FAXFILE},debug)
> exten => s,n,Hangup()
> exten => h,1,NoOp(RxFAX completed)
> exten => h,n,NoOp(RX: REMOTESTATIONID is ${REMOTESTATIONID})
> exten => h,n,NoOp(RX: FAXPAGES is ${FAXPAGES})
> exten => h,n,NoOp(RX: FAXRESOLUTION is ${FAXRESOLUTION})
> exten => h,n,NoOp(RX: FAXBITRATE is ${FAXBITRATE})
> exten => h,n,NoOp(RX: PHASEESTATUS is ${PHASEESTATUS})
> exten => h,n,NoOp(RX: PHASESTRING is ${PHASEESTRING})
> exten => h,n,System("/usr/share/callweaver/bin/mailfax '${FROM_DID}'
> '${CALLERIDNUM}' '${DESTNAME}' '${MAILTO}' '${PHASEESTATUS}'
> '${FAXFILE}' '${FAXPAGES}' '${FAXBITRATE}' '${REMOTESTATIONID}'
> >/dev/null 2>/dev/null")
>
>
>
>
>
> [incoming-static]
>
> exten => 0553986902,1,Set(FROM_DID=0553986902)
> exten => 0553986902,n,Set(DESTNAME=Navynet Fax)
> exten => 0553986902,n,Set(FAX_DISABLE_V17=0)
> exten => 0553986902,n,Set([email protected])
> exten => 0553986902,n,Set(LOCALSTATIONID=Navynet Fax)
> exten => 0553986902,n,Set(LOCALHEADERINFO=Navynet Fax)
> exten => 0553986902,n,Goto(mailfaxin,s,1)
>
>
>
>
> sip:~# cat /usr/share/callweaver/bin/mailfax
> #!/bin/bash
>
> #set -x
>
> LOGFILE=/var/log/callweaver/faxmail.log
> DATETIME=`date +"%A %d %b %Y %H:%M"`
>
> CALLEE=$1
> CALLER=$2
> DESTNAME=$3
> MAILTO=$4
> RESULT=$5
> FAXFILE=$6
> FAXPAGES=$7
> FAXBITRATE=$8
> FAXREMOTEID=$9
>
> echo Received paramters >>$LOGFILE
> echo ------------------ >>$LOGFILE
> echo DATE=$DATETIME >>$LOGFILE
> echo CALLEE=$1 >>$LOGFILE
> echo CALLER=$2 >>$LOGFILE
> echo DESTNAME=$3 >>$LOGFILE
> echo MAILTO=$4 >>$LOGFILE
> echo RESULT=$5 >>$LOGFILE
> echo FAXFILE=$6 >>$LOGFILE
> echo FAXPAGES=$7 >>$LOGFILE
> echo FAXBITRATE=$8 >>$LOGFILE
> echo FAXREMOTEID=$9 >>$LOGFILE
>
> TMPNAME=$FAXFILE.txt
>
> rm -f $TMPNAME
>
> SUBJ="Fax received for $DESTNAME"
>
> echo Salve, >>$TMPNAME
> echo >>$TMPNAME
> echo E appena stato ricevuto un fax >>$TMPNAME
> echo >>$TMPNAME
> echo "Mittente : "$CALLER >>$TMPNAME
> echo "Destinatario : "$CALLEE >>$TMPNAME
> echo "Identificativo : "$FAXREMOTEID >>$TMPNAME
> echo "Pagine : "$FAXPAGES >>$TMPNAME
> echo "Bitrate : "$FAXBITRATE >>$TMPNAME
> echo >>$TMPNAME
> echo >>$TMPNAME
>
> if [ "$RESULT" == "0" ]; then
> if [ "$FAXPAGES" != "0" ]; then
> echo Received successfully >>$LOGFILE
> echo Fax ricevuto correttamente>>$TMPNAME
> /usr/bin/nail -s "$SUBJ" -a $FAXFILE $MAILTO< $TMPNAME
> else
> echo Received unsuccessfully >>$LOGFILE
> echo Fax ricevuto vuoto>>$TMPNAME
> /usr/bin/mail -s "$SUBJ" [email protected] < $TMPNAME
> fi
> else
> echo Received unsuccessfully >>$LOGFILE
> echo Fax ricevuto non correttamente>>$TMPNAME
> /usr/bin/mail -s "$SUBJ" [email protected] < $TMPNAME
> fi
>
> echo "<<<<<<<<<<<<<<<<<<<<---------------->>>>>>>>>>>>>>>>>>>>>>>>>" >>
> $LOGFILE
>
> exit
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Callweaver-users mailing list
> [email protected]
> http://lists.callweaver.org/mailman/listinfo/callweaver-users
>
>
> End of Callweaver-users Digest, Vol 28, Issue 8
> ***********************************************
_________________________________________________________________
Découvrez Windows Live Spaces et créez votre site Web perso en quelques clics !
http://spaces.live.com/signup.aspx_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users