feat(libapi): add RtpSecureMediaEnum for RTP/SRTP security modes#209
Open
brancan wants to merge 1 commit intohnimminh:masterfrom
Open
feat(libapi): add RtpSecureMediaEnum for RTP/SRTP security modes#209brancan wants to merge 1 commit intohnimminh:masterfrom
brancan wants to merge 1 commit intohnimminh:masterfrom
Conversation
- Introduced `RtpSecureMediaEnum` to define security modes for RTP/SRTP: mandatory, optional, forbidden, and false. - Updated `MediaModel` to include `rtp_secure_media` field, allowing configuration of RTP/SRTP security settings. This commit enhances media configuration capabilities by providing explicit options for RTP security modes.
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
This PR introduces a new
RtpSecureMediaEnumto give explicit control over RTP/SRTP security in theMediaModel.Changes
RtpSecureMediaEnumwith four modes:mandatory: always SRTPoptional: SRTP if supported by remoteforbidden: never SRTPfalse: no SRTP (current default behavior)MediaModelextended with artp_secure_mediafield, defaulting tofalseto preserve backwards compatibility.Why
The codebase already supports SRTP at the FreeSWITCH layer, but the libreapi data model lacks a first-class field to declare per-class media security policy. Exposing it via a typed Pydantic enum makes it straightforward for clients (WebUI, automation, ansible) to set it consistently and have the API validate the values.
Backward compatibility
Default
falsekeeps the current behavior, so existing deployments are unaffected.Test plan
rtp_secure_media=false).Cherry-picked from a downstream deployment branch where this addition has been running for a while.
Made with Cursor