Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'rubygems'
require 'tropo-webapi-ruby'
require 'sinatra'
post '/index_sms.json' do
v = Tropo::Generator.parse request.env["rack.input"].read
to = "+" + v[:session][:parameters][:numbertodial]
msg = v[:session][:parameters][:msg]
t = => to, :network => "SMS")
t.say(:value => "" + msg + "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment