Talking To Rails

85
Ben Langfeld Adhearsion Core Team Mojo Lingo @benlangfeld [email protected] Talking to Rails

description

Talking To Rails presented by Ben Langfeld at MagRails 2011

Transcript of Talking To Rails

Page 1: Talking To Rails

Ben LangfeldAdhearsion Core Team

Mojo Lingo

@[email protected]

Talking to Rails

Page 2: Talking To Rails

Why voice?

Page 3: Talking To Rails

Why voice?

•Many more people have access to a telephone than have access to the internet

Page 4: Talking To Rails

Why voice?

•Many more people have access to a telephone than have access to the internet

•Many people still prefer voice-based interactions

Page 5: Talking To Rails

Why voice?

•Many more people have access to a telephone than have access to the internet

•Many people still prefer voice-based interactions

•Voice enables a multitude of interesting use-cases which text and images cannot

Page 6: Talking To Rails

Why voice?

•Many more people have access to a telephone than have access to the internet

•Many people still prefer voice-based interactions

•Voice enables a multitude of interesting use-cases which text and images cannot

•Because having a computer make a phone ring is still cool

Page 7: Talking To Rails

But wait...telephony is HARD right??

Photo by Joseph A. Carr from http://en.wikipedia.org/wiki/File:JT_Switchboard_770x540.jpg

Page 8: Talking To Rails

Code Sample (comfort zone)

Page 9: Talking To Rails

Code Sample (comfort zone)

Page 10: Talking To Rails

Code Sample (comfort zone)

Page 11: Talking To Rails
Page 12: Talking To Rails

A voice application development framework

Page 13: Talking To Rails

A voice application development framework

Independent from, but compatiblewith, Rails

Page 14: Talking To Rails

A voice application development framework

Independent from, but compatiblewith, Rails

Voice applications the Ruby Way

Page 15: Talking To Rails
Page 16: Talking To Rails

Features

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 17: Talking To Rails

Features•Easy-to-use DSL

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 18: Talking To Rails

Features•Easy-to-use DSL•Idiomatic Ruby code Not just compiled down to some kind of crazy configuration, but we have full access

to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 19: Talking To Rails

Features•Easy-to-use DSL•Idiomatic Ruby code•Powerful Eventing System

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 20: Talking To Rails

Features•Easy-to-use DSL•Idiomatic Ruby code•Powerful Eventing System•Plugins to solve common problems

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 21: Talking To Rails

Features•Easy-to-use DSL•Idiomatic Ruby code•Powerful Eventing System•Plugins to solve common problems•A very helpful community

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 22: Talking To Rails

Features•Easy-to-use DSL•Idiomatic Ruby code•Powerful Eventing System•Plugins to solve common problems•A very helpful community•Sponsorship from and

Not just compiled down to some kind of crazy configuration, but we have full access to both the ruby environment and the call at all times

Call setup/teardown events, DTMF events, conference join/leave, active speaker, etc

Third largest mobile carrier in the world

Page 23: Talking To Rails

Advanced Voice Features

Page 24: Talking To Rails

Advanced Voice Features

High-level constructs (Menus, Queues, Conferences)

Page 25: Talking To Rails

Advanced Voice Features

High-level constructs (Menus, Queues, Conferences)

DTMF gathering & voice recognition

Page 26: Talking To Rails

Advanced Voice Features

High-level constructs (Menus, Queues, Conferences)

Text-to-Speech

DTMF gathering & voice recognition

Page 27: Talking To Rails

Advanced Voice Features

High-level constructs (Menus, Queues, Conferences)

Text-to-Speech

DTMF gathering & voice recognition

Answering Machine Detection

Page 28: Talking To Rails

Advanced Voice Features

High-level constructs (Menus, Queues, Conferences)

Text-to-Speech

DTMF gathering & voice recognition

Call Progress

Answering Machine Detection

Page 29: Talking To Rails

Adhearsion Applied

Page 30: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Page 31: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Page 32: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Conferencing applications

Page 33: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Conferencing applications

Translation services

Page 34: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Conferencing applications

Translation services

Robo-calling

Page 35: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Conferencing applications

Translation services

Polling

Robo-calling

Page 36: Talking To Rails

Adhearsion AppliedCall centre workflow

optimisation and integration

Sales force automation

Conferencing applications

Translation servicesIVR

Polling

Robo-calling

Page 37: Talking To Rails

2008

2010

2011

Adhearsion Platforms

Page 38: Talking To Rails

2008

2010

2011

Adhearsion Platforms

Page 39: Talking To Rails

2008

2010

2011

Adhearsion Platforms

Page 40: Talking To Rails

2008

2010

2011

Adhearsion Platforms

Page 41: Talking To Rails

