SDKsiOSEnterprise
Hang up a call
Hang up an established call with the OpenIM iOS SDK.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
signalingInfo | OIMSignalingInfo * | Yes | The 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 byroomID. - Remote event notification: Remaining participants receive a hang-up notification via
onInvitationTimeout:or room termination callbacks inOIMSignalingListener(see Handle call events). - State merge key: Call sessions merge state by
roomIDand correlate individual participant statuses withuserID.
Was this page helpful?