Translate

2012-04-22

Script for automated out calls

The following script uses the "call' files utility of Asterisk to automatically call a list of numbers and playback a sound file;

 launch_call.sh
#!/bin/sh
TIME_BETWEEN_CALLS=30
TRUNK="SIP/PROVIDER"
FILE_TO_PLAYBACK="vm-intro"

for i in `cat input.txt`
do
echo "Calling $i"
        echo "Channel: $TRUNK/$i
Application: Playback
Data: $FILE_TO_PLAYBACK" > $i.call

        cp $i.call /var/spool/asterisk/outgoing/$i.call
   
sleep $TIME_BETWEEN_CALLS
done

sample of input.txt
0111111111
0122222222
1478541236
0147854125