Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Voice] - conferences and applications #20

Closed
wants to merge 45 commits into from
Closed

[Voice] - conferences and applications #20

wants to merge 45 commits into from

Conversation

650elx
Copy link
Contributor

@650elx 650elx commented Feb 29, 2024

I've changed target branch to main, so this PR represents whole Voice domain.

@650elx 650elx marked this pull request as ready for review March 1, 2024 06:44
@650elx 650elx changed the base branch from DEVEXP-299-voice-api-support to main March 1, 2024 06:45
Copy link
Contributor

@asein-sinch asein-sinch left a comment

Choose a reason for hiding this comment

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

I would have been nice to iterate on the previous PR to not have the reviewers redo the previous work again.
The main missing point of this PR is the work related to SVAML, please check related comments in details.

dtmf=dtmf,
custom=custom,
maxDuration=max_duration,
ice=ice,
Copy link
Contributor

Choose a reason for hiding this comment

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

The PR #18 says explicitly "This PR omits any SVAML related code. SVAML will be implemented within DEVEXP-306" which is this PR if I'm not mistaken.
I may have missed it but I can't see any support for SVAML here, can you point me to the right place in the code? Or maybe you forgot to push a commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've simply overlooked it :P it's added now

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you then update the test to reflect it? From what I can see, the property is still defined as a string with no hints to build actions and instructions

Copy link
Contributor Author

@650elx 650elx Mar 18, 2024

Choose a reason for hiding this comment

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

I think I've forgot to mention ADR-0005-enums.md in this PR review.
It was a design decision that was made while I was designing this SDK.

That's why I'm providing Enums, helpers etc. (they are present and explained in documentation and code samples) but I don't enforce them.
Maybe we need to revisit this ADR? Until then I prefer to stick to it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I may have missed it, but since you are mentioning helpers, can you point me where are the SVAML helpers to build actions and instructions for each kind of events? I would like to compare it with what is done in the Node.js SDK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My last reply was more abstract (just like mentioned ADR is). It't not about SVAML but the whole SDK design.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification. Now, back to the original comment regarding SVAML, do you plan to add helpers or will you leave it as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO current solution is fairly simple to use. I don't think there is a need to add more to that.

Copy link

@JPPortier JPPortier Apr 5, 2024

Choose a reason for hiding this comment

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

Why a step back about providing SVAML as expected by ticket ?
Seems we need to synch about design and SDKs expectations

Copy link

@JPPortier JPPortier left a comment

Choose a reason for hiding this comment

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

See comment about SDK design and exceptation

conference_id: str
call_id: str
command: str
moh: str
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently, the moh parameter is specified as a string. While Python allows for flexibility in function parameters, I'd like to highlight the benefits of specifying the type of moh as ConferenceMusicOnHold:

  1. Type Safety: Specifying the type of moh as ConferenceMusicOnHold ensures that developers use only valid values defined in the ConferenceMusicOnHold enum. This helps catch errors early in development and provides better type checking.
  2. Self-Documenting Code: By using the enum type, we provide clear documentation for developers who will use the function in the future. It communicates the expected input and improves code readability.
  3. Flexibility: Despite specifying the type, developers still have the flexibility to pass a string directly to moh if they prefer. For example, they can use manage_participant(moh="ring") instead of manage_participant(moh=ConferenceMusicOnHold.RING.value) if it better suits their needs.
  4. Consistency: It's worth noting that we already have a similar example in our codebase where enum types are used to enforce strict input validation. This change would help maintain consistency across our codebase and make it easier for developers to understand and work with our APIs.

I believe incorporating this change will enhance the clarity, robustness, and maintainability of our codebase. What are your thoughts on making this improvement?

@650elx
Copy link
Contributor Author

650elx commented Apr 30, 2024

This PR is redundant. There will be new PR for Voice API (as we discussed)

@650elx 650elx closed this Apr 30, 2024
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.

3 participants