Make ruby talk to your users - literally

986 views
816 views

Published on

My talk at RubyConf India 2014 (http://rubyconfindia.org/2014/) on Adhearsion

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide

Make ruby talk to your users - literally

  1. 1. Make ruby ‘talk’ to your users - literally Bhavin Javia! Founder @ www.mavenhive.in
  2. 2. Voice enable your Ruby apps
  3. 3. Why voice ? ❖ Many more people have phones than PCs/ internet! ❖ Many people prefer voice communications over other channels! ❖ Voice provides interesting use-cases that text and images alone can’t! ❖ Integrating computers with phones sounds like magic !
  4. 4. maintained by
  5. 5. What is Adhearsion ? ❖ Framework for voice apps! ❖ Business layer of telephony stack! ❖ Adhearsion = “adhesion” + “hear”! ❖ Glues voice layer to rest of the world
  6. 6. <3
  7. 7. What is Adhearsion ? ❖ Written in Ruby! ❖ Open Source! ❖ Easy to use DSL! ❖ Powerful eventing! ❖ Plugins for common problems! ❖ Helpful community! ❖ Democratising telephony
  8. 8. Who is it for ? ❖ Voice app developers! ❖ Voice service providers! ❖ Telephony network providers! ❖ Ruby developers! ❖ Web developers! ❖ Anyone who doesn’t know ABC of telecom Not just for the telecom guys
  9. 9. Where is it used ? ❖ IVRs! ❖ Call Center/Sales Force Automation! ❖ Surveys! ❖ Directory/Translation services! ❖ Automated reminders! ❖ Tele-marketing! ❖ Shopify (http://vimeo.com/33038589)! ❖ Your app ?
  10. 10. Adhearsion Features ❖ IVR Menus! ❖ Call answering, transfer, conferencing! ❖ Voicemails! ❖ Click-to-call! ❖ TTS or Audio playback! ❖ ASR! ❖ Answering Machine Detection
  11. 11. How is it used ? https://speakerdeck.com/benlangfeld/infiltrating-telecoms-using-ruby
  12. 12. Connecting Adhearsion ❖ Database - via Sequel! ❖ HTTP client - HTTParty, RestClient etc! ❖ Redis - via redis gem! ❖ DRb - via adhearsion-drb! ❖ AMQP and other queues! ❖ HTTP server - Reel, Sinatra! ❖ XMPP - adhearsion-xmpp http://www.confreaks.com/videos/2266-adhearsionconf2012-connecting-adhearsion
  13. 13. Adhearsion.kind_of?(Rails) but Adhearsion != Rails
  14. 14. Got it ! show me something in action
  15. 15. Demo Social feed ‘talker’ Dharampal HS! @codemangler
  16. 16. Instructions ❖ Everyone, please Switch OFF your WiFi :)! ❖ 4-5 people, please raise your hands to volunteer
  17. 17. Volunteers Only ❖ Tweet something to @mavenhive! ❖ Listen to your tweets (on stage)
  18. 18. Features Demo’ed ❖ Call Routing! ❖ IVR (ASR)! ❖ TTS! ❖ Integration! ❖ to external APIs e.g. Twitter API! ❖ via Ruby libraries e.g. twitter gem
  19. 19. Real world example ?
  20. 20. Grasshopper Demo
  21. 21. Lets look under the hood
  22. 22. Celluloid ❖ OOP + Actor model! ❖ Concurrent objects! ❖ Adhearsion uses Celluloid! ❖ Sidekiq users Celluloid! ❖ It’s an ecosystem - Celluloid::IO, DCell, Reel https://github.com/celluloid/celluloid
  23. 23. Punchblock ❖ Middleware library for telephony applications! ❖ Similar to Rack for Rails/Sinatra! ❖ Consistent API over third-party call control protocols - Rayo, Asterisk, FreeSWITCH! ❖ Frameworks/Apps can leverage Punchblock’s APIs! ❖ Not a framework in itself! ❖ https://github.com/adhearsion/ punchblock
  24. 24. VOIP Platforms http://mojolingo.com/blog/2013/adhearsion-voice-platform-comparison/ How to choose ?
  25. 25. FreeSWITCH with mod_rayo ❖ Calls bridging! ❖ Call rejection/redirection! ❖ Outbound dialing! ❖ Audio playback! ❖ Audio input! ❖ Audio recording ❖ Fax! ❖ Call Progress Analysis! ❖ Supervisory tone detection! ❖ Answering nachhing detection! ❖ Fax tone detection!
  26. 26. SIP (Session Initiation Protocol) ❖ Communications protocol! ❖ Controls media communication sessions! ❖ e.g. Voice/Video calls over IP! ❖ Standardised as RFC 3261 under IETF! ❖ Application layer protocol! ❖ Independent of underlying transport - TCP/UDP/SCTP/ SMTP! ❖ Uses other protocols - SDP/RTP/SRTP! ❖ Similar to HTTP’s request/response model
  27. 27. DID (Direct Inward Dialing) ❖ DID numbers purchased from carrier website! ❖ IP Address/FQDN of voice network provided to carrier! ❖ Same or different carrier provides out bound dialling! ❖ Calls are routed to single FS server or OpenSIPS proxy
  28. 28. TTS (Text-To-Speech) ❖ Adhearsion itself does not provide a TTS engine! ❖ Works with various TTS engines via VOIP platforms like Asterisk, FreeSWITCH etc! ❖ TTS Engines - Festival, Cepstral, Lumevox, Nuance, AT&T Speech API, Google Translate! ❖ CallController#say
  29. 29. ASR (Automatic Speech Recognition) ❖ Adhearsion supports third-party ASR engines! ❖ ASR Engines - PocketSphinx, Lumevox, Nuance, Vestec, AT&T Speech API! ❖ Plugin - https://github.com/adhearsion/adhearsion-asr! ❖ More insights - http://adhearsionconf.com/events/adhearsion-mania/
  30. 30. Simple Deployment
  31. 31. Scaling it up
  32. 32. How can I get started ?
  33. 33. https://github.com/mojolingo/Telephony-Dev-Box https://mojolingo.com/blog/2013/using-telephony-dev-box/
  34. 34. Adhearsion Plugins http://ahnhub.com/
  35. 35. Finding Help ❖ Documentation - adhearsion.com/docs! ❖ Mailing list - groups.google.com/forum/#!forum/adhearsion! ❖ Github Issue Tracker - github.com/adhearsion/adhearsion/issues! ❖ Reusable Plugins - ahnhub.com! ❖ IRC - adhearsion.com/irc! ❖ Talks - adhearsion.com/media! ❖ Conference - adhearsionconf.com
  36. 36. SippyCup http://mojolingo.github.io/sippy_cup
  37. 37. Remember ❖ There is lots of fraud in telephony! ❖ Be very careful when exposing your server to the public internet! ❖ Use access control lists to reject all SIP / XMPP traffic from untrusted IPs! ❖ Do not use default usernames and passwords in example configuration! ❖ Encrypt traffic between FS and Adhearsion - if not in same LAN! ❖ Be careful about letting customers dial expensive countries! ❖ Block dialing to premium numbers or non-market parts of the world! ❖ RTP is not encrypted if using SIP! ❖ Use SRTP with SSIP for encrypted audio
  38. 38. References ❖ adhearsion.com! ❖ speakerdeck.com/benlangfeld! ❖ slideshare.net/bklang/presentations! ❖ vimeo.com/adhearsion! ❖ mojolingo.com/blog/2014/adhearsion-survey-results-v2! ❖ github.com/MavenHive/social-feed-talker (demo app)
  39. 39. Thank You Bhavin Javia @bhavinjavia bhavin@mavenhive.in www.mavenhive.in speakerdeck.com/bhavinjavia slideshare.com/bhavinjavia presentation available shortly at -

×