Audio and video calling overview
Understand the signaling, room information, and event boundaries of audio and video calls in the OpenIM iOS SDK.
The OpenIM iOS SDK provides the signaling APIs required to initiate, accept, reject, and cancel invitations, hang up calls, query rooms, and synchronize call state. It coordinates who joins which room and manages the call lifecycle. It does not capture camera input, play remote media streams, or render the call interface.
Your app passes the roomID, token, and liveURL returned by the SDK to the selected real-time audio and video engine. It also handles system permissions, audio sessions, media tracks, poor-network behavior, and UI state. OpenIM iOS SDK provides call signaling here, not a complete real-time media implementation.
Call flow
- Call
signalingInvite:offlinePushInfo:onSuccess:onFailure:Enterprise to start a one-to-one call, orsignalingInviteInGroup:offlinePushInfo:onSuccess:onFailure:Enterprise to start a group call. - The invitee receives an
OIMSignalingInfothroughonReceiveNewInvitation:Enterprise and chooses whether to accept or reject the invitation. - The invitee calls
signalingAccept:onSuccess:onFailure:Enterprise. Both parties then use the room credentials from the success callback to connect to the media engine. - During the call, update local state from delegate callbacks for participants, media streams, and custom signals.
- The caller can cancel an invitation that has not been answered. Any participant can hang up an established call.
Core data types
| Type | Description |
|---|---|
OIMInvitationInfo | Contains the invitees, group, room, media type, timeout, and session type. |
OIMSignalingInfo | Contains the user, invitation details, and offline push information for the current signaling operation. |
OIMInvitationResultInfo | Contains the roomID, token, liveURL, and list of busy users returned by OpenIMServer. |
OIMParticipantConnectedInfo | Contains room, invitation, and participant information retrieved for a group. |
Use custom signals for lightweight, temporary coordination data related to the current call. They do not provide file transfer or durable state storage.
State updates and event ownership
For write operations such as initiating, accepting, rejecting, canceling, or hanging up a call, handle both the success callback and the call delegate. A success callback means that OpenIMServer has accepted or completed the current signaling request. Delegate callbacks report incremental state observed by the caller, invitees, other devices, or room participants. These are not the same completion signal.
For the complete invitation lifecycle and participant, hang-up, and media-stream listeners, see Call events. For custom-signal events, see Send a custom signal. Room and token queries return snapshots only through callbacks; see the three pages under Call information.
Do not register delegates on this overview page. Use roomID as the primary key for call state and combine it with the user ID for participant state. After the app restarts, restore unresolved invitations with a query. Query room information again whenever the UI needs a current room snapshot.
Related pages
Was this page helpful?