Created
February 25, 2012 16:09
-
-
Save hamin/1909293 to your computer and use it in GitHub Desktop.
twilio call into existing conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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