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

Add disconnect reason for SIP failures. #845

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented Oct 9, 2024

We can now indicate that LiveKit participant associated with SIP has left particularly because of a SIP protocol failure.

@dennwc dennwc requested a review from a team October 9, 2024 15:33
@dennwc dennwc self-assigned this Oct 9, 2024
Copy link

changeset-bot bot commented Oct 9, 2024

🦋 Changeset detected

Latest commit: 66e07e0

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
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@@ -447,6 +447,8 @@ enum DisconnectReason {
USER_UNAVAILABLE = 11;
// SIP callee rejected the call (busy)
USER_REJECTED = 12;
// SIP protocol failure or unexpected response
USER_FAILURE = 13;
Copy link
Member

Choose a reason for hiding this comment

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

do you have some examples of how this would fail? USER_FAILURE seems too generic.. and it seems like it's not an explicit user action

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A typical failure would be the SIP server we are trying to dial rejecting our request (e.g. wrong password, wrong number, etc).

Agree, the name is not the best one. I considered EXTERNAL_FAILURE, INTEGRATION_FAILURE or CONNECTOR_FAILURE to indicate that it's not an issue with LiveKit, but with the external service.

Copy link
Member

Choose a reason for hiding this comment

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

SIP_TRUNK_FAILURE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would work, but we specifically omitted SIP_ prefix in other cases. Maybe we could also use a name that could be reused for other integrations?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, the other ones (USER_REJECTED, USER_UNAVAILABLE) indicate user action. it seems correct.

in this case, it seems like it is an issue with the sip trunk, so feels like we should reflect it as is, instead of additional abstractions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to SIP_TRUNK_FAILURE.

@dennwc dennwc force-pushed the sip-failed-call-state branch from 07a9c43 to 66e07e0 Compare November 1, 2024 14:57
@dennwc dennwc merged commit 5bd7e73 into main Nov 1, 2024
3 checks passed
@dennwc dennwc deleted the sip-failed-call-state branch November 1, 2024 15:37
@github-actions github-actions bot mentioned this pull request Nov 1, 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.

2 participants