Sha256: 23b6b3068b45ea51f369f546fd6db373b9134641c1e4f23e0aef9122e4bf758b

Contents?: true

Size: 770 Bytes

Versions: 4

Compression:

Stored size: 770 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'lib')

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', '..')

require 'connfu'

require 'examples/provisioning/setup'

ARGV.length < 2 and
    (
    puts "Please include as argument the api_key, the channel and optionally the dtmf tone"
    exit
    )

api_key = ARGV.shift

channel = ARGV.shift

dtmf = if ARGV.length < 1
                ""
              else
                ARGV.shift
              end


Connfu.log_level = Logger::DEBUG

application = Connfu::Provisioning::Application.new(api_key, CONNFU_ENDPOINT)


begin
  phones = application.get_dtmf(channel, dtmf)
  p phones
rescue Exception => ex
  puts "There was an error:"
  puts "Exception message: #{ex.message}"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
connfu-client-0.1.6 examples/provisioning/voice/dtmf/get.rb
connfu-client-0.1.5 examples/provisioning/voice/dtmf/get.rb
connfu-client-0.1.4 examples/provisioning/voice/dtmf/get.rb
connfu-client-0.1.3 examples/provisioning/voice/dtmf/get.rb