SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Tropo           Adam Kalsey
www.Tropo.com   akalsey@tropo.com
  @tropo             @akalsey
copper wires




http://www.flickr.com/photos/anselmhook
expensive




            http://www.flickr.com/photos/amagill
GSM
G722                TAPI
          JSR289

 Telephony
 Developers
SIP       SS7
                   RTMP
       JSR309
Javascript
  HTML
               REST

Web Developers
        Ruby          URLs
  PHP
           JSON
1,704 or 514,756?
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
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>
http://tropo.com/
http://github.com/tropo
• Call       • Say
• Answer     • Ask
• Transfer   • Record
• Reject     • Conference
• Hangup
answer

options = { :choices => '1 (1,sales), 2 (2 support)' }
result = ask 'Hi. For sales, say Sales or press 1. For
      support, say Support or press 2.', options

if 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.'
  end
end

hangup
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()
Mozilla Rhino
Quercus




     JRuby


    Python
  Jython
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']
                     );
             ...
         }
Tropo
Control API         Routing           Sciprting        WebAPI




                              Moho
State Machine        Events        Monitoring       Plugins...


 JSR 289            JSR 309             JMX            Clustering



                 PRISM Application Server



                     Speech                        Audio / Video
Call Recording                    Text to Speech
                   Recognition                      Conference

                      Plugin          Signal
  WAV / MP3                                           MRCP
                   Architecture      Detection



                  Prophecy Media Server
labs.voxeo.com/moho
Call or SMS: (510) 470-7863


GTalk, XMPP: bartdemo@tropo.im




http://github.com/tropo/tropo-samples/
require 'rubygems'
require 'open-uri'
require 'json'

default_voice = 'en'
voices = { :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 => 'vanessa'

voices.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]
  end
end

say 'Thanks for listening! Goodbye.', :voice => 'simon'
babelverse
phono
$.phono({
   onReady: function() {
     this.phone.dial("510-867-5309")
   }
})
Tropo           Adam Kalsey
www.Tropo.com   akalsey@tropo.com
  @tropo             @akalsey

Weitere ähnliche Inhalte

Was ist angesagt?

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
Tom Corrigan
 
Richard practica nº2.php
Richard  practica nº2.phpRichard  practica nº2.php
Richard practica nº2.php
richardrq
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Nobuo Danjou
 

Was ist angesagt? (19)

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
 
Richard practica nº2.php
Richard  practica nº2.phpRichard  practica nº2.php
Richard practica nº2.php
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from inside
 
What RabbitMQ can do for you (phpnw14 Uncon)
What RabbitMQ can do for you (phpnw14 Uncon)What RabbitMQ can do for you (phpnw14 Uncon)
What RabbitMQ can do for you (phpnw14 Uncon)
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)
 
Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6
 
PHP7 is coming
PHP7 is comingPHP7 is coming
PHP7 is coming
 
Profiling php5 to php7
Profiling php5 to php7Profiling php5 to php7
Profiling php5 to php7
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
An introduction to PHP 5.4
An introduction to PHP 5.4An introduction to PHP 5.4
An introduction to PHP 5.4
 
Shell Script
Shell ScriptShell Script
Shell Script
 
Perl IO
Perl IOPerl IO
Perl IO
 
How Xslate Works
How Xslate WorksHow Xslate Works
How Xslate Works
 
2010/7/31 LTの虎@LL Tiger
2010/7/31 LTの虎@LL Tiger2010/7/31 LTの虎@LL Tiger
2010/7/31 LTの虎@LL Tiger
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
Scaling antispam solutions with Puppet
Scaling antispam solutions with PuppetScaling antispam solutions with Puppet
Scaling antispam solutions with Puppet
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLite
 

Andere mochten auch (6)

Betty crocker brief
Betty crocker briefBetty crocker brief
Betty crocker brief
 
Introduction to jRuby
Introduction to jRubyIntroduction to jRuby
Introduction to jRuby
 
Rps Vsba Presentation 11.18.10 [3]
Rps   Vsba Presentation 11.18.10 [3]Rps   Vsba Presentation 11.18.10 [3]
Rps Vsba Presentation 11.18.10 [3]
 
Halfway to ‘Big Bang': ensuring competence, promoting excellence...
Halfway to ‘Big Bang': ensuring competence, promoting excellence...Halfway to ‘Big Bang': ensuring competence, promoting excellence...
Halfway to ‘Big Bang': ensuring competence, promoting excellence...
 
