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

Allow number filtering on Dispatch Rules #707

Merged
merged 1 commit into from
May 7, 2024
Merged

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented May 7, 2024

Allow inbound number filtering on SIP Dispatch Rules. It works similar to Trunks, where rules without a number filter are grouped together and take less priority than number-specific rules.

While at it, simplify the rule evaluation.

Previously it was doing some hand-crafted checks for evaluation path, that matched the validation path. Same double logic existed for priorities as well.

Now the validation is always called from evaluation, thus sharing the logic. And rule selection is simplified by just picking the first one after priority filtering.

@dennwc dennwc self-assigned this May 7, 2024
Copy link

changeset-bot bot commented May 7, 2024

🦋 Changeset detected

Latest commit: cf7a88e

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.

Allow inbound number filtering on  SIP Dispatch Rules. It works similar to Trunks, where rules without a number filter are grouped together and take less priority than number-specific rules.

While at it, simplify the rule evaluation.

Previously it was doing some hand-crafted checks for evaluation path, that matched the validation path. Same double logic existed for priorities as well.

Now the validation is always called from evaluation, thus sharing the logic. And rule selection is simplified by just picking the first one after priority filtering.
@dennwc dennwc force-pushed the sip-dispatch-number branch from c8334ce to cf7a88e Compare May 7, 2024 15:10
@dennwc dennwc merged commit 3842342 into main May 7, 2024
3 checks passed
@dennwc dennwc deleted the sip-dispatch-number branch May 7, 2024 16:23
@github-actions github-actions bot mentioned this pull request May 7, 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