SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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