PB Free Fax Asterisk receive

Community-based Support for users of Free Fax For Asterisk

PB Free Fax Asterisk receive

Postby barto_95 » Fri Jul 08, 2011 9:25 am

Hello everyone,

here I have a problem I can not get the fax to mail

I did install the license FFA

when receiving a fax from my provider but all is well because there is one, but asterisk does not have the command that is tiff2pdf-o PDF TIFF

I put it included my sip.conf:

[general]
language =fr
context =default
bindport =5060
disallow =all
allow =ulaw
externip =109.0.xxx.xxx
t38pt_udptl =yes
canreinvite =yes
nat = yes
localnet =192.168.1.34/255.255.255.0
autofallthrough =yes
faxdetect =yes

register=>022206xxx@xxxxxxx:sct:0xxxxxxx@sixxxxxxx:5060/0xxxxxxxxx


My extensions.conf :
[general]
autofallthrough =yes
static =yes
writeprotect =no

[globals]
ADDRESSEASTERISK = 109.0.xxxx.xxx
MAILFAX = bartoxxxxxxxxx@gmail.com


[default]
exten => _0222xxxxxx,1,NoOp(0222xxxxxx)
exten => _0222xxxxxx,2,Goto(FAX,${EXTEN},1)
exten => _022xxxxxxx,3,Hangup()


