| Robert Kulagowski 2007-03-16, 1:11 pm |
| Patrick Diener wrote:
> there is some 3th party software that can do that for you, e.g.:
> http://www.voipintegration.com/software.html
If you're cheap, and not afraid of doing it a different way, you can
pretend that there's a user pressing the buttons on the phone itself
with a script file:
$ cat background.sh
LIMIT=253
for ((a=20; a<=LIMIT; a++))
do
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=settings.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=kp1.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=kp2.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=kp2.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=select.txt http://10.255.2.$a/CGI/Execute
sleep 5
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=save.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=exit.txt http://10.255.2.$a/CGI/Execute
sleep 1
wget -O /dev/null --http-user="abcd" --http-passwd="12345"
--post-file=exit.txt http://10.255.2.$a/CGI/Execute
echo -n "$a "
done
where
settings.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:Sett
ings%22%2F%3E%3C%2FCiscoIPPhoneExecute%3
E
kp1.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:KeyP
ad1%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
kp2.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:KeyP
ad2%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
select.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:Soft
1%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
save.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:Soft
2%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
exit.txt is:
XML=%3CCiscoIPPhoneExecute%3E%3CExecuteI
tem+Priority%3D%220%22+URL%3D%22Key:Soft
3%22%2F%3E%3C%2FCiscoIPPhoneExecute%3E
Note that this is a pretty dumb script, because it doesn't check if
there's a phone there. You can also use the PERL Cisco::Phone module if
you like that sort of stuff.
|