-
Notifications
You must be signed in to change notification settings - Fork 1
IncomingApplicationCall
Ajša Terko edited this page Jan 30, 2025
·
2 revisions
extends
ApplicationCall
from(): String
fromDisplayName(): String
accept(options?: ApplicationCallOptions): void
decline(options?: DeclineOptions): void
Returns the identifier of the caller that made the call.
none
-
string
- Represents the identifier of the caller.
let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
let incomingCall = incomingApplicationCallEvent.incomingCall;
console.log(`Incoming call caller name: ${incomingCall.from()}`);
});
Returns the display identifier of the caller.
none
-
string
- Represents the display identifier of the caller.
let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
let incomingCall = incomingApplicationCallEvent.incomingCall;
console.log(`Incoming call caller name: ${incomingCall.fromDisplayName()}`);
});
Accepts the incoming call:
-
options
:ApplicationCallOptions
- Optional additional options to be used when accepting an incoming call.
N/A
let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
incomingApplicationCallEvent.incomingCall.accept(ApplicationCallOptions.builder().setVideo(true).build());
});
Declines the incoming call.
-
options
:DeclineOptions
- Optional additional option to decline an incoming call on all devices.
N/A
let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
incomingApplicationCallEvent.incomingCall.decline(DeclineOptions.builder().setDeclineOnAllDevices(true).build());
});