telnyx 5.74.0 → 5.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/call_deepfake_detection_error_webhook_event.rb +160 -0
- data/lib/telnyx/models/call_deepfake_detection_result_webhook_event.rb +176 -0
- data/lib/telnyx/models/call_dial_params.rb +48 -1
- data/lib/telnyx/models/calls/action_answer_params.rb +48 -1
- data/lib/telnyx/models/sim_card_list_params.rb +1 -1
- data/lib/telnyx/models/traffic_policy_profile_list_params.rb +2 -2
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/verify_profile.rb +9 -3
- data/lib/telnyx/models/verify_profile_create_params.rb +15 -5
- data/lib/telnyx/models/verify_profile_update_params.rb +15 -5
- data/lib/telnyx/models.rb +4 -0
- data/lib/telnyx/resources/calls/actions.rb +6 -1
- data/lib/telnyx/resources/calls.rb +6 -1
- data/lib/telnyx/resources/webhooks.rb +2 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +2 -0
- data/rbi/telnyx/models/call_deepfake_detection_error_webhook_event.rbi +380 -0
- data/rbi/telnyx/models/call_deepfake_detection_result_webhook_event.rbi +398 -0
- data/rbi/telnyx/models/call_dial_params.rbi +80 -0
- data/rbi/telnyx/models/calls/action_answer_params.rbi +87 -0
- data/rbi/telnyx/models/sim_card_list_params.rbi +1 -1
- data/rbi/telnyx/models/traffic_policy_profile_list_params.rbi +2 -2
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +2 -0
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/telnyx/models/verify_profile.rbi +18 -6
- data/rbi/telnyx/models/verify_profile_create_params.rbi +30 -10
- data/rbi/telnyx/models/verify_profile_update_params.rbi +30 -10
- data/rbi/telnyx/models.rbi +6 -0
- data/rbi/telnyx/resources/calls/actions.rbi +10 -0
- data/rbi/telnyx/resources/calls.rbi +9 -0
- data/rbi/telnyx/resources/webhooks.rbi +4 -0
- data/sig/telnyx/models/call_deepfake_detection_error_webhook_event.rbs +166 -0
- data/sig/telnyx/models/call_deepfake_detection_result_webhook_event.rbs +171 -0
- data/sig/telnyx/models/call_dial_params.rbs +36 -0
- data/sig/telnyx/models/calls/action_answer_params.rbs +36 -0
- data/sig/telnyx/models/sim_card_list_params.rbs +1 -1
- data/sig/telnyx/models/traffic_policy_profile_list_params.rbs +2 -2
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models.rbs +4 -0
- data/sig/telnyx/resources/calls/actions.rbs +1 -0
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/webhooks.rbs +4 -0
- metadata +8 -2
|
@@ -96,7 +96,9 @@ module Telnyx
|
|
|
96
96
|
# @!attribute whitelisted_destinations
|
|
97
97
|
# Enabled country destinations to send verification codes. The elements in the
|
|
98
98
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
99
|
-
# destinations will be allowed.
|
|
99
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
100
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
101
|
+
# destinations; otherwise it is optional.
|
|
100
102
|
#
|
|
101
103
|
# @return [Array<String>, nil]
|
|
102
104
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -136,7 +138,9 @@ module Telnyx
|
|
|
136
138
|
# @!attribute whitelisted_destinations
|
|
137
139
|
# Enabled country destinations to send verification codes. The elements in the
|
|
138
140
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
139
|
-
# destinations will be allowed.
|
|
141
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
142
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
143
|
+
# destinations; otherwise it is optional.
|
|
140
144
|
#
|
|
141
145
|
# @return [Array<String>, nil]
|
|
142
146
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -190,7 +194,9 @@ module Telnyx
|
|
|
190
194
|
# @!attribute whitelisted_destinations
|
|
191
195
|
# Enabled country destinations to send verification codes. The elements in the
|
|
192
196
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
193
|
-
# destinations will be allowed.
|
|
197
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
198
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
199
|
+
# destinations; otherwise it is optional.
|
|
194
200
|
#
|
|
195
201
|
# @return [Array<String>, nil]
|
|
196
202
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -251,7 +257,9 @@ module Telnyx
|
|
|
251
257
|
# @!attribute whitelisted_destinations
|
|
252
258
|
# Enabled country destinations to send verification codes. The elements in the
|
|
253
259
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
254
|
-
# destinations will be allowed.
|
|
260
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
261
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
262
|
+
# destinations; otherwise it is optional.
|
|
255
263
|
#
|
|
256
264
|
# @return [Array<String>, nil]
|
|
257
265
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -293,7 +301,9 @@ module Telnyx
|
|
|
293
301
|
# @!attribute whitelisted_destinations
|
|
294
302
|
# Enabled country destinations to send verification codes. The elements in the
|
|
295
303
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
296
|
-
# destinations will be allowed.
|
|
304
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
305
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
306
|
+
# destinations; otherwise it is optional.
|
|
297
307
|
#
|
|
298
308
|
# @return [Array<String>, nil]
|
|
299
309
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -102,7 +102,9 @@ module Telnyx
|
|
|
102
102
|
# @!attribute whitelisted_destinations
|
|
103
103
|
# Enabled country destinations to send verification codes. The elements in the
|
|
104
104
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
105
|
-
# destinations will be allowed.
|
|
105
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
106
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
107
|
+
# destinations; otherwise it is optional.
|
|
106
108
|
#
|
|
107
109
|
# @return [Array<String>, nil]
|
|
108
110
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -142,7 +144,9 @@ module Telnyx
|
|
|
142
144
|
# @!attribute whitelisted_destinations
|
|
143
145
|
# Enabled country destinations to send verification codes. The elements in the
|
|
144
146
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
145
|
-
# destinations will be allowed.
|
|
147
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
148
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
149
|
+
# destinations; otherwise it is optional.
|
|
146
150
|
#
|
|
147
151
|
# @return [Array<String>, nil]
|
|
148
152
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -196,7 +200,9 @@ module Telnyx
|
|
|
196
200
|
# @!attribute whitelisted_destinations
|
|
197
201
|
# Enabled country destinations to send verification codes. The elements in the
|
|
198
202
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
199
|
-
# destinations will be allowed.
|
|
203
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
204
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
205
|
+
# destinations; otherwise it is optional.
|
|
200
206
|
#
|
|
201
207
|
# @return [Array<String>, nil]
|
|
202
208
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -257,7 +263,9 @@ module Telnyx
|
|
|
257
263
|
# @!attribute whitelisted_destinations
|
|
258
264
|
# Enabled country destinations to send verification codes. The elements in the
|
|
259
265
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
260
|
-
# destinations will be allowed.
|
|
266
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
267
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
268
|
+
# destinations; otherwise it is optional.
|
|
261
269
|
#
|
|
262
270
|
# @return [Array<String>, nil]
|
|
263
271
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -299,7 +307,9 @@ module Telnyx
|
|
|
299
307
|
# @!attribute whitelisted_destinations
|
|
300
308
|
# Enabled country destinations to send verification codes. The elements in the
|
|
301
309
|
# list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
|
|
302
|
-
# destinations will be allowed.
|
|
310
|
+
# destinations will be allowed. **Conditionally required:** this field must be
|
|
311
|
+
# provided when your organization is configured to require explicit whitelisted
|
|
312
|
+
# destinations; otherwise it is optional.
|
|
303
313
|
#
|
|
304
314
|
# @return [Array<String>, nil]
|
|
305
315
|
optional :whitelisted_destinations, Telnyx::Internal::Type::ArrayOf[String]
|
data/lib/telnyx/models.rb
CHANGED
|
@@ -213,6 +213,10 @@ module Telnyx
|
|
|
213
213
|
|
|
214
214
|
CallCostWebhookEvent = Telnyx::Models::CallCostWebhookEvent
|
|
215
215
|
|
|
216
|
+
CallDeepfakeDetectionErrorWebhookEvent = Telnyx::Models::CallDeepfakeDetectionErrorWebhookEvent
|
|
217
|
+
|
|
218
|
+
CallDeepfakeDetectionResultWebhookEvent = Telnyx::Models::CallDeepfakeDetectionResultWebhookEvent
|
|
219
|
+
|
|
216
220
|
CallDialParams = Telnyx::Models::CallDialParams
|
|
217
221
|
|
|
218
222
|
CallDtmfReceived = Telnyx::Models::CallDtmfReceived
|
|
@@ -45,13 +45,16 @@ module Telnyx
|
|
|
45
45
|
# **Expected Webhooks:**
|
|
46
46
|
#
|
|
47
47
|
# - `call.answered`
|
|
48
|
+
# - `call.deepfake_detection.result` if `deepfake_detection` was enabled
|
|
49
|
+
# - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an
|
|
50
|
+
# error occurred
|
|
48
51
|
# - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
49
52
|
# was set
|
|
50
53
|
#
|
|
51
54
|
# When the `record` parameter is set to `record-from-answer`, the response will
|
|
52
55
|
# include a `recording_id` field.
|
|
53
56
|
#
|
|
54
|
-
# @overload answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
|
|
57
|
+
# @overload answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, deepfake_detection: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
|
|
55
58
|
#
|
|
56
59
|
# @param call_control_id [String] Unique identifier and token for controlling the call
|
|
57
60
|
#
|
|
@@ -65,6 +68,8 @@ module Telnyx
|
|
|
65
68
|
#
|
|
66
69
|
# @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE response.
|
|
67
70
|
#
|
|
71
|
+
# @param deepfake_detection [Telnyx::Models::Calls::ActionAnswerParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
|
|
72
|
+
#
|
|
68
73
|
# @param preferred_codecs [Symbol, Telnyx::Models::Calls::ActionAnswerParams::PreferredCodecs] The list of comma-separated codecs in a preferred order for the forked media to
|
|
69
74
|
#
|
|
70
75
|
# @param record [Symbol, Telnyx::Models::Calls::ActionAnswerParams::Record] Start recording automatically after an event. Disabled by default.
|
|
@@ -25,13 +25,16 @@ module Telnyx
|
|
|
25
25
|
# `answering_machine_detection=premium` was requested
|
|
26
26
|
# - `call.machine.premium.greeting.ended` if `answering_machine_detection=premium`
|
|
27
27
|
# was requested and a beep was detected
|
|
28
|
+
# - `call.deepfake_detection.result` if `deepfake_detection` was enabled
|
|
29
|
+
# - `call.deepfake_detection.error` if `deepfake_detection` was enabled and an
|
|
30
|
+
# error occurred
|
|
28
31
|
# - `streaming.started`, `streaming.stopped` or `streaming.failed` if `stream_url`
|
|
29
32
|
# was set
|
|
30
33
|
#
|
|
31
34
|
# When the `record` parameter is set to `record-from-answer`, the response will
|
|
32
35
|
# include a `recording_id` field.
|
|
33
36
|
#
|
|
34
|
-
# @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
|
|
37
|
+
# @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
|
|
35
38
|
#
|
|
36
39
|
# @param connection_id [String] The ID of the Call Control App (formerly ID of the connection) to be used when d
|
|
37
40
|
#
|
|
@@ -61,6 +64,8 @@ module Telnyx
|
|
|
61
64
|
#
|
|
62
65
|
# @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE.
|
|
63
66
|
#
|
|
67
|
+
# @param deepfake_detection [Telnyx::Models::CallDialParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
|
|
68
|
+
#
|
|
64
69
|
# @param dialogflow_config [Telnyx::Models::DialogflowConfig]
|
|
65
70
|
#
|
|
66
71
|
# @param enable_dialogflow [Boolean] Enables Dialogflow for the current call. The default value is false.
|
|
@@ -5,7 +5,7 @@ module Telnyx
|
|
|
5
5
|
class Webhooks
|
|
6
6
|
# @param payload [String] The raw webhook payload as a string
|
|
7
7
|
#
|
|
8
|
-
# @return [Telnyx::Models::CallAIGatherEndedWebhookEvent, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent, Telnyx::Models::CallAIGatherPartialResultsWebhookEvent, Telnyx::Models::CallAnsweredWebhookEvent, Telnyx::Models::CallBridgedWebhookEvent, Telnyx::Models::CallConversationEndedWebhookEvent, Telnyx::Models::CallConversationInsightsGeneratedWebhookEvent, Telnyx::Models::CallCostWebhookEvent, Telnyx::Models::CallDtmfReceivedWebhookEvent, Telnyx::Models::CallEnqueuedWebhookEvent, Telnyx::Models::CallForkStartedWebhookEvent, Telnyx::Models::CallForkStoppedWebhookEvent, Telnyx::Models::CallGatherEndedWebhookEvent, Telnyx::Models::CallHangupWebhookEvent, Telnyx::Models::CallInitiatedWebhookEvent, Telnyx::Models::CallLeftQueueWebhookEvent, Telnyx::Models::CallMachineDetectionEndedWebhookEvent, Telnyx::Models::CallMachineGreetingEndedWebhookEvent, Telnyx::Models::CallMachinePremiumDetectionEndedWebhookEvent, Telnyx::Models::CallMachinePremiumGreetingEndedWebhookEvent, Telnyx::Models::CallPlaybackEndedWebhookEvent, Telnyx::Models::CallPlaybackStartedWebhookEvent, Telnyx::Models::CallRecordingErrorWebhookEvent, Telnyx::Models::CallRecordingSavedWebhookEvent, Telnyx::Models::CallRecordingTranscriptionSavedWebhookEvent, Telnyx::Models::CallReferCompletedWebhookEvent, Telnyx::Models::CallReferFailedWebhookEvent, Telnyx::Models::CallReferStartedWebhookEvent, Telnyx::Models::CallSiprecFailedWebhookEvent, Telnyx::Models::CallSiprecStartedWebhookEvent, Telnyx::Models::CallSiprecStoppedWebhookEvent, Telnyx::Models::CallSpeakEndedWebhookEvent, Telnyx::Models::CallSpeakStartedWebhookEvent, Telnyx::Models::CallStreamingFailedWebhookEvent, Telnyx::Models::CallStreamingStartedWebhookEvent, Telnyx::Models::CallStreamingStoppedWebhookEvent, Telnyx::Models::CampaignStatusUpdate, Telnyx::Models::ConferenceCreatedWebhookEvent, Telnyx::Models::ConferenceEndedWebhookEvent, Telnyx::Models::ConferenceFloorChanged, Telnyx::Models::ConferenceParticipantJoinedWebhookEvent, Telnyx::Models::ConferenceParticipantLeftWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackEndedWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackStartedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakEndedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakStartedWebhookEvent, Telnyx::Models::ConferencePlaybackEndedWebhookEvent, Telnyx::Models::ConferencePlaybackStartedWebhookEvent, Telnyx::Models::ConferenceRecordingSavedWebhookEvent, Telnyx::Models::ConferenceSpeakEndedWebhookEvent, Telnyx::Models::ConferenceSpeakStartedWebhookEvent, Telnyx::Models::DeliveryUpdateWebhookEvent, Telnyx::Models::FaxDelivered, Telnyx::Models::FaxFailed, Telnyx::Models::FaxMediaProcessed, Telnyx::Models::FaxQueued, Telnyx::Models::FaxSendingStarted, Telnyx::Models::InboundMessageWebhookEvent, Telnyx::Models::NumberOrderStatusUpdate, Telnyx::Models::ReplacedLinkClickWebhookEvent, Telnyx::Models::TranscriptionWebhookEvent]
|
|
8
|
+
# @return [Telnyx::Models::CallAIGatherEndedWebhookEvent, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent, Telnyx::Models::CallAIGatherPartialResultsWebhookEvent, Telnyx::Models::CallAnsweredWebhookEvent, Telnyx::Models::CallBridgedWebhookEvent, Telnyx::Models::CallConversationEndedWebhookEvent, Telnyx::Models::CallConversationInsightsGeneratedWebhookEvent, Telnyx::Models::CallCostWebhookEvent, Telnyx::Models::CallDeepfakeDetectionErrorWebhookEvent, Telnyx::Models::CallDeepfakeDetectionResultWebhookEvent, Telnyx::Models::CallDtmfReceivedWebhookEvent, Telnyx::Models::CallEnqueuedWebhookEvent, Telnyx::Models::CallForkStartedWebhookEvent, Telnyx::Models::CallForkStoppedWebhookEvent, Telnyx::Models::CallGatherEndedWebhookEvent, Telnyx::Models::CallHangupWebhookEvent, Telnyx::Models::CallInitiatedWebhookEvent, Telnyx::Models::CallLeftQueueWebhookEvent, Telnyx::Models::CallMachineDetectionEndedWebhookEvent, Telnyx::Models::CallMachineGreetingEndedWebhookEvent, Telnyx::Models::CallMachinePremiumDetectionEndedWebhookEvent, Telnyx::Models::CallMachinePremiumGreetingEndedWebhookEvent, Telnyx::Models::CallPlaybackEndedWebhookEvent, Telnyx::Models::CallPlaybackStartedWebhookEvent, Telnyx::Models::CallRecordingErrorWebhookEvent, Telnyx::Models::CallRecordingSavedWebhookEvent, Telnyx::Models::CallRecordingTranscriptionSavedWebhookEvent, Telnyx::Models::CallReferCompletedWebhookEvent, Telnyx::Models::CallReferFailedWebhookEvent, Telnyx::Models::CallReferStartedWebhookEvent, Telnyx::Models::CallSiprecFailedWebhookEvent, Telnyx::Models::CallSiprecStartedWebhookEvent, Telnyx::Models::CallSiprecStoppedWebhookEvent, Telnyx::Models::CallSpeakEndedWebhookEvent, Telnyx::Models::CallSpeakStartedWebhookEvent, Telnyx::Models::CallStreamingFailedWebhookEvent, Telnyx::Models::CallStreamingStartedWebhookEvent, Telnyx::Models::CallStreamingStoppedWebhookEvent, Telnyx::Models::CampaignStatusUpdate, Telnyx::Models::ConferenceCreatedWebhookEvent, Telnyx::Models::ConferenceEndedWebhookEvent, Telnyx::Models::ConferenceFloorChanged, Telnyx::Models::ConferenceParticipantJoinedWebhookEvent, Telnyx::Models::ConferenceParticipantLeftWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackEndedWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackStartedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakEndedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakStartedWebhookEvent, Telnyx::Models::ConferencePlaybackEndedWebhookEvent, Telnyx::Models::ConferencePlaybackStartedWebhookEvent, Telnyx::Models::ConferenceRecordingSavedWebhookEvent, Telnyx::Models::ConferenceSpeakEndedWebhookEvent, Telnyx::Models::ConferenceSpeakStartedWebhookEvent, Telnyx::Models::DeliveryUpdateWebhookEvent, Telnyx::Models::FaxDelivered, Telnyx::Models::FaxFailed, Telnyx::Models::FaxMediaProcessed, Telnyx::Models::FaxQueued, Telnyx::Models::FaxSendingStarted, Telnyx::Models::InboundMessageWebhookEvent, Telnyx::Models::NumberOrderStatusUpdate, Telnyx::Models::ReplacedLinkClickWebhookEvent, Telnyx::Models::TranscriptionWebhookEvent]
|
|
9
9
|
def unsafe_unwrap(payload)
|
|
10
10
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
11
11
|
Telnyx::Internal::Type::Converter.coerce(Telnyx::Models::UnsafeUnwrapWebhookEvent, parsed)
|
|
@@ -17,7 +17,7 @@ module Telnyx
|
|
|
17
17
|
#
|
|
18
18
|
# @param key [String, nil] The webhook signing key
|
|
19
19
|
#
|
|
20
|
-
# @return [Telnyx::Models::CallAIGatherEndedWebhookEvent, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent, Telnyx::Models::CallAIGatherPartialResultsWebhookEvent, Telnyx::Models::CallAnsweredWebhookEvent, Telnyx::Models::CallBridgedWebhookEvent, Telnyx::Models::CallConversationEndedWebhookEvent, Telnyx::Models::CallConversationInsightsGeneratedWebhookEvent, Telnyx::Models::CallCostWebhookEvent, Telnyx::Models::CallDtmfReceivedWebhookEvent, Telnyx::Models::CallEnqueuedWebhookEvent, Telnyx::Models::CallForkStartedWebhookEvent, Telnyx::Models::CallForkStoppedWebhookEvent, Telnyx::Models::CallGatherEndedWebhookEvent, Telnyx::Models::CallHangupWebhookEvent, Telnyx::Models::CallInitiatedWebhookEvent, Telnyx::Models::CallLeftQueueWebhookEvent, Telnyx::Models::CallMachineDetectionEndedWebhookEvent, Telnyx::Models::CallMachineGreetingEndedWebhookEvent, Telnyx::Models::CallMachinePremiumDetectionEndedWebhookEvent, Telnyx::Models::CallMachinePremiumGreetingEndedWebhookEvent, Telnyx::Models::CallPlaybackEndedWebhookEvent, Telnyx::Models::CallPlaybackStartedWebhookEvent, Telnyx::Models::CallRecordingErrorWebhookEvent, Telnyx::Models::CallRecordingSavedWebhookEvent, Telnyx::Models::CallRecordingTranscriptionSavedWebhookEvent, Telnyx::Models::CallReferCompletedWebhookEvent, Telnyx::Models::CallReferFailedWebhookEvent, Telnyx::Models::CallReferStartedWebhookEvent, Telnyx::Models::CallSiprecFailedWebhookEvent, Telnyx::Models::CallSiprecStartedWebhookEvent, Telnyx::Models::CallSiprecStoppedWebhookEvent, Telnyx::Models::CallSpeakEndedWebhookEvent, Telnyx::Models::CallSpeakStartedWebhookEvent, Telnyx::Models::CallStreamingFailedWebhookEvent, Telnyx::Models::CallStreamingStartedWebhookEvent, Telnyx::Models::CallStreamingStoppedWebhookEvent, Telnyx::Models::CampaignStatusUpdate, Telnyx::Models::ConferenceCreatedWebhookEvent, Telnyx::Models::ConferenceEndedWebhookEvent, Telnyx::Models::ConferenceFloorChanged, Telnyx::Models::ConferenceParticipantJoinedWebhookEvent, Telnyx::Models::ConferenceParticipantLeftWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackEndedWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackStartedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakEndedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakStartedWebhookEvent, Telnyx::Models::ConferencePlaybackEndedWebhookEvent, Telnyx::Models::ConferencePlaybackStartedWebhookEvent, Telnyx::Models::ConferenceRecordingSavedWebhookEvent, Telnyx::Models::ConferenceSpeakEndedWebhookEvent, Telnyx::Models::ConferenceSpeakStartedWebhookEvent, Telnyx::Models::DeliveryUpdateWebhookEvent, Telnyx::Models::FaxDelivered, Telnyx::Models::FaxFailed, Telnyx::Models::FaxMediaProcessed, Telnyx::Models::FaxQueued, Telnyx::Models::FaxSendingStarted, Telnyx::Models::InboundMessageWebhookEvent, Telnyx::Models::NumberOrderStatusUpdate, Telnyx::Models::ReplacedLinkClickWebhookEvent, Telnyx::Models::TranscriptionWebhookEvent]
|
|
20
|
+
# @return [Telnyx::Models::CallAIGatherEndedWebhookEvent, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent, Telnyx::Models::CallAIGatherPartialResultsWebhookEvent, Telnyx::Models::CallAnsweredWebhookEvent, Telnyx::Models::CallBridgedWebhookEvent, Telnyx::Models::CallConversationEndedWebhookEvent, Telnyx::Models::CallConversationInsightsGeneratedWebhookEvent, Telnyx::Models::CallCostWebhookEvent, Telnyx::Models::CallDeepfakeDetectionErrorWebhookEvent, Telnyx::Models::CallDeepfakeDetectionResultWebhookEvent, Telnyx::Models::CallDtmfReceivedWebhookEvent, Telnyx::Models::CallEnqueuedWebhookEvent, Telnyx::Models::CallForkStartedWebhookEvent, Telnyx::Models::CallForkStoppedWebhookEvent, Telnyx::Models::CallGatherEndedWebhookEvent, Telnyx::Models::CallHangupWebhookEvent, Telnyx::Models::CallInitiatedWebhookEvent, Telnyx::Models::CallLeftQueueWebhookEvent, Telnyx::Models::CallMachineDetectionEndedWebhookEvent, Telnyx::Models::CallMachineGreetingEndedWebhookEvent, Telnyx::Models::CallMachinePremiumDetectionEndedWebhookEvent, Telnyx::Models::CallMachinePremiumGreetingEndedWebhookEvent, Telnyx::Models::CallPlaybackEndedWebhookEvent, Telnyx::Models::CallPlaybackStartedWebhookEvent, Telnyx::Models::CallRecordingErrorWebhookEvent, Telnyx::Models::CallRecordingSavedWebhookEvent, Telnyx::Models::CallRecordingTranscriptionSavedWebhookEvent, Telnyx::Models::CallReferCompletedWebhookEvent, Telnyx::Models::CallReferFailedWebhookEvent, Telnyx::Models::CallReferStartedWebhookEvent, Telnyx::Models::CallSiprecFailedWebhookEvent, Telnyx::Models::CallSiprecStartedWebhookEvent, Telnyx::Models::CallSiprecStoppedWebhookEvent, Telnyx::Models::CallSpeakEndedWebhookEvent, Telnyx::Models::CallSpeakStartedWebhookEvent, Telnyx::Models::CallStreamingFailedWebhookEvent, Telnyx::Models::CallStreamingStartedWebhookEvent, Telnyx::Models::CallStreamingStoppedWebhookEvent, Telnyx::Models::CampaignStatusUpdate, Telnyx::Models::ConferenceCreatedWebhookEvent, Telnyx::Models::ConferenceEndedWebhookEvent, Telnyx::Models::ConferenceFloorChanged, Telnyx::Models::ConferenceParticipantJoinedWebhookEvent, Telnyx::Models::ConferenceParticipantLeftWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackEndedWebhookEvent, Telnyx::Models::ConferenceParticipantPlaybackStartedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakEndedWebhookEvent, Telnyx::Models::ConferenceParticipantSpeakStartedWebhookEvent, Telnyx::Models::ConferencePlaybackEndedWebhookEvent, Telnyx::Models::ConferencePlaybackStartedWebhookEvent, Telnyx::Models::ConferenceRecordingSavedWebhookEvent, Telnyx::Models::ConferenceSpeakEndedWebhookEvent, Telnyx::Models::ConferenceSpeakStartedWebhookEvent, Telnyx::Models::DeliveryUpdateWebhookEvent, Telnyx::Models::FaxDelivered, Telnyx::Models::FaxFailed, Telnyx::Models::FaxMediaProcessed, Telnyx::Models::FaxQueued, Telnyx::Models::FaxSendingStarted, Telnyx::Models::InboundMessageWebhookEvent, Telnyx::Models::NumberOrderStatusUpdate, Telnyx::Models::ReplacedLinkClickWebhookEvent, Telnyx::Models::TranscriptionWebhookEvent]
|
|
21
21
|
def unwrap(payload, headers:, key: @client.public_key)
|
|
22
22
|
if key.nil?
|
|
23
23
|
raise ArgumentError.new("Cannot verify a webhook without a key on either the client's public_key or passed in as an argument")
|
data/lib/telnyx/version.rb
CHANGED
data/lib/telnyx.rb
CHANGED
|
@@ -495,6 +495,8 @@ require_relative "telnyx/models/call_conversation_ended_webhook_event"
|
|
|
495
495
|
require_relative "telnyx/models/call_conversation_insights_generated"
|
|
496
496
|
require_relative "telnyx/models/call_conversation_insights_generated_webhook_event"
|
|
497
497
|
require_relative "telnyx/models/call_cost_webhook_event"
|
|
498
|
+
require_relative "telnyx/models/call_deepfake_detection_error_webhook_event"
|
|
499
|
+
require_relative "telnyx/models/call_deepfake_detection_result_webhook_event"
|
|
498
500
|
require_relative "telnyx/models/call_dial_params"
|
|
499
501
|
require_relative "telnyx/models/call_dial_response"
|
|
500
502
|
require_relative "telnyx/models/call_dtmf_received"
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class CallDeepfakeDetectionErrorWebhookEvent < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent,
|
|
10
|
+
Telnyx::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
returns(T.nilable(Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data))
|
|
16
|
+
end
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
data: Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::OrHash
|
|
22
|
+
).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :data
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
data: Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(data: nil)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{ data: Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data }
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class Data < Telnyx::Internal::Type::BaseModel
|
|
43
|
+
OrHash =
|
|
44
|
+
T.type_alias do
|
|
45
|
+
T.any(
|
|
46
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data,
|
|
47
|
+
Telnyx::Internal::AnyHash
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Identifies the type of resource.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :id
|
|
54
|
+
|
|
55
|
+
sig { params(id: String).void }
|
|
56
|
+
attr_writer :id
|
|
57
|
+
|
|
58
|
+
# The type of event being delivered.
|
|
59
|
+
sig do
|
|
60
|
+
returns(
|
|
61
|
+
T.nilable(
|
|
62
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::TaggedSymbol
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
attr_reader :event_type
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
event_type:
|
|
71
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::OrSymbol
|
|
72
|
+
).void
|
|
73
|
+
end
|
|
74
|
+
attr_writer :event_type
|
|
75
|
+
|
|
76
|
+
# ISO 8601 datetime of when the event occurred.
|
|
77
|
+
sig { returns(T.nilable(Time)) }
|
|
78
|
+
attr_reader :occurred_at
|
|
79
|
+
|
|
80
|
+
sig { params(occurred_at: Time).void }
|
|
81
|
+
attr_writer :occurred_at
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
returns(
|
|
85
|
+
T.nilable(
|
|
86
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
attr_reader :payload
|
|
91
|
+
|
|
92
|
+
sig do
|
|
93
|
+
params(
|
|
94
|
+
payload:
|
|
95
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::OrHash
|
|
96
|
+
).void
|
|
97
|
+
end
|
|
98
|
+
attr_writer :payload
|
|
99
|
+
|
|
100
|
+
# Identifies the type of the resource.
|
|
101
|
+
sig do
|
|
102
|
+
returns(
|
|
103
|
+
T.nilable(
|
|
104
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::TaggedSymbol
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
attr_reader :record_type
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
record_type:
|
|
113
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::OrSymbol
|
|
114
|
+
).void
|
|
115
|
+
end
|
|
116
|
+
attr_writer :record_type
|
|
117
|
+
|
|
118
|
+
sig do
|
|
119
|
+
params(
|
|
120
|
+
id: String,
|
|
121
|
+
event_type:
|
|
122
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::OrSymbol,
|
|
123
|
+
occurred_at: Time,
|
|
124
|
+
payload:
|
|
125
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::OrHash,
|
|
126
|
+
record_type:
|
|
127
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::OrSymbol
|
|
128
|
+
).returns(T.attached_class)
|
|
129
|
+
end
|
|
130
|
+
def self.new(
|
|
131
|
+
# Identifies the type of resource.
|
|
132
|
+
id: nil,
|
|
133
|
+
# The type of event being delivered.
|
|
134
|
+
event_type: nil,
|
|
135
|
+
# ISO 8601 datetime of when the event occurred.
|
|
136
|
+
occurred_at: nil,
|
|
137
|
+
payload: nil,
|
|
138
|
+
# Identifies the type of the resource.
|
|
139
|
+
record_type: nil
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
sig do
|
|
144
|
+
override.returns(
|
|
145
|
+
{
|
|
146
|
+
id: String,
|
|
147
|
+
event_type:
|
|
148
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::TaggedSymbol,
|
|
149
|
+
occurred_at: Time,
|
|
150
|
+
payload:
|
|
151
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload,
|
|
152
|
+
record_type:
|
|
153
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::TaggedSymbol
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# The type of event being delivered.
|
|
161
|
+
module EventType
|
|
162
|
+
extend Telnyx::Internal::Type::Enum
|
|
163
|
+
|
|
164
|
+
TaggedSymbol =
|
|
165
|
+
T.type_alias do
|
|
166
|
+
T.all(
|
|
167
|
+
Symbol,
|
|
168
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
172
|
+
|
|
173
|
+
CALL_DEEPFAKE_DETECTION_ERROR =
|
|
174
|
+
T.let(
|
|
175
|
+
:"call.deepfake_detection.error",
|
|
176
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::TaggedSymbol
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
sig do
|
|
180
|
+
override.returns(
|
|
181
|
+
T::Array[
|
|
182
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::EventType::TaggedSymbol
|
|
183
|
+
]
|
|
184
|
+
)
|
|
185
|
+
end
|
|
186
|
+
def self.values
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
class Payload < Telnyx::Internal::Type::BaseModel
|
|
191
|
+
OrHash =
|
|
192
|
+
T.type_alias do
|
|
193
|
+
T.any(
|
|
194
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload,
|
|
195
|
+
Telnyx::Internal::AnyHash
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Call ID used to issue commands via Call Control API.
|
|
200
|
+
sig { returns(T.nilable(String)) }
|
|
201
|
+
attr_reader :call_control_id
|
|
202
|
+
|
|
203
|
+
sig { params(call_control_id: String).void }
|
|
204
|
+
attr_writer :call_control_id
|
|
205
|
+
|
|
206
|
+
# ID that is unique to the call and can be used to correlate webhook events.
|
|
207
|
+
sig { returns(T.nilable(String)) }
|
|
208
|
+
attr_reader :call_leg_id
|
|
209
|
+
|
|
210
|
+
sig { params(call_leg_id: String).void }
|
|
211
|
+
attr_writer :call_leg_id
|
|
212
|
+
|
|
213
|
+
# ID that is unique to the call session and can be used to correlate webhook
|
|
214
|
+
# events. Call session is a group of related call legs that logically belong to
|
|
215
|
+
# the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
216
|
+
sig { returns(T.nilable(String)) }
|
|
217
|
+
attr_reader :call_session_id
|
|
218
|
+
|
|
219
|
+
sig { params(call_session_id: String).void }
|
|
220
|
+
attr_writer :call_session_id
|
|
221
|
+
|
|
222
|
+
# State received from a command.
|
|
223
|
+
sig { returns(T.nilable(String)) }
|
|
224
|
+
attr_accessor :client_state
|
|
225
|
+
|
|
226
|
+
# Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
227
|
+
sig { returns(T.nilable(String)) }
|
|
228
|
+
attr_reader :connection_id
|
|
229
|
+
|
|
230
|
+
sig { params(connection_id: String).void }
|
|
231
|
+
attr_writer :connection_id
|
|
232
|
+
|
|
233
|
+
# The error that occurred. 'detection_timeout' = no DFD response received,
|
|
234
|
+
# 'rtp_timeout' = no RTP audio received, 'dfd_connection_error'/'dfd_stream_error'
|
|
235
|
+
# = service connectivity issues.
|
|
236
|
+
sig do
|
|
237
|
+
returns(
|
|
238
|
+
T.nilable(
|
|
239
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
end
|
|
243
|
+
attr_reader :error_message
|
|
244
|
+
|
|
245
|
+
sig do
|
|
246
|
+
params(
|
|
247
|
+
error_message:
|
|
248
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::OrSymbol
|
|
249
|
+
).void
|
|
250
|
+
end
|
|
251
|
+
attr_writer :error_message
|
|
252
|
+
|
|
253
|
+
sig do
|
|
254
|
+
params(
|
|
255
|
+
call_control_id: String,
|
|
256
|
+
call_leg_id: String,
|
|
257
|
+
call_session_id: String,
|
|
258
|
+
client_state: T.nilable(String),
|
|
259
|
+
connection_id: String,
|
|
260
|
+
error_message:
|
|
261
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::OrSymbol
|
|
262
|
+
).returns(T.attached_class)
|
|
263
|
+
end
|
|
264
|
+
def self.new(
|
|
265
|
+
# Call ID used to issue commands via Call Control API.
|
|
266
|
+
call_control_id: nil,
|
|
267
|
+
# ID that is unique to the call and can be used to correlate webhook events.
|
|
268
|
+
call_leg_id: nil,
|
|
269
|
+
# ID that is unique to the call session and can be used to correlate webhook
|
|
270
|
+
# events. Call session is a group of related call legs that logically belong to
|
|
271
|
+
# the same phone call, e.g. an inbound and outbound leg of a transferred call.
|
|
272
|
+
call_session_id: nil,
|
|
273
|
+
# State received from a command.
|
|
274
|
+
client_state: nil,
|
|
275
|
+
# Call Control App ID (formerly Telnyx connection ID) used in the call.
|
|
276
|
+
connection_id: nil,
|
|
277
|
+
# The error that occurred. 'detection_timeout' = no DFD response received,
|
|
278
|
+
# 'rtp_timeout' = no RTP audio received, 'dfd_connection_error'/'dfd_stream_error'
|
|
279
|
+
# = service connectivity issues.
|
|
280
|
+
error_message: nil
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
sig do
|
|
285
|
+
override.returns(
|
|
286
|
+
{
|
|
287
|
+
call_control_id: String,
|
|
288
|
+
call_leg_id: String,
|
|
289
|
+
call_session_id: String,
|
|
290
|
+
client_state: T.nilable(String),
|
|
291
|
+
connection_id: String,
|
|
292
|
+
error_message:
|
|
293
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
end
|
|
297
|
+
def to_hash
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# The error that occurred. 'detection_timeout' = no DFD response received,
|
|
301
|
+
# 'rtp_timeout' = no RTP audio received, 'dfd_connection_error'/'dfd_stream_error'
|
|
302
|
+
# = service connectivity issues.
|
|
303
|
+
module ErrorMessage
|
|
304
|
+
extend Telnyx::Internal::Type::Enum
|
|
305
|
+
|
|
306
|
+
TaggedSymbol =
|
|
307
|
+
T.type_alias do
|
|
308
|
+
T.all(
|
|
309
|
+
Symbol,
|
|
310
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
314
|
+
|
|
315
|
+
DETECTION_TIMEOUT =
|
|
316
|
+
T.let(
|
|
317
|
+
:detection_timeout,
|
|
318
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
319
|
+
)
|
|
320
|
+
RTP_TIMEOUT =
|
|
321
|
+
T.let(
|
|
322
|
+
:rtp_timeout,
|
|
323
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
324
|
+
)
|
|
325
|
+
DFD_CONNECTION_ERROR =
|
|
326
|
+
T.let(
|
|
327
|
+
:dfd_connection_error,
|
|
328
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
329
|
+
)
|
|
330
|
+
DFD_STREAM_ERROR =
|
|
331
|
+
T.let(
|
|
332
|
+
:dfd_stream_error,
|
|
333
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
sig do
|
|
337
|
+
override.returns(
|
|
338
|
+
T::Array[
|
|
339
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::Payload::ErrorMessage::TaggedSymbol
|
|
340
|
+
]
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
def self.values
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Identifies the type of the resource.
|
|
349
|
+
module RecordType
|
|
350
|
+
extend Telnyx::Internal::Type::Enum
|
|
351
|
+
|
|
352
|
+
TaggedSymbol =
|
|
353
|
+
T.type_alias do
|
|
354
|
+
T.all(
|
|
355
|
+
Symbol,
|
|
356
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType
|
|
357
|
+
)
|
|
358
|
+
end
|
|
359
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
360
|
+
|
|
361
|
+
EVENT =
|
|
362
|
+
T.let(
|
|
363
|
+
:event,
|
|
364
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
sig do
|
|
368
|
+
override.returns(
|
|
369
|
+
T::Array[
|
|
370
|
+
Telnyx::CallDeepfakeDetectionErrorWebhookEvent::Data::RecordType::TaggedSymbol
|
|
371
|
+
]
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
def self.values
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
end
|
|
378
|
+
end
|
|
379
|
+
end
|
|
380
|
+
end
|