bandwidth-sdk 7.0.0 → 7.1.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: b67b83b111ec3185ce0614d96b9f46ea31270db7e0b44a069cc8d87e16bf2bd5
4
- data.tar.gz: b4c1575cda3afab5b3a17ccf70883ddd68815ec9e3e55c162d778cc7667dd8ad
3
+ metadata.gz: 6e5b7565451db03e5f10b45f99ec1e8ffb3f53a0a6b971859e987ce41d71c5bb
4
+ data.tar.gz: a6586d7f6c2f8c43a5842ca8edd978cd2e8aba7820879f0f2348cd3fc04ff898
5
5
  SHA512:
6
- metadata.gz: 7de5c586dc71cc06134c42008931b6508e5fca4a7baecd02dd94b5d9c5d1e26f10c6266c020ef6c91429a0e50e10678a32803e07c2af30e74833fe0a55ea7f65
7
- data.tar.gz: 61b41ff9f216fee03ff287270a13666575006b870ecdc38c9edf8b4de93e7db0a4d45d37becf2b11bd52cfba399058739b3e9bea48d086d71d01983ef2da28f7
6
+ metadata.gz: aea92c9db21c51e280276b0b42e17242c49792148671fd77d830e65870c973835375090f17df0c6d82fe1581f77bea950bc5faabbba06bcd16639608970df292
7
+ data.tar.gz: 1c38ec8c456e9c37dd0a9fb6a61947e28e9f231d296e8394296d4fa12ee4a2887588a8e2dfbf9307f38dd070f5e0c831e7d97b293f9f962d74b87d0faf3257bd
@@ -7,7 +7,11 @@
7
7
  module Bandwidth
8
8
  module WebRtc
9
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]
10
+ return '<?xml version="1.0" encoding="UTF-8"?><Response>' + generate_transfer_bxml_verb(device_token, sip_uri) + '</Response>'
11
+ end
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]
11
15
  end
12
16
  end
13
17
  end
@@ -9,6 +9,7 @@ include Bandwidth
9
9
  include Bandwidth::Voice
10
10
  include Bandwidth::Messaging
11
11
  include Bandwidth::MultiFactorAuth
12
+ include Bandwidth::WebRtc
12
13
 
13
14
  begin
14
15
  USERNAME = ENV.fetch("USERNAME")
@@ -580,4 +581,16 @@ class IntegrationTest < Test::Unit::TestCase
580
581
  get_response = @bandwidth_client.phone_number_lookup_client.client.get_lookup_request_status(ACCOUNT_ID, request_id)
581
582
  assert(get_response.data.status.length > 0, "status value not set")
582
583
  end
584
+
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')
588
+ assert_equal(expected, actual)
589
+ end
590
+
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')
594
+ assert_equal(expected, actual)
595
+ end
583
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.0.0
4
+ version: 7.1.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-15 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging