regular_run_cmdfile = /usr/local/bin/sms/spool/stats/gsm1.ussd
....
regular_run_cmdfile = /usr/local/bin/sms/spool/stats/gsm2.ussd
#---------------------------------------------------------------------------------
crontab
30 6 * * * /usr/local/bin/sms/scripts/account_prepare.sh
#---------------------------------------------------------------------------------
File: account_prepare.sh
#!/bin/sh
echo 'AT+CUSD=1,"*111#"'> /usr/local/bin/sms/spool/stats/eccom1.ussd
echo 'AT+CUSD=1,"*112#"'>>/usr/local/bin/sms/spool/stats/eccom1.ussd
echo 'AT+CUSD=1,"*111#"'> /usr/local/bin/sms/spool/stats/eccom2.ussd
echo 'AT+CUSD=1,"*112#"'>>/usr/local/bin/sms/spool/stats/eccom2.ussd
eventhandler_ussd = /usr/local/bin/sms/scripts/eventhandler_ussd
File: eventhandler_ussd
#################################################
file=$2
device=$3
command=$5
ussdcommand=${command:12:3}
if [ "$event" = "USSD" ] ; then
cp -f $file /var/log/sms/$device.$ussdcommand.ussd
fi
« Last edit by
nm11 on Thu Apr 22, 2010 10:24, 177 months ago. »