Look Who's Talking

815 views

Published on

http://www.youtube.com/watch?v=d9fvd_OErc8

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
815
On SlideShare
0
From Embeds
0
Number of Embeds
290
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Look Who's Talking

  1. 1. Look Who’s Talking Pablo Cantero @pablocantero http://pablocantero.com 28° GURU-SP - 09/03/2013
  2. 2. Why I started with it?
  3. 3. We had a problemWe needed a phone support 24x7 in case the website becomes unavailable and other possible urgent issues.
  4. 4. SolutionWe decided to use a Communication as a Service (CaaS) toregister a fixed phone number in Brazil, which receives a call and redirects it to the developer on duty cellphone.
  5. 5. http://www.twilio.com
  6. 6. Why Twilio?• No Contracts• Pay as you go• Simple and well documented API
  7. 7. 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
  8. 8. Support Roulettehttps://github.com/phstc/support-roulette
  9. 9. Plantão Elo7
  10. 10. Call me maybe WebRTC
  11. 11. gem “twilio-ruby”
  12. 12. 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_tokencapability.allow_client_outgoing  twiml_app_sid  token  =  capability.generate
  13. 13. <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>
  14. 14. <ul  id="user-­‐list"  data-­‐token="eyJ0...">    <li>          Pablo  Cantero          <a  href="#"  rel="phone-­‐number">              +551199...          </a>      </li></ul>
  15. 15. <script src="//static.twilio.com/libs/twiliojs/1.1/twilio.min.js"></script>
  16. 16. $  -­‐>    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()
  17. 17. $(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());    });});
  18. 18. Other examples
  19. 19. Twilio + Monit =Pingdom Mingdomhttps://gist.github.com/phstc/5044114
  20. 20. #  /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"
  21. 21. #  /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.")
  22. 22. SMS Forwarding<Response>    <Sms  from="+5511.."  to="+5511...">        Hello  World    </Sms></Response>
  23. 23. Twimlets https://www.twilio.com/labs/twimletsTwimlets are tiny web applications that implement basic voice and text functionality. Think of them as "Widgets" in the web world.
  24. 24. Apps which talk• Alerts & Notifications• Rewards• Reminders• System administration• Sales Automation• Bike Sampa• Identity Verification• Security token• Support Roulette ;)
  25. 25. Thank you Pablo Cantero @pablocanterohttp://pablocantero.com

×