Don’t call me DOM

9 September 2005

Setting Vonage line on and off

Filed under:

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.

5 Responses to “Setting Vonage line on and off”

  1. dom Says:

    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.

  2. Ashley Bowers Says:

    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.

  3. iroberts Says:

    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” \
    “” \
    2>&1 >> $debugfile

  4. Mike Says:

    An updated version of the call forwarding feature would be highly appreciated!

  5. Gurjeet Singh Says:

    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” && 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″

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.