Package

## Interface CallController

- All Implemented Interfaces:

      public interface CallController

  CallController provides the entry point to the calling functionality of the Sinch SDK. A CallController can be acquired via SinchClient.callController.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract Unit` | `addCallControllerListener(CallControllerListener callControllerListener)` | The CallControllerListener object that will be notified of new incoming calls.
    `abstract Unit` | `removeCallControllerListener(CallControllerListener callControllerListener)` | Remove listener for incoming call events.
    `abstract Call` | `callUser(String userId, MediaConstraints mediaConstraints)` | Makes a call to the user with the given id.
    `abstract Call` | `callUser(String userId, MediaConstraints mediaConstraints, Map<String, String> callHeaders)` | Makes a call to the user with the given id.
    `abstract Call` | `callPhoneNumber(String phoneNumber, String cli)` | Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).
    `abstract Call` | `callPhoneNumber(String phoneNumber, String cli, Map<String, String> callHeaders)` | Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).
    `abstract Call` | `callSip(String sipUri)` | Makes a SIP call to the user with the given sip uri.
    `abstract Call` | `callSip(String sipUri, Map<String, String> callHeaders)` | Makes a SIP call to the user with the given sip uri.
    `abstract Call` | `callSip(String sipUri, String cli)` | Makes a SIP call to the user with the given sip uri.
    `abstract Call` | `callSip(String sipUri, String cli, Map<String, String> callHeaders)` | Makes a SIP call to the user with the given sip uri.
    `abstract Call` | `callConference(String conferenceId)` | Calls the conference with the given id.
    `abstract Call` | `callConference(String conferenceId, String cli)` | Calls the conference with the given id.
    `abstract Call` | `callConference(String conferenceId, Map<String, String> callHeaders)` | Calls the conference with the given id.
    `abstract Call` | `callConference(String conferenceId, String cli, Map<String, String> callHeaders)` | Calls the conference with the given id.
    `abstract Unit` | `setRespectNativeCalls(Boolean respectNativeCalls)` | Set whether or not the client should respect native calls.
    `abstract Call` | `getCall(String callId)` | Returns the Call object with the identifier callId.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

  - ### Method Detail

    - #### addCallControllerListener

           abstract Unit addCallControllerListener(CallControllerListener callControllerListener)

      The CallControllerListener object that will be notified of new incoming calls.

      Parameters:
        `callControllerListener` - a CallControllerListener.

    - #### removeCallControllerListener

           abstract Unit removeCallControllerListener(CallControllerListener callControllerListener)

      Remove listener for incoming call events.

      Parameters:
        `callControllerListener` - a CallControllerListener.

    - #### callUser

           abstract Call callUser(String userId, MediaConstraints mediaConstraints)

      Makes a call to the user with the given id.

      Parameters:
        `userId` - The app specific id of the user to call.
        `mediaConstraints` - Media constraints for given user call.

    - #### callUser

           abstract Call callUser(String userId, MediaConstraints mediaConstraints, Map<String, String> callHeaders)

      Makes a call to the user with the given id.

      Parameters:
        `userId` - The app specific id of the user to call.
        `mediaConstraints` - Media constraints for given user call.
        `callHeaders` - Headers to pass with the call.

    - #### callPhoneNumber

           abstract Call callPhoneNumber(String phoneNumber, String cli)

      Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).

      Parameters:
        `phoneNumber` - The phone number to call.
        `cli` - Identifier of the caller.

    - #### callPhoneNumber

           abstract Call callPhoneNumber(String phoneNumber, String cli, Map<String, String> callHeaders)

      Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).

      Parameters:
        `phoneNumber` - The phone number to call.
        `cli` - Identifier of the caller.
        `callHeaders` - Headers to pass with the call.

    - #### callSip

           abstract Call callSip(String sipUri)

      Makes a SIP call to the user with the given sip uri. The identity should be in the form "user@server".

      Parameters:
        `sipUri` - SIP URI to dial in to.

    - #### callSip

           abstract Call callSip(String sipUri, Map<String, String> callHeaders)

      Makes a SIP call to the user with the given sip uri. The identity should be in the form "user@server".

      Parameters:
        `sipUri` - SIP URI to dial in to.
        `callHeaders` - Headers to pass with the call.

    - #### callSip

           abstract Call callSip(String sipUri, String cli)

      Makes a SIP call to the user with the given sip uri. The identity should be in the form "user@server".

      Parameters:
        `sipUri` - SIP URI to dial in to.
        `cli` - Identifier of the caller.

    - #### callSip

           abstract Call callSip(String sipUri, String cli, Map<String, String> callHeaders)

      Makes a SIP call to the user with the given sip uri. The identity should be in the form "user@server".

      Parameters:
        `sipUri` - SIP URI to dial in to.
        `cli` - Identifier of the caller.
        `callHeaders` - Headers to pass with the call.

    - #### callConference

           abstract Call callConference(String conferenceId)

      Calls the conference with the given id.

      Parameters:
        `conferenceId` - Conference ID to dial in to.

    - #### callConference

           abstract Call callConference(String conferenceId, String cli)

      Calls the conference with the given id.

      Parameters:
        `conferenceId` - Conference ID to dial in to.
        `cli` - Identifier of the caller.

    - #### callConference

           abstract Call callConference(String conferenceId, Map<String, String> callHeaders)

      Calls the conference with the given id.

      Parameters:
        `conferenceId` - Conference ID to dial in to.
        `callHeaders` - Headers to pass with the call.

    - #### callConference

           abstract Call callConference(String conferenceId, String cli, Map<String, String> callHeaders)

      Calls the conference with the given id.

      Parameters:
        `conferenceId` - Conference ID to dial in to.
        `cli` - Identifier of the caller.
        `callHeaders` - Headers to pass with the call.

    - #### setRespectNativeCalls

           abstract Unit setRespectNativeCalls(Boolean respectNativeCalls)

      Set whether or not the client should respect native calls. If this is set to true, answering native calls will hangup any ongoing Sinch calls. Also, if in a native calls, incoming Sinch calls will be denied automatically. If set to true, the app requires permissions android.permission.READ_PHONE_STATE. Defaults to true.

      Parameters:
        `respectNativeCalls` - whether or not the client should respect native calls.

    - #### getCall

           abstract Call getCall(String callId)

      Returns the Call object with the identifier callId.

      Parameters:
        `callId` - The call identifier string.