Browse SDKs · iOS
Platform
SDKsiOSEnterprise

Hang up a call

Hang up an established call with the OpenIM iOS SDK.

Copy

Terminate an active audio or video call using signalingHungUp:onSuccess:onFailure:. Any connected participant can invoke this method using the active OIMSignalingInfo object associated with the room.

Parameters

ParameterTypeRequiredDescription
signalingInfoOIMSignalingInfo *YesThe active signaling information object for the ongoing call session.

Code example

[[OIMManager manager] signalingHungUp:signalingInfo
                            onSuccess:^{
    [self releaseCallResources];
}
                            onFailure:^(NSInteger code, NSString * _Nullable message) {
    [self showCallError:code message:message ?: @"Failed to hang up call"];
}];

Return value

The onSuccess callback confirms that the hang-up signaling command was accepted by OpenIMServer.

State changes after the call

  • Local resource teardown: Stop audio and video capture pipelines, disconnect from the RTC media room, deactivate AVAudioSession, and release camera/microphone devices idempotently by roomID.
  • Remote event notification: Remaining participants receive a hang-up notification via onInvitationTimeout: or room termination callbacks in OIMSignalingListener (see Handle call events).
  • State merge key: Call sessions merge state by roomID and correlate individual participant statuses with userID.