Using events


function incomingCallHandler(event) {
   if(event.detail.autoAnswerActivated === false) { 
apiRTC.addEventListener("incomingCall", incomingCallHandler);
The handler “incomingCallHandler()” is called when an event “incomingCall” is fired, you can then access detail of the event using “event.detail.” Ex : event.detail.autoAnswerActivated for an incomingCall event Check description of the events in the Api documentation to learn about the available parameters on the different events.