Skip to content

SDP: Crypto line, ignore line with session-params#70

Open
ypkoller wants to merge 1 commit into
livekit:mainfrom
ypkoller:ingnore-crypto-line-with-session-parameters
Open

SDP: Crypto line, ignore line with session-params#70
ypkoller wants to merge 1 commit into
livekit:mainfrom
ypkoller:ingnore-crypto-line-with-session-parameters

Conversation

@ypkoller

@ypkoller ypkoller commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

If a crypto line in the SDP offer contains session-params, the parser fails with the following error, causing the connection setup to fail entirely:

"error":"cannot parse srtp profile "2 AES_CM_128_HMAC_SHA1_80 inline:j/azhfJjX2cv+xwOOH8W7aks30PDRN7MzyRML7UX|2^48 UNENCRYPTED_SRTCP": invalid lifetime parameter "2^48 UNENCRYPTED_SRTCP": invalid exponent in 2^48 UNENCRYPTED_SRTCP: strconv.ParseUint: parsing "48 UNENCRYPTED_SRTCP": invalid syntax"}

Cause

The parser incorrectly treats the session parameter (e.g., "UNENCRYPTED_SRTCP") as part of the key lifetime, which causes strconv.ParseUint to fail.

Solution / Approach

Since the LiveKit SIP Bridge currently does not process optional session parameters as defined in RFC 4568 Section 6, these crypto lines should be safely ignored rather than causing a hard crash. Aborting the entire parsing process prevents connections from being established, even if there are alternative, valid crypto lines without session parameters available in the SDP offer.

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.

1 participant