SlideShare a Scribd company logo
Look Who’s Talking




        Pablo Cantero
       @pablocantero
   http://pablocantero.com
                             28° GURU-SP - 09/03/2013
Why I started with it?
We had a problem
We needed a phone support 24x7 in case the
  website becomes unavailable and other
          possible urgent issues.
Look Who's Talking
Look Who's Talking
Solution
We decided to use a Communication as a Service (CaaS) to
register a fixed phone number in Brazil, which receives a call
     and redirects it to the developer on duty cellphone.
http://www.twilio.com
Why Twilio?

• No Contracts
• Pay as you go
• Simple and well documented API
Brazilian pricing

•   To receive a call = 1¢/minute

•   To make a call = 33¢/minute

•   To send a text: starts at =1.2¢/message

•   Fixed brazilian number = 3$/month

•   Fixed american number = 1$/month
Support Roulette
https://github.com/phstc/support-roulette
Look Who's Talking
Plantão Elo7
Call me maybe




     WebRTC
gem “twilio-ruby”
account_sid	
  	
  	
  =	
  ENV["TWILIO_ACCOUNT_SID"]
auth_token	
  	
  	
  	
  =	
  ENV["TWILIO_AUTH_TOKEN"]
twiml_app_sid	
  =	
  ENV["TWILIO_TWIML_APP"]

capability	
  =	
  Twilio::Util::Capability.new	
  
account_sid,	
  auth_token

capability.allow_client_outgoing	
  twiml_app_sid
	
  
token	
  =	
  capability.generate
<ul	
  id="user-­‐list"	
  data-­‐token="<%=	
  token	
  %>">
<%	
  @users.each	
  do	
  |user|	
  %>
	
  	
  	
  	
  <li>
                	
  	
  <%=	
  user.name	
  %>	
  -­‐	
  
                	
  	
  <a	
  href="#"	
  rel="phone-­‐number">
                        	
  	
  <%=	
  user.name	
  %>
                	
  	
  </a>
                </li>
<%	
  end	
  %>
</ul>
<ul	
  id="user-­‐list"	
  data-­‐token="eyJ0...">
	
  	
  <li>
	
  	
  	
  	
  	
  Pablo	
  Cantero
	
  	
  	
  	
  	
  <a	
  href="#"	
  rel="phone-­‐number">
	
  	
  	
  	
  	
  	
  	
  +551199...
	
  	
  	
  	
  	
  </a>
	
  	
  	
  </li>
</ul>
<script src="//static.twilio.com/libs/twiliojs/1.1/twilio.min.js"></script>
$	
  -­‐>
	
  	
  Twilio.Device.setup	
  $("#user-­‐list").data	
  "token"
	
  
	
  	
  $("a[rel=phone-­‐number]").on	
  "click",	
  (e)	
  -­‐>
	
  	
  	
  	
  e.preventDefault()

	
  	
  	
  	
  if	
  Twilio.Device.status()	
  !=	
  "ready"
	
  	
  	
  	
  	
  	
  Twilio.Device.disconnectAll()
	
  	
  	
  	
  	
  	
  return

	
  	
  	
  	
  $this	
  =	
  $	
  e.target
	
  	
  	
  	
  Twilio.Device.connect	
  $this.text()
$(function(){

	
  	
  Twilio.Device.setup($("#user-­‐list").data("token"));
	
  
	
  	
  $("a[rel=phone-­‐number]").on("click",	
  function(e){

	
  	
  	
  	
  e.preventDefault();

	
  	
  	
  	
  if(Twilio.Device.status()	
  !==	
  "ready"){
	
  	
  	
  	
  	
  	
  Twilio.Device.disconnectAll();
	
  	
  	
  	
  	
  	
  return;
	
  	
  	
  	
  }

	
  	
  	
  	
  $this	
  =	
  $(e.target);

	
  	
  	
  	
  Twilio.Device.connect($this.text());
	
  	
  });

});
Other examples
Twilio + Monit =
Pingdom Mingdom
https://gist.github.com/phstc/5044114
#	
  /etc/monitrc
	
  
check	
  host	
  localhost	
  with	
  address	
  127.0.0.1
	
  	
  if	
  failed	
  port	
  8080
	
  	
  	
  	
  with	
  timeout	
  15	
  seconds
	
  	
  	
  	
  then
	
  	
  	
  	
  exec	
  "ruby	
  /usr/bin/notify-­‐site-­‐is-­‐down.rb'"
#	
  /usr/bin/notify-­‐site-­‐is-­‐down.rb
	
  
require	
  "rubygems"
require	
  "twilio-­‐ruby"
	
  
account_sid	
  =	
  ENV["TWILIO_ACCOUNT_SID"]
auth_token	
  	
  =	
  ENV["TWILIO_AUTH_TOKEN"]
	
  
