public interface CallClient
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();
Modifier and Type | Method and Description |
---|---|
void |
addCallClientListener(CallClientListener callClientListener)
The
CallClientListener object will be notified of new incoming calls. |
Call |
callConference(java.lang.String conferenceId)
Calls the conference with the given id.
|
Call |
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.
|
Call |
callPhoneNumber(java.lang.String phoneNumber)
Calls a phone number and terminates the call to the PSTN-network (Publicly Switched
Telephone Network).
|
Call |
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).
|
Call |
callSip(java.lang.String sipIdentity)
Makes a SIP call to the user with the given identity.
|
Call |
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.
|
Call |
callUser(java.lang.String toUserId)
Makes a call to the user with the given id.
|
Call |
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.
|
Call |
callUserVideo(java.lang.String toUserId)
Makes a video call to the user with the given id.
|
Call |
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.
|
Call |
getCall(java.lang.String callId)
Returns the
Call object with the identifier callId . |
void |
removeCallClientListener(CallClientListener callClientListener)
Remove listener for incoming call events.
|
void |
setRespectNativeCalls(boolean respectNativeCalls)
Set whether or not the client should respect native calls.
|
void addCallClientListener(CallClientListener callClientListener)
CallClientListener
object will be notified of new incoming calls.callClientListener
- a CallClientListener
void removeCallClientListener(CallClientListener callClientListener)
callClientListener
- a CallClientListener
Call callUser(java.lang.String toUserId)
toUserId
- The app specific id of the user to call. May not be null or empty.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedMissingPermissionException
- If missing a permission required to place a callCall callUser(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers)
toUserId
- The app specific id of the user to call. May not be null or empty.headers
- Headers to pass with the call.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.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 callCall callUserVideo(java.lang.String toUserId)
toUserId
- The app specific id of the user to call. May not be null or empty.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedMissingPermissionException
- If missing a permission required to place a callCall callUserVideo(java.lang.String toUserId, java.util.Map<java.lang.String,java.lang.String> headers)
toUserId
- The app specific id of the user to call. May not be null or empty.headers
- Headers to pass with the call.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.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 callCall callPhoneNumber(java.lang.String phoneNumber)
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.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedMissingPermissionException
- If missing a permission required to place a callCall callPhoneNumber(java.lang.String phoneNumber, java.util.Map<java.lang.String,java.lang.String> headers)
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.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.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 callCall callConference(java.lang.String conferenceId)
conferenceId
- Conference ID to dial in to.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.lang.IllegalArgumentException
- if conferenceId exceeds 64 charactersMissingPermissionException
- If missing a permission required to place a callCall callConference(java.lang.String conferenceId, java.util.Map<java.lang.String,java.lang.String> headers)
conferenceId
- Conference ID to dial in to.headers
- Headers to pass with the call.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.lang.IllegalArgumentException
- if conferenceId exceeds 64 charactersjava.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 callCall callSip(java.lang.String sipIdentity)
sipIdentity
- SIP identity to dial in to.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.lang.IllegalArgumentException
- if sipIdentity exceeds 64 charactersMissingPermissionException
- If missing a permission required to place a callCall callSip(java.lang.String sipIdentity, java.util.Map<java.lang.String,java.lang.String> headers)
sipIdentity
- SIP identity to dial in to.headers
- Headers to pass with the call.Call
instance.java.lang.IllegalStateException
- if SinchClient
is not startedjava.lang.IllegalArgumentException
- if sipIdentity exceeds 64 charactersjava.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 callvoid setRespectNativeCalls(boolean respectNativeCalls)
respectNativeCalls
- whether or not the client should respect native calls.Copyright 2016, Sinch AB