Interface CallServiceListener


  • public interface CallServiceListener
    Listener interface for events from the CallService.
    • Method Detail

      • onIncomingCallReceived

        void onIncomingCallReceived​(CallService callService,
                                    Call call)
        Called to report an incoming call.
        Parameters:
        callService - The call service that the callback is associated with.
        call - The incoming call.
      • onCallCreated

        void onCallCreated​(CallService callService,
                           Call call)
        Called when a call is created by the signaling engine.
        Parameters:
        callService - The call service that the callback is associated with.
        call - The newly created call.
      • onIncomingCallUndelivered

        void onIncomingCallUndelivered​(CallService callService,
                                       Call call)
        Called when the call service is informed of an incoming call that was not delivered to the local application due to an active server feature, such as call forwarding or send all calls. If desired the application can use the information in this call object to update its call history records. Since the call is already ended no further events will be sent for it.
        Parameters:
        callService - The call service that the callback is associated with.
        call - The undelivered call.
      • onCallRemoved

        void onCallRemoved​(CallService callService,
                           Call call)
        Called when a call has been removed from the call service.
        Parameters:
        callService - The call service that the callback is associated with.
        call - The removed call.
      • onCallServiceCapabilityChanged

        void onCallServiceCapabilityChanged​(CallService callService)
        Called when service capability is changed. e.g VideoCapability, voipCallingCapability Video capability is calculated based on license, user configuration and available network. VoIP calling capability is calculated based on user configuration and available network.
        Parameters:
        callService - The call service that the callback is associated with.
      • onActiveCallChanged

        void onActiveCallChanged​(CallService callService,
                                 Call call)
        Called when a there is change in active call or another call has become active call. An active call is local and in established state. The active call is null if there is no call, or all local calls are in held state.
        Parameters:
        callService - The call service that the callback is associated with.
        call - The new call, or null if there is no active call.
      • onStartCallRequestReceived

        void onStartCallRequestReceived​(CallService callService,
                                        Call call,
                                        VideoMode videoMode)
        Called to report the receipt of a new video call creation request from a third-party call control application or from the user's other endpoint which is controlling this application instance in Shared Control mode (see SIPUserConfiguration.setControlledEndpointEnabled(boolean)).

        It should be noted that video call start requires the client application to initialize video resources such as video rendering view and camera, which is why this callback is required to be handled by the application in order to complete the call setup. This callback is not reported for an incoming audio call creation request, as the audio call creation request is automatically handled by the Client SDK, using the user-selected (or default) microphone and playback devices.

        If the call is requested to start with bidirectional video mode, but local camera device cannot be initialized, the client application should proceed with establishing a receive-only video call by first calling call.setVideoMode(VideoMode.RECEIVE_ONLY), and then call.start(). If, for some reason, the client application is unable to start the call with receive-only video, it should proceed with starting the call with audio only, by first calling call.setVideoMode(VideoMode.DISABLE), and then call.start(). Failure to start the call in a timely fashion will result in timeout of the network request and will cause call setup failure at the controlling application.

        Parameters:
        callService - The call service that the callback is associated with.
        call - Outgoing call on which start() should be called after UI video resources are initialized.
        videoMode - Requested video mode/direction to start the call with. Used to initialize the UI video resources.
      • onAcceptCallRequestReceived

        void onAcceptCallRequestReceived​(CallService callService,
                                         Call call,
                                         VideoMode videoMode)
        Called to report the receipt of an incoming video call accept request from a third-party call control application or from the user's other endpoint which is controlling this application instance in Shared Control mode (see SIPUserConfiguration.setControlledEndpointEnabled(boolean)).

        It should be noted that video call accept requires the client application to initialize video resources such as video rendering view and camera, which is why this callback is required to be handled by the application in order to complete the call setup. This callback is not reported for handling of an incoming audio call accept request, as the audio call request is automatically handled by the Client SDK using the user-selected (or default) microphone and playback devices.

        If the call is requested to be accepted with bidirectional video, but local camera device cannot be initialized, the client application should proceed with establishing receive-only video call by first calling call.setVideoMode(VideoMode.RECEIVE_ONLY), and then calling call.accept(). If, for some reason, the client application is unable to answer the call with receive-only video, it should proceed with answering the call with audio only, by first calling call.setVideoMode(VideoMode.DISABLE), and then call.start(). Failure to answer the incoming call in a timely fashion will result in timeout of the network request and will cause call setup failure at the controlling application.

        Parameters:
        callService - The call service that the callback is associated with.
        call - Incoming call on which accept() should be called after UI video resources are initialized.
        videoMode - Requested video mode/direction to answer the call with. Used to initialize the UI video resources.