Skip to main content

Notification

A notification is an event that SignalWire dispatches to notify the Client about different cases. A notification can refer to the JWT expiration, Call changes or Conference updates.

Types

Every notification has a property type that identify the case and the structure of the data.
The available type are:

ValueDescription
refreshTokenThe JWT is going to expire. Refresh it or your session will be disconnected.
callUpdateA Call's state has been changed. Update the UI accordingly.
participantDataNew participant's data (i.e. name, number) to update the UI.
userMediaErrorThe browser does not have permission to access media devices. Check the audio and video constraints you are using.

refreshToken

Your JWT is going to expire. Refresh it or your session will be disconnected.

Anatomy of a refreshToken notification.

{
type: 'refreshToken',
session: RelayInstance
}

callUpdate

A Call's state has been changed. It is useful to update the UI of your application.s

Anatomy of a callUpdate notification.

{
type: 'callUpdate',
call: CallObject
}

participantData

This notification contains the participant data for the current Call. This is useful when updating the UI.

Anatomy of a participantData notification.

{
type: 'participantData',
call: CallObject,
displayName: 'David Roe',
displayNumber: '1777888800'
displayDirection: 'inbound'
}

userMediaError

The browser lacks of permissions to access microphone or webcam. You should check which audio/video constraints you are using and make sure they are supported by the browser.

Anatomy of a userMediaError notification.

{
type: 'userMediaError',
error: error
}