SDKsHarmonyOSEnterprise
Reject call
Decline an unanswered incoming audio or video call invitation.
Supply the complete invitation payload along with the callee's participant metadata to reject an incoming call:
Code example
import sdk, { Platform, SignalingRejectReq } from '@openimsdk/imsdk';
const request: SignalingRejectReq = {
invitation: invitation,
offlinePush: offlinePush,
participant: participant,
opUserPlatformID: Platform.HarmonyOS,
userID: invitation.inviterUserID,
};
await sdk.signalingReject(request);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invitation | SignalingInvitationInfo | Yes | The complete call invitation object to reject. |
offlinePush | OfflinePushInfo | Yes | Push notification options for offline participants. |
participant | SignalingParticipantMetaData | Yes | User metadata of the rejecting participant. |
opUserPlatformID | Platform | Yes | Platform identifier of the rejecting device (Platform.HarmonyOS). |
userID | string | Yes | User ID of the inviter receiving the rejection signal. |
Return value
Returns a Promise that resolves to void when the rejection signal is transmitted.
State changes after the call
Once the Promise resolves, dismiss the incoming call interface locally identified by roomID and release any reserved audio resources. The caller receives an invitation rejection event and updates UI accordingly. For remote event handling, see Handle call events.
Was this page helpful?