Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 2.2 KB

README.md

File metadata and controls

67 lines (48 loc) · 2.2 KB

Build Status

Matrioska

Matrioska is an Adhearsion plugin for creating in-call voice apps.

Matrioska helps you do more asynchronous things than Adhearsion alone. For example, you can start a long phone call and have Matrioska listening in the background for keypresses. When a keypress is detected, it can execute application code, for example, to transfer the call or to start or stop a recording. You can think of Matrioska as “background apps for Adhearsion.”

By mapping controllers or blocks to the desired applications, a listener object waits for DTMF and reacts by executing the specified payload.

Usage Example

# inside your controller
runner = Matrioska::AppRunner.new call
runner.map_app 3 do
  logger.info "hi there!"
end
runner.map_app 5, AppController

runner.start

Using local and remote apps with at the same time with a parallel dial

# inside your controller
dial_with_apps ['user/userb'] do |dial|
  local do |runner|
    runner.map_app '1' do
      say 'Gosh you sound stunning today leg a'
    end
  end

  remote do |runner|
    runner.map_app '2' do
      say 'Gosh you sound stunning today leg b'
    end
  end
end

Links

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with Rakefile, version, or history.
    • If you want to have your own version, that is fine but bump version in a commit by itself so I can ignore when I pull
  • Send me a pull request. Bonus points for topic branches.

Credits

Original author: Luca Pradovera

Developed by Mojo Lingo in partnership with RingPlus.

Thanks to RingPlus for ongoing sponsorship of Matrioska.

Copyright

Copyright (c) 2013 Adhearsion Foundation Inc. MIT license (see LICENSE for details).