Slide 1

Slide 1 text

Make ruby ‘talk’ to your users - literally Bhavin Javia! Founder @ www.mavenhive.in

Slide 2

Slide 2 text

Voice enable your Ruby apps

Slide 3

Slide 3 text

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 !

Slide 4

Slide 4 text

maintained by

Slide 5

Slide 5 text

What is Adhearsion ? ❖ Framework for voice apps! ❖ Business layer of telephony stack! ❖ Adhearsion = “adhesion” + “hear”! ❖ Glues voice layer to rest of the world

Slide 6

Slide 6 text

<3

Slide 7

Slide 7 text

What is Adhearsion ? ❖ Written in Ruby! ❖ Open Source! ❖ Easy to use DSL! ❖ Powerful eventing! ❖ Plugins for common problems! ❖ Helpful community! ❖ Democratising telephony

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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 ?

Slide 10

Slide 10 text

Adhearsion Features ❖ IVR Menus! ❖ Call answering, transfer, conferencing! ❖ Voicemails! ❖ Click-to-call! ❖ TTS or Audio playback! ❖ ASR! ❖ Answering Machine Detection

Slide 11

Slide 11 text

How is it used ? https://speakerdeck.com/benlangfeld/infiltrating-telecoms-using-ruby

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Adhearsion.kind_of?(Rails) but Adhearsion != Rails

Slide 14

Slide 14 text

Got it ! show me something in action

Slide 15

Slide 15 text

Demo Social feed ‘talker’ Dharampal HS! @codemangler

Slide 16

Slide 16 text

Instructions ❖ Everyone, please Switch OFF your WiFi :)! ❖ 4-5 people, please raise your hands to volunteer

Slide 17

Slide 17 text

Volunteers Only ❖ Tweet something to @mavenhive! ❖ Listen to your tweets (on stage)

Slide 18

Slide 18 text

Features Demo’ed ❖ Call Routing! ❖ IVR (ASR)! ❖ TTS! ❖ Integration! ❖ to external APIs e.g. Twitter API! ❖ via Ruby libraries e.g. twitter gem

Slide 19

Slide 19 text

Real world example ?

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Grasshopper Demo

Slide 23

Slide 23 text

Lets look under the hood

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

VOIP Platforms http://mojolingo.com/blog/2013/adhearsion-voice-platform-comparison/ How to choose ?

Slide 27

Slide 27 text

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!

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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/

Slide 32

Slide 32 text

Simple Deployment

Slide 33

Slide 33 text

Scaling it up

Slide 34

Slide 34 text

How can I get started ?

Slide 35

Slide 35 text

https://github.com/mojolingo/Telephony-Dev-Box https://mojolingo.com/blog/2013/using-telephony-dev-box/

Slide 36

Slide 36 text

Adhearsion Plugins http://ahnhub.com/

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

SippyCup http://mojolingo.github.io/sippy_cup

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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)

Slide 41

Slide 41 text

Thank You Bhavin Javia @bhavinjavia [email protected] www.mavenhive.in speakerdeck.com/bhavinjavia slideshare.com/bhavinjavia presentation available shortly at -