All Classes

com.voximplant.sdk.call

Interface ICall



  • public interface ICall
    Interface that may be used for call operations like answer, reject, hang up and mid-call operations like hold, start/stop video and others.
    • Method Detail

      • addCallListener

        void addCallListener(ICallListener listener)
        Add ICallListener listener to handle call events.
        Parameters:
        listener - ICallListener listener
      • removeCallListener

        void removeCallListener(ICallListener listener)
        Remove previously added ICallListener
        Parameters:
        listener - ICallListener listener
      • getCallId

        java.lang.String getCallId()
        Get the call id.
        Returns:
        The call id
      • getEndpoints

        java.util.List<IEndpoint> getEndpoints()
        Get list of the endpoints associated with the call.
        Returns:
        List of the endpoints associated with the call
      • isVideoEnabled

        boolean isVideoEnabled()
        Check if video is enabled in the call.
        Returns:
        True if video send or receive is enabled by current user, false otherwise
      • start

        void start(java.util.Map<java.lang.String,java.lang.String> headers) throws CallException
        Start the call.
        Parameters:
        headers - Optional set of headers to be sent to VoxImplant Cloud. Names must begin with "X-" to be processed by SDK
        Throws:
        CallException - if the call is already started
      • answer

        void answer(java.lang.String customData, VideoFlags videoFlags, java.util.Map<java.lang.String,java.lang.String> headers) throws CallException
        Answer the call. Should be used only for incoming call.
        Parameters:
        customData - Optional custom data passed with call. Will be available in VoxEngine scenario
        videoFlags - Specify video settings (send and receive) for the new call
        headers - Optional set of headers to be sent to VoxImplant Cloud. Names must begin with "X-" to be processed by SDK
        Throws:
        CallException - exception
      • reject

        void reject(java.util.Map<java.lang.String,java.lang.String> headers) throws CallException
        Reject the call. Should be used only for incoming call.
        Parameters:
        headers - Optional set of headers to be sent to VoxImplant Cloud. Names must begin with "X-" to be processed by SDK
        Throws:
        CallException - exception
      • hangup

        void hangup(java.util.Map<java.lang.String,java.lang.String> headers)
        Hang up the call.
        Parameters:
        headers - Optional set of headers to be sent to VoxImplant Cloud. Names must begin with "X-" to be processed by SDK
      • sendAudio

        void sendAudio(boolean enable)
        Enables or disables audio transfer from microphone into the call.
        Parameters:
        enable - True if audio should be sent, false otherwise
      • sendVideo

        void sendVideo(boolean enable, ICallCompletionHandler handler)
        Start or stop sending video for the call
        Parameters:
        enable - True if video should be sent, false otherwise
        handler - Object to receive the result of this operation
      • hold

        void hold(boolean enable, ICallCompletionHandler handler)
        Hold or unhold the call
        Parameters:
        enable - True if the call should be put on hold, false for unhold
        handler - Object to receive the result of this operation
      • receiveVideo

        void receiveVideo(ICallCompletionHandler handler)
        Start receive video if video receive was disabled before. Stop receiving video during the call is not supported.
        Parameters:
        handler - Object to receive the result of this operation
      • sendDTMF

        void sendDTMF(java.lang.String tone)
        Send DTMF in the call
        Parameters:
        tone - DTMFs
      • sendInfo

        void sendInfo(java.lang.String mimeType, java.lang.String content, java.util.Map<java.lang.String,java.lang.String> headers)
        Send INFO message within the call
        Parameters:
        mimeType - MIME type of info
        content - Custom string data
        headers - Optional set of headers to be sent with message. Names must begin with "X-" to be processed by SDK
      • sendMessage

        void sendMessage(java.lang.String text)
        Send message within the call. Implemented atop SIP INFO for communication between call endpoint and Voximplant cloud, and is separated from Voximplant messaging API.
        Parameters:
        text - Message text
      • getCallDuration

        long getCallDuration()
        Get the call duration
        Returns:
        the call duration in milliseconds
      • getCallStatistic

        CallStatistic getCallStatistic()
        Get the call statistics
        Returns:
        CallStatistic instance