#!/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:@${T38MODEM_SIP_SERVER}" "--route" "sip:.*=t38:" ) if [ "$T38MODEM_DISABLE_T38" = true ]; then cmd+=("--disable-t38-mode" "--audio") fi CMD+=("${T38MODEM_CMD_ARGS}") exec "${CMD[@]}"