[Freeswitch-users] execute_on_fax_success/failure

Darcy Primrose darcyp at voice2net.ca
Sun May 6 19:04:43 MSD 2012


I am using excute_on_fax_success to call a script when a fax is received, the script converts the fax to pdf and emails it,  Is there a way to pass the number of pages received, ie, a variable created by spandsp.  Everything works, but I do not seem to be able to pass the variables.

   <condition field="destination_number" expression="^1(\d{10})$|(\d{10})$">
       <action application="set" data="faxtempdirectory=/faxfiles/${caller_id_number}"/>     
       <action application="system" data="mkdir ${faxtempdirectory}"/>      
       <action application="set" data="faxDirection=outbound"/>       
       <action application="set" data="emailAddress=$1$2@${fax2net_server}"/>
       <action application="set" data="faxFile=$1$2-${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)-Success}"/>
       <action application="set" data="execute_on_fax_success=system /./var/mail/sentfaxes/fax2mail.sh ${faxFile} $1$2@${fax2net_server} ${fax_security_code} ${fromRc} fax2net_orig=${fax_email}= ${fax_transfer_rate}"/>   
       <action application="answer"/>
       <action application="playback" data="silence_stream://2000"/>
       <action application="set" data="fax_enable_t38_request=true"/>
       <action application="set" data="fax_enable_t38=true"/>
       <action application="rxfax" data="${faxFile}.tif"/>
       <action application="hangup"/>
  </condition>  

Thanks
Darcy Primrose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120506/16853457/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list