Class AnswerWebhook

java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.voice.AnswerWebhook
All Implemented Interfaces:
Jsonable

public class AnswerWebhook extends JsonableBaseObject
Maps the fields for data sent to the answer_url configured in your voice application. See the webhook reference for details.
Since:
8.2.0
  • Constructor Details

  • Method Details

    • getEndpointType

      The type of endpoint that answered the call.
      Returns:
      The endpoint type as an enum, or null if unknown.
      Since:
      8.12.0
    • getTo

      public String getTo()
      The user or number that answered the call. This is the virtual number linked to in your application.
      Returns:
      The answering user or number in E.164 format.
    • getFrom

      public String getFrom()
      The number or user that made the call. This could be a landline or mobile number or another virtual number if the call was made programmatically. It could also be a username if the call was made by a user.
      Returns:
      The calling user or number in E.164 format, or null if absent.
    • getConversationUuid

      Unique identifier for this conversation. Starts with CON- followed by a UUID.
      Returns:
      The conversation ID as a string.
    • getUuid

      public UUID getUuid()
      Unique identifier for this call.
      Returns:
      The call ID as a UUID.
    • getRegionUrl

      public URI getRegionUrl()
      Regional API endpoint which should be used to control the call with REST API; see the full list of regions.
      Returns:
      The configured region URL.
    • getCustomData

      public Map<String,?> getCustomData()
      A custom data map, optionally passed as parameter on the callServer method when a call is initiated from an application using the Client SDK.
      Returns:
      The custom data object as a Map, or null if absent / not applicable.
    • fromJson

      public static AnswerWebhook fromJson(String json)
      Constructs an instance, populating this class's fields from the JSON string.
      Parameters:
      json - The JSON payload as a string.
      Returns:
      A new instance of this class.