Skip to main content

Switch/Server Events

The Telnyx signaling server sends events over the WebSocket connection during the call lifecycle. These are the raw server-side events — most applications should use the higher-level telnyx.notification event instead. See INotification for the recommended approach.
Most developers don’t need to handle these events directly. The SDK translates them into INotification objects. Use telnyx.notification unless you need low-level signaling details.

Event Reference

Client Lifecycle

Call Lifecycle

Media

Call Control

Presence & Registration


Event Flow: Outbound Call


Event Flow: Inbound Call


Listening to Server Events

For advanced use cases, you can listen to raw server events by enabling debug mode and parsing the WebSocket messages:
Or intercept WebSocket messages directly:
Listening to raw WebSocket messages is not a supported API. The message format may change between SDK versions. Use telnyx.notification for stable event handling.

Server Events vs INotification

Use telnyx.notification (INotification) for application code:

Gateway State Events

The telnyx.gateway.state event indicates when the WebSocket connection to the gateway goes up or down:
Gateway DOWN can indicate:
  • Network interruption
  • Server-side maintenance
  • Credential revoked
  • WebSocket timeout
The SDK automatically attempts reconnection. See Reconnection & Recovery.

See Also