Recevoir un appel

Pour recevoir un appel entrant dans l'application, vous devez vous enregistrer et écouter les événements d'appels entrants :

To receive an incoming in-app call, you should listen to incoming call events:

application.on("member:call", (member, call) => {
    ...
});

The listener method receives a member object that contains information about the caller and a call object, that lets you interact with the call in progress. With the later, you’ll be able to perform methods such as answer, reject and hang up.

Vous pourrez ensuite utiliser des méthodes telles que répondre, rejeter et raccrocher.

Réponse

call.answer();

Rejeter

call.reject();

Raccrocher

Pour un call:

call.hangUp();

Écouter les événements de l'appel

Pour connaître l'état d'un appel, par exemple pour savoir si l'autre membre a répondu ou raccroché, vous devez écouter les événements de l'appel.

To see updates on the state of the call and its members:

application.on("call:status:changed",(call) => {
    ...
});

Référence