SlideShare a Scribd company logo
1 of 27
Download to read offline
respond_to :voice
   The Convergence of Web and Voice
    Interfaces with Rails and Asterisk

                     or

An introduction to Telegraph - Voice done
                  MVC


               Jonathan Palley
           Co-Founder, Idapted Inc.
            jpalley@idapted.com
VoIP Development Is NOT
about cheaper phone calls




Already done and telcos can do cheaper...
It’s about the
 applications.
Voice is Another Interface for Your
            Application
The Plan

• Voice as the next Killer Interface
• The Voice/Web Analogy
• Asterisk in 5 minutes
• Telegraph - Bridging Voice and Rails
Why add voice? Why
      now?
   Only Recently Available

     Ripe for Innovation

         Ubiquitous
Lowered Barriers to Voice App
       Development


• DB Driven applications (Rails/etc.)
• Phone system (VoIP/OSS PBX)
Space To Innovate

• Existing Voice Design Thinking =   Phone
  Prompt Hell
• Few applications merge voice and web.
  Most users do.
• Underlying OSS Servers/Technology
  Available
Ubiquity
• 2.7 Billion mobile phones. 1.4 Billion fixed-
  lines.
• 1/3 of “Internet Users” access the internet
  from their mobile phone.
• Each of those 4.1 billion users can be
  uniquely identified by a standardized
  numerical system

                Source: http://communities-dominate.blogs.com/brands/2007/02/mobile_the_7th_.html
The Voice/Web Analogy: Technology
Technology           Web                   VoIP
                                       SIP - Ind. Standard
                      HTTP
                                      IAX - Asterisk only
                       FTP
   Protocol                            H.323 - Obsolete
                       RTP
                                          Jingle - Gtalk
                       etc
                                      Skype - Proprietary

                                     g.711 - high bandwidth
                       gzip
                                    gsm - medium bandwidth
    Codec           jpg/gif/etc.
                                     g.729 - low bandwidth
                   wmv/rm/etc
                                      iLBC - low bandwidth

    Server        apache/lighttpd           asterisk

                                             AGI
  Interactivity        CGI
                                             AMI
Asterisk: The 5min
         Tutorial
• OSS Multipurpose PBX
• Very powerful/flexible
• Relatively Stable
• Very messy to deal with
Asterisk: Key Concepts
Concept                       Explanation
 Channel     A “Channel” in Asterisk is what can setup/receive calls

              Determines what to do with call. Given a call and a
               dialed number, what sounds should be played, input
 Dialplan
            received or connections made? Written in a “BASIC like
                                   language.

                 Stdin/out or TCP method that allows external
   AGI
                   applications to dynamically write dialplans

            Method to send commands to Asterisk (independent of
  AMI
                     calls) and listen for stateful events
Voice System Setup
                                  SIP/IAX
                     VoIP
                    Clients


                                                                      Rails/
              Origination/        SIP/IAX                 AGI/AMI
                                               Asterisk
 PSTN
                                                                    Telegraph
              Termination
                                                Server
Network
                                                                     Server
                Server


                     Analog
     PSTN                       Zaptel/Other
                    Interface
    Phones/
                      Cards
    Network
Existing Ruby/Asterisk
         Integration Tools

                             Just for AGI.
  RAGI               Not well integrated into rails
                              Not active.
                                AMI.
  RAMI                   No Rails Integration.
                            Not Active.

                           Active. Real Apps?
                    Good for writing pure voice apps
Adhearsion   Not tied to Rails or concept of shared voice/web
                                 interfaces.
Introducing Telegraph
• Extracted from Real Application (Idapted’s
  distributed voice system for oral language
  training - EnglishQuad) with input of
  others.
• Started with RAGI/RAMI
• Tightly Integrated with Rails/Web
  Interfaces.
• Embraces the Voice/Web analogy.
Telegraph 1: Making Interfaces (AGI)

