Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Start a single call

Initiate a one-to-one audio or video call invitation to a specified user.

Copy

Initiate a one-to-one call invitation to an individual recipient. The OpenIM SDK manages the signaling channel and call lifecycle; your app connects to your RTC media engine using the returned credentials:

Parameters

ParameterTypeRequiredDescription
infoSignalingInfoYesCall signaling initiation object containing the operator's userID, invitation, and optional offlinePushInfo.

Core fields of invitation:

  • inviterUserID: Initiator user ID.
  • inviteeUserIDList: List containing exactly one recipient user ID.
  • groupID: Pass an empty string '' for single-chat calls.
  • roomID: Call room ID. Generate a globally unique ID per call session.
  • timeout: Call timeout in seconds.
  • mediaType: Media type (for example, 'video' or 'audio').
  • sessionType: Session type; pass ConversationType.single for single-chat calls.

Code example

final info = SignalingInfo(
  userID: currentUserID,
  invitation: InvitationInfo(
    inviterUserID: currentUserID,
    inviteeUserIDList: [peerUserID],
    groupID: '',
    roomID: roomID,
    timeout: 30,
    mediaType: 'video',
    sessionType: ConversationType.single,
    platformID: Platform.isIOS ? IMPlatform.ios : IMPlatform.android,
  ),
  offlinePushInfo: offlinePushInfo,
);

final credentials = await OpenIM.iMManager.signalingManager
    .signalingInvite(info: info);

Return value

A successful Future returns a SignalingCertificate object containing credentials for entering the media room.

FieldTypeDescription
tokenString?Room authentication token required by the media engine.
roomIDString?Target call room ID.
liveURLString?Live media streaming server URL.
busyLineUserIDListList<String>?List of user IDs currently busy on another line.

State changes after the call

A successful call indicates that the invitation signal has been dispatched. It does not mean the recipient has answered. The client creates a local calling state mapped to roomID and awaits acceptance, rejection, or timeout events (see Handle call events for complete event handling).