#!/bin/bash ######################################################################## # filename: fastdtmfdial # # description: Used to play DTMF tones at a user specified speed, # usually faster than the standard dtmfdial program. # # history: # 20021007 kc6hur revised edition ######################################################################## # # FUNCTION: senddtmf # function senddtmf () { ${BIN}/coscheck # wait for clear channel ${BIN}/key # key the TX usleep ${TXDELAY:-500000} # Wait for RX to hear it ${BIN}/dial --tone-time 50 --silent-time 50 --volume 30 "$1" ${BIN}/unkey } # Make sure we are user repeater!!! if [ `/usr/bin/whoami` != "repeater" ] ; then echo "${0##*/}: must be run as user REPEATER!" exit 1 fi # Make sure we have sourced the environment file if [ "$RUN_ENV" != "TRUE" ] ; then . /home/irlp/custom/environment fi # # Check for presence of an argumant # if [ "$#" = "0" ] ; then echo "usage: ${0##*/} " exit 1; fi # # Main Program # if [ -f ${LOCAL}/active ] ; then killall ispeaker >&/dev/null 2>&1 killall ispeaker_PCI >&/dev/null 2>&1 killall sfswrapper >&/dev/null 2>&1 senddtmf "$1" ${SCRIPT}/sfswrapper else senddtmf "$1" fi exit 0