Skip to content

sip: add Session-Expires and Min-SE headers - #335

Open
Mliviu79 wants to merge 1 commit into
emiago:mainfrom
Mliviu79:pr/rfc4028-headers
Open

sip: add Session-Expires and Min-SE headers#335
Mliviu79 wants to merge 1 commit into
emiago:mainfrom
Mliviu79:pr/rfc4028-headers

Conversation

@Mliviu79

Copy link
Copy Markdown

Fixes #334

Adds SessionExpiresHeader (uint32 delta-seconds plus optional HeaderParams) and MinSEHeader (uint32 delta). Both implement HeaderName, Value, String, StringWrite, headerClone — and SessionExpiresHeader also gets a typed Clone.

Each is reachable through a lazy accessor over the generic header passthrough, in the same shape as ReferTo and ReferredBy. The Session-Expires accessor also matches the compact form x.

headersParsers is untouched: parsing happens on demand, so a message carrying no session timers does no extra work.

Params such as refresher=uac|uas are stored as sent rather than interpreted, and a malformed value makes the accessor return nil. Electing a refresher and enforcing the Min-SE floor are negotiation policy and stay with the caller — this PR only makes the values readable and writable with a type.

Additive API only, no behaviour change to anything existing.

Session-Expires carries a delta-seconds interval plus optional params, and
Min-SE a bare delta. Both are exposed as lazy accessors over the generic
header passthrough, like Refer-To and Referred-By, so headersParsers stays
minimal and messages without session timers are unaffected. Params such as
refresher=uac|uas are kept as sent, since electing a refresher and enforcing
the Min-SE floor are negotiation policy rather than parsing.
Refs emiago#334
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.

sip: no typed access to Session-Expires and Min-SE

1 participant