Sha256: d2d32209b8f2d51f8c6594c25fb43ac38a4440f8a42bd7587f218d9d39e212b3
Contents?: true
Size: 721 Bytes
Versions: 15
Compression:
Stored size: 721 Bytes
Contents
# web_rtc_transfer.rb # # Custom transfer BXML for WebRtc # # @copyright Bandwidth INC module Bandwidth module WebRtc 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 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 end end
Version data entries
15 entries across 15 versions & 1 rubygems