Interface Call


  • public interface Call
    • Method Detail

      • addCallListener

        void addCallListener​(CallListener callListener)
        Adds a listener to the call.
        Parameters:
        callListener - the CallListener
      • removeCallListener

        void removeCallListener​(CallListener callListener)
        Removes a listener from the call.
        Parameters:
        callListener - the CallListener
      • answer

        void answer()
        Answers an incoming call.
        Throws:
        MissingPermissionException - If the application is missing permission to record audio
      • hangup

        void hangup()
        Ends the call, regardless of what state it is in. If the call is an incoming call that has not yet been answered, the call will be reported as denied to the caller.
      • getCallId

        java.lang.String getCallId()
        Returns the call identifier.
        Returns:
        the call identifier.
      • getRemoteUserId

        java.lang.String getRemoteUserId()
        Returns the identifier of the remote participant in the call.
        Returns:
        the identifier of the remote participant in the call.
      • getDetails

        CallDetails getDetails()
        Returns metadata about the call.
        Returns:
        a CallDetails containing metadata about the call.
      • getState

        CallState getState()
        Returns the CallState the call is currently in.
        Returns:
        the state the call is currently in.
      • sendDTMF

        void sendDTMF​(java.lang.String keys)
        Sends one or more DTMF tones for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).
        Parameters:
        keys - May be a series of DTMF keys. Each key must be in [0-9, #, *, A-D].
        Throws:
        java.lang.IllegalArgumentException - if any of the given DTMF keys is invalid
      • pauseVideo

        void pauseVideo()
        Pause the video capturing.
      • resumeVideo

        void resumeVideo()
        Resume the video capturing.
      • getHeaders

        java.util.Map<java.lang.String,​java.lang.String> getHeaders()
        Returns the headers.

        IMPORTANT: If a call is initially received via remote push notifications, headers may not be immediately available due to push payload size limitations. If it's not immediately available, it will be available after the onCallProgressing or onCallEstablished callbacks for CallListener are called.

        Returns:
        the headers.
      • setBandwidthLimits

        void setBandwidthLimits​(int maxAudioBitrate,
                                int maxVideoBitrate)
        Sets bandwidth limitations on negotiated media streams. Bitrate settings should be non-negative integers values in kbps. Setting bitrate to zero forces use of default values. Settings take effect only if applied before call starts.
        Parameters:
        maxAudioBitrate - sets max audio bitrates in kbps.
        maxVideoBitrate - sets max video bitrates in kbps.