Exception: RubyAMI::Action::UnsupportedActionName

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/ruby_ami/action.rb

Overview

This class will be removed once this AMI library fully supports all known protocol anomalies.

Constant Summary collapse

UNSUPPORTED_ACTION_NAMES =
%w[queues]

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ UnsupportedActionName

Returns a new instance of UnsupportedActionName.



142
143
144
# File 'lib/ruby_ami/action.rb', line 142

def initialize(name)
  super "At the moment this AMI library doesn't support the #{name.inspect} action because it causes a protocol anomaly. Support for it will be coming shortly."
end

Class Method Details

.preinitialize(version) ⇒ Object

Blacklist some actions depends on the Asterisk version



134
135
136
137
138
139
140
# File 'lib/ruby_ami/action.rb', line 134

def self.preinitialize(version)
  if version < 1.8
    %w[iaxpeers muteaudio mixmonitormute aocmessage].each do |action|
      UNSUPPORTED_ACTION_NAMES << action
    end
  end
end