Skip to content

IncomingApplicationCall

Ajša Terko edited this page Jan 30, 2025 · 2 revisions

extends ApplicationCall



from()

Description

Returns the identifier of the caller that made the call.

Arguments

  • none

Returns

  • string - Represents the identifier of the caller.

Example

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()}`);
});



fromDisplayName()

Description

Returns the display identifier of the caller.

Arguments

  • none

Returns

  • string - Represents the display identifier of the caller.

Example

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()}`);
});



accept(options)

Description

Accepts the incoming call:

Arguments

Returns

  • N/A

Example

let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
    incomingApplicationCallEvent.incomingCall.accept(ApplicationCallOptions.builder().setVideo(true).build());
});



decline(options)

Description

Declines the incoming call.

Arguments

  • options: DeclineOptions - Optional additional option to decline an incoming call on all devices.

Returns

  • N/A

Example

let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-application-call', (incomingApplicationCallEvent) => {
    incomingApplicationCallEvent.incomingCall.decline(DeclineOptions.builder().setDeclineOnAllDevices(true).build());
});

Tutorials

Migration guides

Reference documentation

Clone this wiki locally