•   Setup Dialplan

       exten => 1, 1, AGI(agi://localhost/my_route?param1=value)

•   Add respond_to and voice DSL.

       wants.voice do
           render_voice do |voice|
             voice.play “hello-world”
       	

 voice.link_to_dtmf 'bank-lineitem-menu' do
               link 1, :action=quot;newquot;
               link 2, :action=quot;listquot;
               link 3, :action=quot;indexquot;
             end
           end
       end
Demo I: Adding Voice Interface to Standard Scaffolding
                    Application.

   Look at account controller in demo app. Description/docs at
                     telegraph.rubyforge.org
Sessions can be shared between
voice and web. Making it easy to link
       voice and web actions
Demo II: Phone Number Confirmation

Look at verify_number controller in demo app. Description/docs at
                    telegraph.rubyforge.org
Telegraph II: Manipulating the System (AMI)
               (follows CRUD)

                             Calls
  Create                   Recordings


                    Call/Channel/Queue Status
   Read                     Variables
                             Mailbox

                            Context
  Update                   Recording
                            Variable


                          Call (Hangup)
  Delete                   Recording
Telegraph II: Deal with system info

•   Create a model-like class:

        class VoiceConnection  Telegraph::AsteriskManager

        end

•   Use CRUD technique’s to get Asterisk parameters, place calls, etc. Examples:

        VoiceConnection.create(:call, :channel=”SIP/
        dave”, :context=”some_context”, :exten=3)

        VoiceConnection.destroy(:call, :channel=my_channel)

        VoiceConnection.find(:sip_peer, :peer=”SIP/joe”)

        VoiceConnection.update
        (:monitor, :channel=my_channel, :file=new_file)
Demo III: Placing a call and getting channel status

 Look at dialer controller in demo app. Description/docs at
                   telegraph.rubyforge.org
Telegraph III: Dealing
     with stateful events
•   Add a special AMILogic class to your project

•   Add methods to deal with events, use params to access info
    sent by asterisk.

•   For example
      class AmiLogic  Telegraph::AMIHandler
      	

 def link
      	

   puts quot;Linked #{params[:channel1]} to #{params[:channel2]}quot;
            end
      end
Look at documentation on AMI Events at telegraph.rubyforge.org
                        for Examples
Easy Deployment/Scaling

• AGI and AMI Events handled by
  independent rails processes that can be
  load balanced.

• AMI runs through distributed Ruby
  process.

• Deployment/daemonization very easy. Like
  mongrel, works with Capistrano
Questions/Discussion
                    telegraph.rubyforge.org
                         talkingruby.org


Thanks To Rabble and John Shulty for their contributions to the source.


                            Contact Me:
                             Jonathan Palley
                         jpalley@idapted.com
                  skype: jpalley, gizmo: jonathanpalley
                    idapted.com || englishquad.com
Appendix: The Voice/Web
               Analogy: Interfaces
    Concept                   Web                  Voice

Interacting with system     Web Browser        IVR Like Systems



                                             DB + Voice Connection
  Get/set info system      Database/Models
                                                  Parameters

                                             Handling connections/
Handling Stateful Events          -            disconnections/
                                                 registrations

More Related Content

What's hot

Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)
Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)
Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)Thomas Siegers
 
Voice over IP By SAIKIRAN PANJALA
Voice over IP By SAIKIRAN PANJALAVoice over IP By SAIKIRAN PANJALA
Voice over IP By SAIKIRAN PANJALASaikiran Panjala
 
Introduction to VoIP, RTP and SIP
Introduction to VoIP, RTP and SIP Introduction to VoIP, RTP and SIP
Introduction to VoIP, RTP and SIP ThousandEyes
 
Voice over IP (VoIP)
Voice over IP (VoIP)Voice over IP (VoIP)
Voice over IP (VoIP)Peter R. Egli
 
Quality of Experience
Quality of ExperienceQuality of Experience
Quality of ExperienceThomas Kernen
 
Review on portable voice communication system in raspberry pi
Review on portable voice communication system in raspberry piReview on portable voice communication system in raspberry pi
Review on portable voice communication system in raspberry piIRJET Journal
 
Microsoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMicrosoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMUCUGL
 
Introduction to IP Telephony
Introduction to IP TelephonyIntroduction to IP Telephony
Introduction to IP TelephonyVideoguy
 
IPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication ApplicationsIPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication ApplicationsVoxeo Corp
 
Retail Phybridge PoLRE and CLEER
Retail Phybridge PoLRE and CLEERRetail Phybridge PoLRE and CLEER
Retail Phybridge PoLRE and CLEERJulian Kennedy
 
VoIP Techniques and Challenges PRESENTATION
VoIP Techniques and Challenges PRESENTATIONVoIP Techniques and Challenges PRESENTATION
VoIP Techniques and Challenges PRESENTATIONKarama Said(BEng,MSc)
 
Network Readiness[1]
Network Readiness[1]Network Readiness[1]
Network Readiness[1]Mike Roush
 
