Skip to content

proto_ws: handle CRLF keep-alives in WS messages - #4246

Open
greenbea wants to merge 1 commit into
OpenSIPS:masterfrom
greenbea:ws_crlf_ping
Open

proto_ws: handle CRLF keep-alives in WS messages#4246
greenbea wants to merge 1 commit into
OpenSIPS:masterfrom
greenbea:ws_crlf_ping

Conversation

@greenbea

@greenbea greenbea commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Browser WebSocket APIs cannot send native WebSocket Ping frames, so browser-based SIP clients use the RFC 5626 CRLF keep-alive mechanism, as permitted by RFC 7118.

Details

Solution

Recognize double-CRLF pings and single-CRLF pongs carried in WebSocket data frames. Reply with a single-CRLF text frame and prevent these keep-alives from reaching the SIP parser.

This applies to both WS and WSS transports.

Compatibility

Closing issues

Browser WebSocket APIs cannot send native WebSocket Ping frames, so
browser-based SIP clients use the RFC 5626 CRLF keep-alive mechanism,
as permitted by RFC 7118.

Recognize double-CRLF pings and single-CRLF pongs carried in WebSocket
data frames. Reply with a single-CRLF text frame and prevent these
keep-alives from reaching the SIP parser.

This applies to both WS and WSS transports.
@razvancrainea razvancrainea self-assigned this Sep 8, 2026
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.

2 participants