This screencast gives an introduction to a new feature in Adhearsion 1.1.0: The Adhearsion Console. The console is an interactive way to test your Adhearsion application by getting into a running Adhearsion instance. Using a Ruby library called Pry, the Adhearsion Console allows you to interactively manipulate calls in real-time, taking advantage of the handy DSL and all integrations, such as ActiveRecord and Blather, that Adhearsion has to offer.
Some tips and tricks you can use with the Adhearsion Console:
- Use the
#callsmethod, a shortcut to
Adhearsion.active_callsto get an enumerable object representing all calls connected to Adhearsion at the moment. From there, you can tell the console to grab the first call that is active with the following:
- Disable and re-enable logging on the fly using the
- This screencast was made with the Adhearsion setting
config.automatically_answer_incoming_calls = false. We recommend this setting as it allows the application developer to do interesting things with a call even before the call is answered (and billing begins).