Class Call

    • Method Detail

      • creator

        public static CallCreator creator​(String pathAccountSid,
                                          Endpoint to,
                                          Endpoint from,
                                          URI url)
        Create a CallCreator to execute create.
        Parameters:
        pathAccountSid - The SID of the Account that will create the resource
        to - Phone number, SIP address, or client identifier to call
        from - Twilio number from which to originate the call
        url - The absolute URL that returns TwiML for this call
        Returns:
        CallCreator capable of executing the create
      • creator

        public static CallCreator creator​(Endpoint to,
                                          Endpoint from,
                                          URI url)
        Create a CallCreator to execute create.
        Parameters:
        to - Phone number, SIP address, or client identifier to call
        from - Twilio number from which to originate the call
        url - The absolute URL that returns TwiML for this call
        Returns:
        CallCreator capable of executing the create
      • creator

        public static CallCreator creator​(String pathAccountSid,
                                          Endpoint to,
                                          Endpoint from,
                                          String applicationSid)
        Create a CallCreator to execute create.
        Parameters:
        pathAccountSid - The SID of the Account that will create the resource
        to - Phone number, SIP address, or client identifier to call
        from - Twilio number from which to originate the call
        applicationSid - The SID of the Application resource that will handle the call
        Returns:
        CallCreator capable of executing the create
      • creator

        public static CallCreator creator​(Endpoint to,
                                          Endpoint from,
                                          String applicationSid)
        Create a CallCreator to execute create.
        Parameters:
        to - Phone number, SIP address, or client identifier to call
        from - Twilio number from which to originate the call
        applicationSid - The SID of the Application resource that will handle the call
        Returns:
        CallCreator capable of executing the create
      • deleter

        public static CallDeleter deleter​(String pathAccountSid,
                                          String pathSid)
        Create a CallDeleter to execute delete.
        Parameters:
        pathAccountSid - The SID of the Account that created the resource(s) to delete
        pathSid - The unique string that identifies this resource
        Returns:
        CallDeleter capable of executing the delete
      • deleter

        public static CallDeleter deleter​(String pathSid)
        Create a CallDeleter to execute delete.
        Parameters:
        pathSid - The unique string that identifies this resource
        Returns:
        CallDeleter capable of executing the delete
      • fetcher

        public static CallFetcher fetcher​(String pathAccountSid,
                                          String pathSid)
        Create a CallFetcher to execute fetch.
        Parameters:
        pathAccountSid - The SID of the Account that created the resource(s) to fetch
        pathSid - The unique string that identifies this resource
        Returns:
        CallFetcher capable of executing the fetch
      • fetcher

        public static CallFetcher fetcher​(String pathSid)
        Create a CallFetcher to execute fetch.
        Parameters:
        pathSid - The unique string that identifies this resource
        Returns:
        CallFetcher capable of executing the fetch
      • reader

        public static CallReader reader​(String pathAccountSid)
        Create a CallReader to execute read.
        Parameters:
        pathAccountSid - The SID of the Account that created the resource(s) to read
        Returns:
        CallReader capable of executing the read
      • reader

        public static CallReader reader()
        Create a CallReader to execute read.
        Returns:
        CallReader capable of executing the read
      • updater

        public static CallUpdater updater​(String pathAccountSid,
                                          String pathSid)
        Create a CallUpdater to execute update.
        Parameters:
        pathAccountSid - The SID of the Account that created the resource(s) to update
        pathSid - The unique string that identifies this resource
        Returns:
        CallUpdater capable of executing the update
      • updater

        public static CallUpdater updater​(String pathSid)
        Create a CallUpdater to execute update.
        Parameters:
        pathSid - The unique string that identifies this resource
        Returns:
        CallUpdater capable of executing the update
      • fromJson

        public static Call fromJson​(String json,
                                    com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON String into a Call object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON String
        objectMapper - Jackson ObjectMapper
        Returns:
        Call object represented by the provided JSON
      • fromJson

        public static Call fromJson​(InputStream json,
                                    com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON InputStream into a Call object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON InputStream
        objectMapper - Jackson ObjectMapper
        Returns:
        Call object represented by the provided JSON
      • getAccountSid

        public final String getAccountSid()
        Returns The The SID of the Account that created this resource.
        Returns:
        The SID of the Account that created this resource
      • getAnnotation

        public final String getAnnotation()
        Returns The The annotation provided for the call.
        Returns:
        The annotation provided for the call
      • getAnsweredBy

        public final String getAnsweredBy()
        Returns The Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise..
        Returns:
        Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.
      • getApiVersion

        public final String getApiVersion()
        Returns The The API Version used to create the call.
        Returns:
        The API Version used to create the call
      • getCallerName

        public final String getCallerName()
        Returns The The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty..
        Returns:
        The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
      • getDateCreated

        public final org.joda.time.DateTime getDateCreated()
        Returns The The RFC 2822 date and time in GMT that this resource was created.
        Returns:
        The RFC 2822 date and time in GMT that this resource was created
      • getDateUpdated

        public final org.joda.time.DateTime getDateUpdated()
        Returns The The RFC 2822 date and time in GMT that this resource was last updated.
        Returns:
        The RFC 2822 date and time in GMT that this resource was last updated
      • getDirection

        public final String getDirection()
        Returns The A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb..
        Returns:
        A string describing the direction of the call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
      • getDuration

        public final String getDuration()
        Returns The The length of the call in seconds..
        Returns:
        The length of the call in seconds.
      • getEndTime

        public final org.joda.time.DateTime getEndTime()
        Returns The The end time of the call. Null if the call did not complete successfully..
        Returns:
        The end time of the call. Null if the call did not complete successfully.
      • getForwardedFrom

        public final String getForwardedFrom()
        Returns The The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty..
        Returns:
        The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
      • getFrom

        public final String getFrom()
        Returns The The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`. Client identifiers are formatted `client:name`..
        Returns:
        The phone number, SIP address or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`. Client identifiers are formatted `client:name`.
      • getFromFormatted

        public final String getFromFormatted()
        Returns The The calling phone number, SIP address, or Client identifier formatted for display..
        Returns:
        The calling phone number, SIP address, or Client identifier formatted for display.
      • getGroupSid

        public final String getGroupSid()
        Returns The The Group SID associated with this call. If no Group is associated with the call, the field is empty..
        Returns:
        The Group SID associated with this call. If no Group is associated with the call, the field is empty.
      • getParentCallSid

        public final String getParentCallSid()
        Returns The The SID that identifies the call that created this leg..
        Returns:
        The SID that identifies the call that created this leg.
      • getPhoneNumberSid

        public final String getPhoneNumberSid()
        Returns The If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed..
        Returns:
        If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
      • getPrice

        public final BigDecimal getPrice()
        Returns The The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available..
        Returns:
        The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
      • getPriceUnit

        public final Currency getPriceUnit()
        Returns The The currency in which `Price` is measured..
        Returns:
        The currency in which `Price` is measured.
      • getSid

        public final String getSid()
        Returns The The unique string that identifies this resource.
        Returns:
        The unique string that identifies this resource
      • getStartTime

        public final org.joda.time.DateTime getStartTime()
        Returns The The start time of the call. Null if the call has not yet been dialed..
        Returns:
        The start time of the call. Null if the call has not yet been dialed.
      • getStatus

        public final Call.Status getStatus()
        Returns The The status of this call..
        Returns:
        The status of this call.
      • getSubresourceUris

        public final Map<String,​String> getSubresourceUris()
        Returns The A list of related subresources identified by their relative URIs.
        Returns:
        A list of related subresources identified by their relative URIs
      • getTo

        public final String getTo()
        Returns The The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`. Client identifiers are formatted `client:name`..
        Returns:
        The phone number, SIP address or Client identifier that received this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`. Client identifiers are formatted `client:name`.
      • getToFormatted

        public final String getToFormatted()
        Returns The The phone number, SIP address or Client identifier that received this call. Formatted for display..
        Returns:
        The phone number, SIP address or Client identifier that received this call. Formatted for display.
      • getUri

        public final String getUri()
        Returns The The URI of this resource, relative to `https://api.twilio.com`.
        Returns:
        The URI of this resource, relative to `https://api.twilio.com`
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object