ping_pong

View as Markdown

Direction: both ways. Dial sends a ping_pong to your server roughly every 2 seconds; echo the same frame straight back. If Dial doesn’t receive a pong within ~5 seconds it treats the link as dead, closes it, and reconnects — at which point you get a fresh call_connected and resume (see Resumability).

This is an application-level keepalive on top of the WebSocket, mirroring the mechanism Dial uses with its own upstream — so dropped connections are detected promptly on both sides.

Schema

FieldTypeDescription
typestringAlways "ping_pong".
timestampintegerMilliseconds since epoch (for round‑trip timing). Echo it back unchanged.

Example

Dial → your server:

1{ "type": "ping_pong", "timestamp": 1749480000000 }

Echo it straight back, your server → Dial:

1{ "type": "ping_pong", "timestamp": 1749480000000 }