Class: Adhearsion::Initializer::AsteriskInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/adhearsion/initializer/asterisk.rb

Class Method Summary collapse

Class Method Details

.startObject



10
11
12
13
14
15
# File 'lib/adhearsion/initializer/asterisk.rb', line 10

def start
  self.config     = AHN_CONFIG.asterisk
  self.agi_server = initialize_agi
  self.ami_client = VoIP::Asterisk.manager_interface = initialize_ami if config.ami_enabled?
  join_server_thread_after_initialized
end

.stopObject



17
18
19
20
# File 'lib/adhearsion/initializer/asterisk.rb', line 17

def stop
  agi_server.stop
  ami_client.disconnect! if ami_client
end