librevox 1.1.0 → 1.2.0
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.
- checksums.yaml +4 -4
- data/lib/librevox/applications.rb +2 -6
- data/lib/librevox/command_socket.rb +11 -5
- data/lib/librevox/listener/outbound.rb +14 -6
- data/lib/librevox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fadfc835daf0f70edfe72c9a1fb2fb8ff709dc649e2105b06e0e304537b4a1aa
|
|
4
|
+
data.tar.gz: 6b6d55db19a6d4d8f3079148c5e0da1af6bd3b31491dc7238967c24188579332
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ade75b396dfaf64a08de980507b3a3ad47c6b3c91d0112196eceb9cc9f787ef96e0e0423583b0bfcb50dca63ce7f7d881b8166c5d28ec8763b0be6297d62566b
|
|
7
|
+
data.tar.gz: 62950a76f942a2021f05c0594daf0dfa7c9227e50218f7f78cf485e4edda45356a893cb6eb6aeffb9042a3535429a0cecb1bcf151619017afbd6303c13ea27e3
|
|
@@ -150,9 +150,7 @@ module Librevox
|
|
|
150
150
|
args = [min, max, tries, timeout, terminators, file, invalid_file,
|
|
151
151
|
variable, regexp].join " "
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
application "play_and_get_digits", args, params
|
|
153
|
+
application "play_and_get_digits", args, variable: variable
|
|
156
154
|
end
|
|
157
155
|
|
|
158
156
|
# Plays a sound file on the current channel.
|
|
@@ -182,9 +180,7 @@ module Librevox
|
|
|
182
180
|
arg_string = "%s %s %s %s %s %s" % [min, max, file, variable, timeout,
|
|
183
181
|
terminators]
|
|
184
182
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
application "read", arg_string, params
|
|
183
|
+
application "read", arg_string, variable: variable
|
|
188
184
|
end
|
|
189
185
|
|
|
190
186
|
# Records a message, with an optional limit on the maximum duration of the
|
|
@@ -37,11 +37,17 @@ module Librevox
|
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
def application(uuid, app, args = nil)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
def application(uuid, app, args = nil, **params)
|
|
41
|
+
headers = params
|
|
42
|
+
.merge(
|
|
43
|
+
event_lock: true,
|
|
44
|
+
call_command: "execute",
|
|
45
|
+
execute_app_name: app,
|
|
46
|
+
execute_app_arg: args,
|
|
47
|
+
)
|
|
48
|
+
.map { |key, value| "#{key.to_s.tr('_', '-')}: #{value}" }
|
|
49
|
+
|
|
50
|
+
send_message "sendmsg #{uuid}\n#{headers.join("\n")}"
|
|
45
51
|
end
|
|
46
52
|
|
|
47
53
|
def close
|
|
@@ -13,16 +13,24 @@ module Librevox
|
|
|
13
13
|
barrier.async { server.run }
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def application(app, args = nil, params
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
def application(app, args = nil, **params)
|
|
17
|
+
variable_name = params.delete(:variable)
|
|
18
|
+
|
|
19
|
+
headers = params
|
|
20
|
+
.merge(
|
|
21
|
+
event_lock: true,
|
|
22
|
+
call_command: "execute",
|
|
23
|
+
execute_app_name: app,
|
|
24
|
+
execute_app_arg: args,
|
|
25
|
+
)
|
|
26
|
+
.map { |key, value| "#{key.to_s.tr('_', '-')}: #{value}" }
|
|
27
|
+
|
|
28
|
+
send_message "sendmsg\n#{headers.join("\n")}"
|
|
20
29
|
|
|
21
|
-
send_message parts.join("\n")
|
|
22
30
|
response = @app_complete_queue.dequeue
|
|
23
31
|
@session = response.content
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
variable(variable_name) if variable_name
|
|
26
34
|
end
|
|
27
35
|
|
|
28
36
|
attr_accessor :session
|
data/lib/librevox/version.rb
CHANGED