public class Call
extends InternalCall
It is strongly recommended that Call instances are created and accessed from a single application thread. Accessing an instance from multiple threads may cause synchronization problems. Listeners are called on the thread that created the Call instance, unless the thread that created the Call instance does not have a Looper. In that case, the listener will be called on the application’s main thread.
Modifier and Type | Class and Description |
---|---|
static interface |
Call.Listener
Call.Listener interface defines a set of callbacks for events related to
call.
|
Modifier and Type | Method and Description |
---|---|
void |
disconnect()
Disconnects the Call.
|
String |
getFrom()
Returns the caller information when available.
|
String |
getSid()
Returns the call sid.
|
CallState |
getState()
Returns the current state of the call.
|
String |
getTo()
Returns the callee information when available.
|
void |
hold(boolean hold)
Holds or un-holds the audio.
|
boolean |
isMuted()
Reports whether the audio input is muted.
|
boolean |
isOnHold()
Reports whether the call is on hold.
|
void |
mute(boolean mute)
Mutes or unmutes the audio input.
|
void |
sendDigits(String digits)
Sends a string of DTMF digits.
|
public String getFrom()
public String getTo()
public String getSid()
CallState.RINGING
state.public CallState getState()
Call is in CallState.CONNECTING
state when it is made or accepted.
Call is in CallState.RINGING
state when it is ringing.
Call transitions to CallState.CONNECTED
state when connected to Twilio.
Call transitions to CallState.DISCONNECTED
state when disconnected.
public void mute(boolean mute)
public void sendDigits(String digits)
digits
- A string of digits to be sent. Valid values are "0" - "9", "*", "#", and "w". Each "w" will cause a 500 ms pause between digits sent.public void hold(boolean hold)
public boolean isMuted()
public boolean isOnHold()
public void disconnect()
3.0.0-preview2