Repository navigation
[sip_overload] Add RFC 7339/7415 SIP overload control - #13
Draft
darwvin-dev wants to merge 6 commits into
Draft
darwvin-dev wants to merge 6 commits into
darwvin-dev wants to merge 6 commits into
Conversation
Rework the httpd module to process MI/HTTP requests asynchronously across one or more named listeners, each with its own worker pool, configured via "[name]"-prefixed modparams (e.g. "[critical]port"). This lets MI traffic be handled in parallel and isolates critical listeners from general ones. README documents the new syntax and "workers" param; httpd_split() also tolerates extra whitespace around the "[name]" prefix and value.
…ter-upstream httpd: async MI processing via multiple listeners/workers
A comma inside a quoted Via parameter value was taken as the separator of the next Via body, so e.g. a RFC 7339 'oc-algo="loss,rate"' was truncated to '"loss' and the rest of the Via header was lost. Keep commas while inside a quoted string and add parser unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allow modules to register providers (register_via_param_provider()) for extra parameters placed on locally generated Via headers and on the top Via of locally generated replies. Several providers may be registered; their parameters are concatenated in registration order. On replies, a provided parameter replaces a parameter with the same name already present in the top Via (e.g. a valued "oc=20" replaces the bare "oc" sent by the client), while branch/rport/received are never touched. When no provider is registered, the generated messages are byte for byte identical to the current ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implement standard hop-by-hop SIP overload control using the Via oc, oc-algo, oc-validity and oc-seq parameters. Client side: advertise "oc" and the supported algorithms on locally generated Vias, keep per-peer feedback received in replies in bounded shared memory (stale/duplicate sequences rejected, default validity 500ms) and take admission decisions in oc_check() - random loss for the "loss" algorithm, the RFC 7415 leaky bucket for "rate". Server side: oc_set_local() / oc_clear_local() publish the local overload state, placed on the top Via of locally generated replies, only towards clients which advertised "oc" support and using an algorithm the client advertised (falling back to the mandatory "loss"). Events and statistics cover accepted, malformed, stale and expired feedback, allowed and throttled requests and server side updates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
darwvin-dev
force-pushed
the
feature/sip-overload-control
branch
from
October 7, 2026 13:27
144b9b2 to
1352a80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement standardized hop-by-hop SIP overload control rather than another local-only rate limiter.
RFC 7339 / RFC 7415 client behavior
ocand configurableoc-algoon locally generated Via headerslossadvertisement when client advertisement is enabledoc,oc-algo,oc-validityandoc-seqfrom downstream responsesServer behavior
oc_set_local()publishes local overload feedbackoc_clear_local()ends overload with a newer sequence and zero validityocCore hook
Adds a small generic Via-parameter provider hook to
msg_translator.The hook is composable: up to multiple independent providers can register and their parameters are concatenated in registration order, so
sip_overloaddoes not monopolize Via extension support for future modules.Operations
Events and statistics cover accepted feedback, malformed/stale records, expiry, allowed/throttled requests and server-side updates.
Initialization validates RFC requirements and cleans all lock/shared-memory allocations on failure.
Draft pending full compile/runtime validation.