Sha256: f0db33dfaf99f72ffab3fbc0bdc273d96e3837d6207fa8538fa4b39085fd2073
Contents?: true
Size: 919 Bytes
Versions: 24
Compression:
Stored size: 919 Bytes
Contents
# A lot of methods are missing here. The only one implemented is max_sessions # The max_sessions getter currently returns the raw result but could instead return an Integer require "fsr/app" module FSR module Cmd class SofiaContact < Command attr_reader :contact def initialize(fs_socket = nil, contact = {}) @fs_socket = fs_socket # FSR::CommandSocket obj @contact = contact[:contact] puts @contact end # Send the command to the event socket, using api by default. def run(api_method = :api) orig_command = "%s %s" % [api_method, raw] Log.debug "saying #{orig_command}" @fs_socket.say(orig_command) end # This method builds the API command to send to the freeswitch event socket def raw orig_command = "sofia_contact #{@contact}" end end register(:sofia_contact, SofiaContact) end end
Version data entries
24 entries across 24 versions & 3 rubygems