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

Support get for SIP resources. #575

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Support get for SIP resources. #575

merged 1 commit into from
Dec 11, 2024

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented Dec 9, 2024

No description provided.

@dennwc dennwc self-assigned this Dec 9, 2024
@dennwc dennwc requested a review from a team December 9, 2024 20:41
sipclient.go Outdated

// GetSIPOutboundTrunksByID gets SIP Outbound Trunks by ID.
// Returned slice is in the same order as the IDs. Missing IDs will have nil in the corresponding position.
func (s *SIPClient) GetSIPOutboundTrunksByID(ctx context.Context, ids []string) ([]*livekit.SIPOutboundTrunkInfo, error) {
Copy link
Member

Choose a reason for hiding this comment

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

nit, should these be

Suggested change
func (s *SIPClient) GetSIPOutboundTrunksByID(ctx context.Context, ids []string) ([]*livekit.SIPOutboundTrunkInfo, error) {
func (s *SIPClient) GetSIPOutboundTrunksByID(ctx context.Context, ids ...string) ([]*livekit.SIPOutboundTrunkInfo, error) {

or renaming the function to refer to plural? GetSIPOutboundTrunksByIDs?

Copy link
Contributor Author

@dennwc dennwc Dec 10, 2024

Choose a reason for hiding this comment

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

An alternative could also be:

GetSIPOutboundTrunks(ctx context.Context, ids ...string)

And remove the requirement for non-empty IDs list. If no IDs are listed - return all the trunks.

Changed to plural for now.

@dennwc dennwc merged commit 7610e16 into main Dec 11, 2024
2 checks passed
@dennwc dennwc deleted the sip-get branch December 11, 2024 08:25
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.

2 participants