freeswitcher 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fsr/app/pre_answer.rb +27 -0
- data/lib/fsr/app/ring_ready.rb +27 -0
- data/lib/fsr/cmd/originate.rb +1 -1
- data/lib/fsr/version.rb +1 -1
- data/spec/fsr/app/pre_answer.rb +12 -0
- data/spec/fsr/app/ring_ready.rb +12 -0
- data/spec/fsr/loading.rb +1 -1
- metadata +10 -14
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
require "fsr/app"
|
3
|
+
module FSR
|
4
|
+
module App
|
5
|
+
class PreAnswer < Application
|
6
|
+
# PreAnswer a call
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
end
|
10
|
+
|
11
|
+
def arguments
|
12
|
+
[]
|
13
|
+
end
|
14
|
+
|
15
|
+
def sendmsg
|
16
|
+
"call-command: execute\nexecute-app-name: %s\n\n" % [app_name]
|
17
|
+
end
|
18
|
+
|
19
|
+
def app_name
|
20
|
+
'pre_answer'
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
register(:pre_answer, PreAnswer)
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
require "fsr/app"
|
3
|
+
module FSR
|
4
|
+
module App
|
5
|
+
class RingReady < Application
|
6
|
+
# RingReady a call
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
end
|
10
|
+
|
11
|
+
def arguments
|
12
|
+
[]
|
13
|
+
end
|
14
|
+
|
15
|
+
def sendmsg
|
16
|
+
"call-command: execute\nexecute-app-name: %s\n\n" % [app_name]
|
17
|
+
end
|
18
|
+
|
19
|
+
def app_name
|
20
|
+
'ring_ready'
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
register(:ring_ready, RingReady)
|
26
|
+
end
|
27
|
+
end
|
data/lib/fsr/cmd/originate.rb
CHANGED
data/lib/fsr/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec/helper'
|
2
|
+
require "fsr/app"
|
3
|
+
FSR::App.load_application("pre_answer")
|
4
|
+
|
5
|
+
describe "Testing FSR::App::PreAnswer" do
|
6
|
+
|
7
|
+
it "pre_answers the incoming call" do
|
8
|
+
ans = FSR::App::PreAnswer.new
|
9
|
+
ans.sendmsg.should == "call-command: execute\nexecute-app-name: pre_answer\n\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec/helper'
|
2
|
+
require "fsr/app"
|
3
|
+
FSR::App.load_application("ring_ready")
|
4
|
+
|
5
|
+
describe "Testing FSR::App::RingReady" do
|
6
|
+
|
7
|
+
it "sends ring_ready to incoming call" do
|
8
|
+
ans = FSR::App::RingReady.new
|
9
|
+
ans.sendmsg.should == "call-command: execute\nexecute-app-name: ring_ready\n\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
data/spec/fsr/loading.rb
CHANGED
@@ -4,7 +4,7 @@ require 'spec/helper'
|
|
4
4
|
describe "Testing FSR module loading methods" do
|
5
5
|
# When you add applications you must modify the expected apps_loaded behavior
|
6
6
|
it "Loads all applications" do
|
7
|
-
all_apps = [:play_and_get_digits, :uuid_dump, :uuid_setvar, :uuid_getvar, :read, :set, :transfer, :speak, :fs_sleep, :playback, :answer, :fifo, :bridge, :hangup, :conference, :fs_break, :log, :limit, :bind_meta_app, :execute_app, :callcenter]
|
7
|
+
all_apps = [:play_and_get_digits, :uuid_dump, :uuid_setvar, :uuid_getvar, :read, :set, :transfer, :speak, :fs_sleep, :playback, :answer, :fifo, :bridge, :hangup, :conference, :fs_break, :log, :limit, :bind_meta_app, :execute_app, :callcenter, :ring_ready, :pre_answer]
|
8
8
|
# Add any apps which will load to this set
|
9
9
|
apps_loaded = FSR.load_all_applications
|
10
10
|
apps_loaded.kind_of?(Array).should == true
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freeswitcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 6
|
8
|
-
- 4
|
9
|
-
version: 0.6.4
|
4
|
+
prerelease:
|
5
|
+
version: 0.6.5
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Jayson Vaughn
|
@@ -17,7 +13,7 @@ autorequire:
|
|
17
13
|
bindir: bin
|
18
14
|
cert_chain: []
|
19
15
|
|
20
|
-
date: 2011-02-
|
16
|
+
date: 2011-02-28 00:00:00 -06:00
|
21
17
|
default_executable:
|
22
18
|
dependencies:
|
23
19
|
- !ruby/object:Gem::Dependency
|
@@ -28,8 +24,6 @@ dependencies:
|
|
28
24
|
requirements:
|
29
25
|
- - ">="
|
30
26
|
- !ruby/object:Gem::Version
|
31
|
-
segments:
|
32
|
-
- 0
|
33
27
|
version: "0"
|
34
28
|
type: :runtime
|
35
29
|
version_requirements: *id001
|
@@ -71,7 +65,9 @@ files:
|
|
71
65
|
- lib/fsr/app/log.rb
|
72
66
|
- lib/fsr/app/play_and_get_digits.rb
|
73
67
|
- lib/fsr/app/playback.rb
|
68
|
+
- lib/fsr/app/pre_answer.rb
|
74
69
|
- lib/fsr/app/read.rb
|
70
|
+
- lib/fsr/app/ring_ready.rb
|
75
71
|
- lib/fsr/app/set.rb
|
76
72
|
- lib/fsr/app/speak.rb
|
77
73
|
- lib/fsr/app/transfer.rb
|
@@ -150,6 +146,8 @@ files:
|
|
150
146
|
- spec/fsr/app/log.rb
|
151
147
|
- spec/fsr/app/play_and_get_digits.rb
|
152
148
|
- spec/fsr/app/playback.rb
|
149
|
+
- spec/fsr/app/pre_answer.rb
|
150
|
+
- spec/fsr/app/ring_ready.rb
|
153
151
|
- spec/fsr/app/set.rb
|
154
152
|
- spec/fsr/app/transfer.rb
|
155
153
|
- spec/fsr/cmd.rb
|
@@ -366,21 +364,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
366
364
|
requirements:
|
367
365
|
- - ">="
|
368
366
|
- !ruby/object:Gem::Version
|
369
|
-
segments:
|
370
|
-
- 0
|
371
367
|
version: "0"
|
372
368
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
373
369
|
none: false
|
374
370
|
requirements:
|
375
371
|
- - ">="
|
376
372
|
- !ruby/object:Gem::Version
|
377
|
-
segments:
|
378
|
-
- 0
|
379
373
|
version: "0"
|
380
374
|
requirements: []
|
381
375
|
|
382
376
|
rubyforge_project: freeswitcher
|
383
|
-
rubygems_version: 1.3
|
377
|
+
rubygems_version: 1.5.3
|
384
378
|
signing_key:
|
385
379
|
specification_version: 3
|
386
380
|
summary: A library for interacting with the "FreeSWITCH":http://freeswitch.org telephony platform
|
@@ -400,6 +394,8 @@ test_files:
|
|
400
394
|
- spec/fsr/app/log.rb
|
401
395
|
- spec/fsr/app/play_and_get_digits.rb
|
402
396
|
- spec/fsr/app/playback.rb
|
397
|
+
- spec/fsr/app/pre_answer.rb
|
398
|
+
- spec/fsr/app/ring_ready.rb
|
403
399
|
- spec/fsr/app/set.rb
|
404
400
|
- spec/fsr/app/transfer.rb
|
405
401
|
- spec/fsr/cmd.rb
|