Sha256: 7fbb169d7a989197d12beb74b6a9d259c4f1832a6b403534d4326575dc2c0b2b

Contents?: true

Size: 454 Bytes

Versions: 9

Compression:

Stored size: 454 Bytes

Contents

methods_for :rpc do
  
  # Simply create proxy methods for the high-level AMI methods
  
  [:send_action, :introduce, :originate, :call_into_context, :call_and_exec].each do |method_name|
    define_method(method_name) do |*args|
      if VoIP::Asterisk.manager_interface
        VoIP::Asterisk.manager_interface.send(method_name, *args)
      else
        ahn_log.ami_remote.error "AMI has not been enabled in startup.rb!"
      end
    end
  end
  
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
eric-adhearsion-0.8.0 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
jicksta-adhearsion-0.7.999 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
jicksta-adhearsion-0.8.0 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
jicksta-adhearsion-0.8.2 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
jicksta-adhearsion-0.8.3 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
sevenscale-adhearsion-0.8.0 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
adhearsion-0.8.0 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
adhearsion-0.8.2 app_generators/ahn/templates/components/ami_remote/ami_remote.rb
adhearsion-0.8.1 app_generators/ahn/templates/components/ami_remote/ami_remote.rb