Sha256: 8d2fa435bbd6f42c0e8da188495889ed04e5bf4e4cd0c9a7b356cfc494fc2376
Contents?: true
Size: 698 Bytes
Versions: 4
Compression:
Stored size: 698 Bytes
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), "..", 'lib', 'fsr') require "fsr/listener/outbound" $stdout.flush class OutboundDemo < FSR::Listener::Outbound def session_initiated exten = @session.headers[:caller_caller_id_number] FSR::Log.info "*** Answering incoming call from #{exten}" answer do FSR::Log.info "***Reading DTMF from #{exten}" read("/home/freeswitch/freeswitch/sounds/music/8000/sweet.wav", 4, 10, "input", 7000) do |read_var| FSR::Log.info "***Success, grabbed #{read_var.strip} from #{exten}" hangup #Hangup the call end end end end FSR.start_oes! OutboundDemo, :port => 8084, :host => "127.0.0.1"
Version data entries
4 entries across 4 versions & 2 rubygems