onEvent
Register a low-level callback that fires for every inbound signalwire.event,
regardless of type. This is a generic escape hatch that runs before the
typed onCall() / onMessage() routing.
Most applications should use the typed onCall() and
onMessage() handlers instead. Use onEvent() only when you need
to observe raw events the typed handlers don’t cover.
Parameters
handler
Callback fired for every inbound event. Receives the event type and its raw params. May be async. Errors thrown here are logged but never tear down the dispatcher.
Returns
The same handler, returned to support decorator-style usage.