Hello Vijay,
My suggestion would be to consider adding http endpoints to your adhearsion application to allow you to manipulate various config settings of the Adhearsion core config as well as for Adhearsion plugins.
The Virginia gem allows you to easily bolt-on a Reel based web server to Adhearsion. Any endpoints you add to Virginia will be running in the same process as Adhearsion, and thus can easily manipulate configuration.
Virginia supports any rack-based web framework. Here's an example endpoint using Sinatra:
require 'sinatra/base'
put '/default_voice' do
Adhearsion.config.media.default_voice = params[:default_voice] if params[:default_voice]
standard_response "default_voice changed to #{Adhearsion.config.media.default_voice}.\n"
end
# Sinatra helpers
helpers do
def standard_response(response, status_code = 200, headers = {})
[status_code, headers, [response]]
end
end
You could invoke this externally using a program like cURL like so:
#=> default_voice changed to Larry.