oversip 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/stud/extconf.rb +18 -3
- data/lib/oversip/proxies_config.rb +6 -1
- data/lib/oversip/sip/core.rb +28 -2
- data/lib/oversip/version.rb +1 -1
- metadata +2 -2
data/ext/stud/extconf.rb
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
require "mkmf"
|
2
2
|
require "fileutils"
|
3
|
+
require "rbconfig"
|
4
|
+
|
5
|
+
|
6
|
+
def log(message)
|
7
|
+
puts "[ext/stud/extconf.rb] #{message}"
|
8
|
+
end
|
3
9
|
|
4
10
|
|
5
11
|
def sys(cmd)
|
6
|
-
|
12
|
+
log "executing system command: #{cmd}"
|
7
13
|
unless ret = xsystem(cmd)
|
8
|
-
raise "system command `#{cmd}' failed"
|
14
|
+
raise "[ext/stud/extconf.rb] system command `#{cmd}' failed"
|
9
15
|
end
|
10
16
|
ret
|
11
17
|
end
|
@@ -17,8 +23,17 @@ stud_tarball = "stud.tar.gz"
|
|
17
23
|
|
18
24
|
Dir.chdir(stud_dir) do
|
19
25
|
sys("tar -zxf #{stud_tarball}")
|
26
|
+
|
20
27
|
Dir.chdir("stud") do
|
21
|
-
|
28
|
+
host_os = RbConfig::CONFIG["host_os"]
|
29
|
+
log "RbConfig::CONFIG['host_os'] returns #{host_os.inspect}"
|
30
|
+
case host_os
|
31
|
+
when /bsd/i
|
32
|
+
log "BSD detected, using `gmake' instead of `make'"
|
33
|
+
sys("gmake")
|
34
|
+
else
|
35
|
+
sys("make")
|
36
|
+
end
|
22
37
|
FileUtils.mv "stud", "../../../bin/oversip_stud"
|
23
38
|
end
|
24
39
|
|
@@ -62,7 +62,12 @@ module OverSIP
|
|
62
62
|
|
63
63
|
proxies[proxy.to_sym] = @proxy_configuration.dup
|
64
64
|
proxies[proxy.to_sym].each do |parameter, default_value|
|
65
|
-
proxies[proxy.to_sym][parameter] =
|
65
|
+
proxies[proxy.to_sym][parameter] = case default_value
|
66
|
+
when ::TrueClass, ::FalseClass, ::NilClass, ::Fixnum
|
67
|
+
default_value
|
68
|
+
else
|
69
|
+
default_value.clone
|
70
|
+
end
|
66
71
|
end
|
67
72
|
|
68
73
|
PROXY_CONFIG_VALIDATIONS.each do |parameter, validations|
|
data/lib/oversip/sip/core.rb
CHANGED
@@ -77,13 +77,15 @@ module OverSIP::SIP
|
|
77
77
|
@num_vias == 1 and
|
78
78
|
outbound_aware? and (
|
79
79
|
( has_preloaded_route_with_ob_param or (@contact and @contact.ob_param?) ) or
|
80
|
-
( @sip_method == :REGISTER and contact_reg_id?)
|
80
|
+
( @sip_method == :REGISTER and contact_reg_id? )
|
81
81
|
)
|
82
82
|
)
|
83
83
|
)
|
84
84
|
)
|
85
85
|
@outgoing_outbound_requested = true
|
86
86
|
log_system_debug "applying outgoing Outbound support" if $oversip_debug
|
87
|
+
else
|
88
|
+
@outgoing_outbound_requested = false
|
87
89
|
end
|
88
90
|
|
89
91
|
# Incoming initial request or in-dialog incoming/outgoing request. Must only perform
|
@@ -158,7 +160,31 @@ module OverSIP::SIP
|
|
158
160
|
end
|
159
161
|
|
160
162
|
|
161
|
-
def outgoing_outbound_requested?
|
163
|
+
def outgoing_outbound_requested?
|
164
|
+
return true if @outgoing_outbound_requested
|
165
|
+
return false if @outgoing_outbound_requested == false
|
166
|
+
|
167
|
+
# It could be an initial request so we must provide Outbound support if
|
168
|
+
# forced via request.fix_nat() or if the request properly indicates it, even
|
169
|
+
# when route.loose_route() is not called.
|
170
|
+
if (
|
171
|
+
initial? and
|
172
|
+
@connection.class.outbound_listener? and (
|
173
|
+
@force_outgoing_outbound or (
|
174
|
+
@num_vias == 1 and
|
175
|
+
outbound_aware? and (
|
176
|
+
( @contact and @contact.ob_param? ) or
|
177
|
+
( @sip_method == :REGISTER and contact_reg_id? )
|
178
|
+
)
|
179
|
+
)
|
180
|
+
)
|
181
|
+
)
|
182
|
+
log_system_debug "applying outgoing Outbound support" if $oversip_debug
|
183
|
+
@outgoing_outbound_requested = true
|
184
|
+
else
|
185
|
+
@outgoing_outbound_requested = false
|
186
|
+
end
|
187
|
+
end
|
162
188
|
|
163
189
|
def incoming_outbound_requested? ; @incoming_outbound_requested end
|
164
190
|
|
data/lib/oversip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oversip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
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: 2013-
|
12
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine-le
|