SDKsiOSEnterprise
Accept a call
Accept a call invitation with the OpenIM iOS SDK.
Accept an incoming audio or video call invitation using signalingAccept:onSuccess:onFailure:, passing the exact OIMSignalingInfo received from the incoming invitation event.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
signalingInfo | OIMSignalingInfo * | Yes | The complete signaling information object delivered by the onReceiveNewInvitation: callback. |
Code example
[[OIMManager manager] signalingAccept:signalingInfo
onSuccess:^(OIMInvitationResultInfo * _Nullable credentials) {
if (credentials != nil) {
[self joinMediaRoom:credentials];
}
}
onFailure:^(NSInteger code, NSString * _Nullable message) {
[self showCallError:code message:message ?: @"Failed to accept invitation"];
}];Pass the unaltered OIMSignalingInfo instance received from the incoming event; never synthesize a new object or modify roomID.
Return value
The onSuccess callback returns an OIMInvitationResultInfo instance containing the call roomID, authentication token, and streaming liveURL. Join the RTC media room only after receiving these valid credentials.
State changes after the call
- Local state merge: Merge call state by
roomIDand correlate participant states withuserID. - Remote event notification: The caller and connected participants receive the acceptance notification via
onInviteeAccepted:inOIMSignalingListener(see Handle call events). - Multi-device sync: Other devices logged in under the same account receive
onInviteeAcceptedByOtherDevice:to synchronize UI state.
Was this page helpful?