Setting Vonage line on and off
For my W3C work, I (and a good chunk of the W3C Team) use Vonage as a Voice over IP service that allows me to participate to teleconferences, call my colleagues, etc. for a very low cost.
But one of my issues with it is that, being with a US number, you can get spammers calling you at US hours, which may or may not match the actual timezone you’re in. I had asked a while back to the technical support in Vonage if there was a way to ask your line to be off (i.e. directly on voicemail) at well-defined times of the day, but to no avail.
Instead, I adapted a script written by one of my colleagues (Ted) to use their Web interface through scripting, primarily based on curl.
Now, with this script, I call set my line on and off with a simple call à la enable-voicemail-vonage on or off; which also means that I can call the said script from a cron job if I want it to be set on and off at a given time in the day…
Of course, I would feel more confident in the reliability of the said script if I could have used some well-defined HTTP interface (e.g. with a WSDL definition); but for the time being, screen scraping will do.
September 12th, 2005 at 10:09
Hmm… I realize the name of the script is extremely confusing, especially given the actual meaning of “on” and “off” as parameters; the script should be really called “vonage-line-ring” since “on” sets the voicemail delay to 30s, and “off” to 0s.
December 15th, 2005 at 14:36
Yea it was a bit confusing thanks for pointing that out.I also utilize Vonage to do my calls and it has saved me a bunch of money compared to my last service provider.Have not had any spammers call me yet but soemthing to look forward to lol ! Neat script will pass it on to my other Vonage friends.
October 23rd, 2007 at 18:55
Very useful. I’d never used curl before. I’ve adapted the script to enable call forwarding to my cell phone, vis:
curl \
-d “did=$vonnum” \
-d voicemailTimeout=1 \
-d enableCallForwarding=true \
-d callForwardingSeconds=22 \
-d simulRingEnabled=false \
-d “submit=Save Changes” \
-d action=save \
-d phoneNumber=$vonnum \
-d did=$vonnum \
-d singleAddress=$celnum \
-b “/tmp/von_cookie_$username” \
“https://secure.vonage.com/vonage-web/features/callforwarding/edit.htm” \
2>&1 >> $debugfile
May 1st, 2011 at 12:14
An updated version of the call forwarding feature would be highly appreciated!
November 2nd, 2011 at 14:59
Thanks for the script. It inspired me to write a cron job using wget, to restart the Vonage device every 5 minutes, so that no call lasts more than 5 minutes.
These are two ‘wget’ calls; first one logs in into the web interface of the Vonage device using default username/password. And the second command asks the device to enable DHCP (which is already enabled by default), and the device reboots in response to this request, so mission accomplished.
wget -o /dev/null -O /dev/null –post-data=”loginUsername=router&loginPassword=router” http://192.168.0.102:8080/goform/login && wget -o /dev/null -O /dev/null –post-data=”DhcpServerEnable=0×1000&LocalIpAddressIP0=192&LocalIpAddressIP1=168&LocalIpAddressIP2=15&LocalIpAddressIP3=1&SubnetMask0=255&SubnetMask1=255&SubnetMask2=255&SubnetMask3=0&StartingLocalAddressIP3=2&EndingLocalAddressIP3=254&LeaseTimeDays=0&LeaseTimeMins=0″ http://192.168.0.102:8080/goform/dhcp