generated from camaraproject/Template_API_Repository
-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
Description
Problem description
The current WebRTC-Registration API offers no way for a client to discover, control, or be warned about the lifetime of its registration:
- The POST
/sessionsresponse omits anyexpiresAt/validUntilfield, so the app cannot tell when the registration becomes invalid. - The PUT
/sessions/{registrationId}operation cannot extend the existing TTL, nor is the TTL refreshed implicitly when other WebRTC APIs are invoked. - The platform provides no CloudEvent (via WebRTC-Events) to signal that the registration has lapsed, leaving the client unaware that a new registration is required.
Expected behavior
- Optional client-requested TTL – Add an optional
requestedValiditySecondsorregistrationExpireTimein the POST body; if absent, the gateway applies its default. - Explicit expiry in responses – Both POST and PUT must return an
expiresAttimestamp so the client can schedule proactive renewal. - Renewal via PUT – Allow the same TTL fields in PUT
/sessions/{registrationId}to extend validity before expiry. - Optional sliding-window refresh – Each successful WebRTC API call may refresh the registration server-side (nice-to-have).
- Expiry notification – Emit a CloudEvent such as
org.camaraproject.webrtc-registration.v0.registration-expiresover the existing WebRTC-Events channel when the registration reachesexpiresAt(or is revoked).
Alternative solution
- Rely solely on the generic
org.camaraproject.webrtc-events.v0.subscription-endsevent for expiry, but document that it applies to registrations. - Provide a separate lightweight “keep-alive” endpoint instead of extending PUT semantics.
- Allow clients to query remaining TTL with a HEAD request returning
Expiresheader rather than embedding it in the JSON payload.
Additional context
- Aligns with CAMARA Commonalities TTL handling used in other APIs (e.g., device-location).
- Prevents silent call failures due to stale registrations, improving UX.
- Requires schema updates in
webrtc-registration.yamland corresponding examples; also needs an event-type addition inwebrtc-events-subscription.yaml.
Reactions are currently unavailable