Elastix Tips

Change “From  Name”  in Elastix/FreePBX FAX to Email

Edit the file /var/lib/asterisk/bin/fax-process.pl

Change the line starting with “From: $from” to  “From: FAX Mailer \<$from\>” or put any name instead of FAX Mailer.

Assign only one Fax Device for each elastix user

Edit  the file /var/www/html/modules/sendfax/index.php

Comment the line starting with  $arrFaxList = array(“none”=> and add the below two lines.

// $arrFaxList = array(“none”=>’– ‘.$arrLang[“Select a Fax Device”].’ –‘);
$usrname=$_SESSION[‘elastix_user’];
exec(“sqlite3 -separator ‘|’ /var/www/db/acl.db \”select extension from acl_user where name=’$usrname’\””,$user_exten);

Add the following line after the line starting with  “foreach($faxes as $values){”

if($_SESSION[‘elastix_user’] == “admin” || $user_exten[0] == $values[‘extension’])

Edit  the file /var/www/html/modules/faxviewer/index.php

Add the following 2 lines after the line starting with  “if(is_array($arrResult) && $total>0) {”

$usrname=$_SESSION[‘elastix_user’];
exec(“sqlite3 -separator ‘|’ /var/www/db/acl.db \”select extension from acl_user where name=’$usrname’\””,$user_exten);

Add the following line after the line starting with   ” $fax[$k] = htmlentities($fax[$k], ENT_COMPAT, ‘UTF-8’);”

 if($user_exten[0] == $fax[‘destiny_fax’] OR $_SESSION[‘elastix_user’] == “admin”){

Add a close the bracket after ” “<a href=’?menu=$module_name&action=edit&id=”.$fax[‘id’].”‘>”._tr(‘Edit’).”</a>”); }

Change Elastix admin password

sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password = '`echo -n password|md5sum|cut -d ' ' -f 1`' WHERE name = 'admin'"

Now Elastix admin password is 'password' (without quotes)