Sha256: 36eeabdca48ddf5a3f8d509b8e22c4476ca99299b9a0b1eaf31531bbb68bd45b

Contents?: true

Size: 734 Bytes

Versions: 11

Compression:

Stored size: 734 Bytes

Contents

# encoding: utf-8

module Punchblock
  module Translator
    class Asterisk
      module Component
        class Input < Component

          include InputComponent

          def execute
            @call.send_progress
            super
          end

          private

          def register_dtmf_event_handler
            component = current_actor
            call.register_handler :ami, :name => 'DTMF' do |event|
              component.process_dtmf! event['Digit'] if event['End'] == 'Yes'
            end
          end

          def unregister_dtmf_event_handler
            call.unregister_handler :ami, @dtmf_handler_id if instance_variable_defined?(:@dtmf_handler_id)
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
punchblock-1.8.0 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.7.1 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.7.0 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.6.1 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.6.0 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.5.3 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.5.2 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.5.1 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.5.0 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.4.1 lib/punchblock/translator/asterisk/component/input.rb
punchblock-1.4.0 lib/punchblock/translator/asterisk/component/input.rb