Dropping the "e". Focus on competence development as a precondition for excel...
Dropping the "e". Focus on competence development as a precondition for excel...Dropping the "e". Focus on competence development as a precondition for excel...
Dropping the "e". Focus on competence development as a precondition for excel...
 
Data Protection and Privacy in Moodle
Data Protection and Privacy in MoodleData Protection and Privacy in Moodle
Data Protection and Privacy in Moodle
 

Ähnlich wie East Bay Ruby Tropo presentation

Voicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.comVoicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.com
Voxeo Corp
 
Hey man, can I get a clue?
Hey man, can I get a clue?Hey man, can I get a clue?
Hey man, can I get a clue?
Voxeo Corp
 

Ähnlich wie East Bay Ruby Tropo presentation (20)

Kamailio and VoIP Wild World
Kamailio and VoIP Wild WorldKamailio and VoIP Wild World
Kamailio and VoIP Wild World
 
Kamailio and VoIP Wild World
Kamailio and VoIP Wild WorldKamailio and VoIP Wild World
Kamailio and VoIP Wild World
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
 
Using Kamailio for Scalability and Security
Using Kamailio for Scalability and SecurityUsing Kamailio for Scalability and Security
Using Kamailio for Scalability and Security
 
Voicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.comVoicecon - Mashups with Tropo.com
Voicecon - Mashups with Tropo.com
 
Kamailio - SIP Servers Everywhere
Kamailio - SIP Servers EverywhereKamailio - SIP Servers Everywhere
Kamailio - SIP Servers Everywhere
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
Hey man, can I get a clue?
Hey man, can I get a clue?Hey man, can I get a clue?
Hey man, can I get a clue?
 
Who wants to be a Developer?
Who wants to be a Developer?Who wants to be a Developer?
Who wants to be a Developer?
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
Symfony Performance
Symfony PerformanceSymfony Performance
Symfony Performance
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
FOSDEM 2017 - RTC Services With Lua and Kamailio
FOSDEM 2017 - RTC Services With Lua and KamailioFOSDEM 2017 - RTC Services With Lua and Kamailio
FOSDEM 2017 - RTC Services With Lua and Kamailio
 
Ruby as a glue language
Ruby as a glue languageRuby as a glue language
Ruby as a glue language
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
Adding 1.21 Gigawatts to Applications with RabbitMQ (DPC 2015)
 
Phone calls and sms from php
Phone calls and sms from phpPhone calls and sms from php
Phone calls and sms from php
 
Developing Tropo Applications
Developing Tropo ApplicationsDeveloping Tropo Applications
Developing Tropo Applications
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

East Bay Ruby Tropo presentation

  • 1. Tropo Adam Kalsey www.Tropo.com akalsey@tropo.com @tropo @akalsey
  • 3. expensive http://www.flickr.com/photos/amagill
  • 4. GSM G722 TAPI JSR289 Telephony Developers SIP SS7 RTMP JSR309
  • 5. Javascript HTML REST Web Developers Ruby URLs PHP JSON
  • 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. 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>
  • 10. • Call • Say • Answer • Ask • Transfer • Record • Reject • Conference • Hangup
  • 11. answer options = { :choices => '1 (1,sales), 2 (2 support)' } result = ask 'Hi. For sales, say Sales or press 1. For support, say Support or press 2.', options if 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.' end end hangup
  • 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. Mozilla Rhino Quercus JRuby Python Jython
  • 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. Tropo Control API Routing Sciprting WebAPI Moho State Machine Events Monitoring Plugins... JSR 289 JSR 309 JMX Clustering PRISM Application Server Speech Audio / Video Call Recording Text to Speech Recognition Conference Plugin Signal WAV / MP3 MRCP Architecture Detection Prophecy Media Server
  • 17. Call or SMS: (510) 470-7863 GTalk, XMPP: bartdemo@tropo.im http://github.com/tropo/tropo-samples/
  • 18. require 'rubygems' require 'open-uri' require 'json' default_voice = 'en' voices = { :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 => 'vanessa' voices.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] end end say 'Thanks for listening! Goodbye.', :voice => 'simon'
  • 20. phono
  • 21. $.phono({ onReady: function() { this.phone.dial("510-867-5309") } })
  • 22. Tropo Adam Kalsey www.Tropo.com akalsey@tropo.com @tropo @akalsey