class Punchblock::Translator::Freeswitch::Component::Input

Public Instance Methods

execute() click to toggle source
# File lib/punchblock/translator/freeswitch/component/input.rb, line 11
def execute
  super
  @dtmf_handler_id = register_dtmf_event_handler
end

Private Instance Methods

register_dtmf_event_handler() click to toggle source
# File lib/punchblock/translator/freeswitch/component/input.rb, line 18
def register_dtmf_event_handler
  component = current_actor
  call.register_handler :es, :event_name => 'DTMF' do |event|
    safe_from_dead_actors do
      component.process_dtmf event[:dtmf_digit]
    end
  end
end
unregister_dtmf_event_handler() click to toggle source
# File lib/punchblock/translator/freeswitch/component/input.rb, line 27
def unregister_dtmf_event_handler
  call.unregister_handler :es, @dtmf_handler_id if instance_variable_defined?(:@dtmf_handler_id)
rescue Celluloid::DeadActorError
end