Package com.sinch.android.rtc.calling
Interface CallClient
- 
 public interface CallClientCallClient provides the entry point to the calling functionality of the Sinch SDK. A CallClient can be acquired via the SinchClient.sinchClient.start(); ... // Get the CallClient from the SinchClient CallClient callClient = sinchClient.getCallClient(); // Make outgoing call Call call = callClient.call(<remote user id>); // Add the call listener that handles call state changes call.addCallListener(...); ... // Hang up the call call.hangUp();
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCallClientListener(CallClientListener callClientListener)TheCallClientListenerobject will be notified of new incoming calls.CallcallConference(java.lang.String conferenceId)Calls the conference with the given id.CallcallConference(java.lang.String conferenceId, java.util.Map<java.lang.String,java.lang.String> headers)Calls the conference with the given id and the given headers.CallcallPhoneNumber(java.lang.String phoneNumber)Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).CallcallPhoneNumber(java.lang.String phoneNumber, java.util.Map<java.lang.String,java.lang.String> headers)Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).CallcallSip(java.lang.String sipIdentity)Makes a SIP call to the user with the given identity.CallcallSip(java.lang.String sipIdentity, java.util.Map<java.lang.String,java.lang.String> headers)Makes a SIP call to the user with the given identity and adding the given headers.CallcallUser(java.lang.String toUserId)Makes a call to the user with the given id.CallcallUser(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers)Makes a call to the user with the given id and adding the given headers.CallcallUserVideo(java.lang.String toUserId)Makes a video call to the user with the given id.CallcallUserVideo(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers)Makes a video call to the user with the given id and adding the given headers.CallgetCall(java.lang.String callId)Returns theCallobject with the identifiercallId.voidremoveCallClientListener(CallClientListener callClientListener)Remove listener for incoming call events.voidsetRespectNativeCalls(boolean respectNativeCalls)Set whether or not the client should respect native calls.
 
- 
- 
- 
Method Detail- 
addCallClientListenervoid addCallClientListener(CallClientListener callClientListener) TheCallClientListenerobject will be notified of new incoming calls.- Parameters:
- callClientListener- a- CallClientListener
 
 - 
removeCallClientListenervoid removeCallClientListener(CallClientListener callClientListener) Remove listener for incoming call events.- Parameters:
- callClientListener- a- CallClientListener
 
 - 
callUserCall callUser(java.lang.String toUserId) Makes a call to the user with the given id.- Parameters:
- toUserId- The app specific id of the user to call. May not be null or empty.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callUserCall callUser(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers) Makes a call to the user with the given id and adding the given headers.- Parameters:
- toUserId- The app specific id of the user to call. May not be null or empty.
- headers- Headers to pass with the call.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callUserVideoCall callUserVideo(java.lang.String toUserId) Makes a video call to the user with the given id.- Parameters:
- toUserId- The app specific id of the user to call. May not be null or empty.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callUserVideoCall callUserVideo(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers) Makes a video call to the user with the given id and adding the given headers.- Parameters:
- toUserId- The app specific id of the user to call. May not be null or empty.
- headers- Headers to pass with the call.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callPhoneNumberCall callPhoneNumber(java.lang.String phoneNumber) Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).- Parameters:
- phoneNumber- The phone number to call. The phone number should be given according to E.164 number formatting (http://en.wikipedia.org/wiki/E.164) and should be prefixed with a '+'. E.g. to call the US phone number 415 555 0101, it should be specified as "+14155550101", where the '+' is the required prefix and the US country code '1' added before the local subscriber number.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callPhoneNumberCall callPhoneNumber(java.lang.String phoneNumber, java.util.Map<java.lang.String,java.lang.String> headers) Calls a phone number and terminates the call to the PSTN-network (Publicly Switched Telephone Network).- Parameters:
- phoneNumber- The phone number to call. The phone number should be given according to E.164 number formatting (http://en.wikipedia.org/wiki/E.164) and should be prefixed with a '+'. E.g. to call the US phone number 415 555 0101, it should be specified as "+14155550101", where the '+' is the required prefix and the US country code '1' added before the local subscriber number.
- headers- Headers to pass with the call.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callConferenceCall callConference(java.lang.String conferenceId) Calls the conference with the given id.- Parameters:
- conferenceId- Conference ID to dial in to.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if conferenceId exceeds 64 characters
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callConferenceCall callConference(java.lang.String conferenceId, java.util.Map<java.lang.String,java.lang.String> headers) Calls the conference with the given id and the given headers.- Parameters:
- conferenceId- Conference ID to dial in to.
- headers- Headers to pass with the call.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if conferenceId exceeds 64 characters
- java.lang.IllegalArgumentException- if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callSipCall callSip(java.lang.String sipIdentity) Makes a SIP call to the user with the given identity. The identity should be in the form "user@server".- Parameters:
- sipIdentity- SIP identity to dial in to.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if sipIdentity exceeds 64 characters
- MissingPermissionException- If missing a permission required to place a call
 
 - 
callSipCall callSip(java.lang.String sipIdentity, java.util.Map<java.lang.String,java.lang.String> headers) Makes a SIP call to the user with the given identity and adding the given headers. The identity should be in the form "user@server".- Parameters:
- sipIdentity- SIP identity to dial in to.
- headers- Headers to pass with the call.
- Returns:
- A Callinstance.
- Throws:
- java.lang.IllegalStateException- if- SinchClientis not started
- java.lang.IllegalArgumentException- if sipIdentity exceeds 64 characters
- java.lang.IllegalArgumentException- if the size of all header strings exceeds 1024 bytes when encoded as UTF-8.
- MissingPermissionException- If missing a permission required to place a call
 
 - 
setRespectNativeCallsvoid 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.
 
 
- 
 
-