Setting up fax by using NVfax detect

Community-based Support for users of Free Fax For Asterisk

Setting up fax by using NVfax detect

Postby tpolak » Thu Jul 02, 2009 8:27 am

I am running Freepbx for a GUI and I would like to integrate the new Asterisk Fax into this setup. I want to use NVfax for detection and then have it receive the fax like it does now. Once receiving the fax is completed send a PDF to the correct person. I have the program installed, but that is where I am running into trouble. I have not been able to find any example on how to easily replace this. I am guessing since I have not seen any examples, I must be missing something really basic.

This is what seems to be controlling the fax process now (an untrixed trixbox).
Code: Select all
[ext-fax]
exten => s,1,Answer
exten => s,2,Goto(in_fax,1)
exten => in_fax,1,StopPlayTones 
exten => in_fax,2,GotoIf($["${FAX_RX}" = "system"]?3:analog_fax,1)
exten => in_fax,3,Macro(faxreceive)
exten => in_fax,4,Hangup
exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?4:2)  ;if fax is disabled, just hang up
exten => analog_fax,2,Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)});
exten => analog_fax,3,Dial(${DIAL},20,d)
exten => analog_fax,4,Hangup
;exten => out_fax,1,wait(7)
exten => out_fax,1,txfax(${TXFAX_NAME},caller)
exten => out_fax,2,Hangup
exten => h,1,system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --from ${FAX_RX_FROM} --dest "${FROM_DID}" --subject "Fax from ${URIENCODE(${CALLERID(number)})} ${URIENCODE(${CALLERID(name)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --type application/pdf --file ${FAXFILE});
exten => h,2,Hangup()

Here is the DID extensions so you can see what I am doing
Code: Select all
[ext-did-0002-custom]
exten => 2318000,1,Set(__FROM_DID=${EXTEN})
exten => 2318000,n,Gosub(app-blacklist-check,s,1)
exten => 2318000,n,GotoIf($[ ""${CALLERID(name)}"" != "" ] ?cidok)
exten => 2318000,n,Set(CALLERID(name)=${CALLERID(num)})
exten => 2318000,n(cidok),Noop(CallerID is ${CALLERID(all)})
exten => 2318000,n,Set(FAX_RX=system)
exten => 2318000,n,Set(FAX_RX_EMAIL=email@somedomain.com)
exten => 2318000,n,Answer
exten => 2318000,n,Playtones(ring)
exten => 2318000,n,NVFaxDetect(20|t)
exten => 2318020,n,Set(__CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}})
exten => 2318020,n,SetCallerPres(allowed_not_screened)
exten => 2318020,n,Goto(app-announcement-2,s,1)
tpolak
Newsterisk
 
Posts: 1
Joined: Thu Jul 02, 2009 8:19 am

Return to Fax For Asterisk

Who is online

Users browsing this forum: No registered users and 1 guest