Browse SDKs · iOS
Platform
SDKsiOSEnterprise

Reject a call

Reject a call invitation with the OpenIM iOS SDK.

Copy

Decline an incoming audio or video call invitation using signalingReject:onSuccess:onFailure:, passing the exact OIMSignalingInfo received from the incoming invitation notification.

Parameters

ParameterTypeRequiredDescription
signalingInfoOIMSignalingInfo *YesThe complete signaling information object delivered by onReceiveNewInvitation:.

Code example

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

Dismiss the incoming call presentation and release local audio/ringing resources upon rejection.

Return value

The onSuccess callback signifies that OpenIMServer processed the rejection signal and notified the caller.

State changes after the call

  • Local state merge: Merge call session state by roomID and correlate participant states with userID.
  • Remote event notification: The caller receives the rejection notification via onInviteeRejected: in OIMSignalingListener (see Handle call events).
  • Multi-device sync: Other devices logged in under the same account receive onInviteeRejectedByOtherDevice: to dismiss incoming call notifications synchronously.