t38modem Dockerfile
This commit is contained in:
parent
a5a8b2c3a2
commit
1a3c20b4cb
5 changed files with 122 additions and 0 deletions
6
docker/t38modem/services/socat.sh
Normal file
6
docker/t38modem/services/socat.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# $1: PTTY ID
|
||||
# $2: TCP server port
|
||||
|
||||
socat -d -d "file:${1},raw,echo=0" "TCP-LISTEN:${2},reuseaddr"
|
22
docker/t38modem/services/t38modem.sh
Normal file
22
docker/t38modem/services/t38modem.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PTTY=$(seq -f "+${1}-%g" -s "," "${T38MODEM_MODEM_COUNT}")
|
||||
|
||||
CMD=(
|
||||
"t38modem"
|
||||
"--ptty" "${PTTY}"
|
||||
"--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"
|
||||
"--stun" "${T38MODEM_STUN_SERVER}"
|
||||
"--route" "t38:.*=sip:<dn>@${T38MODEM_SIP_SERVER}"
|
||||
"--route" "sip:.*=t38:<dn>"
|
||||
)
|
||||
|
||||
if [ "$T38MODEM_DISABLE_T38" = true ]; then
|
||||
cmd+=("--disable-t38-mode" "--audio")
|
||||
fi
|
||||
|
||||
CMD+=("${T38MODEM_CMD_ARGS}")
|
||||
|
||||
exec "${CMD[@]}"
|
Loading…
Add table
Add a link
Reference in a new issue