@comfine Thank you for your documentation.
I did the Setup on the Official Sangoma SNG7 Distro today:
here is the documentation:
My steps to get Hylafax working on SNG7
yum install hylafax+ hylafax+-client -y
yum install libtiff-devel
wget https://sourceforge.net/projects/iaxmodem/files/iaxmodem/iaxmodem-1.3.0.tar.gz
tar xfpz iaxmodem-1.3.0.tar.gz
cd iaxmodem-1.3.0
./build static
cp iaxmodem /usr/local/sbin
mkdir /etc/iaxmodem
nano /etc/iaxmodem/ttyIAX0
insert the following lines and save:
device /dev/ttyIAX0
owner uucp:uucp
mode 666
port 4570
refresh 50
server 127.0.0.1
peername YOUREXTENSIONNUMBER
secret YOURPASSWORDFROMIAX2EXTENSION
codec alaw
/usr/sbin/faxsetup
Press enter for all, expect following:
Country code [1]? ← enter value for your country…
Area code ? ← enter value for your country WIHTOUT leading numbers
Long distance dialing prefix [1]? < enter value for your country…
International dialing prefix [011]? enter value for your country…
if faxaddmodem is called, insert NO or press CTR+C
nano config.ttyIAX
change the following lines to your need:
CountryCode: your countrycode!
AreaCode: your areacode WITHOUT leading numbers
FAXNumber: type in complete number with international predial
LongDistancePrefix: as in your country…
InternationalPrefix: as in your country…
RecvFileMode: 0777
LocalIdentifier: your_complete_fax_identifier (is written on each fax you send…)
cp config.ttyIAX /var/spool/hylafax/etc/config.ttyIAX0
nano /etc/systemd/system/iaxmodem.service
insert and save following:
[Unit]
Description = IAXmodem for /dev/ttyIAX0
ConditionPathExists = /etc/iaxmodem/ttyIAX0
Requires = freepbx.service
After = freepbx.service
[Service]
Type = simple
Restart=always
RestartSec=30
ExecStart = /usr/local/sbin/iaxmodem ttyIAX0
[Install]
WantedBy=multi-user.target
Enable the service to make it autorun:
systemctl enable iaxmodem
nano /etc/systemd/system/faxgetty.service
insert and save following:
[Unit]
Description = Faxgetty for /dev/ttyIAX0
Requires = freepbx.service
After = freepbx.service
[Service]
Type = simple
Restart=always
RestartSec=30
ExecStart = /usr/sbin/faxgetty ttyIAX0
[Install]
WantedBy=multi-user.target
Enable the service to make it autorun:
systemctl enable faxgetty
nano /etc/systemd/system/hfaxd.service
insert and save following:
[Unit]
Description = Hylafax hfaxd
#ConditionPathExists = /etc/iaxmodem/ttyIAX
Requires = freepbx.service
After = freepbx.service[Service]
#User=root
#Group=root
Type = forking
ExecStart = /usr/sbin/hfaxd -i hylafax[Install]
WantedBy=multi-user.target
Enable the service to make it autorun:
systemctl enable hfaxd
nano /etc/systemd/system/faxq.service
insert and save following:
[Unit]
Description = faxq
Requires = freepbx.service
After = freepbx.service
[Service]
Type = forking
ExecStart = /usr/sbin/faxq[Install]
WantedBy=multi-user.target
Enable the service to make it autorun:
systemctl enable faxq
nano /var/spool/hylafax/etc/hosts.hfaxd
Enter your IP Adresseses which should have access to the Server
IP ADRESS
nano /var/spool/hylafax/bin/pdf2fax.gs
change
vres=98
to
vres=196
and save
in freepbx
check that Module “Asterisk IAX Settings” is installed
Open it and insert under Other IAX settings
calltokenoptional = 0.0.0.0/0.0.0.0
maxcallnumbers = 16382
create a new extension IAX2, use the extension-number you specified in the ttyIAX0-File, and the secret. set the option requirecalltoken to NO.
reboot the system and you are done!