Inconsistent RTSP session IDs #3357
Replies: 1 comment
-
Hello,
Exactly, there are two different session concepts. The value you are seeing in the RTSP Session header is not the session ID, but the session secret - that's a private value that is never publicized because it might allow someone to steal the session from another user. We won't make it public. An alternative solution which might fix your problem consist into adding an additional field called "ID" to RTSP responses, in order to allow matching public session IDs with RTSP sessions. If you're interested into this, create a Feature Request. |
Beta Was this translation helpful? Give feedback.
-
Question
Hi,
I am experiencing an issue with inconsistent RTSP session IDs when using MediaMTX as an RTSP server. Here is a brief overview of my setup and the problem:
Setup:
MediaMTX Version: v1.3.1
Protocol: RTSP (TCP only)
Problem:
An intermediate proxy captures the negotiated RTSP session and sends it to telemetry for issue tracking purposes. The hyphens have been removed but it looks like a UUID. Here the session is: 875030865e8041ac9876846271b206ac
Client -> Server
RECORD rtsp://127.0.0.1:9100/mypath RTSP/1.0
Range: npt=0.000-
CSeq: 5
User-Agent: Lavf60.16.100
Session: 875030865e8041ac9876846271b206ac
Server -> Client
RTSP/1.0 200 OK
CSeq: 5
Server: gortsplib
Session: 875030865e8041ac9876846271b206ac
The RTSP session ID negotiated at the beginning of the connection (captured by the proxy) differs from the session ID managed by the MediaMTX server. Both the API and the logs show the same identifier, one of them truncated but they are the same id. Here the sessions are: f254d970-cecb-4d5e-bdfd-3b28046b3c5d and f254d970.
API response for: http://localhost:9997/v3/rtspsessions/list
MediaMTX logs:
This discrepancy causes issues in session tracking and logging.
Questions:
Beta Was this translation helpful? Give feedback.
All reactions