module Bandwidth::WebRtc

Public Instance Methods

generate_bxml(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060") click to toggle source
# File lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb, line 9
def generate_bxml(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
    return '<?xml version="1.0" encoding="UTF-8"?><Response>' + generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri) + '</Response>'
end
generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060") click to toggle source
# File lib/bandwidth/web_rtc_lib/utils/web_rtc_transfer.rb, line 13
def generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri="sip:sipx.webrtc.bandwidth.com:5060")
    voice_call_id = voice_call_id.split("-", 2).last.split("-").join()
    return '<Transfer><SipUri uui="%s;encoding=base64,%s;encoding=jwt">%s</SipUri></Transfer>' % [voice_call_id, device_token, sip_uri]
end