Adhearsion Architecture

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 42: Talking To Rails

Adhearsion Architecture

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 43: Talking To Rails

Adhearsion Architecture

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 44: Talking To Rails

Adhearsion Architecture

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 45: Talking To Rails

Adhearsion Architecture

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 46: Talking To Rails

Adhearsion Architecture

SQL

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 47: Talking To Rails

Adhearsion Architecture

SQL LDAP

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 48: Talking To Rails

Adhearsion Architecture

XMPP/JabberSQL LDAP

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 49: Talking To Rails

Adhearsion Architecture

WebREST/JSON/XML

XMPP/JabberSQL LDAP

Asterisk Pros:* Run on your server* Widely Deployed* Eventing System

Cons:* Tricky to set up/Requires hardware* No TTS/ASR

Tropo Pros:* Easy to set up* Awesome TTS/ASR* SMS & International

Cons:* No manager events* No built-in recordings

Note: AGItate first written 1 year ago

Page 50: Talking To Rails

Why Adhearsion?

Page 51: Talking To Rails

Why Adhearsion?

•Easy code reuse

Page 52: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to

Page 53: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to•Rich inter-call operation within the process

Page 54: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to•Rich inter-call operation within the process•Brings modern development practices to telephony

Page 55: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to•Rich inter-call operation within the process•Brings modern development practices to telephony•No need for complex state-machines and constant load on your Rails app from an HTTP-based API

Page 56: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to•Rich inter-call operation within the process•Brings modern development practices to telephony•No need for complex state-machines and constant load on your Rails app from an HTTP-based API

•Runs on Asterisk, so can integrate with an existing PBX

Page 57: Talking To Rails

Why Adhearsion?

•Easy code reuse•A natural DSL which is easy to write to•Rich inter-call operation within the process•Brings modern development practices to telephony•No need for complex state-machines and constant load on your Rails app from an HTTP-based API

•Runs on Asterisk, so can integrate with an existing PBX

•Adhearsion democratises telephony development

Page 58: Talking To Rails

A (contrived) example problem

Page 59: Talking To Rails

A (contrived) example problem

•Everyone loves a spontaneous conference call

Page 60: Talking To Rails

A (contrived) example problem

•Everyone loves a spontaneous conference call

•Getting people in is tricky

Page 61: Talking To Rails

A (contrived) example problem

•Everyone loves a spontaneous conference call

•Getting people in is tricky

•Not everyone likes the phone ringing

Page 62: Talking To Rails

A (contrived) example problem

•Everyone loves a spontaneous conference call

•Getting people in is tricky

•Not everyone likes the phone ringing

•Not everyone is available

Page 63: Talking To Rails

A solution

Page 64: Talking To Rails

A solution

•Simple rails app for managing contacts

Page 65: Talking To Rails

A solution

•Simple rails app for managing contacts

•Select contacts to call

Page 66: Talking To Rails

A solution

•Simple rails app for managing contacts

•Select contacts to call

•System asks contacts via Jabber if they are available

Page 67: Talking To Rails

A solution

•Simple rails app for managing contacts

•Select contacts to call

•System asks contacts via Jabber if they are available

•Will read apologies via Jabber into the conference

Page 68: Talking To Rails

Code Demo

Page 69: Talking To Rails
Page 70: Talking To Rails
Page 71: Talking To Rails
Page 72: Talking To Rails

Adhearsion 2.0

Page 73: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

Page 74: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

Page 75: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

Page 76: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

• Core architecture overhaul

Page 77: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

• Core architecture overhaul

• A reduction in internal complexity and line-count

Page 78: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

• Core architecture overhaul

• A reduction in internal complexity and line-count

• Scope reduction

Page 79: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

• Core architecture overhaul

• A reduction in internal complexity and line-count

• Scope reduction

• Overhaul of the plugin system

Page 80: Talking To Rails

Adhearsion 2.0• The next major evolution of Adhearsion

• Many improvements including:

• Truly cross-platform (Asterisk, Tropo & Rayo)

• Core architecture overhaul

• A reduction in internal complexity and line-count

• Scope reduction

• Overhaul of the plugin system

• Modular application constructs (voicemail, queueing, etc) as plugins

Page 81: Talking To Rails

Adhearsion really far out

Page 82: Talking To Rails

Adhearsion really far out

•Adhearsion 1.x - Asterisk applications

Page 83: Talking To Rails

Adhearsion really far out

•Adhearsion 1.x - Asterisk applications

•Adhearsion 2.x - Voice applications

Page 84: Talking To Rails

Adhearsion really far out

•Adhearsion 1.x - Asterisk applications

•Adhearsion 2.x - Voice applications

•Adhearsion 3.x - Real-time communications