Integrate with your IM workflow
You can integrate Call into an app that already uses @nexconn/chat (Chat SDK) so users get a seamless calling and messaging experience.
Show call end information in the conversation view
Your app can return to the chat view after a call ends and refresh the conversation list or call list UI based on the call result.
To simplify Chat SDK integration, Call SDK provides call-related data after a 1-to-1 call ends. Your app receives the local call log through onLocalCallLogReceived in INCCallEventsListener. The log is converted to INCCallLog. For related details, see 1-to-1 call.
Get call end information with INCCallLog
Call SDK currently returns call log data through onLocalCallLogReceived only when a 1-to-1 call with the type NCCallType.SINGLE ends. Group calls are not supported at this time.
When a call ends normally, ends unexpectedly, or is hung up before it is answered, the engine fires onLocalCallLogReceived(record: INCCallLog). Use this callback to update your UI or write call data into your app-specific call list.
If the callee is offline, Call SDK resends the related data after the next successful connection, after NCEngine.connect returns a result where result.isOk is true. To receive the event as early as possible, register the listener with setCallEventsListener before you establish the connection.
ncCallEngine.setCallEventsListener({
/**
* Local call log as INCCallLog.
* @param record Call log. See `INCCallLog` in the API documentation.
*/
onLocalCallLogReceived(record: INCCallLog) {
console.log(record);
},
});