Re: Speaktime script and COSSTATE


Chad Starling <chad@...>
 

OK paul i found that the changes i sent you were not enough information so i decided to post the entire script file for id_time what this script does is id's then plays time as i also noticed with some testing is that the script has to be running from the custom DIR.. atached is the script also is pasted into the email here are the changes below with information..

#!/bin/bash

# Make sure we are user repeater!!!

if [ `/usr/bin/whoami` != "repeater" ] ; then

echo This program must be run as user REPEATER!

exit 1

fi

. /home/irlp/custom/environment

# Make sure we have sourced the environment file

if [ "$RUN_ENV" != "TRUE" ] ; then

echo "You must source the environment file first. Do this by running:"

echo ". /home/irlp/custom/environment"

exit 1

fi

if [ -f $LOCAL/active ] ; then exit 0 ; fi

if [ "$#" = "0" ] ; then exit 1; fi

$BIN/coscheck

$BIN/key

usleep 900000

cd /home/irlp/custom                       <<<<  MAKE SURE THIS LINE EXISTS OR IT WILL NOT WORK

$BIN/play $AUDIO/$1.wav      <<<< from command line or cron   id_time   stnXXX

./saytime

$BIN/unkey

exit 0

 
notice i am using PLAY instead of wavplay also you can reverse the play and saytime if you want it to say time then id etc... but make sure the CD dir exists befor the play...
hope this helps paul.. for some reason if this script is not executed from the custom dir it does not check COS that i noticed..
 
and when the script goes off you can test it by keying up your repeater or sending COS to the irlp node and the script should wait till you unkey before it id's
 
 

*************************************************
Chad Starling    ICQ# 1177754
CALL -------  VA3CWS / VA3SCR 
NODES     280 / 281
 
 

----- Original Message -----
Sent: Tuesday, September 18, 2001 8:56 AM
Subject: [irlp] Speaktime script and COSSTATE

Hi all
 
I have been using the voice ID script and voice fiels provided by Bryan VO1HHR for several months now.   All works well except for the fact that it does not hold off when the COS is active.   This results is my node sends the voice ID to the repeater whenever the cron calls for it and ignores the cosstate.
 
I have run the utility to monitor the states for COS and PTT and they do display properly so I know the IRLP code is seeing the COS activity OK.
 
Would apprecaitte anyones input on this script
 
Tnx
Paul VE3SY
 
 
 
#!/bin/bash
. /home/irlp/custom/environment
# Make sure we are user repeater!!!
if [ `/usr/bin/whoami` != "repeater" ] ; then
  echo This program must be run as user REPEATER!
  exit 1
fi
 
# Make sure we have sourced the environment file
if [ "$RUN_ENV" != "TRUE" ] ; then
  echo "You must source the environment file first. Do this by running:"
  echo ". /home/irlp/custom/environment"
  exit 1
fi
 
if [ -f $LOCAL/active ] ; then exit 0 ; fi
#if [repeater@irlp scripts]# cosstate   then exit 0 ; fi
 
$BIN/cosstate
$BIN/key
usleep 900000
cd /home/irlp/custom
./saytime
"$SCRIPT"/wavplay stn241
$BIN/unkey
exit 0

Join IRLP@irlp.groups.io to automatically receive all group messages.