Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

East Bay Ruby Tropo presentation

1,717 views

Published on

I talked at East Bay Ruby on March 15. These are the slides the audience saw.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

East Bay Ruby Tropo presentation

  1. 1. Tropo Adam Kalseywww.Tropo.com akalsey@tropo.com @tropo @akalsey
  2. 2. copper wireshttp://www.flickr.com/photos/anselmhook
  3. 3. expensive http://www.flickr.com/photos/amagill
  4. 4. GSMG722 TAPI JSR289 Telephony DevelopersSIP SS7 RTMP JSR309
  5. 5. Javascript HTML RESTWeb Developers Ruby URLs PHP JSON
  6. 6. 1,704 or 514,756?
  7. 7. menu welcome, for-spanish-press-8, main-ivr, :timeout => 8.seconds, :tries => 3 do |link| link.shipment_status 1 link.ordering 2 link.representative 4 link.spanish 8 link.employee 900..999 link.on_invalid { play invalid selection } end
  8. 8. voicexml<?xml version="1.0" encoding="UTF-8"?><vxml version = "2.1" > <form> <block> <prompt> Hello World. This is my first telephone application. </prompt> </block> </form></vxml>
  9. 9. http://tropo.com/http://github.com/tropo
  10. 10. • Call • Say• Answer • Ask• Transfer • Record• Reject • Conference• Hangup
  11. 11. answeroptions = { :choices => 1 (1,sales), 2 (2 support) }result = ask Hi. For sales, say Sales or press 1. For support, say Support or press 2., optionsif result.name == choice case result.value when 1 say Your money is important to us. when 2 say Your call will be ignored in the order received. endendhangup
  12. 12. PHP Javascript<?php answer();answer(); say("Hello World");say("Hello World"); hangup();hangup();?> Ruby JSON answer {"tropo":[{ say "Hello World" "say": "Hello World" hangup }]} Python Groovy answer() answer() say("Hello World") say("Hello World") hangup() hangup()
  13. 13. Mozilla RhinoQuercus JRuby Python Jython
  14. 14. event = call tel:+19166002497, { :recordURI => http://example.com/, :recordFormat => audio/mp3} function call($to, $options){ ... $_newCall_ = $callFactory->call( $options[callerID], $to, $options[recordURI], $options[recordFormat] ); ... }
  15. 15. TropoControl API Routing Sciprting WebAPI MohoState Machine Events Monitoring Plugins... JSR 289 JSR 309 JMX Clustering PRISM Application Server Speech Audio / VideoCall Recording Text to Speech Recognition Conference Plugin Signal WAV / MP3 MRCP Architecture Detection Prophecy Media Server
  16. 16. labs.voxeo.com/moho
  17. 17. Call or SMS: (510) 470-7863GTalk, XMPP: bartdemo@tropo.imhttp://github.com/tropo/tropo-samples/
  18. 18. require rubygemsrequire open-urirequire jsondefault_voice = envoices = { :es => { :lang => Spanish, :name => Carmen }, :de => { :lang => German, :name => Katrin }, :it => { :lang => Italian, :name => Paola }, :nl => { :lang => Dutch, :name => Saskia }, :fr => { :lang => French, :name => Florence }, :pl => { :lang => Polish, :name => zosia } }text = Berkeley is such a beautiful city!translate_uri = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=#{text}"say text, :voice => vanessavoices.each do |voice| url = URI.encode(translate_uri + "&langpair=#{default_voice}|#{voice[0].to_s}") translation = JSON.parse(open(url).read) say "Now in #{voice[1][:lang]}", :voice => victor log translation.inspect if translation[responseData][translatedText] say translation[responseData][translatedText], :voice => voice[1][:name] endendsay Thanks for listening! Goodbye., :voice => simon
  19. 19. babelverse
  20. 20. phono
  21. 21. $.phono({ onReady: function() { this.phone.dial("510-867-5309") }})
  22. 22. Tropo Adam Kalseywww.Tropo.com akalsey@tropo.com @tropo @akalsey

×