Pbx Presentation V021
Pbx Presentation V021Pbx Presentation V021
Pbx Presentation V021nicklacey
 
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...MAF InfoCom
 
Jain Sip Tutorial
Jain Sip TutorialJain Sip Tutorial
Jain Sip Tutorialrajibdk
 

What's hot (20)

Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)
Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)
Efficient Telecommunication Infrastructure with Internet Telephony (VoIP)
 
Voice over IP By SAIKIRAN PANJALA
Voice over IP By SAIKIRAN PANJALAVoice over IP By SAIKIRAN PANJALA
Voice over IP By SAIKIRAN PANJALA
 
Introduction to VoIP, RTP and SIP
Introduction to VoIP, RTP and SIP Introduction to VoIP, RTP and SIP
Introduction to VoIP, RTP and SIP
 
Voice over IP (VoIP)
Voice over IP (VoIP)Voice over IP (VoIP)
Voice over IP (VoIP)
 
voip gateway
 voip gateway voip gateway
voip gateway
 
Quality of Experience
Quality of ExperienceQuality of Experience
Quality of Experience
 
Module9
Module9Module9
Module9
 
Review on portable voice communication system in raspberry pi
Review on portable voice communication system in raspberry piReview on portable voice communication system in raspberry pi
Review on portable voice communication system in raspberry pi
 
Microsoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMicrosoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management Solutions
 
Distributed IP-PBX
Distributed IP-PBX Distributed IP-PBX
Distributed IP-PBX
 
Introduction to IP Telephony
Introduction to IP TelephonyIntroduction to IP Telephony
Introduction to IP Telephony
 
IPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication ApplicationsIPv6 and How It Impacts Communication Applications
IPv6 and How It Impacts Communication Applications
 
VoIP
VoIPVoIP
VoIP
 
Retail Phybridge PoLRE and CLEER
Retail Phybridge PoLRE and CLEERRetail Phybridge PoLRE and CLEER
Retail Phybridge PoLRE and CLEER
 
VoIP Techniques and Challenges PRESENTATION
VoIP Techniques and Challenges PRESENTATIONVoIP Techniques and Challenges PRESENTATION
VoIP Techniques and Challenges PRESENTATION
 
Network Readiness[1]
Network Readiness[1]Network Readiness[1]
Network Readiness[1]
 
Pbx Presentation V021
Pbx Presentation V021Pbx Presentation V021
Pbx Presentation V021
 
Vo ip sip
Vo ip sipVo ip sip
Vo ip sip
 
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...
MAF ICIMS™ Monitoring, Analytics & Reporting for Microsoft Teams and UC - glo...
 
Jain Sip Tutorial
Jain Sip TutorialJain Sip Tutorial
Jain Sip Tutorial
 

Similar to respond_to :voice - the convergence of voice and web interfaces with Rails and Asterisk

Adhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationAdhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationJustin Grammens
 
JmDNS : Service Discovery for the 21st Century
 JmDNS : Service Discovery for the 21st Century JmDNS : Service Discovery for the 21st Century
JmDNS : Service Discovery for the 21st CenturyGnu Alsonative
 
JmDNS : Service Discovery for the 21st Century
 JmDNS : Service Discovery for the 21st Century JmDNS : Service Discovery for the 21st Century
JmDNS : Service Discovery for the 21st CenturyGnu Alsonative
 
Asterisk-Java Framework Presentation
Asterisk-Java Framework PresentationAsterisk-Java Framework Presentation
Asterisk-Java Framework PresentationJustin Grammens
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsOlle E Johansson
 
Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011grandyho
 
VoIP - seminar at IASRI, New Delhi
VoIP - seminar at IASRI, New DelhiVoIP - seminar at IASRI, New Delhi
VoIP - seminar at IASRI, New DelhiNishikant Taksande
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status MessageLukas Renggli
 
Seaside News
Seaside NewsSeaside News
Seaside NewsESUG
 
VoIP Radio Gateway : Case Study
VoIP Radio Gateway : Case StudyVoIP Radio Gateway : Case Study
VoIP Radio Gateway : Case StudyMistral Solutions
 
From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011telestax
 
Are ott the new walled gardens
Are ott the new walled gardensAre ott the new walled gardens
Are ott the new walled gardensAmir Zmora
 
Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Inc
 
Multimedia Broadcasting Platform
Multimedia Broadcasting PlatformMultimedia Broadcasting Platform
Multimedia Broadcasting PlatformFrancois Lefebvre
 
