quaff 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/call.rb +1 -5
- data/lib/endpoint.rb +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20c9f3e778c12a6af9fbef86b334bc7708c47c34
|
4
|
+
data.tar.gz: 723bc3efb24e71e50b51fa0a45c7e70a04dc791a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 310387f9435b9692b61ac26cdf62cc5d335edca91ef98409d117b157a0d78a98610bd0e389cb5a8f16dc3916e30cae1c928172b6bb62716f1d7a9d3b4a670d11
|
7
|
+
data.tar.gz: 06c032f15eea07f990b2af515061edf05742e720dfa80a6603c4b1cf42e6cff021e52e437e936330e2e4b9b686b0d76b134a61ae41ff535ecdc5e1b2ed470794
|
data/lib/call.rb
CHANGED
@@ -283,13 +283,9 @@ class Call
|
|
283
283
|
"Max-Forwards" => "70",
|
284
284
|
"Content-Length" => "0",
|
285
285
|
"User-Agent" => "Quaff SIP Scripting Engine",
|
286
|
-
"Contact" =>
|
286
|
+
"Contact" => @cxn.contact_header
|
287
287
|
}
|
288
288
|
|
289
|
-
if @instance_id
|
290
|
-
defaults["Contact"] += ";+sip.instance=\"<urn:uuid:"+@instance_id+">\""
|
291
|
-
end
|
292
|
-
|
293
289
|
is_request = code.nil?
|
294
290
|
if is_request
|
295
291
|
defaults['Route'] = @routeset
|
data/lib/endpoint.rb
CHANGED
@@ -11,8 +11,8 @@ require 'digest/md5'
|
|
11
11
|
|
12
12
|
module Quaff
|
13
13
|
class BaseEndpoint
|
14
|
-
attr_accessor :msg_trace, :uri, :sdp_port, :sdp_socket, :
|
15
|
-
attr_reader :msg_log, :local_port
|
14
|
+
attr_accessor :msg_trace, :uri, :sdp_port, :sdp_socket, :contact_header
|
15
|
+
attr_reader :msg_log, :local_port, :instance_id
|
16
16
|
|
17
17
|
# Creates an SDP socket bound to an ephemeral port
|
18
18
|
def setup_sdp
|
@@ -36,6 +36,11 @@ module Quaff
|
|
36
36
|
def add_sock sock
|
37
37
|
end
|
38
38
|
|
39
|
+
def instance_id= id
|
40
|
+
@instance_id = id
|
41
|
+
@contact_header += ";+sip.instance=\"<urn:uuid:"+@instance_id+">\""
|
42
|
+
end
|
43
|
+
|
39
44
|
# Retrieves the next unhandled call for this endpoint and returns
|
40
45
|
# a +Call+ object representing it
|
41
46
|
def incoming_call
|
@@ -91,6 +96,7 @@ module Quaff
|
|
91
96
|
@outbound_connection = new_connection(outbound_proxy, outbound_port)
|
92
97
|
end
|
93
98
|
@hashes = []
|
99
|
+
@contact_header = "<sip:quaff@#{Utils::local_ip}:#{@local_port};transport=#{@transport};ob>"
|
94
100
|
initialize_queues
|
95
101
|
start
|
96
102
|
end
|
@@ -171,6 +177,10 @@ module Quaff
|
|
171
177
|
Timeout::timeout(time_limit) { @call_ids.deq }
|
172
178
|
end
|
173
179
|
|
180
|
+
def no_new_calls?
|
181
|
+
return @call_ids.empty?
|
182
|
+
end
|
183
|
+
|
174
184
|
# Sets up the internal structures needed to handle calls for a new Call-ID.
|
175
185
|
def add_call_id cid
|
176
186
|
@messages[cid] ||= Queue.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quaff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Day
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|