File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
lib/bandwidth/web_rtc_lib/utils Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
1
Gem ::Specification . new do |s |
2
2
s . name = 'bandwidth-sdk'
3
- s . version = '7.0 .0'
3
+ s . version = '7.1 .0'
4
4
s . summary = 'bandwidth'
5
5
s . description = 'Bandwidth\'s set of APIs'
6
6
s . authors = [ 'APIMatic SDK Generator' ]
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 @@ def test_tn_lookup
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
You can’t perform that action at this time.
0 commit comments