i create ssh like to sample
i want create report file for no answer call
anybody help to me?
#!/bin/bash
#Variables
sounds=/var/lib/asterisk/sounds/
rOut=/var/spool/asterisk/outgoing/
rUser=asterisk
rGroup=asterisk
nFile=call0.csv
rtry=60
stime=3
wtime=60
mtry=2
#############################################
for nums in $(cat $nFile)
do
num=`echo $nums | awk -F"," {'print $1'}`
noise=`echo $nums | awk -F"," {'print $2'}`
nTrunk=`echo $nums | awk -F"," {'print $4'}`
echo “date
,$num,$noise” >> call-log0.csv
echo “Channel: DAHDI/g0/$num” >> $num.call
echo “RetryTime:$rtry” >> $num.call
echo “MaxRetries:$mtry” >> $num.call
echo “Context: campain” >> $num.call
echo “WaitTime: wtime” >> $num.call
echo “CallerID: $num” >> $num.call
echo “Extension: 300” >> $num.call
chown $rUser.$rGroup $num.call
mv $num.call $rOut
sleep $stime
done