livekit / protocol

LiveKit protocol. Protobuf definitions for LiveKit's signaling protocol
https://docs.livekit.io
Apache License 2.0
73 stars 62 forks source link

Split SIP Trunk configuration to inbound and outbound parts #738

Closed dennwc closed 3 months ago

dennwc commented 3 months ago

Initial decisions made on the naming of the fields in SIPTrunkInfo leads to a lot of confusion for our users.

Most importantly, the outbound_number field is actually used for both inbound and outbound as the number associated with this LK SIP Trunk. Ideally it should be named number.

Unfortunately, we cannot rename it without breaking compatibility. This is mainly because our CLI uses protojson for decoding these fields. Changing the name will break old JSON request files.

Some users also asked if it's possible to map multiple numbers to one (inbound) Trunk. Again, we cannot change the type of the field, but we could introduce a new one. At the same time, multiple numbers may be unnecessary for outbound Trunks, but they will still appear there because the structure is shared for inbound/outbound.

At the end, it's clear that there's no reason to share inbound and outbound configuration in one entity. Thus, this change splits Trunk into inbound and outbound configs.

Specifically:

We will keep DB structure mostly the same and convert objects in flight. One column will be added: kind. New Trunks will have it set to either inbound or outbound, so that new objects appear in one list only, while old ones appear in both. Eventually we could migrate to separate DB tables.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 44fd60d6a9fdab9682c3bd8d70d879760c77ec5d

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. ```
dennwc commented 3 months ago

I'll keep it open for a bit longer - preparing PRs to other repos.

dennwc commented 3 months ago

Works well, merging