Start a group call
Initiate a group audio or video call and acquire room credentials using signalingInviteInGroup().
Initiate a group audio or video call within a group conversation. The parameter models match those of Start a single call, except invitation.groupID requires a valid group ID and invitation.sessionType is set to ConversationType.GROUP_CHAT.
Only group members explicitly specified in inviteeUserIDList receive invitations; providing a groupID does not automatically ring all members of the group. Exclude the current user ID, empty values, and duplicates from inviteeUserIDList. In the example below, the group ID is reused as the room ID; if you generate custom roomID values, ensure all participants join the same identifier.
Code example
SignalingInvitationInfo invitation = new SignalingInvitationInfo();
invitation.setInviterUserID(currentUserID);
invitation.setInviteeUserIDList(selectedGroupMemberIDs);
invitation.setGroupID(groupID);
invitation.setRoomID(groupID);
invitation.setTimeout(30);
invitation.setMediaType("video");
invitation.setSessionType(ConversationType.GROUP_CHAT);
invitation.setPlatformID(Platform.ANDROID);
invitation.setCustomData("{\"source\":\"group-call\"}");
SignalingInfo info = new SignalingInfo();
info.setInvitation(invitation);
info.setOfflinePushInfo(offlinePushInfo);
OpenIMClient.getInstance().signalingManager.signalingInviteInGroup(
new OnBase<SignalingCertificate>() {
@Override
public void onSuccess(SignalingCertificate credentials) {
// credentials contains room token and liveURL to join the media room.
}
@Override
public void onError(int code, String error) {
// code and error describe the failure.
}
},
info
);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
base | OnBase<SignalingCertificate> | Yes | Callback delivering room credentials needed to connect to the media engine. |
info | SignalingInfo | Yes | Complete signaling payload containing group ID, invitee list, room ID, and media type. |
Invitation attributes
| Field | Type | Description |
|---|---|---|
inviterUserID | String | Initiator user ID (authenticated user). |
inviteeUserIDList | List<String> | List of invited member user IDs, excluding the caller and deduplicated. Populating groupID does not automatically invite all group members. |
groupID | String | Target group ID for the group call. |
roomID | String | Call room identifier, such as the groupID or a random UUID. |
timeout | int | Invitation timeout in seconds. |
mediaType | String | Media type string, such as "audio" or "video". |
sessionType | int | Session type; set to ConversationType.GROUP_CHAT for group calls. |
Return value
Upon success, credentials in onSuccess returns a SignalingCertificate object containing:
roomID: Unique global identifier of the call room.token: Authentication token used to join the media room.liveURL: Media server endpoint URL.busyLineUserIDList: List of invited members currently engaged in another call.
State changes after the call
- Callback confirmation: The
onSuccesscallback confirms that the signaling request succeeded and room credentials were acquired. It does not indicate that invited group members have answered or connected to the media engine. - Asynchronous event delivery: The initiator and invited members track subsequent call events through
OnSignalingListener. Track the group call room state usingroomIDand track individual member response and connectivity states usingroomID:userID. - Media connection: Connect to the real-time audio/video engine using the returned
tokenandroomID. For real-time event updates, see Handle call events.
Was this page helpful?