-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add flag to make CreateSIPParticipant synchronous. #952
Conversation
🦋 Changeset detectedLatest commit: 46e971e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR 💥 An error occurred when fetching the changed packages and changesets in this PR
|
} | ||
|
||
message InternalCreateSIPParticipantResponse { | ||
string participant_id = 1; | ||
string participant_identity = 2; | ||
string sip_call_id = 3; | ||
|
||
uint32 sip_failure_code = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that internal API will succeed even if the call fails and will return these codes explicitly. The client side will return RPC error instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the context for that new convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's mostly to make SDKs work out of the box. Users would expect an errors in case the call fails, but for internal services we'd rather know that communication between services was successful, even though the call was not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
protobufs/rpc/sip.proto
Outdated
@@ -101,13 +101,19 @@ message InternalCreateSIPParticipantRequest { | |||
|
|||
livekit.SIPMediaEncryption media_encryption = 28; | |||
|
|||
// NEXT ID: 29 | |||
// Wait for the call to dial before returning. | |||
bool wait_until_dialed = 29; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on second thought. I think the name of this parameter could be confusing.. it reads as if the function will return as soon as we've dialed it..
I think the intention is to say, wait until the creation is complete? (i.e. either success or failure).. so should we call this wait_until_complete
instead?
or block
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current behavior is "wait until LK participant is created" and with the flag set it will be "wait until call is dialed".
So I was thinking that wait_until_dialed
reflects it quite well, but could rename to wait_until_complete
as well.
block
on the other hand is misleading - we already blocks until participant is created. I think we need to specify exactly what is the event we'll wait for.
Would wait_until_call_pickup
be better maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to wait_until_answered
No description provided.