# -*- encoding: utf-8 -*- # stub: bougyman-freeswitcher 0.1.2 ruby lib Gem::Specification.new do |s| s.name = "bougyman-freeswitcher".freeze s.version = "0.1.2".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Jayson Vaughn".freeze, "Michael Fellinger".freeze, "Kevin Berry".freeze, "TJ Vanderpoel".freeze] s.date = "2009-04-08" s.description = "========================================================= FreeSWITCHeR Copyright (c) 2009 The Rubyists (Jayson Vaughn, Tj Vanderpoel, Michael Fellinger, Kevin Berry) Distributed under the terms of the MIT License. ========================================================== About ----- *** STILL UNDER HEAVY DEVELOPMENT *** A ruby library for interacting with the \"FreeSWITCH\" (http://www.freeswitch.org) opensource telephony platform *** STILL UNDER HEAVY DEVELOPMENT *** Requirements ------------ - ruby (>= 1.8) - eventmachine (If you wish to use Outbound and Inbound listener) Usage ----- Example of originating a new call in 'irb' using FSR::CommandSocket#originate: irb(main):001:0> require 'fsr' => true irb(main):002:0> FSR.load_all_commands => [:sofia, :originate] irb(main):003:0> sock = FSR::CommandSocket.new => #, @port=\"8021\", @auth=\"ClueCon\"> irb(main):007:0> sock.originate(:target => 'sofia/gateway/carlos/8179395222', :endpoint => FSR::App::Bridge.new(\"user/bougyman\")).run => {\"Job-UUID\"=>\"732075a4-7dd5-4258-b124-6284a82a5ae7\", \"body\"=>\"\", \"Content-Type\"=>\"command/reply\", \"Reply-Text\"=>\"+OK Job-UUID: 732075a4-7dd5-4258-b124-6284a82a5ae7\"} Example of creating an Outbound Eventsocket listener: #!/usr/bin/env ruby require 'fsr' require \"fsr/listener/outbound\" class OesDemo < FSR::Listener::Outbound def session_initiated number = @session.headers[:caller_caller_id_number] # Grab the inbound caller id FSR::Log.info \"*** Answering incoming call from \#{number}\" answer # Answer the call set(\"hangup_after_bridge\", \"true\")# Set a variable speak 'Hello, This is your phone switch. Have a great day' # use mod_flite to speak hangup # Hangup the call end end FSR.start_oes!(OesDemo, :port => 1888, :host => \"localhost\") Example of creating an Outbound Eventsocket listener that can read DTMF input and keep state: #!/usr/bin/env ruby require 'fsr' require 'fsr/listener/outbound' FSR.load_all_applications FSR.load_all_commands class DtmfDemo < FSR::Listener::Outbound def session_initiated exten = @session.headers[:caller_caller_id_number] FSR::Log.info \"*** Answering incoming call from \#{exten}\" answer # Answer the call end def receive_reply(reply) exten = @session.headers[:caller_caller_id_number] case @step when 1 FSR::Log.info \"*** Reading dtmf for \#{exten}\" read \"/home/freeswitch/freeswitch/sounds/music/8000/sweet.wav\",4,10,\"test\",15000 # read test when 2 FSR::Log.info \"*** updating session for \#{exten}\" update_session when 3 FSR::Log.info \"** Success, grabbed \#{@session.headers[:variable_test].strip} from \#{exten}\" FSR::Log.info \"*** Hanging up call\" hangup # Hangup the call end end end FSR.start_oes! DtmfDemo, :port => 8084, :host => \"127.0.0.1\" Example of creating an Inbound Eventsocket listener: #!/usr/bin/env ruby require 'fsr' require 'fsr/listener/inbound' require 'pp' class IesDemo < FSR::Listener::Inbound def on_event(event) pp event.headers pp event.content[:event_name] end end FSR.start_ies!(IesDemo, :host => \"localhost\", :port => 8021) Support ------- Home page at http://code.rubyists.com/projects/fs #rubyists on FreeNode".freeze s.email = "FreeSWITCHeR@rubyists.com".freeze s.files = ["License.txt".freeze, "NEWS".freeze, "README".freeze, "Rakefile".freeze, "examples".freeze, "examples/bin".freeze, "examples/bin/cmd_demo.rb".freeze, "examples/bin/dtmf_test.rb".freeze, "examples/bin/ies_demo.rb".freeze, "examples/bin/ies_demo_with_hook.rb".freeze, "examples/bin/oes_demo.rb".freeze, "examples/dtmf_test.rb".freeze, "examples/ies_demo.rb".freeze, "examples/ies_demo_with_hook.rb".freeze, "examples/oes_demo.rb".freeze, "examples/play_and_get_test.rb".freeze, "lib".freeze, "lib/fsr".freeze, "lib/fsr.rb".freeze, "lib/fsr/app".freeze, "lib/fsr/app.rb".freeze, "lib/fsr/app/answer.rb".freeze, "lib/fsr/app/bridge.rb".freeze, "lib/fsr/app/conference.rb".freeze, "lib/fsr/app/fifo.rb".freeze, "lib/fsr/app/fs_break.rb".freeze, "lib/fsr/app/fs_sleep.rb".freeze, "lib/fsr/app/hangup.rb".freeze, "lib/fsr/app/log.rb".freeze, "lib/fsr/app/play_and_get_digits.rb".freeze, "lib/fsr/app/playback.rb".freeze, "lib/fsr/app/read.rb".freeze, "lib/fsr/app/set.rb".freeze, "lib/fsr/app/speak.rb".freeze, "lib/fsr/app/transfer.rb".freeze, "lib/fsr/app/uuid_dump.rb".freeze, "lib/fsr/app/uuid_getvar.rb".freeze, "lib/fsr/app/uuid_setvar.rb".freeze, "lib/fsr/cmd".freeze, "lib/fsr/cmd.rb".freeze, "lib/fsr/cmd/calls.rb".freeze, "lib/fsr/cmd/fsctl.rb".freeze, "lib/fsr/cmd/limit.rb".freeze, "lib/fsr/cmd/originate.rb".freeze, "lib/fsr/cmd/sofia".freeze, "lib/fsr/cmd/sofia.rb".freeze, "lib/fsr/cmd/sofia/profile.rb".freeze, "lib/fsr/cmd/sofia/status.rb".freeze, "lib/fsr/cmd/sofia_contact.rb".freeze, "lib/fsr/cmd/status.rb".freeze, "lib/fsr/command_socket.rb".freeze, "lib/fsr/database".freeze, "lib/fsr/database.rb".freeze, "lib/fsr/database/call_limit.rb".freeze, "lib/fsr/database/core.rb".freeze, "lib/fsr/database/sofia_reg_external.rb".freeze, "lib/fsr/database/sofia_reg_internal.rb".freeze, "lib/fsr/database/voicemail_default.rb".freeze, "lib/fsr/event_socket.rb".freeze, "lib/fsr/fake_socket.rb".freeze, "lib/fsr/listener".freeze, "lib/fsr/listener.rb".freeze, "lib/fsr/listener/header_and_content_response.rb".freeze, "lib/fsr/listener/inbound".freeze, "lib/fsr/listener/inbound.rb".freeze, "lib/fsr/listener/inbound/event.rb".freeze, "lib/fsr/listener/outbound.rb".freeze, "lib/fsr/listener/outbound.rb.orig".freeze, "lib/fsr/model".freeze, "lib/fsr/model/call.rb".freeze, "spec".freeze, "spec/fsr".freeze, "spec/fsr/app".freeze, "spec/fsr/app.rb".freeze, "spec/fsr/app/bridge.rb".freeze, "spec/fsr/app/conference.rb".freeze, "spec/fsr/app/fifo.rb".freeze, "spec/fsr/app/hangup.rb".freeze, "spec/fsr/app/log.rb".freeze, "spec/fsr/app/play_and_get_digits.rb".freeze, "spec/fsr/app/playback.rb".freeze, "spec/fsr/app/set.rb".freeze, "spec/fsr/app/transfer.rb".freeze, "spec/fsr/cmd".freeze, "spec/fsr/cmd.rb".freeze, "spec/fsr/cmd/calls.rb".freeze, "spec/fsr/cmd/limit.rb".freeze, "spec/fsr/cmd/originate.rb".freeze, "spec/fsr/cmd/sofia".freeze, "spec/fsr/cmd/sofia.rb".freeze, "spec/fsr/cmd/sofia/profile.rb".freeze, "spec/fsr/listener".freeze, "spec/fsr/listener.rb".freeze, "spec/fsr/listener/inbound.rb".freeze, "spec/fsr/listener/outbound.rb".freeze, "spec/fsr/loading.rb".freeze, "spec/helper.rb".freeze, "tasks".freeze, "tasks/package.rake".freeze, "tasks/spec.rake".freeze] s.homepage = "http://code.rubyists.com/projects/fs".freeze s.post_install_message = "=========================================================\nFreeSWITCHeR\nCopyright (c) 2009 The Rubyists (Jayson Vaughn, Tj Vanderpoel, Michael Fellinger, Kevin Berry) \nDistributed under the terms of the MIT License.\n==========================================================\n\nAbout\n-----\n*** STILL UNDER HEAVY DEVELOPMENT ***\n\nA ruby library for interacting with the \"FreeSWITCH\" (http://www.freeswitch.org) opensource telephony platform\n\n*** STILL UNDER HEAVY DEVELOPMENT ***\n\nRequirements\n------------\n- ruby (>= 1.8)\n- eventmachine (If you wish to use Outbound and Inbound listener)\n\nUsage\n-----\n\nExample of originating a new call in 'irb' using FSR::CommandSocket#originate:\n\n irb(main):001:0> require 'fsr'\n => true\n\n irb(main):002:0> FSR.load_all_commands\n => [:sofia, :originate]\n\n irb(main):003:0> sock = FSR::CommandSocket.new\n => #, @port=\"8021\", @auth=\"ClueCon\">\n\n irb(main):007:0> sock.originate(:target => 'sofia/gateway/carlos/8179395222', :endpoint => FSR::App::Bridge.new(\"user/bougyman\")).run\n => {\"Job-UUID\"=>\"732075a4-7dd5-4258-b124-6284a82a5ae7\", \"body\"=>\"\", \"Content-Type\"=>\"command/reply\", \"Reply-Text\"=>\"+OK Job-UUID: 732075a4-7dd5-4258-b124-6284a82a5ae7\"}\n\n\nExample of creating an Outbound Eventsocket listener:\n\n #!/usr/bin/env ruby\n\n require 'fsr'\n require \"fsr/listener/outbound\"\n\n class OesDemo < FSR::Listener::Outbound\n\n def session_initiated\n number = @session.headers[:caller_caller_id_number] # Grab the inbound caller id\n FSR::Log.info \"*** Answering incoming call from \#{number}\"\n answer # Answer the call\n set(\"hangup_after_bridge\", \"true\")# Set a variable\n speak 'Hello, This is your phone switch. Have a great day' # use mod_flite to speak\n hangup # Hangup the call\n end\n\n end\n\n FSR.start_oes!(OesDemo, :port => 1888, :host => \"localhost\")\n\n\n\nExample of creating an Outbound Eventsocket listener that can read DTMF input and keep state:\n\n #!/usr/bin/env ruby\n\n require 'fsr'\n require 'fsr/listener/outbound'\n\n FSR.load_all_applications\n FSR.load_all_commands\n\n class DtmfDemo < FSR::Listener::Outbound\n\n def session_initiated\n exten = @session.headers[:caller_caller_id_number]\n FSR::Log.info \"*** Answering incoming call from \#{exten}\"\n answer # Answer the call\n end\n\n def receive_reply(reply)\n exten = @session.headers[:caller_caller_id_number]\n case @step\n when 1\n FSR::Log.info \"*** Reading dtmf for \#{exten}\"\n read \"/home/freeswitch/freeswitch/sounds/music/8000/sweet.wav\",4,10,\"test\",15000 # read test\n when 2\n FSR::Log.info \"*** updating session for \#{exten}\"\n update_session\n when 3\n FSR::Log.info \"** Success, grabbed \#{@session.headers[:variable_test].strip} from \#{exten}\"\n FSR::Log.info \"*** Hanging up call\"\n hangup # Hangup the call\n end\n end\n\n end\n\n FSR.start_oes! DtmfDemo, :port => 8084, :host => \"127.0.0.1\"\n\n\n\nExample of creating an Inbound Eventsocket listener:\n\n #!/usr/bin/env ruby\n\n require 'fsr'\n require 'fsr/listener/inbound'\n require 'pp'\n\n class IesDemo < FSR::Listener::Inbound\n\n def on_event(event)\n pp event.headers\n pp event.content[:event_name]\n end\n\n end\n\n FSR.start_ies!(IesDemo, :host => \"localhost\", :port => 8021)\n\n\n\nSupport\n-------\nHome page at http://code.rubyists.com/projects/fs\n#rubyists on FreeNode\n".freeze s.rubygems_version = "3.5.10".freeze s.summary = "A library for interacting with the \"FreeSWITCH\":http://freeswitch.org telephony platform".freeze s.test_files = ["spec".freeze, "spec/fsr".freeze, "spec/fsr/app".freeze, "spec/fsr/app/bridge.rb".freeze, "spec/fsr/app/conference.rb".freeze, "spec/fsr/app/fifo.rb".freeze, "spec/fsr/app/hangup.rb".freeze, "spec/fsr/app/log.rb".freeze, "spec/fsr/app/play_and_get_digits.rb".freeze, "spec/fsr/app/playback.rb".freeze, "spec/fsr/app/set.rb".freeze, "spec/fsr/app/transfer.rb".freeze, "spec/fsr/app.rb".freeze, "spec/fsr/cmd".freeze, "spec/fsr/cmd/calls.rb".freeze, "spec/fsr/cmd/limit.rb".freeze, "spec/fsr/cmd/originate.rb".freeze, "spec/fsr/cmd/sofia".freeze, "spec/fsr/cmd/sofia/profile.rb".freeze, "spec/fsr/cmd/sofia.rb".freeze, "spec/fsr/cmd.rb".freeze, "spec/fsr/listener".freeze, "spec/fsr/listener/inbound.rb".freeze, "spec/fsr/listener/outbound.rb".freeze, "spec/fsr/listener.rb".freeze, "spec/fsr/loading.rb".freeze, "spec/helper.rb".freeze] s.specification_version = 2 s.add_runtime_dependency(%q.freeze, [">= 0".freeze]) end