Integrating Voice Through Adhearsion

706 views

Published on

Integrating Voice Through Adhearsion presented by Luca Pradovera at FOSDEM 2013

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

  • Be the first to like this

No Downloads
Views
Total views
706
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integrating Voice Through Adhearsion

  1. 1. Integrating Voice through Adhearsion Luca Pradovera Telephony Devroom FOSDEM 2013 Brussels, February 3rd, 2013venerdì 1 marzo 13
  2. 2. Who am I? • Italian computer engineer • No, I didn’t vote for Berlusconi • Voice application developer at Mojo Lingo LLC, Atlanta (GA) • Managed to learn Ruby without doing Rails work!venerdì 1 marzo 13
  3. 3. What is Adhearsion? • Ruby voice application framework • Provides logic for telephony apps • Open source and managed by a Foundation • Version 2.2.1 released on 06/01 • 2.0 was released in April 2012venerdì 1 marzo 13
  4. 4. ADHEARSION 101venerdì 1 marzo 13
  5. 5. Supported platforms • Ruby 1.9 only - JRuby working • Asterisk • FreeSWITCH • Voxeo PRISM • Rayo protocol support (http://rayo.org/)venerdì 1 marzo 13
  6. 6. Rayo sounds tasty. • XMPP-based protocol for 3PCC • Call control • Audio and media control • Telephony primitivesvenerdì 1 marzo 13
  7. 7. Why should I use Adhearsion? • Dialplan applications only get you so far • Every platform has its own syntax • Some features are simply impossible to achieve • It’s Ruby. Everybody likes Ruby.venerdì 1 marzo 13
  8. 8. What can I do?venerdì 1 marzo 13
  9. 9. How does Ahn talk to platforms? • Asterisk: AsyncAGI (AMI) • FreeSWITCH: Inbound Event Socket • PRISM: Pure Rayovenerdì 1 marzo 13
  10. 10. Anatomy of an app • Configuration • Call Controllers • Routing • The ahn command: create, daemon, start, stop, restart, generate, help, versionvenerdì 1 marzo 13
  11. 11. Call Controllers • Hold the application logic (dialplan) • The #run method is used to invoke the controller class SimpleController < Adhearsion::CallController def run answer play "tt-weasels" hangup end endvenerdì 1 marzo 13
  12. 12. Other features • Playback, menus, user input, recording • Configuration system • Plugin architecture • Routing • Testabilityvenerdì 1 marzo 13
  13. 13. Sounds great, huh?venerdì 1 marzo 13
  14. 14. Demo time! class DemoController < Adhearsion::CallController def enter_number def run number = ask "#{Adhearsion.config.platform[:root]}/sounds/ answer please-enter", :limit => 1, :timeout => 5.seconds menu "#{Adhearsion.config.platform[:root]}/sounds/demo- if number menu", :timeout => 5.seconds, :tries => 3 do play "#{Adhearsion.config.platform[:root]}/sounds/you- match 1 do entered" enter_number play "digits/#{number}" end end match 2 do end record_message end def record_message play "#{Adhearsion.config.platform[:root]}/sounds/please- timeout do speak-after" play "#{Adhearsion.config.platform[:root]}/sounds/menu- record_result = record :start_beep => true, :max_duration timeout" => 5_000 end logger.info "Recording saved to invalid do #{record_result.recording_uri}" play "#{Adhearsion.config.platform[:root]}/sounds/menu- play record_result.recording_uri.gsub(/file:///, invalid" ).gsub(/.wav/, ) end end end failure do play "#{Adhearsion.config.platform[:root]}/sounds/menu- failure" hangup end end endvenerdì 1 marzo 13
  15. 15. Event support • Adhearsion allows you to trace and react to events • Guarded handlers in apps • A specialized block for everything elsevenerdì 1 marzo 13
  16. 16. Events over HTTP Adhearsion::Events.draw do punchblock do |event| conn = Faraday.new("http://localhost:3000") conn.post "/publish", { :event => event.inspect } if event.respond_to? :name end end A Sinatra app with Faye can then distribute events to browsers through Websocketsvenerdì 1 marzo 13
  17. 17. Plugins • Virginia provides a Reel interface for Adhearsion • It loads a Reel::App and makes all methods available require reel require reel/app class RequestHandler include Reel::App get(/dial) do Adhearsion::OutboundCall.originate "SIP/100" do invoke ConnectingController end [200, {}, "200 OK"] end endvenerdì 1 marzo 13
  18. 18. Are you sold now?venerdì 1 marzo 13
  19. 19. Adhearsion in the wildvenerdì 1 marzo 13
  20. 20. • Mobile wireless provider and enabler (MVNO - MVNE) • OTT applications • In-call apps • Adhearsion powers all call logic, billing, and featuresvenerdì 1 marzo 13
  21. 21. • Voice conversation automation and metrics • Ad tracking • Hosted IVR • Lead tracking • http://www.ifbyphone.com/venerdì 1 marzo 13
  22. 22. • House remodeling • Robo-dialing for appointment sign-up and confirmation • Real-time data pushed to mobile CRM • Over 5 million calls in 2012 (one every 5 seconds!)venerdì 1 marzo 13
  23. 23. • Pre-paid translation service for travelers • Billing and credit management • Translator search with AMD detection and adaptive selection • http://www.sostravelcard.it/venerdì 1 marzo 13
  24. 24. What the future holds... • WebRTC: Adhearsion can perform all 3PCC functions • Multiple device tracking and switching • Protocol convergence • Some of these are already implemented in upcoming productsvenerdì 1 marzo 13
  25. 25. Adhearsion 3.0 • Currently at the planning stage • Unified communication platform • Better ASR support • Revamped component structurevenerdì 1 marzo 13
  26. 26. AdhearsionConf 2013 • 2012 edition had over 120 attendants • 2 days, 15 presentations, training, beer • http://adhearsionconf.com/venerdì 1 marzo 13
  27. 27. Thank you! • http://adhearsion.com/ • http://mojolingo.com/ • @adhearsion, @mojolingo • @lucaprado • Demo source available at https:// github.com/polysics/fosdem2013venerdì 1 marzo 13

×