Cisco Presentation 1
Cisco Presentation 1Cisco Presentation 1
Cisco Presentation 1changcai
 
Asterisk - Glen Bastes
Asterisk - Glen BastesAsterisk - Glen Bastes
Asterisk - Glen Bastessoss
 

Similar to respond_to :voice - the convergence of voice and web interfaces with Rails and Asterisk (20)

Ruby voip
Ruby voipRuby voip
Ruby voip
 
Adhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationAdhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework Presentation
 
JmDNS : Service Discovery for the 21st Century
 JmDNS : Service Discovery for the 21st Century JmDNS : Service Discovery for the 21st Century
JmDNS : Service Discovery for the 21st Century
 
JmDNS : Service Discovery for the 21st Century
 JmDNS : Service Discovery for the 21st Century JmDNS : Service Discovery for the 21st Century
JmDNS : Service Discovery for the 21st Century
 
Voip
VoipVoip
Voip
 
Asterisk-Java Framework Presentation
Asterisk-Java Framework PresentationAsterisk-Java Framework Presentation
Asterisk-Java Framework Presentation
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installations
 
Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011Apache Etch Introduction @ FOSDEM 2011
Apache Etch Introduction @ FOSDEM 2011
 
VoIP - seminar at IASRI, New Delhi
VoIP - seminar at IASRI, New DelhiVoIP - seminar at IASRI, New Delhi
VoIP - seminar at IASRI, New Delhi
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status Message
 
Seaside News
Seaside NewsSeaside News
Seaside News
 
01 introduction
01 introduction01 introduction
01 introduction
 
VoIP Radio Gateway : Case Study
VoIP Radio Gateway : Case StudyVoIP Radio Gateway : Case Study
VoIP Radio Gateway : Case Study
 
voip_en
voip_envoip_en
voip_en
 
From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011From MSS to TelScale - Mobicents Summit 2011
From MSS to TelScale - Mobicents Summit 2011
 
Are ott the new walled gardens
Are ott the new walled gardensAre ott the new walled gardens
Are ott the new walled gardens
 
Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2Twilio Voice Applications with Amazon AWS S3 and EC2
Twilio Voice Applications with Amazon AWS S3 and EC2
 
Multimedia Broadcasting Platform
Multimedia Broadcasting PlatformMultimedia Broadcasting Platform
Multimedia Broadcasting Platform
 
Cisco Presentation 1
Cisco Presentation 1Cisco Presentation 1
Cisco Presentation 1
 
Asterisk - Glen Bastes
Asterisk - Glen BastesAsterisk - Glen Bastes
Asterisk - Glen Bastes
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

