Relay.Calling.Event

View as Markdown

This object represents Relay events that occur during calling operations.

Properties

PropertyTypeDescription
namestringThe event name
payloadobjectRaw JSON object of the Relay event

Event Types

Calling events include:

  • calling.call.state - Call state changes
  • calling.call.connect - Call connection events
  • calling.call.receive - Incoming call events
  • calling.play.state - Play operation state changes
  • calling.record.state - Record operation state changes
  • calling.detect.state - Detect operation state changes

Usage

Events are typically accessed through result objects or event handlers in the calling system.

1// Example of accessing event information
2const result = await call.play({ url: 'audio.mp3' });
3const event = result.getEvent();
4console.log('Event name:', event.name);
5console.log('Event payload:', event.payload);