@client	
  =	
  Twilio::REST::Client.new(account_sid,	
  
auth_token)
	
  
@client.account.SMS.messages.create(
	
  	
  from:	
  "+5511…",
	
  	
  to:	
  "+5511…",
	
  	
  body:	
  "Houston	
  we	
  have	
  a	
  problem,	
  the	
  website	
  is	
  
down."
)
SMS Forwarding

<Response>
	
  	
  <Sms	
  from="+5511.."	
  to="+5511...">
	
  	
  	
  	
  Hello	
  World
	
  	
  </Sms>
</Response>
Twimlets
                          https://www.twilio.com/labs/twimlets

Twimlets are tiny web applications that implement basic voice and text functionality. Think
                        of them as "Widgets" in the web world.
Apps which talk
•   Alerts & Notifications

•   Rewards

•   Reminders

•   System administration

•   Sales Automation

•   Bike Sampa

•   Identity Verification

•   Security token

•   Support Roulette ;)
Thank you

     Pablo Cantero
    @pablocantero
http://pablocantero.com

More Related Content

PDF
H4x0rs gonna hack
PDF
Ruby on the Phone
PPTX
Paypal checkout anytime anywhere paulam chang matt cole
PDF
Pluginが広げるRailsの魅力
PDF
An Introduction to Faye
PPTX
Twilio XHack 2012
PDF
Saferpay Checkout Page - PHP Sample (Hosting)
DOCX
Hyperlink
H4x0rs gonna hack
Ruby on the Phone
Paypal checkout anytime anywhere paulam chang matt cole
Pluginが広げるRailsの魅力
An Introduction to Faye
Twilio XHack 2012
Saferpay Checkout Page - PHP Sample (Hosting)
Hyperlink

What's hot (15)

KEY
WEC Content Elements API
PDF
Mojolicious: what works and what doesn't
PDF
LAMP_TRAINING_SESSION_8
KEY
HTML5 Web Messaging
PDF
Ben Bridts - $ aws help
PDF
Blog Hacks 2011
PPT
Api pain points
TXT
Tutorial
PPT
PHP - RAQ (Rarely Asked Questions!)
PDF
[PL] Jak nie zostać "programistą" PHP?
PPT
Hack this site
PPTX
API Pain Points (PHPNE)
PDF
fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)
PPTX
Intro to Silex
PDF
自社サービスのAPIをOAuth2対応にして公開した
WEC Content Elements API
Mojolicious: what works and what doesn't
LAMP_TRAINING_SESSION_8
HTML5 Web Messaging
Ben Bridts - $ aws help
Blog Hacks 2011
Api pain points
Tutorial
PHP - RAQ (Rarely Asked Questions!)
[PL] Jak nie zostać "programistą" PHP?
Hack this site
API Pain Points (PHPNE)
fb-researchの舞台裏No.2~技術編~(HatchUp主催 渋谷Facebookアプリ勉強会)
Intro to Silex
自社サービスのAPIをOAuth2対応にして公開した
Ad

Viewers also liked (20)

PDF
Nota seminar kesempurnaan solat
PPTX
Ukr 2.part ii of ccs ppt with allimi (06.07.2015)
PPTX
PPTX
Are resumesdead
PPTX
Placemaking Conference: Walkable Cities
PDF
Segmintation
PDF
Annual-Report-RTB-2014
PPT
Презентація на семінар для грантерів, 10-11 квітня 2014
PPTX
програма е урядування львів
DOC
положение о конкурсе учебных кабинетов
PPTX
customer journey
PPT
Mgsdp for ualrc 13 09 2012
PDF
PPTX
Akhlaq warga muhammadiyah
ODP
византия
PPT
PPTX
Welcome
PPTX
Milagro Tequila Cocktail Recipes
Nota seminar kesempurnaan solat
Ukr 2.part ii of ccs ppt with allimi (06.07.2015)
Are resumesdead
Placemaking Conference: Walkable Cities
Segmintation
Annual-Report-RTB-2014
Презентація на семінар для грантерів, 10-11 квітня 2014
програма е урядування львів
положение о конкурсе учебных кабинетов
customer journey
Mgsdp for ualrc 13 09 2012
Akhlaq warga muhammadiyah
византия
Welcome
Milagro Tequila Cocktail Recipes
Ad

Similar to Look Who's Talking (20)

