Class: FSR::Cmd::Status

Inherits:
Command show all
Defined in:
lib/fsr/cmd/status.rb

Constant Summary

Constants inherited from Command

Command::DEFAULT_OPTIONS

Instance Method Summary collapse

Constructor Details

#initialize(fs_socket = nil) ⇒ Status

Returns a new instance of Status.



6
7
8
# File 'lib/fsr/cmd/status.rb', line 6

def initialize(fs_socket = nil)
  @fs_socket = fs_socket # FSR::CommandSocket obj
end

Instance Method Details

#rawObject

This method builds the API command to send to the freeswitch event socket



18
19
20
# File 'lib/fsr/cmd/status.rb', line 18

def raw
  orig_command = "status"
end

#run(api_method = :api) ⇒ Object

Send the command to the event socket, using bgapi by default.



11
12
13
14
15
# File 'lib/fsr/cmd/status.rb', line 11

def run(api_method = :api)
  orig_command = "%s %s" % [api_method, raw]
  Log.debug "saying #{orig_command}"
  @fs_socket.say(orig_command)
end