bandwidth-sdk 7.1.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3230ac98ad8a88408743b41bf7226f9a5922f90c97b1ec27f08685ffb30a0e46
|
4
|
+
data.tar.gz: 0a6eb443359389264d88fb753df32a349782c7cefda1093544f21b09cb489347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c7da77f1d1466770867d761ba804b7ff703e3977174f6095fbfb79d89c80987699e04d2fcede3828453cae63058ea49d150d49c04676ffc0d6a3c0494a8447
|
7
|
+
data.tar.gz: f71c32303e851a4a90d471e4b4ed456d5887071149ec278a37b386473b6d3d2e994de15fa529053003c71c84408b9da85076426137a1daadd1917bd843574188
|
@@ -6,12 +6,13 @@
|
|
6
6
|
|
7
7
|
module Bandwidth
|
8
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>' + generate_transfer_bxml_verb(device_token, sip_uri) + '</Response>'
|
9
|
+
def generate_bxml(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
|
10
|
+
return '<?xml version="1.0" encoding="UTF-8"?><Response>' + generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri) + '</Response>'
|
11
11
|
end
|
12
12
|
|
13
|
-
def generate_transfer_bxml_verb(device_token, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
|
14
|
-
|
13
|
+
def generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
|
14
|
+
voice_call_id = voice_call_id.split("-", 2).last.split("-").join()
|
15
|
+
return '<Transfer><SipUri uui="%s;encoding=base64,%s;encoding=jwt">%s</SipUri></Transfer>' % [voice_call_id, device_token, sip_uri]
|
15
16
|
end
|
16
17
|
end
|
17
18
|
end
|
@@ -583,14 +583,14 @@ class IntegrationTest < Test::Unit::TestCase
|
|
583
583
|
end
|
584
584
|
|
585
585
|
def test_webrtc_generate_bxml
|
586
|
-
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Transfer><SipUri uui="asdf;encoding=jwt">sip:sipx.webrtc.bandwidth.com:5060</SipUri></Transfer></Response>'
|
587
|
-
actual = Bandwidth::WebRtc.generate_bxml('asdf')
|
586
|
+
expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Transfer><SipUri uui="93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt">sip:sipx.webrtc.bandwidth.com:5060</SipUri></Transfer></Response>'
|
587
|
+
actual = Bandwidth::WebRtc.generate_bxml('asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4')
|
588
588
|
assert_equal(expected, actual)
|
589
589
|
end
|
590
590
|
|
591
591
|
def test_webrtc_generate_transfer_bxml_verb
|
592
|
-
expected = '<Transfer><SipUri uui="asdf;encoding=jwt">sip:sipx.webrtc.bandwidth.com:5060</SipUri></Transfer>'
|
593
|
-
actual = Bandwidth::WebRtc.generate_transfer_bxml_verb('asdf')
|
592
|
+
expected = '<Transfer><SipUri uui="93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt">sip:sipx.webrtc.bandwidth.com:5060</SipUri></Transfer>'
|
593
|
+
actual = Bandwidth::WebRtc.generate_transfer_bxml_verb('asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4')
|
594
594
|
assert_equal(expected, actual)
|
595
595
|
end
|
596
596
|
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:
|
4
|
+
version: 8.0.0
|
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: 2021-
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logging
|