Google Voice icon

Thanks to a comment from Evaryont on the original SMS from the command line with Google Voice post, a problem that was causing Error 500s in the script has been solved.

Check the original post for the script, and change the line (around line 90)

rnrse = newres.match(/’_rnr_se’: ‘([^’]+)’/)[1]

to:

rnrse = CGI.escape(newres.match(/’_rnr_se’: ‘([^’]+)’/)[1])

The CGI escaping should help with the Google’s changes to the _rnr_se variable. Evaryont also notes that the script works great in Arch Linux with Ruby 1.9.2. For 1.9 compatibility (thanks to David for clarification in the comments below), remove the -rjcode from the hashbang on the first line, and add require 'jcode' if RUBY_VERSION < '1.9' below. Have fun!