public class Call extends Resource
Modifier and Type | Class and Description |
---|---|
static class |
Call.Event |
static class |
Call.Status |
static class |
Call.UpdateStatus |
Modifier and Type | Method and Description |
---|---|
static CallCreator |
creator(Endpoint to,
Endpoint from,
String applicationSid)
Create a CallCreator to execute create.
|
static CallCreator |
creator(Endpoint to,
Endpoint from,
Twiml twiml)
Create a CallCreator to execute create.
|
static CallCreator |
creator(Endpoint to,
Endpoint from,
URI url)
Create a CallCreator to execute create.
|
static CallCreator |
creator(String pathAccountSid,
Endpoint to,
Endpoint from,
String applicationSid)
Create a CallCreator to execute create.
|
static CallCreator |
creator(String pathAccountSid,
Endpoint to,
Endpoint from,
Twiml twiml)
Create a CallCreator to execute create.
|
static CallCreator |
creator(String pathAccountSid,
Endpoint to,
Endpoint from,
URI url)
Create a CallCreator to execute create.
|
static CallDeleter |
deleter(String pathSid)
Create a CallDeleter to execute delete.
|
static CallDeleter |
deleter(String pathAccountSid,
String pathSid)
Create a CallDeleter to execute delete.
|
boolean |
equals(Object o) |
static CallFetcher |
fetcher(String pathSid)
Create a CallFetcher to execute fetch.
|
static CallFetcher |
fetcher(String pathAccountSid,
String pathSid)
Create a CallFetcher to execute fetch.
|
static Call |
fromJson(InputStream json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Call object using the provided
ObjectMapper.
|
static Call |
fromJson(String json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Call object using the provided ObjectMapper.
|
String |
getAccountSid()
Returns The SID of the Account that created this resource.
|
String |
getAnnotation()
Returns The annotation provided for the call.
|
String |
getAnsweredBy()
Returns Either `human` or `machine` if this call was initiated with answering
machine detection.
|
String |
getApiVersion()
Returns The API Version used to create the call.
|
String |
getCallerName()
Returns The caller's name if this call was an incoming call to a phone number
with caller ID Lookup enabled.
|
ZonedDateTime |
getDateCreated()
Returns The RFC 2822 date and time in GMT that this resource was created.
|
ZonedDateTime |
getDateUpdated()
Returns The RFC 2822 date and time in GMT that this resource was last
updated.
|
String |
getDirection()
Returns A string describing the direction of the call.
|
String |
getDuration()
Returns The length of the call in seconds..
|
ZonedDateTime |
getEndTime()
Returns The end time of the call.
|
String |
getForwardedFrom()
Returns The forwarding phone number if this call was an incoming call
forwarded from another number (depends on carrier supporting forwarding).
|
String |
getFrom()
Returns The phone number, SIP address or Client identifier that made this
call.
|
String |
getFromFormatted()
Returns The calling phone number, SIP address, or Client identifier formatted
for display..
|
String |
getGroupSid()
Returns The Group SID associated with this call.
|
String |
getParentCallSid()
Returns The SID that identifies the call that created this leg..
|
String |
getPhoneNumberSid()
Returns If the call was inbound, this is the SID of the IncomingPhoneNumber
resource that received the call.
|
String |
getPrice()
Returns The charge for this call, in the currency associated with the
account.
|
Currency |
getPriceUnit()
Returns The currency in which `Price` is measured..
|
String |
getQueueTime()
Returns The wait time in milliseconds before the call is placed..
|
String |
getSid()
Returns The unique string that identifies this resource.
|
ZonedDateTime |
getStartTime()
Returns The start time of the call.
|
Call.Status |
getStatus()
Returns The status of this call..
|
Map<String,String> |
getSubresourceUris()
Returns A list of related subresources identified by their relative URIs.
|
String |
getTo()
Returns The phone number, SIP address or Client identifier that received this
call.
|
String |
getToFormatted()
Returns The phone number, SIP address or Client identifier that received this
call.
|
String |
getTrunkSid()
Returns The (optional) unique identifier of the trunk resource that was used
for this call..
|
String |
getUri()
Returns The URI of this resource, relative to `https://api.twilio.com`.
|
int |
hashCode() |
static CallReader |
reader()
Create a CallReader to execute read.
|
static CallReader |
reader(String pathAccountSid)
Create a CallReader to execute read.
|
static CallUpdater |
updater(String pathSid)
Create a CallUpdater to execute update.
|
static CallUpdater |
updater(String pathAccountSid,
String pathSid)
Create a CallUpdater to execute update.
|
public static CallCreator creator(String pathAccountSid, Endpoint to, Endpoint from, URI url)
pathAccountSid
- The SID of the Account that will create the resourceto
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callurl
- The absolute URL that returns TwiML for this callpublic static CallCreator creator(Endpoint to, Endpoint from, URI url)
to
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callurl
- The absolute URL that returns TwiML for this callpublic static CallCreator creator(String pathAccountSid, Endpoint to, Endpoint from, Twiml twiml)
pathAccountSid
- The SID of the Account that will create the resourceto
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the calltwiml
- TwiML instructions for the callpublic static CallCreator creator(Endpoint to, Endpoint from, Twiml twiml)
to
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the calltwiml
- TwiML instructions for the callpublic static CallCreator creator(String pathAccountSid, Endpoint to, Endpoint from, String applicationSid)
pathAccountSid
- The SID of the Account that will create the resourceto
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callapplicationSid
- The SID of the Application resource that will handle
the callpublic static CallCreator creator(Endpoint to, Endpoint from, String applicationSid)
to
- Phone number, SIP address, or client identifier to callfrom
- Twilio number from which to originate the callapplicationSid
- The SID of the Application resource that will handle
the callpublic static CallDeleter deleter(String pathAccountSid, String pathSid)
pathAccountSid
- The SID of the Account that created the resource(s) to
deletepathSid
- The unique string that identifies this resourcepublic static CallDeleter deleter(String pathSid)
pathSid
- The unique string that identifies this resourcepublic static CallFetcher fetcher(String pathAccountSid, String pathSid)
pathAccountSid
- The SID of the Account that created the resource(s) to
fetchpathSid
- The SID of the Call resource to fetchpublic static CallFetcher fetcher(String pathSid)
pathSid
- The SID of the Call resource to fetchpublic static CallReader reader(String pathAccountSid)
pathAccountSid
- The SID of the Account that created the resource(s) to
readpublic static CallReader reader()
public static CallUpdater updater(String pathAccountSid, String pathSid)
pathAccountSid
- The SID of the Account that created the resource(s) to
updatepathSid
- The unique string that identifies this resourcepublic static CallUpdater updater(String pathSid)
pathSid
- The unique string that identifies this resourcepublic static Call fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapperpublic static Call fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapperpublic final String getSid()
public final ZonedDateTime getDateCreated()
public final ZonedDateTime getDateUpdated()
public final String getParentCallSid()
public final String getAccountSid()
public final String getTo()
public final String getToFormatted()
public final String getFrom()
public final String getFromFormatted()
public final String getPhoneNumberSid()
public final Call.Status getStatus()
public final ZonedDateTime getStartTime()
public final ZonedDateTime getEndTime()
public final String getDuration()
public final String getPrice()
public final Currency getPriceUnit()
public final String getDirection()
public final String getAnsweredBy()
public final String getAnnotation()
public final String getApiVersion()
public final String getForwardedFrom()
public final String getGroupSid()
public final String getCallerName()
public final String getQueueTime()
public final String getTrunkSid()
public final String getUri()
public final Map<String,String> getSubresourceUris()
Copyright © 2019 Twilio, Inc. All Rights Reserved.