-
Notifications
You must be signed in to change notification settings - Fork 2
IncomingCall
Ajša Terko edited this page Feb 22, 2023
·
3 revisions
Accepts an incoming call, which ends up in both parties receiving CallEstablishedEvent
, after accept is processed by Infobip WebRTC platform.
none
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingWebrtcCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingWebrtcCall incomingWebrtcCall = incomingWebrtcCallEvent.getIncomingWebrtcCall();
Log.d("WebRTC", "Received incoming WebRTC call from: " + incomingWebrtcCall.source().identifier());
incomingWebrtcCall.setEventListener(new DefaultWebrtcCallEventListener());
incomingWebrtcCall.accept();
}
};
Declines the incoming call, which ends up in both parties receiving the CallHangupEvent
, after decline is processed by Infobip WebRTC platform.
none
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingWebrtcCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingWebrtcCall incomingWebrtcCall = incomingWebrtcCallEvent.getIncomingWebrtcCall();
Log.d("WebRTC", "Received incoming WebRTC call from: " + incomingWebrtcCall.source().identifier());
incomingWebrtcCall.setEventListener(new DefaultWebrtcCallEventListener());
incomingWebrtcCall.decline();
}
};
Declines the incoming call, which ends up in both parties receiving the CallHangupEvent
, after decline is processed by Infobip WebRTC platform.
DeclineOptions
give control over declining the call on all devices.
-
declineOptions
:DeclineOptions
- Additional option to decline an incoming call on all devices.
N/A
IncomingCallEventListener incomingCallEventListener = new IncomingCallEventListener() {
@Override
public void onIncomingWebrtcCall(IncomingApplicationCallEvent incomingApplicationCallEvent) {
IncomingWebrtcCall incomingWebrtcCall = incomingWebrtcCallEvent.getIncomingWebrtcCall();
Log.d("WebRTC", "Received incoming WebRTC call from: " + incomingWebrtcCall.source().identifier());
incomingWebrtcCall.setEventListener(new DefaultWebrtcCallEventListener());
incomingWebrtcCall.decline(DeclineOptions.builder().setDeclineOnAllDevices(true).build());
}
};