Browse SDKs · iOS
Platform
SDKsiOSEnterprise

Cancel a call invitation

Cancel an unanswered call invitation with the OpenIM iOS SDK.

Copy

Cancel an outgoing audio or video call invitation before the callee answers by invoking signalingCancel:onSuccess:onFailure:.

Parameters

ParameterTypeRequiredDescription
signalingInfoOIMSignalingInfo *YesThe complete signaling information object preserved when the call was initiated.

Code example

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

Provide the unaltered OIMSignalingInfo instance saved during the initial signalingInvite:... or signalingInviteInGroup:... call.

Return value

The onSuccess callback signifies that OpenIMServer processed the cancellation command and broadcasted it to all invitees.

State changes after the call

  • Local state teardown: Exit the ringing wait state, dismiss the outgoing call screen, and release audio ringing resources.
  • Remote event notification: Invitees receive cancellation notifications via onInvitationCancelled: in OIMSignalingListener, triggering automatic dismissal of their incoming call screens (see Handle call events).
  • State merge key: Call sessions merge state by roomID, combining with userID for participant state.