Skip to main content

Relay.Calling.Event

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.

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