Scaling based on a number of active calls fixed and filtering by sipTrunkId#598
Scaling based on a number of active calls fixed and filtering by sipTrunkId#598dennwc merged 4 commits intolivekit:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #598 +/- ##
==========================================
- Coverage 65.25% 63.07% -2.18%
==========================================
Files 51 35 -16
Lines 6588 6920 +332
==========================================
+ Hits 4299 4365 +66
- Misses 1915 2128 +213
- Partials 374 427 +53 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @dennwc are you able to review this change? Or call someone who can :) Thank you! |
alexlivekit
left a comment
There was a problem hiding this comment.
Didn't look too deep into this one, but overall lgtm
|
Hi @alexlivekit, thank you! How does merging to main work for this repository? Will you merge? When do you have a plan to release a new version of SIP bridge? Thank you :) |
Hi @alexlivekit @dennwc can you have a look at the comment please? |
dennwc
left a comment
There was a problem hiding this comment.
LGTM! Apologies for the delay on our end.
|
Great, thank you for merging! Do you have any release timeline for this project? |
|
@rafallezanko , no immediate plans for releases as I understand. I'll ask around just in case. On another note, related to this PR, this change in protocol actually drops the usage of this affinity function altogether. It is not yet propagated anywhere, but for future reference please make sure to use an appropriate version or a patched version that re-enabled this use. |
There was existing TODO to fix -> Scale outbound calls based on number or active calls.
Load-aware affinity routing and trunk whitelisting for SIP bridges
Summary
replacing the hardcoded 0.5. This enables psrpc to route new outbound calls to the least-loaded SIP bridge.
trunk.
Affinity algorithm
The function evaluates in order:
will not claim the call).
Configuration
Optional: maximum number of concurrent calls this bridge should handle.
Affinity scales linearly from 1.0 (idle) to 0.0 (at capacity).
max_active_calls: 100
Optional: only accept outbound calls for these trunk IDs.
Calls for any other trunk will get affinity 0 (routed elsewhere).
If empty/unset, all trunks are accepted.
sip_trunk_ids:
- "ST_abc123"
- "ST_def456"