DX-2849 Add webrtc_utils#110
Conversation
Add WebRTC Utilities module with helper methods to generate transfer BXML
| Returns: | ||
| str: <Transfer> BXML Verb | ||
| """ | ||
| uui = "".join(voice_call_id.split("-")[1::]) |
There was a problem hiding this comment.
You could make a private helper to generate the Transfer and reuse it in this function and in generate_transfer_bxml
bandwidth/utilities/web_rtc.py
Outdated
| from bandwidth.model.bxml.verbs import * | ||
|
|
||
|
|
||
| def _generate_transfer_verb(device_token: str, voice_call_id: str, sip_uri: str = 'sip:sipx.webrtc.bandwidth.com:5060') -> Transfer: |
There was a problem hiding this comment.
For better or worse, iIn the SDK for all of our other languages the generate_transfer_verb() equivalent returns the BXML. This is the node version: https://github.com/Bandwidth/node-webrtc/blob/main/src/controllers/apiController.ts#L345
To make it consistent across languages perhaps name this one something like generate_transfer_verb_model, generate_transfer_bxml would become generate_transfer_bxml_verb, and generate_transfer_bxml_document would become generate_transfer_bxml
There was a problem hiding this comment.
This version of the SDK Will be breaking - so we could take the opprotunity to standardize on new names for all of the languages. We will be writing migration documentation for each language before going live.
Im fine with
_generate_transfer_model()
generate_transfer_bxml_verb()
generate_transfer_bxml()if you guys are happy
Add WebRTC Utilities module with helper methods to generate transfer BXML