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 signaling APIs to initiate, accept, reject, cancel, and hang up call invitations, query room status, and synchronize participant states. The SDK manages invitation lifecycles and room membership coordination; it does not capture camera feeds, play audio streams, or render video canvas views.
Your application passes credentials returned by the SDK (roomID, token, and liveURL) to your chosen WebRTC or RTC media engine. The application layer handles system camera and microphone permissions, audio session management, media tracks, network adaptability, and UI rendering.
Call workflow
- Invoke Start a one-to-one call to invite a single user, or invoke Start a group call for multi-party group calls.
- The invitee extracts
OIMSignalingInfofrom the incoming invitation callback and chooses to accept or reject the call. - Upon acceptance via Accept a call, both caller and callee use the returned room credentials to join the media channel.
- During an active call, track member join/leave events, stream state changes, and custom signaling data via delegates.
- The initiator can Cancel a call invitation before connection, and any participant can Hang up a call once connected.
Core data structures
| Structure | Description |
|---|---|
OIMInvitationInfo | Details invitee list, group ID, room ID, media type (audio or video), timeout duration, and session type. |
OIMSignalingInfo | Encapsulates caller identity, invitation parameters, and offline APNs notification payloads. |
OIMInvitationResultInfo | Delivers the server-assigned roomID, authentication token, liveURL, and busy user list. |
OIMParticipantConnectedInfo | Captures active room status, inviter details, and currently connected participants for a group room. |
Custom signals transmit lightweight, transient negotiation payloads during a call session. Do not use custom signals for persistent storage or bulk data transfer.
State synchronization and event boundaries
Write actions such as initiating, accepting, rejecting, cancelling, or hanging up require handling both completion callbacks and signaling delegate events. Completion callbacks confirm that OpenIMServer processed the request. Delegate callbacks notify other participants and linked multi-terminal devices of state transitions; they represent distinct asynchronous milestones.
Listen for the full invitation lifecycle, participant connection events, hangup triggers, and stream changes in Handle call events. For transient signaling, refer to Send a custom signal.
Merge call session state using roomID as the primary key, and key participant states with userID. When the application relaunches with unresolved invitations, recover state via Restore a pending invitation. To inspect an ongoing group call room, invoke Query a group call room.
Related documentation
Was this page helpful?