CallController

interface CallController

CallController provides the entry point to the calling functionality of the Sinch SDK.

See also

Functions

Link copied to clipboard
abstract fun addCallControllerListener(callControllerListener: CallControllerListener)

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

Link copied to clipboard
abstract fun callConference(conferenceId: String): Call
abstract fun callConference(conferenceId: String, cli: String?): Call
abstract fun callConference(conferenceId: String, callHeaders: Map<String, String>?): Call
abstract fun callConference(conferenceId: String, cli: String?, callHeaders: Map<String, String>?): Call

Calls the conference with the given id.

Link copied to clipboard
abstract fun callPhoneNumber(phoneNumber: String, cli: String?): Call
abstract fun callPhoneNumber(phoneNumber: String, cli: String?, callHeaders: Map<String, String>?): Call

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

Link copied to clipboard
abstract fun callSip(sipUri: String): Call
abstract fun callSip(sipUri: String, cli: String?): Call
abstract fun callSip(sipUri: String, callHeaders: Map<String, String>?): Call
abstract fun callSip(sipUri: String, cli: String?, callHeaders: Map<String, String>?): Call

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

Link copied to clipboard
abstract fun callUser(userId: String, mediaConstraints: MediaConstraints): Call
abstract fun callUser(userId: String, mediaConstraints: MediaConstraints, callHeaders: Map<String, String>?): Call

Makes a call to the user with the given id.

Link copied to clipboard
abstract fun getCall(callId: String): Call?

Returns the Call object with the given callId.

Link copied to clipboard
abstract fun removeCallControllerListener(callControllerListener: CallControllerListener)

Removes listener for incoming call events. If listener was not added before method is no-op.

Link copied to clipboard
abstract fun setRespectNativeCalls(respectNativeCalls: Boolean)

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.

abstract fun setRespectNativeCalls(onIncomingSinchCall: Boolean, duringSinchCall: Boolean)

Set whether or not the client should respect native (GSM) calls.

Link copied to clipboard
abstract fun setRespectVoIPCalls(onIncomingSinchCall: Boolean, duringSinchCall: Boolean = false)

Set whether or not the client should respect other VoIP calls (eg. WhatsAPP, Messenger).

Link copied to clipboard
abstract fun setWebRtcCallConfiguration(webRtcCallConfiguration: WebRtcCallConfiguration)

Sets the WebRTC configuration for every call created by this CallController. For this method to have effect, it must be called before initiating any outgoing call or relying the push payload.