respond_to :voice - the convergence of voice and web interfaces with Rails and Asterisk

  • 1. respond_to :voice The Convergence of Web and Voice Interfaces with Rails and Asterisk or An introduction to Telegraph - Voice done MVC Jonathan Palley Co-Founder, Idapted Inc. jpalley@idapted.com
  • 2. VoIP Development Is NOT about cheaper phone calls Already done and telcos can do cheaper...
  • 3. It’s about the applications.
  • 4. Voice is Another Interface for Your Application
  • 5. The Plan • Voice as the next Killer Interface • The Voice/Web Analogy • Asterisk in 5 minutes • Telegraph - Bridging Voice and Rails
  • 6. Why add voice? Why now? Only Recently Available Ripe for Innovation Ubiquitous
  • 7. Lowered Barriers to Voice App Development • DB Driven applications (Rails/etc.) • Phone system (VoIP/OSS PBX)
  • 8. Space To Innovate • Existing Voice Design Thinking = Phone Prompt Hell • Few applications merge voice and web. Most users do. • Underlying OSS Servers/Technology Available
  • 9. Ubiquity • 2.7 Billion mobile phones. 1.4 Billion fixed- lines. • 1/3 of “Internet Users” access the internet from their mobile phone. • Each of those 4.1 billion users can be uniquely identified by a standardized numerical system Source: http://communities-dominate.blogs.com/brands/2007/02/mobile_the_7th_.html
  • 10. The Voice/Web Analogy: Technology Technology Web VoIP SIP - Ind. Standard HTTP IAX - Asterisk only FTP Protocol H.323 - Obsolete RTP Jingle - Gtalk etc Skype - Proprietary g.711 - high bandwidth gzip gsm - medium bandwidth Codec jpg/gif/etc. g.729 - low bandwidth wmv/rm/etc iLBC - low bandwidth Server apache/lighttpd asterisk AGI Interactivity CGI AMI
  • 11. Asterisk: The 5min Tutorial • OSS Multipurpose PBX • Very powerful/flexible • Relatively Stable • Very messy to deal with
  • 12. Asterisk: Key Concepts Concept Explanation Channel A “Channel” in Asterisk is what can setup/receive calls Determines what to do with call. Given a call and a dialed number, what sounds should be played, input Dialplan received or connections made? Written in a “BASIC like language. Stdin/out or TCP method that allows external AGI applications to dynamically write dialplans Method to send commands to Asterisk (independent of AMI calls) and listen for stateful events
  • 13. Voice System Setup SIP/IAX VoIP Clients Rails/ Origination/ SIP/IAX AGI/AMI Asterisk PSTN Telegraph Termination Server Network Server Server Analog PSTN Zaptel/Other Interface Phones/ Cards Network
  • 14. Existing Ruby/Asterisk Integration Tools Just for AGI. RAGI Not well integrated into rails Not active. AMI. RAMI No Rails Integration. Not Active. Active. Real Apps? Good for writing pure voice apps Adhearsion Not tied to Rails or concept of shared voice/web interfaces.
  • 15. Introducing Telegraph • Extracted from Real Application (Idapted’s distributed voice system for oral language training - EnglishQuad) with input of others. • Started with RAGI/RAMI • Tightly Integrated with Rails/Web Interfaces. • Embraces the Voice/Web analogy.
  • 16. Telegraph 1: Making Interfaces (AGI) • Setup Dialplan exten => 1, 1, AGI(agi://localhost/my_route?param1=value) • Add respond_to and voice DSL. wants.voice do render_voice do |voice| voice.play “hello-world” voice.link_to_dtmf 'bank-lineitem-menu' do link 1, :action=quot;newquot; link 2, :action=quot;listquot; link 3, :action=quot;indexquot; end end end
  • 17. Demo I: Adding Voice Interface to Standard Scaffolding Application. Look at account controller in demo app. Description/docs at telegraph.rubyforge.org
  • 18. Sessions can be shared between voice and web. Making it easy to link voice and web actions
  • 19. Demo II: Phone Number Confirmation Look at verify_number controller in demo app. Description/docs at telegraph.rubyforge.org
  • 20. Telegraph II: Manipulating the System (AMI) (follows CRUD) Calls Create Recordings Call/Channel/Queue Status Read Variables Mailbox Context Update Recording Variable Call (Hangup) Delete Recording
  • 21. Telegraph II: Deal with system info • Create a model-like class: class VoiceConnection Telegraph::AsteriskManager end • Use CRUD technique’s to get Asterisk parameters, place calls, etc. Examples: VoiceConnection.create(:call, :channel=”SIP/ dave”, :context=”some_context”, :exten=3) VoiceConnection.destroy(:call, :channel=my_channel) VoiceConnection.find(:sip_peer, :peer=”SIP/joe”) VoiceConnection.update (:monitor, :channel=my_channel, :file=new_file)
  • 22. Demo III: Placing a call and getting channel status Look at dialer controller in demo app. Description/docs at telegraph.rubyforge.org
  • 23. Telegraph III: Dealing with stateful events • Add a special AMILogic class to your project • Add methods to deal with events, use params to access info sent by asterisk. • For example class AmiLogic Telegraph::AMIHandler def link puts quot;Linked #{params[:channel1]} to #{params[:channel2]}quot; end end
  • 24. Look at documentation on AMI Events at telegraph.rubyforge.org for Examples
  • 25. Easy Deployment/Scaling • AGI and AMI Events handled by independent rails processes that can be load balanced. • AMI runs through distributed Ruby process. • Deployment/daemonization very easy. Like mongrel, works with Capistrano
  • 26. Questions/Discussion telegraph.rubyforge.org talkingruby.org Thanks To Rabble and John Shulty for their contributions to the source. Contact Me: Jonathan Palley jpalley@idapted.com skype: jpalley, gizmo: jonathanpalley idapted.com || englishquad.com
  • 27. Appendix: The Voice/Web Analogy: Interfaces Concept Web Voice Interacting with system Web Browser IVR Like Systems DB + Voice Connection Get/set info system Database/Models Parameters Handling connections/ Handling Stateful Events - disconnections/ registrations