bandwidth-sdk 3.10.0 → 3.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bandwidth.rb +24 -1
- data/lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb +25 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb +20 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb +14 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/tag.rb +13 -0
- data/lib/bandwidth/voice_lib/bxml/verbs/transfer.rb +9 -2
- data/lib/bandwidth/voice_lib/voice/controllers/base_controller.rb +1 -1
- data/lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb +13 -0
- data/lib/bandwidth/web_rtc_lib/web_rtc/controllers/base_controller.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a79b2f744a1044c7312833760914829637f9c7d21aa8b670102d83b2e810f8b
|
4
|
+
data.tar.gz: e12d0c3e1d70547f90a1bdbad47e76425823b85bc8d5f838ca15e2e9d3dfe1d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71871be37311133b4c09b4b157d800cf94e622399907625fab8dc6ebff41aaed8b6c1dc8f931c819d2e9172e8998842fa3cbbd5d48982685bac0b72f64205b62
|
7
|
+
data.tar.gz: 6236ac41293f9e5f5453b9db12e50ff1c07eb632d61af71d8929b568f36c13ddd1205cd775fe717cc2668b8ff16dae76f91a2295bdf78fe06c1567b58c03266e
|
data/lib/bandwidth.rb
CHANGED
@@ -42,4 +42,27 @@ require_relative 'bandwidth/http/auth/voice_basic_auth.rb'
|
|
42
42
|
require_relative 'bandwidth/web_rtc_lib/web_rtc'
|
43
43
|
require_relative 'bandwidth/http/auth/web_rtc_basic_auth.rb'
|
44
44
|
|
45
|
-
#
|
45
|
+
# External Files
|
46
|
+
require_relative 'bandwidth/voice_lib/bxml/bxml.rb'
|
47
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/bridge.rb'
|
48
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/conference.rb'
|
49
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/forward.rb'
|
50
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/gather.rb'
|
51
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/hangup.rb'
|
52
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/pause.rb'
|
53
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/pause_recording.rb'
|
54
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/phone_number.rb'
|
55
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/play_audio.rb'
|
56
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/record.rb'
|
57
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/redirect.rb'
|
58
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/resume_recording.rb'
|
59
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/ring.rb'
|
60
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/send_dtmf.rb'
|
61
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/speak_sentence.rb'
|
62
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/start_gather.rb'
|
63
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/start_recording.rb'
|
64
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/stop_gather.rb'
|
65
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/stop_recording.rb'
|
66
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/transfer.rb'
|
67
|
+
require_relative 'bandwidth/voice_lib/bxml/verbs/xml_verb.rb'
|
68
|
+
require_relative 'bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'xml_verb'
|
2
|
+
|
3
|
+
module Bandwidth
|
4
|
+
module Voice
|
5
|
+
class SipUri
|
6
|
+
include XmlVerb
|
7
|
+
def to_bxml(xml)
|
8
|
+
xml.SipUri(uri, compact_hash({
|
9
|
+
'transferAnswerUrl' => transfer_answer_url,
|
10
|
+
'transferAnswerMethod' => transfer_answer_method,
|
11
|
+
'transferDisconnectUrl' => transfer_disconnect_url,
|
12
|
+
'transferDisconnectMethod' => transfer_disconnect_method,
|
13
|
+
'username' => username,
|
14
|
+
'password' => password,
|
15
|
+
'tag' => tag,
|
16
|
+
'uui' => uui,
|
17
|
+
'transferAnswerFallbackUrl' => transfer_answer_fallback_url,
|
18
|
+
'transferAnswerFallbackMethod' => transfer_answer_fallback_method,
|
19
|
+
'fallbackUsername' => fallback_username,
|
20
|
+
'fallbackPassword' => fallback_password
|
21
|
+
}))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative 'xml_verb'
|
2
|
+
|
3
|
+
module Bandwidth
|
4
|
+
module Voice
|
5
|
+
# The StartGather verb is used to start a gather
|
6
|
+
class StartGather
|
7
|
+
include XmlVerb
|
8
|
+
|
9
|
+
def to_bxml(xml)
|
10
|
+
xml.StartGather(compact_hash({
|
11
|
+
'username' => username,
|
12
|
+
'password' => password,
|
13
|
+
'tag' => tag,
|
14
|
+
'dtmfUrl' => dtmf_url,
|
15
|
+
'dtmfMethod' => dtmf_method,
|
16
|
+
}))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -31,8 +31,15 @@ module Bandwidth
|
|
31
31
|
s.to_bxml(xml)
|
32
32
|
end
|
33
33
|
end
|
34
|
-
phone_numbers.
|
35
|
-
|
34
|
+
if not phone_numbers.nil?
|
35
|
+
phone_numbers.each do |number|
|
36
|
+
embedded_xml(xml, number, PhoneNumber)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
if not sip_uris.nil?
|
40
|
+
sip_uris.each do |sip_uri|
|
41
|
+
embedded_xml(xml, sip_uri, SipUri)
|
42
|
+
end
|
36
43
|
end
|
37
44
|
end
|
38
45
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# web_rtc_transfer.rb
|
2
|
+
#
|
3
|
+
# Custom transfer BXML for WebRtc
|
4
|
+
#
|
5
|
+
# @copyright Bandwidth INC
|
6
|
+
|
7
|
+
module Bandwidth
|
8
|
+
module WebRtc
|
9
|
+
def generate_bxml(device_token, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
|
10
|
+
return '<?xml version="1.0" encoding="UTF-8"?><Response><Transfer><SipUri uui="%s;encoding=jwt">%s</SipUri></Transfer></Response>' % [device_token, sip_uri]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandwidth-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- APIMatic SDK Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|
@@ -168,9 +168,13 @@ files:
|
|
168
168
|
- lib/bandwidth/voice_lib/bxml/verbs/resume_recording.rb
|
169
169
|
- lib/bandwidth/voice_lib/bxml/verbs/ring.rb
|
170
170
|
- lib/bandwidth/voice_lib/bxml/verbs/send_dtmf.rb
|
171
|
+
- lib/bandwidth/voice_lib/bxml/verbs/sip_uri.rb
|
171
172
|
- lib/bandwidth/voice_lib/bxml/verbs/speak_sentence.rb
|
173
|
+
- lib/bandwidth/voice_lib/bxml/verbs/start_gather.rb
|
172
174
|
- lib/bandwidth/voice_lib/bxml/verbs/start_recording.rb
|
175
|
+
- lib/bandwidth/voice_lib/bxml/verbs/stop_gather.rb
|
173
176
|
- lib/bandwidth/voice_lib/bxml/verbs/stop_recording.rb
|
177
|
+
- lib/bandwidth/voice_lib/bxml/verbs/tag.rb
|
174
178
|
- lib/bandwidth/voice_lib/bxml/verbs/transfer.rb
|
175
179
|
- lib/bandwidth/voice_lib/bxml/verbs/xml_verb.rb
|
176
180
|
- lib/bandwidth/voice_lib/voice.rb
|
@@ -208,6 +212,7 @@ files:
|
|
208
212
|
- lib/bandwidth/voice_lib/voice/models/transcript.rb
|
209
213
|
- lib/bandwidth/voice_lib/voice/models/transcription.rb
|
210
214
|
- lib/bandwidth/voice_lib/voice/models/transcription_response.rb
|
215
|
+
- lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb
|
211
216
|
- lib/bandwidth/web_rtc_lib/web_rtc.rb
|
212
217
|
- lib/bandwidth/web_rtc_lib/web_rtc/client.rb
|
213
218
|
- lib/bandwidth/web_rtc_lib/web_rtc/controllers/api_controller.rb
|
@@ -238,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
243
|
- !ruby/object:Gem::Version
|
239
244
|
version: '0'
|
240
245
|
requirements: []
|
241
|
-
rubygems_version: 3.1.
|
246
|
+
rubygems_version: 3.1.4
|
242
247
|
signing_key:
|
243
248
|
specification_version: 4
|
244
249
|
summary: bandwidth
|