[FAX]
exten => _0222xxxxxx,1,Answer()
exten => _0222xxxxxx,n,Wait(1)
exten => _0222xxxxxx,n,Set(FICHIERMAIL=/home/server-asterisk/mail_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.txt)
exten => _0222xxxxxx,n,Set(FICHIERTIFF=fax__${EXTEN}_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${CALLERID(num)})
exten => _0222xxxxxx,n,Set(TIFF=/home/server-asterisk/${FICHIERTIFF}.tiff)
exten => _0222xxxxxx,n,Set(PDF=/home/server-asterisk/${FICHIERTIFF}.pdf)
exten => _0222xxxxxx,n,ReceiveFAX(${TIFF})
exten => _0222xxxxxx,h,Hangup()
exten => _0222xxxxxx,h,System(mkdir /home/server-asterisk/toto)
exten => _0222xxxxxxh,System(tiff2pdf -o ${TIFF} ${PDF})
exten => _0222xxxxxx,h,System(rm ${TIFF})
exten => _0222xxxxxx,h,System(echo "Bonjour," >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "Un Nouveau Fax est arriver sur le numero suivant : ${EXTEN}" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "Il provient du numero suivant : ${CALLERID(num)}" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "Vous pouvez le consulter sur le lien suivant : " >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "http://${ADDRESSEASTERISK}/fax/${FICHIERTIFF}.pdf" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(echo "Meilleures Salutations" >> ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(sudo mail ${MAILFAX} -s "Nouveau Fax au ${EXTEN}" < ${FICHIERMAIL})
exten => _0222xxxxxx,h,System(sudo rm ${FICHIERMAIL})
exten => _0222xxxxxx,h,Return()


and this is my CLI when receiving the fax :

asterisk*CLI>
== Using UDPTL CoS mark 5
== Using SIP RTP CoS mark 5
-- Executing [0222xxxxxx@default:1] NoOp("SIPxxxxxx-00000001", "0222xxxxxx") in new stack
-- Executing [0222xxxxxx@default:2] Goto("SIP/xxxxxx-00000001", "FAX,0222xxxxxx,1") in new stack
-- Goto (FAX,02220xxxxxx,1)
-- Executing [0222xxxxxx@FAX:1] Answer("SIP/xxxxxx-00000001", "") in new stack
-- Executing [0222xxxxxx@FAX:2] Wait("SIP/xxxxxx-00000001", "1") in new stack
-- Executing [0222xxxxxx@FAX:3] Set("SIP/sxxxxxx-00000001", "FICHIERMAIL=/home/server-asterisk/mail_20110708-171119.txt") in new stack
-- Executing [0222xxxxxx@FAX:4] Set("SIP/xxxxxx-00000001", "FICHIERTIFF=fax__0222xxxxxx_20110708-171119_149980677") in new stack
-- Executing [0222xxxxxx@FAX:5] Set("SIP/xxxxxx-00000001", "TIFF=/home/server-asterisk/fax__0222xxxxxx_20110708-171119_149980677.tiff") in new stack
-- Executing [022xxxxxx@FAX:6] Set("SIP/sxxxxxx-00000001", "PDF=/home/server-asterisk/fax__0222xxxxxx_20110708-171119_149980677.pdf") in new stack
-- Executing [022xxxxxx@FAX:7] ReceiveFAX("SIP/sxxxxxx-00000001", "/home/server-asterisk/fax__022xxxxxx_20110708-171119_149980677.tiff") in new stack
-- Channel 'SIP/sxxxxxxr-00000001' receiving FAX '/home/server-asterisk/fax__0222xxxxxx_20110708-171119_149980677.tiff'
-- Channel 'SIP/sxxxxxx-00000001' FAX session '1' started
-- FAX handle 0: [ 058.520178 ], entering CLOSING state
-- FAX handle 0: [ 058.583046 ], entering CLOSING state
-- Channel 'SIP/xxxxxxx-00000001' FAX session '1' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x98', transfer rate: '14400', remoteSID: '0xxxxxxxxxx'
== Spawn extension (FAX, 0222xxxxxxxxx, 7) exited non-zero on 'SIP/xxxxxxxxxx-00000001'


I have my tiff file created with a padlock on the logo but not to create Pdf file

where would the problem I do not understand

thank all :)

ps : excuse my english I use google translator i'm french
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby malcolmd » Fri Jul 08, 2011 10:23 am

Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: PB Free Fax Asterisk receive

Postby barto_95 » Fri Jul 08, 2011 2:20 pm

libtiff-tools it install and the command in terminal :

tiff2pdf -o file.pdf file.tiff works well

I have my file converted to tiff pdf

the problem is that asterisk does not has the following command after receiveFAX

I d'ont know why

:(

help me please .

thank for your response malcolmd
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby barto_95 » Sat Jul 09, 2011 5:18 pm

help me please ...
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby barto_95 » Tue Jul 12, 2011 11:46 am

Nobody wants to help me on my problem
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby AndyInNYC » Fri Jul 15, 2011 7:07 am

Barto,

Look at my post in the AsteriskNow Support section - "Re: Intercepting Faxes (changing from Trixbox to AsteriskNOW)"

I now have faxes working correctly - receipt, email, etc.

Good luck.
AndyInNYC
Newsterisk
 
Posts: 8
Joined: Thu Jun 30, 2011 8:09 am

Re: PB Free Fax Asterisk receive

Postby barto_95 » Fri Jul 15, 2011 3:56 pm

hello,

I saw your topic

I have in my sip.conf file the active T28

I managed to find or was my mistake by telling I can not send PDF file as an attachment via email

that using you as his command to

thank :)
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby barto_95 » Tue Jul 19, 2011 9:35 am

help me please .... :(
barto_95
Newsterisk
 
Posts: 7
Joined: Fri Jul 08, 2011 9:11 am

Re: PB Free Fax Asterisk receive

Postby alexjack » Thu Aug 11, 2011 11:40 am

Nice post really it has given me that much help required it was very usefull post i studied your post and now i have all my confusion and concepts clear.
alexjack
Newsterisk
 
Posts: 4
Joined: Sat Aug 06, 2011 12:13 pm

Re: PB Free Fax Asterisk receive

Postby zozo6015 » Thu Oct 18, 2012 12:51 pm

hi, try this code it works for me

Code: Select all
[FAX]
exten => _0222xxxxxx,1,Answer()
exten => _0222xxxxxx,n,Wait(1)
exten => _0222xxxxxx,n,Set(FICHIERMAIL=/home/server-asterisk/mail_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.txt)
exten => _0222xxxxxx,n,Set(FICHIERTIFF=fax__${EXTEN}_${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}_${CALLERID(num)})
exten => _0222xxxxxx,n,Set(TIFF=/home/server-asterisk/${FICHIERTIFF}.tiff)
exten => _0222xxxxxx,n,Set(PDF=/home/server-asterisk/${FICHIERTIFF}.pdf)
exten => _0222xxxxxx,n,ReceiveFAX(${TIFF})
exten => _0222xxxxxx,n,Hangup()
exten => h,1,System(mkdir /home/server-asterisk/toto)
exten => h,2,System(tiff2pdf -o ${TIFF} ${PDF})
exten => h,3,System(rm ${TIFF})
exten => h,4,System(echo "Bonjour," >> ${FICHIERMAIL})
exten => h,5,System(echo "" >> ${FICHIERMAIL})
exten => h,6,System(echo "Un Nouveau Fax est arriver sur le numero suivant : ${EXTEN}" >> ${FICHIERMAIL})
exten => h,7,System(echo "" >> ${FICHIERMAIL})
exten => h,8,System(echo "Il provient du numero suivant : ${CALLERID(num)}" >> ${FICHIERMAIL})
exten => h,9,System(echo "" >> ${FICHIERMAIL})
exten => h,10,System(echo "Vous pouvez le consulter sur le lien suivant : " >> ${FICHIERMAIL})
exten => h,11,System(echo "" >> ${FICHIERMAIL})
exten => h,12,System(echo "http://${ADDRESSEASTERISK}/fax/${FICHIERTIFF}.pdf" >> ${FICHIERMAIL})
exten => h,13,System(echo "" >> ${FICHIERMAIL})
exten => h,14,System(echo "" >> ${FICHIERMAIL})
exten => h,15,System(echo "Meilleures Salutations" >> ${FICHIERMAIL})
exten => h,16,System(sudo mail ${MAILFAX} -s "Nouveau Fax au ${EXTEN}" < ${FICHIERMAIL})
exten => h,17,System(sudo rm ${FICHIERMAIL})


also if would be a good idea if you would use full path for the applications like tiff2pdf (/usr/bin/tiff2pdf)

instead of mail use mutt because you can attach the pdf file to the e-mail with -a options

I hope it helps and I am not too late ;)
zozo6015
Newsterisk
 
Posts: 21
Joined: Fri Aug 18, 2006 1:24 pm


Return to Fax For Asterisk

Who is online

Users browsing this forum: Google [Bot] and 1 guest