Class: Pbx::AmiBridge::EventClient

Inherits:
RubyAsterisk::AMI::Client
  • Object
show all
Defined in:
lib/pbx/ami_bridge.rb

Overview

Subclass that routes parsed AMI events into a Ruby Queue, enabling the Bubbletea command loop to consume them.

Instance Method Summary collapse

Constructor Details

#initialize(host:, port:, queue:, log: nil) ⇒ EventClient

Returns a new instance of EventClient.



24
25
26
27
28
# File 'lib/pbx/ami_bridge.rb', line 24

def initialize(host:, port:, queue:, log: nil)
  super(host: host, port: port)
  @event_queue = queue
  @log = log
end

Instance Method Details

#pjsip_show_endpointsObject



30
31
32
# File 'lib/pbx/ami_bridge.rb', line 30

def pjsip_show_endpoints
  execute "PJSIPShowEndpoints", {}
end