Changeset 1654

Show
Ignore:
Timestamp:
04/18/06 04:29:32 (7 years ago)
Author:
qldrob
Message:

Add 'Fax Email From' - Allow users to set the 'From' address that faxes come from. Will help avoid spam filtering if the hostname of the * machine isn't valid.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/astetc/extensions.conf

    r1625 r1654  
    620620exten => in_fax,1,GotoIf($["${FAX_RX}" = "system"]?2:analog_fax,1) 
    621621exten => in_fax,2,Macro(faxreceive) 
    622 exten => in_fax,3,system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --subject "Fax from ${CALLERID(number)} ${CALLERID(name)}" --attachment ${CALLERID(number)}.pdf --type application/pdf --file ${FAXFILE}); 
     622exten => in_fax,3,system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --from ${FAX_RX_FROM} --subject "Fax from ${CALLERID(number)} ${CALLERID(name)}" --attachment ${CALLERID(number)}.pdf --type application/pdf --file ${FAXFILE}); 
    623623exten => in_fax,4,Hangup 
    624624exten => analog_fax,1,GotoIf($["${FAX_RX}" = "disabled"]?3:2)  ;if fax is disabled, just hang up 
  • freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.general.php

    r1613 r1654  
    2020            array($_REQUEST['FAX_RX'],'FAX_RX'), 
    2121            array($_REQUEST['FAX_RX_EMAIL'],'FAX_RX_EMAIL'), 
     22            array($_REQUEST['FAX_RX_FROM'],'FAX_RX_FROM'), 
    2223            array($_REQUEST['DIRECTORY'],'DIRECTORY'), 
    2324            array($_REQUEST['VM_PREFIX'],'VM_PREFIX'), 
     
    112113  <input type="text" size="20" name="FAX_RX_EMAIL" value="<?php  echo htmlspecialchars($FAX_RX_EMAIL)?>"/> 
    113114</p> 
     115<p> 
     116  <a class="info" href="#"><?php echo _("Email address")?><span><?php echo _("Email address that faxes appear to come from if 'system' has been chosen for the fax extension above.")?></span></a> <?php echo _("that faxes appear to come from:")?> 
     117  <input type="text" size="20" name="FAX_RX_FROM" value="<?php  echo htmlspecialchars($FAX_RX_FROM)?>"/> 
     118</p> 
    114119<h5><?php echo _("International Tone Settings")?></h5> 
    115120<p> 
  • freepbx/trunk/upgrades/2.1beta1/tables.php

    r1612 r1654  
    3636} 
    3737 
     38// Add default FAX_RX_FROM which allows users to set the 'from' address of fax emails 
     39// I've used a gmail account as the default as we know the domain's going to exist. 
     40$sql = "SELECT value FROM globals WHERE variable = 'FAX_RX_FROM' "; 
     41$asa = $db->getRow($sql, DB_FETCHMODE_ASSOC); 
     42if (!is_array($asa)) { // does not exist already 
     43        // Default to 'no' 
     44        $sql = "INSERT INTO globals (variable, value) VALUES ('FAX_RX_FROM', 'freepbx@gmail.com') "; 
     45        $result = $db->query($sql); 
     46        if(DB::IsError($result)) { 
     47                die($result->getDebugInfo()); 
     48        } 
     49} 
     50 
     51 
    3852?>