Skip to content

enhance: Possibly breaking down MediaSessionInformation into distinct schema #164

Merged
deepakjaiswal1 merged 10 commits into
camaraproject:mainfrom
teikuran:issue#147
Jun 15, 2026
Merged

enhance: Possibly breaking down MediaSessionInformation into distinct schema #164
deepakjaiswal1 merged 10 commits into
camaraproject:mainfrom
teikuran:issue#147

Conversation

@teikuran

Copy link
Copy Markdown
Contributor

What type of PR is this?

Add one of the following kinds:

  • enhancement/feature

What this PR does / why we need it:

To address following issues:

The current API definition re-uses the MediaSessionInformation schema, using it as the message body for almost all operations, including POST requests/responses, GET responses, and PUT requests/responses.

This leads to ambiguity e.g., currently, receiverAddress is not marked as required in the MediaSessionInformation schema. This allows a client to technically submit a call initiation request without a destination, which is functionally invalid.

Which issue(s) this PR fixes:

Fixes #147

Changelog input

 release-note - webrtc-call-handling
- enhance: Possibly breaking down MediaSessionInformation into distinct schema 

teikuran added 2 commits May 7, 2026 16:59
Updated references for media session schemas and added new schemas for MediaSessionCreate, MediaSessionResponse, and MediaSessionStatusChange.
Updated examples for media session status changes to include SDP answers and refined existing examples.
@deepakjaiswal1

Copy link
Copy Markdown
Collaborator

@teikuran The schema decomposition approach is well-structured and correctly addresses Issue #147 (in the right direction).

One request before merge: please rebase this PR on top of PR #142 once it is checked in. The MediaSessionStatusChange schema currently does not include locationDetails, which is being introduced in PR #142 for the PUT path (answering party location at setup and post-establishment location updates). A rebase will surface that conflict and the fix will be straightforward.

@stroncoso

Copy link
Copy Markdown
Contributor

Ok, #142 was already merged, please, @teikuran review conflict resolution and we can approve and merge.
👍

stroncoso
stroncoso previously approved these changes May 31, 2026

@stroncoso stroncoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
There are commonalities warnings, but they can be reviewed later

@deepakjaiswal1 deepakjaiswal1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: offer required in MediaSessionResponse breaks the receiver pick-up flow

MediaSessionResponse marks offer as required, and this schema is used for all GET responses. However, in the receiver pick-up flow, the callee retrieves the session immediately upon receiving a session-invitation event — before any SDP exchange has occurred. If the originator used the deferred-offer path, the session at GET time will have no offer, causing the response to fail schema validation.

This is further contradicted by the WrtcSDPDescriptor description, which explicitly states the answer element may be absent when no answer exists yet — acknowledging that partial-state sessions are valid.

Suggestion: Remove offer from the required list in MediaSessionResponse.

@deepakjaiswal1

Copy link
Copy Markdown
Collaborator

Issue: mediaSessionId should not be inherited by request schemas

mediaSessionId is defined in MediaSessionInformation (the base schema), which means it is inherited by MediaSessionCreate via allOf — making it a valid field in the POST request body. The only guard against a client sending it is a prose note in the field description. Schema validation and auto-generated clients would see it as permitted.

This is a leftover from before the refactor. The intent of breaking up MediaSessionInformation was precisely to give each operation the correct shape — mediaSessionId should have been part of that work.

Suggestion: Remove mediaSessionId from MediaSessionInformation and declare it only in MediaSessionResponse, where it is required. This enforces the constraint at the schema level rather than relying on a documentation note.

@teikuran

teikuran commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Issue: offer required in MediaSessionResponse breaks the receiver pick-up flow

Thank you for your comment.
This raises a more fundamental question: is deferred offer intended to be supported by this API?

Based on the current specification, it appears that the callee is expected to have an SDP offer available when retrieving the session after receiving a session-invitation event because MediaSessionCreate explicitly requires offer.

Regarding the reference to WrtcSDPDescriptor, we agree that the specification explicitly allows answer to be absent in intermediate states (e.g. after session creation and before the call is accepted). However, this only demonstrates that the API supports states where an answer has not yet been generated. It does not necessarily imply that offer may also be absent.

Furthermore, with telco network, it is defined in 3GPP that the UE shall contain a SDP offer.

Issue: mediaSessionId should not be inherited by request schemas

Thank you. We will incorporate the comment as indicated.

@deepakjaiswal1

Copy link
Copy Markdown
Collaborator

Issue: offer required in MediaSessionResponse breaks the receiver pick-up flow

@teikuran I agree with your feedback. We, currently do not support deferred offer.

@stroncoso

Copy link
Copy Markdown
Contributor

Conflict probably generated by the Commonalities/ICM v4.2 merge #174 , sorry 🙇

Anyway, the fix is easily covered from the web editor accepting the current change, not the incomming. Couple of clicks ahead.

An screenshot here:

image

teikuran added 2 commits June 10, 2026 19:56
Removed redundant required fields from MediaSessionResponse schema.

@stroncoso stroncoso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stroncoso

Copy link
Copy Markdown
Contributor

@teikuran , @deepakjaiswal1 up to you to merge when you consider. Thank you! 🙇

@deepakjaiswal1 deepakjaiswal1 merged commit a9f1a4b into camaraproject:main Jun 15, 2026
2 checks passed
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.

Possibly breaking down MediaSessionInformation into distinct schema | webrtc-call-handling

3 participants