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: 6e5b7565451db03e5f10b45f99ec1e8ffb3f53a0a6b971859e987ce41d71c5bb
4
- data.tar.gz: a6586d7f6c2f8c43a5842ca8edd978cd2e8aba7820879f0f2348cd3fc04ff898
3
+ metadata.gz: 3230ac98ad8a88408743b41bf7226f9a5922f90c97b1ec27f08685ffb30a0e46
4
+ data.tar.gz: 0a6eb443359389264d88fb753df32a349782c7cefda1093544f21b09cb489347
5
5
  SHA512:
6
- metadata.gz: aea92c9db21c51e280276b0b42e17242c49792148671fd77d830e65870c973835375090f17df0c6d82fe1581f77bea950bc5faabbba06bcd16639608970df292
7
- data.tar.gz: 1c38ec8c456e9c37dd0a9fb6a61947e28e9f231d296e8394296d4fa12ee4a2887588a8e2dfbf9307f38dd070f5e0c831e7d97b293f9f962d74b87d0faf3257bd
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
- return '<Transfer><SipUri uui="%s;encoding=jwt">%s</SipUri></Transfer>' % [device_token, sip_uri]
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: 7.1.0
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-07-21 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging