Update README

This commit is contained in:
Dominic Grimm 2024-08-01 21:39:29 +02:00
parent a45d3fba6b
commit 5ed67a3d3b

View file

@ -110,8 +110,16 @@ case "$1" in
# - T38MODEM_SIP_USERNAME
# - T38MODEM_SIP_PASSWORD
# - T38MODEM_SIP_SERVER
# - T38MODEM_STUN
if [ -z ${T38MODEM_STUN+x} ]; then
$STUN="--stun ${T38MODEM_STUN}"
else
$STUN=""
fi
COMMAND="t38modem -u T38modem --ptty +/dev/ttyT38-1 --sip-proxy ${T38MODEM_SIP_USERNAME}:${T38MODEM_SIP_PASSWORD}@${T38MODEM_SIP_SERVER} --sip-register ${T38MODEM_SIP_USERNAME}@${T38MODEM_SIP_SERVER},${T38MODEM_SIP_PASSWORD} --sip-listen udp\$:5060 --route t38:.*=sip:<dn>@${T38MODEM_SIP_SERVER} --route sip:.*=t38:<dn>"
COMMAND="t38modem -u T38modem --ptty +/dev/ttyT38-1 --sip-proxy ${T38MODEM_SIP_USERNAME}:${T38MODEM_SIP_PASSWORD}@${T38MODEM_SIP_SERVER} --sip-register ${T38MODEM_SIP_USERNAME}@${T38MODEM_SIP_SERVER},${T38MODEM_SIP_PASSWORD} --sip-listen udp\$:5060 --route t38:.*=sip:<dn>@${T38MODEM_SIP_SERVER} --route sip:.*=t38:<dn> ${STUN}"
echo "${COMMAND}"
exec $COMMAND > /dev/null 2>&1 &
PID=$!
echo "Starting t38modem with pid $PID (pidfile /run/t38modem.pid)"
@ -153,6 +161,7 @@ sudo chmod +x /etc/t38modem/bin/run
T38MODEM_SIP_USERNAME="USERNAME"
T38MODEM_SIP_PASSWORD="PASSWORD"
T38MODEM_SIP_SERVER="voip.example.com"
# T38MODEM_STUN="stun.example.com" # optional
```
- Give only root access to the config
@ -209,15 +218,44 @@ sudo systemctl start t38modem.service
<hr/>
## HylaFax
## Install HylaFax
- Version 6
- `sudo apt install hylafax-server`
- Set Postfix Configuration to **Local only** in dpkg-reconfigure menu
- Run `sudo faxsetup`
- Add new modem
- Enter correct modem port (`ttyT38-1`)
- Enter dialing configuration
- Accept default configuration for everything else
- It should automatically detect it to be a `T38FAX` modem
- Look at `man sendfax` to send faxes
- `fgetty` (the service to receive faxes) should be enabled automatically
- Bugs:
- If you get some error about protocol errors, just let HylaFax do its thing.
Fax over SIP is not stable at all in my experience
<hr/>
## Cron
- Alias your fax admin account as `FaxMaster` (`/etc/aliases`)
```bash
# /etc/aliases
# [...]
# HylaFax
FaxMaster: $USER # replace with fax admin account
```
- Add standard tasks to crontab file: `crontab -e`
```bash
0 * * * * /usr/sbin/faxqclean
25 23 * * * sh /usr/sbin/faxcron | mail FaxMaster
```