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 11Gem ::Specification . new do |s |
22 s . name = 'bandwidth-sdk'
3- s . version = '7.0 .0'
3+ s . version = '7.1 .0'
44 s . summary = 'bandwidth'
55 s . description = 'Bandwidth\'s set of APIs'
66 s . authors = [ 'APIMatic SDK Generator' ]
Original file line number Diff line number Diff line change 77module Bandwidth
88 module WebRtc
99 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 ]
1115 end
1216 end
1317end
Original file line number Diff line number Diff line change 99include Bandwidth ::Voice
1010include Bandwidth ::Messaging
1111include Bandwidth ::MultiFactorAuth
12+ include Bandwidth ::WebRtc
1213
1314begin
1415 USERNAME = ENV . fetch ( "USERNAME" )
@@ -580,4 +581,16 @@ def test_tn_lookup
580581 get_response = @bandwidth_client . phone_number_lookup_client . client . get_lookup_request_status ( ACCOUNT_ID , request_id )
581582 assert ( get_response . data . status . length > 0 , "status value not set" )
582583 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
583596end
You can’t perform that action at this time.
0 commit comments