When connecting to a milestone camera via WebRtc the stream will cut out after a few minutes. When looking at a network capture we noticed that the milestone endpoint was sending an Encrypted Alert before the stream was cut off.
Searching encrypted alerts I saw:
What It Means
Encrypted Payload: Packet analyzers like Wireshark show “Encrypted Alert” because the content is protected by symmetric encryption keys established during the handshake; the analyzer cannot read the plaintext without the session keys.
Structure: The alert contains two bytes—one showing the severity (warning or fatal) and another identifying the specific condition. [1, 2, 3]
Common Causes
Session Closure: Most frequently, it is a normal close_notify message indicating that one side is shutting down the session cleanly.
Please advise how we can move forward determining the reason why Milestone VMS is ending the webrtc stream.
Does the stream stop consistently or only occasionally?
Have you seen this in multiple installations or only one?
Does it affect multiple cameras?
Does the behavior change with another browser or another PC?
Could you describe the use case and steps to reproduce?
Do the API Gateway logs show any warnings or errors when the stream disconnects?
If nothing stands out, please enable Debug logging for the API Gateway, reproduce the issue, and share the log entries around the time of the disconnect.
Instructions for enabling Debug logging are described here: Webrtc integration
At this point, the issue may be related to the network path between the WebRTC server and the client. Could you provide some information about the network topology?
Is there any NAT device between the server and the client?
Are there any firewalls, reverse proxies, load balancers, or VPNs involved?
Is the problem reproducible only from external networks, or also when the client is on the same LAN as the server?
Have you configured and tested a TURN server, or are you relying only on STUN/direct connectivity?
Do browser developer tools show any ICE connection failures or WebRTC-related errors in the console?
WebRTC is sensitive to NAT traversal and firewall restrictions, so understanding the network setup will help determine whether the encrypted stream warning is related to connectivity rather than the video stream itself.