Skip to content

Instantly share code, notes, and snippets.

@hamin
Created February 25, 2012 16:09
Show Gist options
  • Select an option

  • Save hamin/1909293 to your computer and use it in GitHub Desktop.

Select an option

Save hamin/1909293 to your computer and use it in GitHub Desktop.
twilio call into existing conf
get '/queue_song' do
@client = Twilio::REST::Client.new ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN']
@call = @client.account.calls.create(
:from => '+13473144879',
:to => '+13158491034',
:url => 'http://173.204.223.126/play_song'
)
end
post '/play_song' do
puts "IT CAME TO PLAY SONG!!!"
"<Response>
<Play>http://pianomidi.org/mp3as/b-sympho01.mp3</Play>
</Response>"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment