adhearsion-ims 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -11,11 +11,11 @@ Usage
|
|
11
11
|
|
12
12
|
def run
|
13
13
|
# Complete the call as a B2BUA, must pass options returned
|
14
|
-
ims_data =
|
14
|
+
ims_data = generate_ims_options :b2bua
|
15
15
|
dial ims_data[:sip_uri], ims_data[:options]
|
16
16
|
|
17
17
|
# Complete the call as an Out of the Blue (OOB)
|
18
|
-
ims_data =
|
18
|
+
ims_data = generate_ims_options :out_of_the_blue
|
19
19
|
dial ims_data[:sip_uri], ims_data[:options]
|
20
20
|
end
|
21
21
|
end
|
@@ -34,5 +34,5 @@ The configuration for this plugin should be included in the Adhearsion project w
|
|
34
34
|
config.adhearsion_ims.cscf_address = "192.168.0.2" #The Hostname or IP Address of the Call Session Control Function (CSCF) of the IMS, can not be nil
|
35
35
|
config.adhearsion_ims.originating_ims_identity = 'foobar.com' #Originating IMS Identity for an Out of the Blue session, can not be nil
|
36
36
|
config.adhearsion_ims.uvp_address = '192.168.0.3' #The Hostname or IP Address of the Universal Voice Platform (UVP) of the IMS
|
37
|
-
config.adhearsion_ims.exclude_routes = ['foo'] #An array of routes to exclude from the route header
|
37
|
+
config.adhearsion_ims.exclude_routes = ['foo'] #An array of routes to exclude from the route header, may match on partial strings
|
38
38
|
|
@@ -77,7 +77,13 @@ module Adhearsion
|
|
77
77
|
# @param [Array] route headers
|
78
78
|
# @return [Array] the routes with any nodes removed
|
79
79
|
def remove_nodes(routes)
|
80
|
-
|
80
|
+
routes_to_delete = nil
|
81
|
+
|
82
|
+
Adhearsion::IMS::Plugin.config[:exclude_routes].each { |excluded_route|
|
83
|
+
routes_to_delete = routes.grep /#{excluded_route}/
|
84
|
+
}
|
85
|
+
|
86
|
+
routes_to_delete.each { |route| routes.delete(route) } if routes_to_delete
|
81
87
|
routes
|
82
88
|
end
|
83
89
|
|
@@ -67,12 +67,19 @@ module Adhearsion::IMS
|
|
67
67
|
headers[:route].should eql "#{Adhearsion::IMS::Plugin.config[:sbc_address]}|||1234|||4567"
|
68
68
|
end
|
69
69
|
|
70
|
-
it "but removes appropriate route nodes when specified
|
70
|
+
it "but removes appropriate route nodes when specified in the configuration" do
|
71
71
|
Adhearsion::IMS::Plugin.config[:exclude_routes] = ['1234']
|
72
72
|
headers = subject.generate_isc_headers :b2bua
|
73
73
|
headers[:route].should eql "#{Adhearsion::IMS::Plugin.config[:sbc_address]}|||4567"
|
74
74
|
Adhearsion::IMS::Plugin.config[:exclude_routes] = []
|
75
75
|
end
|
76
|
+
|
77
|
+
it "and removes appropriate matching route nodes when specified in the configuration" do
|
78
|
+
Adhearsion::IMS::Plugin.config[:exclude_routes] = ['12']
|
79
|
+
headers = subject.generate_isc_headers :b2bua
|
80
|
+
headers[:route].should eql "#{Adhearsion::IMS::Plugin.config[:sbc_address]}|||4567"
|
81
|
+
Adhearsion::IMS::Plugin.config[:exclude_routes] = []
|
82
|
+
end
|
76
83
|
end
|
77
84
|
end
|
78
85
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adhearsion-ims
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: adhearsion
|
@@ -231,3 +231,4 @@ summary: Adhearsion IMS Integration
|
|
231
231
|
test_files:
|
232
232
|
- spec/adhearsion-ims/controller_methods_spec.rb
|
233
233
|
- spec/spec_helper.rb
|
234
|
+
has_rdoc:
|