Module: FSR
- Defined in:
- lib/fsr/database/core.rb,
lib/fsr.rb,
lib/fsr/app.rb,
lib/fsr/cmd.rb,
lib/fsr/app/log.rb,
lib/fsr/app/set.rb,
lib/fsr/app/fifo.rb,
lib/fsr/database.rb,
lib/fsr/listener.rb,
lib/fsr/app/speak.rb,
lib/fsr/cmd/fsctl.rb,
lib/fsr/cmd/sofia.rb,
lib/fsr/app/answer.rb,
lib/fsr/app/bridge.rb,
lib/fsr/app/hangup.rb,
lib/fsr/cmd/status.rb,
lib/fsr/fake_socket.rb,
lib/fsr/app/fs_break.rb,
lib/fsr/app/fs_sleep.rb,
lib/fsr/app/playback.rb,
lib/fsr/app/transfer.rb,
lib/fsr/event_socket.rb,
lib/fsr/cmd/originate.rb,
lib/fsr/app/conference.rb,
lib/fsr/command_socket.rb,
lib/fsr/cmd/sofia/status.rb,
lib/fsr/listener/inbound.rb,
lib/fsr/cmd/sofia/profile.rb,
lib/fsr/cmd/sofia_contact.rb,
lib/fsr/listener/outbound.rb,
lib/fsr/database/call_limit.rb,
lib/fsr/listener/inbound/event.rb,
lib/fsr/listener/header_and_content_response.rb
Overview
TODO Separate these models into their own subdirectories
Defined Under Namespace
Modules: App, Cmd, Database, Listener Classes: CommandSocket, EventSocket, FakeSocket
Constant Summary collapse
- VERSION =
Global configuration options
'0.0.8'
- FS_INSTALL_PATHS =
["/usr/local/freeswitch", "/opt/freeswitch", "/usr/freeswitch"]
- DEFAULT_CALLER_ID_NUMBER =
'8675309'
- DEFAULT_CALLER_ID_NAME =
"FSR"
- Log =
Usage:
Log.info('foo') Log.debug('bar') Log.warn('foobar') Log.error('barfoo')
Logger.new($stdout)
- ROOT =
Pathname(__FILE__).dirname..freeze
Class Method Summary collapse
-
.load_all_applications ⇒ Object
Load all FSR::App classes.
-
.load_all_commands(retrying = false) ⇒ Object
Load all FSR::Cmd classes.
-
.start_ies!(klass, args = {}) ⇒ Object
Method to start EM for Inbound Event Socket.
-
.start_oes!(klass, args = {}) ⇒ Object
Method to start EM for Outbound Event Socket.
Class Method Details
.load_all_applications ⇒ Object
Load all FSR::App classes
34 35 36 37 |
# File 'lib/fsr.rb', line 34 def self.load_all_applications require "fsr/app" App.load_all end |
.load_all_commands(retrying = false) ⇒ Object
Load all FSR::Cmd classes
27 28 29 30 31 |
# File 'lib/fsr.rb', line 27 def self.load_all_commands( = false) require 'fsr/command_socket' load_all_applications Cmd.load_all end |
.start_ies!(klass, args = {}) ⇒ Object
Method to start EM for Inbound Event Socket
51 52 53 54 55 56 57 58 59 |
# File 'lib/fsr.rb', line 51 def self.start_ies!(klass, args = {}) port = args[:port] || "8021" host = args[:host] || "localhost" EM.run do EventMachine::connect(host, port, klass) FSR::Log.info "*** FreeSWITCHer Inbound EventSocket Listener connected to #{host}:#{port} ***" FSR::Log.info "*** http://code.rubyists.com/projects/fs" end end |
.start_oes!(klass, args = {}) ⇒ Object
Method to start EM for Outbound Event Socket
40 41 42 43 44 45 46 47 48 |
# File 'lib/fsr.rb', line 40 def self.start_oes!(klass, args = {}) port = args[:port] || "8084" host = args[:host] || "localhost" EM.run do EventMachine::start_server(host, port, klass) FSR::Log.info "*** FreeSWITCHer Outbound EventSocket Listener on #{host}:#{port} ***" FSR::Log.info "*** http://code.rubyists.com/projects/fs" end end |