PDF
Phone calls and sms from php
PPTX
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
PPTX
Tech campmemphis slides_post_session
PPTX
Lets have some fun with twilio open tok
PPTX
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
PDF
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
PDF
- Webexpo 2010
PDF
The Future of the Web - Cold Front conference 2016
PDF
The Future of Progressive Web Apps - View Source conference, Berlin 2016
PPTX
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
PDF
Simple callcenter platform with PHP
PPTX
Real time voice call integration - Confoo 2012
PPTX
How to Integrate Text and Phone Messaging with your Website
PDF
Practical PHP by example Jan Leth-Kjaer
PDF
Writing a slack chatbot seattle
PDF
Smashing the stats for fun (and profit)
PDF
Payments On Rails
ODP
My app is secure... I think
PDF
PDF
Ruby on Rails For Java Programmers
Phone calls and sms from php
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
Tech campmemphis slides_post_session
Lets have some fun with twilio open tok
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
- Webexpo 2010
The Future of the Web - Cold Front conference 2016
The Future of Progressive Web Apps - View Source conference, Berlin 2016
Mojolicious - Perl Framework for the Real-Time Web (Lightning Talk)
Simple callcenter platform with PHP
Real time voice call integration - Confoo 2012
How to Integrate Text and Phone Messaging with your Website
Practical PHP by example Jan Leth-Kjaer
Writing a slack chatbot seattle
Smashing the stats for fun (and profit)
Payments On Rails
My app is secure... I think
Ruby on Rails For Java Programmers

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
Modernizing your data center with Dell and AMD
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Spectral efficient network and resource selection model in 5G networks
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Review of recent advances in non-invasive hemoglobin estimation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Big Data Technologies - Introduction.pptx
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Look Who's Talking

  • 1. Look Who’s Talking Pablo Cantero @pablocantero http://pablocantero.com 28° GURU-SP - 09/03/2013
  • 2. Why I started with it?
  • 3. We had a problem We needed a phone support 24x7 in case the website becomes unavailable and other possible urgent issues.
  • 6. Solution We decided to use a Communication as a Service (CaaS) to register a fixed phone number in Brazil, which receives a call and redirects it to the developer on duty cellphone.
  • 8. Why Twilio? • No Contracts • Pay as you go • Simple and well documented API
  • 9. Brazilian pricing • To receive a call = 1¢/minute • To make a call = 33¢/minute • To send a text: starts at =1.2¢/message • Fixed brazilian number = 3$/month • Fixed american number = 1$/month
  • 13. Call me maybe WebRTC
  • 15. account_sid      =  ENV["TWILIO_ACCOUNT_SID"] auth_token        =  ENV["TWILIO_AUTH_TOKEN"] twiml_app_sid  =  ENV["TWILIO_TWIML_APP"] capability  =  Twilio::Util::Capability.new   account_sid,  auth_token capability.allow_client_outgoing  twiml_app_sid   token  =  capability.generate
  • 16. <ul  id="user-­‐list"  data-­‐token="<%=  token  %>"> <%  @users.each  do  |user|  %>        <li>    <%=  user.name  %>  -­‐      <a  href="#"  rel="phone-­‐number">    <%=  user.name  %>    </a> </li> <%  end  %> </ul>
  • 17. <ul  id="user-­‐list"  data-­‐token="eyJ0...">    <li>          Pablo  Cantero          <a  href="#"  rel="phone-­‐number">              +551199...          </a>      </li> </ul>
  • 19. $  -­‐>    Twilio.Device.setup  $("#user-­‐list").data  "token"      $("a[rel=phone-­‐number]").on  "click",  (e)  -­‐>        e.preventDefault()        if  Twilio.Device.status()  !=  "ready"            Twilio.Device.disconnectAll()            return        $this  =  $  e.target        Twilio.Device.connect  $this.text()
  • 20. $(function(){    Twilio.Device.setup($("#user-­‐list").data("token"));      $("a[rel=phone-­‐number]").on("click",  function(e){        e.preventDefault();        if(Twilio.Device.status()  !==  "ready"){            Twilio.Device.disconnectAll();            return;        }        $this  =  $(e.target);        Twilio.Device.connect($this.text());    }); });
  • 22. Twilio + Monit = Pingdom Mingdom https://gist.github.com/phstc/5044114
  • 23. #  /etc/monitrc   check  host  localhost  with  address  127.0.0.1    if  failed  port  8080        with  timeout  15  seconds        then        exec  "ruby  /usr/bin/notify-­‐site-­‐is-­‐down.rb'"
  • 24. #  /usr/bin/notify-­‐site-­‐is-­‐down.rb   require  "rubygems" require  "twilio-­‐ruby"   account_sid  =  ENV["TWILIO_ACCOUNT_SID"] auth_token    =  ENV["TWILIO_AUTH_TOKEN"]   @client  =  Twilio::REST::Client.new(account_sid,   auth_token)   @client.account.SMS.messages.create(    from:  "+5511…",    to:  "+5511…",    body:  "Houston  we  have  a  problem,  the  website  is   down." )
  • 25. SMS Forwarding <Response>    <Sms  from="+5511.."  to="+5511...">        Hello  World    </Sms> </Response>
  • 26. Twimlets https://www.twilio.com/labs/twimlets Twimlets are tiny web applications that implement basic voice and text functionality. Think of them as "Widgets" in the web world.
  • 27. Apps which talk • Alerts & Notifications • Rewards • Reminders • System administration • Sales Automation • Bike Sampa • Identity Verification • Security token • Support Roulette ;)
  • 28. Thank you Pablo Cantero @pablocantero http://pablocantero.com