Install Diva Server and HylaFAX from source on Ubuntu 9.0.4
Do a base build of Ubuntu Server (x86) with the mailserver option and then update it.
Now you need to install some extra packages
sudo apt-get install xinetd ncurses-dev g++ libc-dev linux-source linux-headers-2.6.28-13-generic kernel-package binutils build-essential libtiff-dev mgetty mgetty-fax mgetty-voice libtiff-tools autoconf automake1.9 ghostscript netpbm
Some of these are meta-packages, and otheres will have dependancies that will be automatically covered
Now you need to extract the sources
cd /usr/src
sudo tar \-xjf /usr/src/linux-source-<tab complete> is the one for a tar.bz2
Then make symbolic link for it
sudo ln \-s linux-source<tab complete> linux
If you are using the default ubuntu Dash shell, you will need to relink to bash.
sudo ln \-sf /bin/bash /bin/sh
To ensure you are in the correct shell, log out and and back in again
Download the Dialogic driver and chmod \+x the installer
sudo chmod+x Diva<tab complete>
Now run the installer
sudo ./Diva<tab complete>
when the first stage completes, you should get a message box like
+------------------------------------------------------------------------------+ | DIVAS4LINUX INSTALLATION COMPLETE | +------------------------------------------------------------------------------+ | | | Please start Dialogic Diva Build Wizard | | (cd /usr/lib/opendiva/divas/src; ./Build) | | to build and install drivers for Dialogic Diva ISDN Adapters | | - | | Please start Dialogic Diva Configuration Wizard | | (/usr/lib/opendiva/divas/Config) | | to detect and configure all installed Dialogic Diva ISDN Adapters | | - | | Diva HTTP Configuration Server started at port '10005' | | To enable Web interface access please set password in the file | | '/usr/lib/opendiva/divas/httpd/login/login' | | - | | | +------------------------------------------------------------------------------+
you can then make the driver
cd /usr/lib/opendiva/divas/src
sudo ./Build \-pci
The option \-pci builds for PCI devices
once it has installed you need to set a web interface password
sudo nano /usr/lib/opendiva/divas/httpd/login/login
You should now be able to browse to the Dialogic service website http://f.q.d.n:10005 to configure the card.
With the card configured, you can now install hylafax
Download the latest tarball and extract it
sudo tar \-xzvf hylafax<tabcomplete>
then to build, do
cd hylafax<tab complete>
sudo ./configure
then
sudo make
then
sudo make install
After the build process has finished, you then start to configure it
sudo /usr/local/sbin/faxsetup
At the end of this it will automatically take you into faxaddmodem, which you need to do for the two ports (one for each channel).
You will now have a base hylafax install, however you also need to get faxgetty to run so that it can receive faxes.
cd /etc/event.d
sudo nano faxgetty-ttyds01
start on stopped rc2 start on stopped rc3 start on stopped rc4 start on stopped rc5 stop on runlevel 0 stop on runlevel 1 stop on runlevel 6 respawn exec /usr/local/sbin/faxgetty ttyds01
sudo nano faxgetty-ttyds02
start on stopped rc2 start on stopped rc3 start on stopped rc4 start on stopped rc5 stop on runlevel 0 stop on runlevel 1 stop on runlevel 6 respawn exec /usr/local/sbin/faxgetty ttyds02
After rebooting, you should now have a fax server, that answers inbound calls
The next stage is getting it to route faxes to an email address, and from there, route to different addresses based on the DDI that the fax was sent to.
To do this, you need to create a file called FaxDispatch in /usr/spool/hylafax
sudo nano /var/spool/hylafax/etc/FaxDispatch {code} case "$CIDNUMBER" in
2022) SENDTO=recipient1@domain.com; FILETYPE=pdf;; # send a pdf 5900) SENDTO=recip2@f.q.d.n; FILETYPE=tif;; # send a tiff 2147) SENDTO=recip3@d.n # send a ps
esac NOTIFY_FAXMASTER=errors {code} This will then route inbound faxes on the listed DDI numbers to their respective email addresses.
Pages that I found useful during this
http://www.dialogic.com/support/helpweb/slnxen/hylafax.aspx
http://www.hylafax.org/content/Handbook:Source_Code_Install
http://www.hylafax.org/archive/2008-09/msg00179.php]
ShouldBeQ931 22:14, 4 July 2009 (EDT)