Skip to content

Commit 7fea2c9

Browse files
committed
EDGE-630 Add voice call id to the transfer
1 parent 59aabb2 commit 7fea2c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bandwidth/webrtc/utils/transfer_util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
@copyright Bandwidth INC
77
"""
88

9-
def generate_transfer_bxml(device_token, sip_uri='sip:sipx.webrtc.bandwidth.com:5060'):
9+
def generate_transfer_bxml(device_token: str, voice_call_id: str, sip_uri: str ='sip:sipx.webrtc.bandwidth.com:5060'):
1010
"""
1111
Returns BXML string with WebRTC a device token to perform a SIP transfer
1212
"""
13-
return '<?xml version="1.0" encoding="UTF-8"?><Response>' + generate_transfer_bxml_verb(device_token, sip_uri) + '</Response>'
13+
return '<?xml version="1.0" encoding="UTF-8"?><Response>' + generate_transfer_bxml_verb(device_token, voice_call_id, sip_uri) + '</Response>'
1414

15-
def generate_transfer_bxml_verb(device_token, sip_uri='sip:sipx.webrtc.bandwidth.com:5060'):
15+
def generate_transfer_bxml_verb(device_token: str, voice_call_id: str, sip_uri: str ='sip:sipx.webrtc.bandwidth.com:5060'):
1616
"""
1717
Returns the Transfer verb to perform the SIP transfer
1818
"""
19-
return f'''<Transfer><SipUri uui="{device_token};encoding=jwt">{sip_uri}</SipUri></Transfer>'''
19+
return f'''<Transfer><SipUri uui="{voice_call_id};encoding=base64,{device_token};encoding=jwt">{sip_uri}</SipUri></Transfer>'''

0 commit comments

Comments
 (0)