There are other services that will be more reliable/useful.
Which OS is your phone on? Where is your script going to be running? Are you behind a firewall?
- Setup app like Tasker on phone to (automatically) notify your script about its location. Monitoring which Wifi network is connectect will probably enough. When you leave home (disconnect from Wifi), your mobile will tell your script at work to redirect.
- Have the script monitor your Work wifi network, and when it sees your mobile phone appear on it, redirect the telephone.