[asterisk-users] ReceiveFAX and SendFAX questions
Kristijan Vrban
vrban.lkml at googlemail.com
Sun Jan 24 11:22:58 CST 2010
it's because after ReceiveFAX (i use asterisk 1.6.2.1 with
spandsp-0.0.6pre17), it jumps to the hangup exten. So this is my
dialplan for ReceiveFAX:
[fax-in]
exten => s,1,ReceiveFAX(/tmp/fax-${CDR(uniqueid)}.tif)
exten => s,n,Hangup()
exten => h,1,NoOp(### FAXSTATUS: ${FAXSTATUS})
exten => h,n,NoOp(### FAXERROR: ${FAXERROR})
exten => h,n,NoOp(### FAXMODE: ${FAXMODE})
exten => h,n,NoOp(### FAXPAGES: ${FAXPAGES})
exten => h,n,NoOp(### FAXBITRATE: ${FAXBITRATE})
exten => h,n,NoOp(### FAXRESOLUTION: ${FAXRESOLUTION})
exten => h,n,NoOp(### REMOTESTATIONID: ${REMOTESTATIONID})
exten => h,n,System(/usr/bin/tiff2pdf /tmp/fax-${CDR(uniqueid)}.tif -o
/tmp/fax-${CDR(uniqueid)}.pdf)
exten => h,n,System(/home/kristijan.vrban/test/fax_perl/send_email.pl
${CUSTOMER} ${EFAX} /tmp/fax-${CDR(uniqueid)}.pdf ${CALLERID(num):1}
${FAXPAGES})
and the exten => 101,1,Answer() and exten => 101,2,Wait(3) are
redundant in you dialplan.
Kristijan
2010/1/24 Magnus Benngård <magnus.b at inputinterior.se>:
> Morning,
>
> Have some questions regarding receiving and sending faxes...
> 1:st example:
> exten => 101,1,Answer()
> exten => 101,2,Wait(3)
> exten => 101,3,ReceiveFAX(/var/spool/asterisk/tmp/fax.tiff)
> exten => 101,4,System(tiff2pdf -p A4 /var/spool/asterisk/tmp/fax.tiff >
> /var/spool/asterisk/tmp/fax.pdf)
> exten => 101,5,System(mutt -s 'New FAX for you sir' -a
> /var/spool/asterisk/tmp/fax.pdf magnus.b at inputinterior.se < /dev/null)
> I do receive the fax, the fax got converted to a pdf but 101,5 never get
> "executed", when i look in cli, last line is 101,4... can any1 se why?
>
> 2:nd example:
> exten => 101,1,Answer()
> exten => 101,2,Wait(3)
> exten => 101,3,ReceiveFAX(/var/spool/asterisk/tmp/fax.tiff)
> exten => 101,4,System(fax.sh)
> cat /usr/bin/fax.sh
> tiff2pdf -p A4 /var/spool/asterisk/tmp/fax.tiff >
> /var/spool/asterisk/tmp/fax.pdf
> mutt -s 'New FAX for you sir' -a /var/spool/asterisk/tmp/fax.pdf
> boras at inputinterior.se < /dev/null
> That works, i receive the fax as an attachment, but as I asked before why is
> not example 1 working?
>
> SendFAX question:
> exten => 101,1,Answer()
> exten => 101,2,Wait(3)
> exten => 101,3,ReceiveFAX(/var/spool/asterisk/tmp/fax.tiff)
> exten => 101,4,"Some magical way to setup "the channel to: SIP/033211101"
> exten => 101,5,SendFAX(/var/spool/asterisk/tmp/fax.tiff)
>
> 033211101 is an ATA (SPA2102) registered to *.
>
> I wonder if it is possible to do something like my example or not?
> Any suggestions?
> I was looking at:
> http://www.evilspurv.net/blog/2010/01/sending-pdfs-as-fax-with-asterisk/
> I could do something like that but i would prefer to have all in the
> dialplan without need for an external program.
>
> /Magnus
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list