Exception: Adhearsion::VoIP::Asterisk::Manager::ManagerInterface::UnsupportedActionName

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/adhearsion/voip/asterisk/manager_interface.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.



457
458
459
# File 'lib/adhearsion/voip/asterisk/manager_interface.rb', line 457

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



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/adhearsion/voip/asterisk/manager_interface.rb', line 441

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

  if version < 1.6
    %w[skinnydevices skinnyshowdevice skinnylines skinnyshowline coreshowchannels
       sipshowregistry getconfigjson bridge listallvoicemailusers dbdel dbdeltree
       insert jitterbufstats atxfer iaxregistry queuereload queuereset].each do |action|
      UNSUPPORTED_ACTION_NAMES << action
    end
  end
end