Audio and video calling overview
Understand OpenIM React Native SDK RTC signaling, room credentials, and call event boundaries.
The OpenIM React Native SDK provides real-time calling signaling APIs to initiate and handle call invitations, query room information, and synchronize call states. The SDK exclusively manages RTC signaling workflows; it does not capture or render audio/video media tracks, manage media network sockets, or draw in-call UI components.
When initiating or accepting a call, the SDK returns room credentials including roomID, token, and liveURL. Feed these credentials into your real-time audio/video media engine (such as LiveKit, WebRTC, or TRTC) to join the media room, while managing local device permissions, audio routing, and UI rendering directly in your application.
Call workflow
- Initiate a direct call via Start a one-to-one call, or a multi-party call via Start a group call.
- The invitee receives the call invitation through the
OnReceiveNewInvitationEnterprise event, choosing either to Accept a call or Reject a call. - Upon accepting, retrieve the room credentials (
roomID,token, andliveURL) to connect the media engine. - During an active call, update the UI according to invitation state, participant state, media stream state, and custom signals.
- The caller can cancel an unanswered call via Cancel a call invitation; any participant can terminate an active call via Hang up a call.
Core data structures
| Structure | Description |
|---|---|
RtcInvite | Call invitation object containing inviter, invitees, group ID, room ID, media type, timeout, and session type. |
RtcInviteResults | Room credentials (roomID, token, and liveURL) returned upon initiating, accepting, or querying a call room. |
CallingRoomData | Room ID, active invitation, and participant profiles returned when querying by group ID. |
OnReceiveNewInvitationPayload | Event payload received on incoming invitations, containing invitation, optional offlinePushInfo, and participant details. |
Both customData and custom signaling payloads are arbitrary business strings. You can pass JSON strings or custom serialized formats based on your application protocol.
Call state reconciliation
After invoking initiate, accept, reject, cancel, or hang-up APIs, update the local screen state based on the method result. State changes from other users or devices arrive via push events. When reconciling call state in local storage or state managers, always use roomID as the primary identifier for the call room, and combine roomID:userID to manage individual participant states.
For invitation lifecycles, participant room changes, and media stream events, see Handle call events. For application-level signaling, see Send a custom signal.
Browse by task
| Task | Guide |
|---|---|
| Initiate calls | Start a one-to-one call, Start a group call |
| Respond to invitations | Accept a call, Reject a call |
| End or cancel calls | Cancel a call invitation, Hang up a call |
| Query room information & restore state | Get a group call room, Get room credentials, Restore a pending invitation |
| Listen to events & custom signals | Handle call events, Send a custom signal |
Was this page helpful?