Skip to content

DX-2849 Add webrtc_utils#110

Merged
ajrice6713 merged 3 commits intofeature/openapi-generator-sdkfrom
DX-2849
Sep 15, 2022
Merged

DX-2849 Add webrtc_utils#110
ajrice6713 merged 3 commits intofeature/openapi-generator-sdkfrom
DX-2849

Conversation

@ajrice6713
Copy link
Contributor

Add WebRTC Utilities module with helper methods to generate transfer BXML

Add WebRTC Utilities module with helper methods to generate transfer BXML
@ajrice6713 ajrice6713 requested a review from a team September 13, 2022 18:52
@ajrice6713 ajrice6713 marked this pull request as draft September 13, 2022 18:58
Returns:
str: <Transfer> BXML Verb
"""
uui = "".join(voice_call_id.split("-")[1::])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make a private helper to generate the Transfer and reuse it in this function and in generate_transfer_bxml

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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me

@ajrice6713 ajrice6713 marked this pull request as ready for review September 15, 2022 15:28
@ajrice6713 ajrice6713 merged commit b8ecf1a into feature/openapi-generator-sdk Sep 15, 2022
@ajrice6713 ajrice6713 deleted the DX-2849 branch September 15, 2022 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants