lib/adhearsion/punchblock_plugin.rb in adhearsion-2.2.1 vs lib/adhearsion/punchblock_plugin.rb in adhearsion-2.3.0

- old
+ new

@@ -5,10 +5,11 @@ extend ActiveSupport::Autoload autoload :Initializer config :punchblock do + enabled true , :transform => Proc.new { |v| v == 'true' }, :desc => "Enable or disable Punchblock connectivity to a Voice server" platform :xmpp , :transform => Proc.new { |v| v.to_sym }, :desc => <<-__ Platform punchblock shall use to connect to the Telephony provider. Currently supported values: - :xmpp - :asterisk - :freeswitch @@ -26,14 +27,14 @@ media_engine nil , :transform => Proc.new { |v| v.to_sym }, :desc => "The media engine to use. Defaults to platform default." default_voice nil , :transform => Proc.new { |v| v.to_sym }, :desc => "The default TTS voice to use." end init :punchblock do - Initializer.init + Initializer.init if config.enabled end run :punchblock do - Initializer.run + Initializer.run if config.enabled end class << self delegate :client, :to => Initializer delegate :connection, :to => Initializer