Select Page

ICTFAX Installation Guide (Debian / Ubuntu)


ICTFAX Installation Guide (Debian / Ubuntu)

Out-dated. Needs modification.

1. Download ICTFAX

cd /usr/src

2. Install dependencies

Base requirements
apt-get -y install apache2 mysql-client mysql-server-5.5
apt-get -y install libmysqlclient-dev libmysqlcppconn-dev
apt-get -y install php5 php5-mysql php5-gd php5-curl php5-imap
apt-get -y install perl libdbd-mysql-perl
apt-get -y install libtiff4 ghostscript imagemagick poppler-utils curl

Enable apache and mysql to start at boot
update-rc.d apache2 defaults
update-rc.d mysql defaults

following dependencies are required for Freeswitch installations
apt-get -y install git make

also install yudit for text to pdf support
apt-get -y install g++ make
cd /usr/src
tar -xzf yudit-2.9.2.tar.gz
cd yudit-2.9.2
./configure –prefix=/usr/local
make install
#TODO: Install Yudit recommended fonts ( ?

3. Freeswitch installation

cd /tmp
wget -O
bash ./install

This process will take some time. Sit back and have a cup of tea or coffee.

4. Setup and Run Plivo Framework

apt-get -y install gcc libevent-dev
#Stop plivo, if its running
/usr/local/plivo stop

cd /usr/src
cp -r ictfax-2.1.1/plivo-devel /usr
cd /usr/plivo-devel
./ /usr/plivo
cd /usr/plivo/bin
./plivo start

NOTE: There may be some errors while starting plivo cache server. But make sure that plivo default server is running.

5. ICTFAX Installation

Here you will have to provide your mysql root password
mysql -e “CREATE database ictfax;” -p
cp -r /usr/src/ictfax-2.1.1/wwwroot/ /usr/ictfax

1. Create a symbolic link for /usr/ictfax in /var/www/html
mkdir -p /var/www/html
ln -s /usr/ictfax /var/www/html/ictfax

2. Now visit http://DOMAIN.COM/ictfax and follow the installation instructions for ICTFax (drupal based) front end installation.

3. Once you are done with installation, visit the website and login as site administrator with username and password that you provided during installation.

4. Locate the folder “ictpbx” in the extracted ICTFAX directory. Copy it and move it to /usr/ictfax/sites/all/modules.
cp -r /usr/src/ictfax-2.1.1/ictpbx /usr/ictfax/sites/all/modules

5. Now comeback to Web GUI and go to Modules menu and enable all modules in “ICTPBX System” Package.

6. Now you’ll see menu item Fax Account, ICTPBX System and others in your Navigation Menu.

Note: Following contributed modules should be enabled.
1.Chaos Tools
5.Mailhandler (All are required)
6.Job Scheduler

6. Email to FAX / FAX to Email service (optional)

1. Make sure that your desired domain’s MX records are properly configured for email2fax server.

2. install sendmail service and enable sendmail service at startup.
apt-get -y install sendmail sendmail-bin
update-rc.d sendmail defaults

2a. Also make sure you have created linux user “freeswitch”.
useradd freeswitch

3. enable sendmail to listen on public ip address look for following line in /etc/mail/
DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA’)dnl

4. and change line mentioned above into
DAEMON_OPTIONS(`Port=smtp, Addr=, Name=MTA’)dnl

5. apply changes
m4 /etc/mail/ > /etc/mail/

6. Add freeswitch to list of trusted user
echo “freeswitch” >> /etc/mail/trusted-users

7. Add your domain name in allowed local domain list to let sendmail receive mails for that domain
echo “FAX_DOMAIN.COM” >> /etc/mail/local-host-names

8. route all mails for none-existing addresses into freeswitch mailbox so we can receive emails for addresses like xyz_number@FAX_DOMAIN.COM
echo ‘@FAX_DOMAIN.COM freeswitch’ >> /etc/mail/virtusertable
makemap hash /etc/mail/virtusertable

9. grant proper permission to apache user on mail folder
chmod +t /var/spool/mail

10. restart sendmail service so changes can take affect
service sendmail restart

11. login at ictfax web interface as admin (ictfax)

12. goto administrator => mailhandler => Add Mailbox and set following fields
# E-mail address: fax@FAX_DOMAIN.COM
# Folder: /var/spool/mail/freeswitch
# POP3 or IMAP Mailbox: local Mbox
# Mailbox domain: *** must be empty ***
# Security: Require password (leave empty if you haven’t set already)
# Delete messages after they are processed?: TICK / Yes

13. setup cronjob so incoming email can be processed after every 5 minutes
echo ‘MAILTO=””‘ > /tmp/freeswitch_cron.txt
echo “*/5 * * * * wget -O /dev/null ‘http://FAX_DOMAIN.COM/cron.php?cron_key=your_key‘ 2>/dev/null” >> /tmp/freeswitch_cron.txt
crontab -l >> /tmp/freeswitch_cron.txt
crontab /tmp/freeswitch_cron.txt

14. You can find your cron url by logging in at your web interface as admin. Go to Reports -> Status Reports.
Copy your Cron URL and paste at the above URL and then run above lines at the command prompt.

NOTE: make sure that /etc/hosts.allow is properly configured for accepting mails, and smtp port (25) is not blocked by firewall.
If port is blocked, execute the following commands:
$ iptables -I INPUT 0 -m state –state NEW -m tcp -p tcp –dport 25 -j ACCEPT
#Save iptables rules
$ iptables-save > /etc/iptables.rules
#Add the following line to /etc/network/interfaces, for your eth0 section. This will restore iptables rules, after reboot.
post-up iptables-restore

Also DO NOT enable CLEAN URLS, because plivo has been configured to use default URLS.

15. Create a content type “fax” with three additional fields “to” of type text, “from” of type text” and “file” of type file.
Go to Admin => Structure => Feeds Importer => Mailhandler nodes. Click Override and then in Processor field make sure Fax Processor is selected. Click Mapping in fax processor. Make sure that your to, from and file fields are correctly mapped to toaddress, fromaddress and attachments respectively.

16. Create a new MailHandler source . Go to Admin => Content => Add new => Mailhandler Source.
Insert any name and select the mailbox you created in step 12 and save it.

17. Now you are ready to send faxes through your email. See Admin/User Guide for further details.