Class: FSR::Cmd::Status

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

Constant Summary

Constants inherited from Command

DEFAULT_OPTIONS

Instance Method Summary (collapse)

Methods inherited from Command

#default_options

Constructor Details

- (Status) initialize(fs_socket = nil)

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

- (Object) raw

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

- (Object) run(api_method = :api)

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