|
1 | 1 | #region |
| 2 | +using System; |
2 | 3 | using System.Collections.Generic; |
3 | 4 | using System.Linq; |
4 | 5 | using System.Text.Json; |
5 | 6 | using System.Text.Json.Serialization; |
6 | 7 | using Newtonsoft.Json; |
| 8 | +using Newtonsoft.Json.Converters; |
7 | 9 | using Newtonsoft.Json.Linq; |
8 | 10 | using Vonage.Voice.EventWebhooks; |
| 11 | +using Vonage.Voice.Nccos.Endpoints; |
9 | 12 | #endregion |
10 | 13 |
|
11 | 14 | namespace Vonage.Voice.AnswerWebhooks; |
@@ -40,6 +43,38 @@ public class Answer : EventBase |
40 | 43 | [JsonPropertyName("conversation_uuid")] |
41 | 44 | public string ConversationUuid { get; set; } |
42 | 45 |
|
| 46 | + /// <summary> |
| 47 | + /// The username that called to only if the call was made using the Client SDK. In this case, from will be absent (that |
| 48 | + /// is, from and from_user will never both be present together). |
| 49 | + /// </summary> |
| 50 | + [JsonProperty("from_user")] |
| 51 | + [JsonPropertyName("from_user")] |
| 52 | + public string FromUser { get; set; } |
| 53 | + |
| 54 | + /// <summary> |
| 55 | + /// The voice channel type that answered the call. Possible values are phone, sip, websocket, app, vbc. |
| 56 | + /// </summary> |
| 57 | + [JsonProperty("endpoint_type")] |
| 58 | + [JsonPropertyName("endpoint_type")] |
| 59 | + [Newtonsoft.Json.JsonConverter(typeof(StringEnumConverter))] |
| 60 | + [System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter<Endpoint.EndpointType>))] |
| 61 | + public Endpoint.EndpointType EndpointType { get; set; } |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// Regional API endpoint which should be used to control the call with REST API. |
| 65 | + /// </summary> |
| 66 | + [JsonProperty("region_url")] |
| 67 | + [JsonPropertyName("region_url")] |
| 68 | + public Uri RegionUrl { get; set; } |
| 69 | + |
| 70 | + /// <summary> |
| 71 | + /// A custom data object, optionally passed as parameter on the serverCall method when a call is initiated from an |
| 72 | + /// application using the Client SDK |
| 73 | + /// </summary> |
| 74 | + [JsonProperty("custom_data")] |
| 75 | + [JsonPropertyName("custom_data")] |
| 76 | + public Dictionary<string, string> CustomData { get; set; } |
| 77 | + |
43 | 78 | /// <summary> |
44 | 79 | /// Captures all additional unmapped properties from the JSON payload. |
45 | 80 | /// This is used internally to store extension data including SIP headers. |
|
0 commit comments