Save as viaTalkClearCallForward or any other name as desired. From command line: viaTalkClearCallForward 19521234567 mySecretPassword #!/bin/bash # #$1 = Login name #$2 = Password curl -b /tmp/$1.cookie -L "https://support.viatalk.com/billing/user.php?op=menu&tile=callforward" >/tmp/$1-forward.html 2>/dev/null result=`cat /tmp/$1-forward.html|grep callforward|head -1` if [ "$result" = "" ]; then curl -c /tmp/$1.cookie -d "op=login&submit=submit&username=$1&password=$2" -L https://support.viatalk.com/billing/index.php>/dev/null 2>&1 fi if [ "$result" = "" ]; then echo -e "Login Error\n" exit 1 else curl -b /tmp/$1.cookie -L "https://support.viatalk.com/billing/user.php?op=menu&tile=callforward&number=$1&clear=Clear" >/tmp/$1-forward.html 2>/dev/null result=`cat /tmp/$1-forward.html|grep -A 6 "name=\"number\" value=\"$1\""|grep -A 1 ">$1<"|tail -1|grep "><"` if [ "$result" = "" ]; then echo -e "Failed to clear forward for $1\n" exit 1 fi fi exit 0