Accept a call
Accept an incoming call invitation and retrieve room access credentials.
After receiving or restoring a complete OpenIMSignalingInvitationInfo object, invoke signalingAccept() to accept the incoming call invitation and obtain RTC room access credentials.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invitation | OpenIMSignalingInvitationInfo | Yes | The complete invitation object received via signaling events or recovered from queries. |
Pass the complete invitation payload as received. Do not reconstruct an incomplete payload containing only roomID. If your application resumed from the background or restarted, retrieve the active invitation using Restore pending call invitations.
Code example
import { signalingAccept } from '@/uni_modules/unix-openim-sdk'
const result = await signalingAccept({ invitation })
if (result?.roomID != null && result?.token != null) {
await mediaEngineJoin(result.roomID!, result.token!, result.liveURL)
}Return value
The Promise resolves with an OpenIMSignalingAcceptResult | null object containing invitation, roomID, token, and liveURL. Connect your media engine to the RTC channel using the returned room ID and token.
State changes after the call
A resolved Promise confirms that the acceptance signal was submitted to OpenIMServer; it does not indicate that the media engine channel has connected or that other participants have received the update. Track calling session state using roomID. For multi-party participant events and disconnection handling, see Handle call events.
Was this page helpful?