public
Created

  • Download Gist
troposmstest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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 = Tropo::Generator.new
t.call(:to => to, :network => "SMS")
t.say(:value => "" + msg + "")
t.response
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.