telnyx 5.68.2 → 5.69.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 +35 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +7 -0
- data/lib/telnyx/internal/util.rb +18 -4
- data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
- data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
- data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
- data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
- data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
- data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
- data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
- data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
- data/lib/telnyx/models/verification.rb +1 -0
- data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
- data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
- data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
- data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
- data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
- data/lib/telnyx/models.rb +15 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
- data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
- data/lib/telnyx/resources/texml.rb +106 -0
- data/lib/telnyx/resources/verifications.rb +28 -0
- data/lib/telnyx/resources/verify_profiles.rb +5 -2
- data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +13 -0
- data/rbi/telnyx/client.rbi +6 -0
- data/rbi/telnyx/internal/util.rbi +8 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
- data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
- data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
- data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
- data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
- data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
- data/rbi/telnyx/models/verification.rbi +1 -0
- data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
- data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
- data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
- data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
- data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
- data/rbi/telnyx/models.rbi +19 -10
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
- data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
- data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
- data/rbi/telnyx/resources/texml.rbi +164 -0
- data/rbi/telnyx/resources/verifications.rbi +23 -0
- data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
- data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/internal/util.rbs +4 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
- data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
- data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
- data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
- data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
- data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
- data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
- data/sig/telnyx/models/verification.rbs +2 -1
- data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
- data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
- data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
- data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
- data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
- data/sig/telnyx/models.rbs +14 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
- data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
- data/sig/telnyx/resources/texml.rbs +44 -0
- data/sig/telnyx/resources/verifications.rbs +8 -0
- data/sig/telnyx/resources/verify_profiles.rbs +2 -0
- data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
- metadata +41 -2
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
class TexmlInitiateAICallParams < Telnyx::Internal::Type::BaseModel
|
|
6
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Telnyx::TexmlInitiateAICallParams, Telnyx::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :connection_id
|
|
16
|
+
|
|
17
|
+
# The ID of the AI assistant to use for the call.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :ai_assistant_id
|
|
20
|
+
|
|
21
|
+
# The phone number of the party initiating the call. Phone numbers are formatted
|
|
22
|
+
# with a `+` and country code.
|
|
23
|
+
sig { returns(String) }
|
|
24
|
+
attr_accessor :from
|
|
25
|
+
|
|
26
|
+
# The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
27
|
+
# country code.
|
|
28
|
+
sig { returns(String) }
|
|
29
|
+
attr_accessor :to
|
|
30
|
+
|
|
31
|
+
# Key-value map of dynamic variables to pass to the AI assistant.
|
|
32
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
33
|
+
attr_reader :ai_assistant_dynamic_variables
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(ai_assistant_dynamic_variables: T::Hash[Symbol, String]).void
|
|
37
|
+
end
|
|
38
|
+
attr_writer :ai_assistant_dynamic_variables
|
|
39
|
+
|
|
40
|
+
# The version of the AI assistant to use.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_reader :ai_assistant_version
|
|
43
|
+
|
|
44
|
+
sig { params(ai_assistant_version: String).void }
|
|
45
|
+
attr_writer :ai_assistant_version
|
|
46
|
+
|
|
47
|
+
# Select whether to perform answering machine detection in the background. By
|
|
48
|
+
# default execution is blocked until Answering Machine Detection is completed.
|
|
49
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
50
|
+
attr_reader :async_amd
|
|
51
|
+
|
|
52
|
+
sig { params(async_amd: T::Boolean).void }
|
|
53
|
+
attr_writer :async_amd
|
|
54
|
+
|
|
55
|
+
# URL destination for Telnyx to send AMD callback events to for the call.
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_reader :async_amd_status_callback
|
|
58
|
+
|
|
59
|
+
sig { params(async_amd_status_callback: String).void }
|
|
60
|
+
attr_writer :async_amd_status_callback
|
|
61
|
+
|
|
62
|
+
# HTTP request type used for `AsyncAmdStatusCallback`.
|
|
63
|
+
sig do
|
|
64
|
+
returns(
|
|
65
|
+
T.nilable(
|
|
66
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
attr_reader :async_amd_status_callback_method
|
|
71
|
+
|
|
72
|
+
sig do
|
|
73
|
+
params(
|
|
74
|
+
async_amd_status_callback_method:
|
|
75
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol
|
|
76
|
+
).void
|
|
77
|
+
end
|
|
78
|
+
attr_writer :async_amd_status_callback_method
|
|
79
|
+
|
|
80
|
+
# To be used as the caller id name (SIP From Display Name) presented to the
|
|
81
|
+
# destination (`To` number). The string should have a maximum of 128 characters,
|
|
82
|
+
# containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
83
|
+
# omitted, the display name will be the same as the number in the `From` field.
|
|
84
|
+
sig { returns(T.nilable(String)) }
|
|
85
|
+
attr_reader :caller_id
|
|
86
|
+
|
|
87
|
+
sig { params(caller_id: String).void }
|
|
88
|
+
attr_writer :caller_id
|
|
89
|
+
|
|
90
|
+
# URL destination for Telnyx to send conversation callback events to.
|
|
91
|
+
sig { returns(T.nilable(String)) }
|
|
92
|
+
attr_reader :conversation_callback
|
|
93
|
+
|
|
94
|
+
sig { params(conversation_callback: String).void }
|
|
95
|
+
attr_writer :conversation_callback
|
|
96
|
+
|
|
97
|
+
# HTTP request type used for `ConversationCallback`.
|
|
98
|
+
sig do
|
|
99
|
+
returns(
|
|
100
|
+
T.nilable(
|
|
101
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
attr_reader :conversation_callback_method
|
|
106
|
+
|
|
107
|
+
sig do
|
|
108
|
+
params(
|
|
109
|
+
conversation_callback_method:
|
|
110
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol
|
|
111
|
+
).void
|
|
112
|
+
end
|
|
113
|
+
attr_writer :conversation_callback_method
|
|
114
|
+
|
|
115
|
+
# An array of URL destinations for conversation callback events.
|
|
116
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
117
|
+
attr_reader :conversation_callbacks
|
|
118
|
+
|
|
119
|
+
sig { params(conversation_callbacks: T::Array[String]).void }
|
|
120
|
+
attr_writer :conversation_callbacks
|
|
121
|
+
|
|
122
|
+
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
123
|
+
# with 'name' and 'value' properties.
|
|
124
|
+
sig do
|
|
125
|
+
returns(
|
|
126
|
+
T.nilable(T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader])
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
attr_reader :custom_headers
|
|
130
|
+
|
|
131
|
+
sig do
|
|
132
|
+
params(
|
|
133
|
+
custom_headers:
|
|
134
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader::OrHash]
|
|
135
|
+
).void
|
|
136
|
+
end
|
|
137
|
+
attr_writer :custom_headers
|
|
138
|
+
|
|
139
|
+
# Allows you to choose between Premium and Standard detections.
|
|
140
|
+
sig do
|
|
141
|
+
returns(
|
|
142
|
+
T.nilable(Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol)
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
attr_reader :detection_mode
|
|
146
|
+
|
|
147
|
+
sig do
|
|
148
|
+
params(
|
|
149
|
+
detection_mode:
|
|
150
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol
|
|
151
|
+
).void
|
|
152
|
+
end
|
|
153
|
+
attr_writer :detection_mode
|
|
154
|
+
|
|
155
|
+
# Enables Answering Machine Detection.
|
|
156
|
+
sig do
|
|
157
|
+
returns(
|
|
158
|
+
T.nilable(
|
|
159
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol
|
|
160
|
+
)
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
attr_reader :machine_detection
|
|
164
|
+
|
|
165
|
+
sig do
|
|
166
|
+
params(
|
|
167
|
+
machine_detection:
|
|
168
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol
|
|
169
|
+
).void
|
|
170
|
+
end
|
|
171
|
+
attr_writer :machine_detection
|
|
172
|
+
|
|
173
|
+
# If initial silence duration is greater than this value, consider it a machine.
|
|
174
|
+
# Ignored when `premium` detection is used.
|
|
175
|
+
sig { returns(T.nilable(Integer)) }
|
|
176
|
+
attr_reader :machine_detection_silence_timeout
|
|
177
|
+
|
|
178
|
+
sig { params(machine_detection_silence_timeout: Integer).void }
|
|
179
|
+
attr_writer :machine_detection_silence_timeout
|
|
180
|
+
|
|
181
|
+
# Silence duration threshold after a greeting message or voice for it be
|
|
182
|
+
# considered human. Ignored when `premium` detection is used.
|
|
183
|
+
sig { returns(T.nilable(Integer)) }
|
|
184
|
+
attr_reader :machine_detection_speech_end_threshold
|
|
185
|
+
|
|
186
|
+
sig { params(machine_detection_speech_end_threshold: Integer).void }
|
|
187
|
+
attr_writer :machine_detection_speech_end_threshold
|
|
188
|
+
|
|
189
|
+
# Maximum threshold of a human greeting. If greeting longer than this value,
|
|
190
|
+
# considered machine. Ignored when `premium` detection is used.
|
|
191
|
+
sig { returns(T.nilable(Integer)) }
|
|
192
|
+
attr_reader :machine_detection_speech_threshold
|
|
193
|
+
|
|
194
|
+
sig { params(machine_detection_speech_threshold: Integer).void }
|
|
195
|
+
attr_writer :machine_detection_speech_threshold
|
|
196
|
+
|
|
197
|
+
# Maximum timeout threshold in milliseconds for overall detection.
|
|
198
|
+
sig { returns(T.nilable(Integer)) }
|
|
199
|
+
attr_reader :machine_detection_timeout
|
|
200
|
+
|
|
201
|
+
sig { params(machine_detection_timeout: Integer).void }
|
|
202
|
+
attr_writer :machine_detection_timeout
|
|
203
|
+
|
|
204
|
+
# A string of passport identifiers to associate with the call.
|
|
205
|
+
sig { returns(T.nilable(String)) }
|
|
206
|
+
attr_reader :passports
|
|
207
|
+
|
|
208
|
+
sig { params(passports: String).void }
|
|
209
|
+
attr_writer :passports
|
|
210
|
+
|
|
211
|
+
# The list of comma-separated codecs to be offered on a call.
|
|
212
|
+
sig { returns(T.nilable(String)) }
|
|
213
|
+
attr_reader :preferred_codecs
|
|
214
|
+
|
|
215
|
+
sig { params(preferred_codecs: String).void }
|
|
216
|
+
attr_writer :preferred_codecs
|
|
217
|
+
|
|
218
|
+
# Whether to record the entire participant's call leg. Defaults to `false`.
|
|
219
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
220
|
+
attr_reader :record
|
|
221
|
+
|
|
222
|
+
sig { params(record: T::Boolean).void }
|
|
223
|
+
attr_writer :record
|
|
224
|
+
|
|
225
|
+
# The number of channels in the final recording. Defaults to `mono`.
|
|
226
|
+
sig do
|
|
227
|
+
returns(
|
|
228
|
+
T.nilable(
|
|
229
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol
|
|
230
|
+
)
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
attr_reader :recording_channels
|
|
234
|
+
|
|
235
|
+
sig do
|
|
236
|
+
params(
|
|
237
|
+
recording_channels:
|
|
238
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol
|
|
239
|
+
).void
|
|
240
|
+
end
|
|
241
|
+
attr_writer :recording_channels
|
|
242
|
+
|
|
243
|
+
# The URL the recording callbacks will be sent to.
|
|
244
|
+
sig { returns(T.nilable(String)) }
|
|
245
|
+
attr_reader :recording_status_callback
|
|
246
|
+
|
|
247
|
+
sig { params(recording_status_callback: String).void }
|
|
248
|
+
attr_writer :recording_status_callback
|
|
249
|
+
|
|
250
|
+
# The changes to the recording's state that should generate a call to
|
|
251
|
+
# `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
252
|
+
# Separate multiple values with a space. Defaults to `completed`.
|
|
253
|
+
sig { returns(T.nilable(String)) }
|
|
254
|
+
attr_reader :recording_status_callback_event
|
|
255
|
+
|
|
256
|
+
sig { params(recording_status_callback_event: String).void }
|
|
257
|
+
attr_writer :recording_status_callback_event
|
|
258
|
+
|
|
259
|
+
# HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
260
|
+
sig do
|
|
261
|
+
returns(
|
|
262
|
+
T.nilable(
|
|
263
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
|
+
end
|
|
267
|
+
attr_reader :recording_status_callback_method
|
|
268
|
+
|
|
269
|
+
sig do
|
|
270
|
+
params(
|
|
271
|
+
recording_status_callback_method:
|
|
272
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol
|
|
273
|
+
).void
|
|
274
|
+
end
|
|
275
|
+
attr_writer :recording_status_callback_method
|
|
276
|
+
|
|
277
|
+
# The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
278
|
+
# silence is detected. The timer only starts when the speech is detected. The
|
|
279
|
+
# minimum value is 0. The default value is 0 (infinite).
|
|
280
|
+
sig { returns(T.nilable(Integer)) }
|
|
281
|
+
attr_reader :recording_timeout
|
|
282
|
+
|
|
283
|
+
sig { params(recording_timeout: Integer).void }
|
|
284
|
+
attr_writer :recording_timeout
|
|
285
|
+
|
|
286
|
+
# The audio track to record for the call. The default is `both`.
|
|
287
|
+
sig do
|
|
288
|
+
returns(
|
|
289
|
+
T.nilable(Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol)
|
|
290
|
+
)
|
|
291
|
+
end
|
|
292
|
+
attr_reader :recording_track
|
|
293
|
+
|
|
294
|
+
sig do
|
|
295
|
+
params(
|
|
296
|
+
recording_track:
|
|
297
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol
|
|
298
|
+
).void
|
|
299
|
+
end
|
|
300
|
+
attr_writer :recording_track
|
|
301
|
+
|
|
302
|
+
# Whether to send RecordingUrl in webhooks.
|
|
303
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
304
|
+
attr_reader :send_recording_url
|
|
305
|
+
|
|
306
|
+
sig { params(send_recording_url: T::Boolean).void }
|
|
307
|
+
attr_writer :send_recording_url
|
|
308
|
+
|
|
309
|
+
# The password to use for SIP authentication.
|
|
310
|
+
sig { returns(T.nilable(String)) }
|
|
311
|
+
attr_reader :sip_auth_password
|
|
312
|
+
|
|
313
|
+
sig { params(sip_auth_password: String).void }
|
|
314
|
+
attr_writer :sip_auth_password
|
|
315
|
+
|
|
316
|
+
# The username to use for SIP authentication.
|
|
317
|
+
sig { returns(T.nilable(String)) }
|
|
318
|
+
attr_reader :sip_auth_username
|
|
319
|
+
|
|
320
|
+
sig { params(sip_auth_username: String).void }
|
|
321
|
+
attr_writer :sip_auth_username
|
|
322
|
+
|
|
323
|
+
# Defines the SIP region to be used for the call.
|
|
324
|
+
sig do
|
|
325
|
+
returns(
|
|
326
|
+
T.nilable(Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol)
|
|
327
|
+
)
|
|
328
|
+
end
|
|
329
|
+
attr_reader :sip_region
|
|
330
|
+
|
|
331
|
+
sig do
|
|
332
|
+
params(
|
|
333
|
+
sip_region: Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol
|
|
334
|
+
).void
|
|
335
|
+
end
|
|
336
|
+
attr_writer :sip_region
|
|
337
|
+
|
|
338
|
+
# URL destination for Telnyx to send status callback events to for the call.
|
|
339
|
+
sig { returns(T.nilable(String)) }
|
|
340
|
+
attr_reader :status_callback
|
|
341
|
+
|
|
342
|
+
sig { params(status_callback: String).void }
|
|
343
|
+
attr_writer :status_callback
|
|
344
|
+
|
|
345
|
+
# The call events for which Telnyx should send a webhook. Multiple events can be
|
|
346
|
+
# defined when separated by a space. Valid values: initiated, ringing, answered,
|
|
347
|
+
# completed.
|
|
348
|
+
sig { returns(T.nilable(String)) }
|
|
349
|
+
attr_reader :status_callback_event
|
|
350
|
+
|
|
351
|
+
sig { params(status_callback_event: String).void }
|
|
352
|
+
attr_writer :status_callback_event
|
|
353
|
+
|
|
354
|
+
# HTTP request type used for `StatusCallback`.
|
|
355
|
+
sig do
|
|
356
|
+
returns(
|
|
357
|
+
T.nilable(
|
|
358
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol
|
|
359
|
+
)
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
attr_reader :status_callback_method
|
|
363
|
+
|
|
364
|
+
sig do
|
|
365
|
+
params(
|
|
366
|
+
status_callback_method:
|
|
367
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol
|
|
368
|
+
).void
|
|
369
|
+
end
|
|
370
|
+
attr_writer :status_callback_method
|
|
371
|
+
|
|
372
|
+
# An array of URL destinations for Telnyx to send status callback events to for
|
|
373
|
+
# the call.
|
|
374
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
375
|
+
attr_reader :status_callbacks
|
|
376
|
+
|
|
377
|
+
sig { params(status_callbacks: T::Array[String]).void }
|
|
378
|
+
attr_writer :status_callbacks
|
|
379
|
+
|
|
380
|
+
# The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
381
|
+
# maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
382
|
+
sig { returns(T.nilable(Integer)) }
|
|
383
|
+
attr_reader :time_limit
|
|
384
|
+
|
|
385
|
+
sig { params(time_limit: Integer).void }
|
|
386
|
+
attr_writer :time_limit
|
|
387
|
+
|
|
388
|
+
# The number of seconds to wait for the called party to answer the call before the
|
|
389
|
+
# call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
390
|
+
# is 30 seconds.
|
|
391
|
+
sig { returns(T.nilable(Integer)) }
|
|
392
|
+
attr_reader :timeout_seconds
|
|
393
|
+
|
|
394
|
+
sig { params(timeout_seconds: Integer).void }
|
|
395
|
+
attr_writer :timeout_seconds
|
|
396
|
+
|
|
397
|
+
# Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
398
|
+
# `trim-silence`.
|
|
399
|
+
sig do
|
|
400
|
+
returns(T.nilable(Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol))
|
|
401
|
+
end
|
|
402
|
+
attr_reader :trim
|
|
403
|
+
|
|
404
|
+
sig do
|
|
405
|
+
params(trim: Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol).void
|
|
406
|
+
end
|
|
407
|
+
attr_writer :trim
|
|
408
|
+
|
|
409
|
+
sig do
|
|
410
|
+
params(
|
|
411
|
+
connection_id: String,
|
|
412
|
+
ai_assistant_id: String,
|
|
413
|
+
from: String,
|
|
414
|
+
to: String,
|
|
415
|
+
ai_assistant_dynamic_variables: T::Hash[Symbol, String],
|
|
416
|
+
ai_assistant_version: String,
|
|
417
|
+
async_amd: T::Boolean,
|
|
418
|
+
async_amd_status_callback: String,
|
|
419
|
+
async_amd_status_callback_method:
|
|
420
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol,
|
|
421
|
+
caller_id: String,
|
|
422
|
+
conversation_callback: String,
|
|
423
|
+
conversation_callback_method:
|
|
424
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol,
|
|
425
|
+
conversation_callbacks: T::Array[String],
|
|
426
|
+
custom_headers:
|
|
427
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader::OrHash],
|
|
428
|
+
detection_mode:
|
|
429
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
430
|
+
machine_detection:
|
|
431
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
432
|
+
machine_detection_silence_timeout: Integer,
|
|
433
|
+
machine_detection_speech_end_threshold: Integer,
|
|
434
|
+
machine_detection_speech_threshold: Integer,
|
|
435
|
+
machine_detection_timeout: Integer,
|
|
436
|
+
passports: String,
|
|
437
|
+
preferred_codecs: String,
|
|
438
|
+
record: T::Boolean,
|
|
439
|
+
recording_channels:
|
|
440
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol,
|
|
441
|
+
recording_status_callback: String,
|
|
442
|
+
recording_status_callback_event: String,
|
|
443
|
+
recording_status_callback_method:
|
|
444
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol,
|
|
445
|
+
recording_timeout: Integer,
|
|
446
|
+
recording_track:
|
|
447
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol,
|
|
448
|
+
send_recording_url: T::Boolean,
|
|
449
|
+
sip_auth_password: String,
|
|
450
|
+
sip_auth_username: String,
|
|
451
|
+
sip_region: Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol,
|
|
452
|
+
status_callback: String,
|
|
453
|
+
status_callback_event: String,
|
|
454
|
+
status_callback_method:
|
|
455
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol,
|
|
456
|
+
status_callbacks: T::Array[String],
|
|
457
|
+
time_limit: Integer,
|
|
458
|
+
timeout_seconds: Integer,
|
|
459
|
+
trim: Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol,
|
|
460
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
461
|
+
).returns(T.attached_class)
|
|
462
|
+
end
|
|
463
|
+
def self.new(
|
|
464
|
+
connection_id:,
|
|
465
|
+
# The ID of the AI assistant to use for the call.
|
|
466
|
+
ai_assistant_id:,
|
|
467
|
+
# The phone number of the party initiating the call. Phone numbers are formatted
|
|
468
|
+
# with a `+` and country code.
|
|
469
|
+
from:,
|
|
470
|
+
# The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
471
|
+
# country code.
|
|
472
|
+
to:,
|
|
473
|
+
# Key-value map of dynamic variables to pass to the AI assistant.
|
|
474
|
+
ai_assistant_dynamic_variables: nil,
|
|
475
|
+
# The version of the AI assistant to use.
|
|
476
|
+
ai_assistant_version: nil,
|
|
477
|
+
# Select whether to perform answering machine detection in the background. By
|
|
478
|
+
# default execution is blocked until Answering Machine Detection is completed.
|
|
479
|
+
async_amd: nil,
|
|
480
|
+
# URL destination for Telnyx to send AMD callback events to for the call.
|
|
481
|
+
async_amd_status_callback: nil,
|
|
482
|
+
# HTTP request type used for `AsyncAmdStatusCallback`.
|
|
483
|
+
async_amd_status_callback_method: nil,
|
|
484
|
+
# To be used as the caller id name (SIP From Display Name) presented to the
|
|
485
|
+
# destination (`To` number). The string should have a maximum of 128 characters,
|
|
486
|
+
# containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
487
|
+
# omitted, the display name will be the same as the number in the `From` field.
|
|
488
|
+
caller_id: nil,
|
|
489
|
+
# URL destination for Telnyx to send conversation callback events to.
|
|
490
|
+
conversation_callback: nil,
|
|
491
|
+
# HTTP request type used for `ConversationCallback`.
|
|
492
|
+
conversation_callback_method: nil,
|
|
493
|
+
# An array of URL destinations for conversation callback events.
|
|
494
|
+
conversation_callbacks: nil,
|
|
495
|
+
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
496
|
+
# with 'name' and 'value' properties.
|
|
497
|
+
custom_headers: nil,
|
|
498
|
+
# Allows you to choose between Premium and Standard detections.
|
|
499
|
+
detection_mode: nil,
|
|
500
|
+
# Enables Answering Machine Detection.
|
|
501
|
+
machine_detection: nil,
|
|
502
|
+
# If initial silence duration is greater than this value, consider it a machine.
|
|
503
|
+
# Ignored when `premium` detection is used.
|
|
504
|
+
machine_detection_silence_timeout: nil,
|
|
505
|
+
# Silence duration threshold after a greeting message or voice for it be
|
|
506
|
+
# considered human. Ignored when `premium` detection is used.
|
|
507
|
+
machine_detection_speech_end_threshold: nil,
|
|
508
|
+
# Maximum threshold of a human greeting. If greeting longer than this value,
|
|
509
|
+
# considered machine. Ignored when `premium` detection is used.
|
|
510
|
+
machine_detection_speech_threshold: nil,
|
|
511
|
+
# Maximum timeout threshold in milliseconds for overall detection.
|
|
512
|
+
machine_detection_timeout: nil,
|
|
513
|
+
# A string of passport identifiers to associate with the call.
|
|
514
|
+
passports: nil,
|
|
515
|
+
# The list of comma-separated codecs to be offered on a call.
|
|
516
|
+
preferred_codecs: nil,
|
|
517
|
+
# Whether to record the entire participant's call leg. Defaults to `false`.
|
|
518
|
+
record: nil,
|
|
519
|
+
# The number of channels in the final recording. Defaults to `mono`.
|
|
520
|
+
recording_channels: nil,
|
|
521
|
+
# The URL the recording callbacks will be sent to.
|
|
522
|
+
recording_status_callback: nil,
|
|
523
|
+
# The changes to the recording's state that should generate a call to
|
|
524
|
+
# `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
525
|
+
# Separate multiple values with a space. Defaults to `completed`.
|
|
526
|
+
recording_status_callback_event: nil,
|
|
527
|
+
# HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
528
|
+
recording_status_callback_method: nil,
|
|
529
|
+
# The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
530
|
+
# silence is detected. The timer only starts when the speech is detected. The
|
|
531
|
+
# minimum value is 0. The default value is 0 (infinite).
|
|
532
|
+
recording_timeout: nil,
|
|
533
|
+
# The audio track to record for the call. The default is `both`.
|
|
534
|
+
recording_track: nil,
|
|
535
|
+
# Whether to send RecordingUrl in webhooks.
|
|
536
|
+
send_recording_url: nil,
|
|
537
|
+
# The password to use for SIP authentication.
|
|
538
|
+
sip_auth_password: nil,
|
|
539
|
+
# The username to use for SIP authentication.
|
|
540
|
+
sip_auth_username: nil,
|
|
541
|
+
# Defines the SIP region to be used for the call.
|
|
542
|
+
sip_region: nil,
|
|
543
|
+
# URL destination for Telnyx to send status callback events to for the call.
|
|
544
|
+
status_callback: nil,
|
|
545
|
+
# The call events for which Telnyx should send a webhook. Multiple events can be
|
|
546
|
+
# defined when separated by a space. Valid values: initiated, ringing, answered,
|
|
547
|
+
# completed.
|
|
548
|
+
status_callback_event: nil,
|
|
549
|
+
# HTTP request type used for `StatusCallback`.
|
|
550
|
+
status_callback_method: nil,
|
|
551
|
+
# An array of URL destinations for Telnyx to send status callback events to for
|
|
552
|
+
# the call.
|
|
553
|
+
status_callbacks: nil,
|
|
554
|
+
# The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
555
|
+
# maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
556
|
+
time_limit: nil,
|
|
557
|
+
# The number of seconds to wait for the called party to answer the call before the
|
|
558
|
+
# call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
559
|
+
# is 30 seconds.
|
|
560
|
+
timeout_seconds: nil,
|
|
561
|
+
# Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
562
|
+
# `trim-silence`.
|
|
563
|
+
trim: nil,
|
|
564
|
+
request_options: {}
|
|
565
|
+
)
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
sig do
|
|
569
|
+
override.returns(
|
|
570
|
+
{
|
|
571
|
+
connection_id: String,
|
|
572
|
+
ai_assistant_id: String,
|
|
573
|
+
from: String,
|
|
574
|
+
to: String,
|
|
575
|
+
ai_assistant_dynamic_variables: T::Hash[Symbol, String],
|
|
576
|
+
ai_assistant_version: String,
|
|
577
|
+
async_amd: T::Boolean,
|
|
578
|
+
async_amd_status_callback: String,
|
|
579
|
+
async_amd_status_callback_method:
|
|
580
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol,
|
|
581
|
+
caller_id: String,
|
|
582
|
+
conversation_callback: String,
|
|
583
|
+
conversation_callback_method:
|
|
584
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol,
|
|
585
|
+
conversation_callbacks: T::Array[String],
|
|
586
|
+
custom_headers:
|
|
587
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader],
|
|
588
|
+
detection_mode:
|
|
589
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
590
|
+
machine_detection:
|
|
591
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
592
|
+
machine_detection_silence_timeout: Integer,
|
|
593
|
+
machine_detection_speech_end_threshold: Integer,
|
|
594
|
+
machine_detection_speech_threshold: Integer,
|
|
595
|
+
machine_detection_timeout: Integer,
|
|
596
|
+
passports: String,
|
|
597
|
+
preferred_codecs: String,
|
|
598
|
+
record: T::Boolean,
|
|
599
|
+
recording_channels:
|
|
600
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol,
|
|
601
|
+
recording_status_callback: String,
|
|
602
|
+
recording_status_callback_event: String,
|
|
603
|
+
recording_status_callback_method:
|
|
604
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol,
|
|
605
|
+
recording_timeout: Integer,
|
|
606
|
+
recording_track:
|
|
607
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol,
|
|
608
|
+
send_recording_url: T::Boolean,
|
|
609
|
+
sip_auth_password: String,
|
|
610
|
+
sip_auth_username: String,
|
|
611
|
+
sip_region: Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol,
|
|
612
|
+
status_callback: String,
|
|
613
|
+
status_callback_event: String,
|
|
614
|
+
status_callback_method:
|
|
615
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol,
|
|
616
|
+
status_callbacks: T::Array[String],
|
|
617
|
+
time_limit: Integer,
|
|
618
|
+
timeout_seconds: Integer,
|
|
619
|
+
trim: Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol,
|
|
620
|
+
request_options: Telnyx::RequestOptions
|
|
621
|
+
}
|
|
622
|
+
)
|
|
623
|
+
end
|
|
624
|
+
def to_hash
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
# HTTP request type used for `AsyncAmdStatusCallback`.
|
|
628
|
+
module AsyncAmdStatusCallbackMethod
|
|
629
|
+
extend Telnyx::Internal::Type::Enum
|
|
630
|
+
|
|
631
|
+
TaggedSymbol =
|
|
632
|
+
T.type_alias do
|
|
633
|
+
T.all(
|
|
634
|
+
Symbol,
|
|
635
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod
|
|
636
|
+
)
|
|
637
|
+
end
|
|
638
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
639
|
+
|
|
640
|
+
GET =
|
|
641
|
+
T.let(
|
|
642
|
+
:GET,
|
|
643
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
|
|
644
|
+
)
|
|
645
|
+
POST =
|
|
646
|
+
T.let(
|
|
647
|
+
:POST,
|
|
648
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
|
|
649
|
+
)
|
|
650
|
+
|
|
651
|
+
sig do
|
|
652
|
+
override.returns(
|
|
653
|
+
T::Array[
|
|
654
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
|
|
655
|
+
]
|
|
656
|
+
)
|
|
657
|
+
end
|
|
658
|
+
def self.values
|
|
659
|
+
end
|
|
660
|
+
end
|
|
661
|
+
|
|
662
|
+
# HTTP request type used for `ConversationCallback`.
|
|
663
|
+
module ConversationCallbackMethod
|
|
664
|
+
extend Telnyx::Internal::Type::Enum
|
|
665
|
+
|
|
666
|
+
TaggedSymbol =
|
|
667
|
+
T.type_alias do
|
|
668
|
+
T.all(
|
|
669
|
+
Symbol,
|
|
670
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod
|
|
671
|
+
)
|
|
672
|
+
end
|
|
673
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
674
|
+
|
|
675
|
+
GET =
|
|
676
|
+
T.let(
|
|
677
|
+
:GET,
|
|
678
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::TaggedSymbol
|
|
679
|
+
)
|
|
680
|
+
POST =
|
|
681
|
+
T.let(
|
|
682
|
+
:POST,
|
|
683
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::TaggedSymbol
|
|
684
|
+
)
|
|
685
|
+
|
|
686
|
+
sig do
|
|
687
|
+
override.returns(
|
|
688
|
+
T::Array[
|
|
689
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::TaggedSymbol
|
|
690
|
+
]
|
|
691
|
+
)
|
|
692
|
+
end
|
|
693
|
+
def self.values
|
|
694
|
+
end
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
class CustomHeader < Telnyx::Internal::Type::BaseModel
|
|
698
|
+
OrHash =
|
|
699
|
+
T.type_alias do
|
|
700
|
+
T.any(
|
|
701
|
+
Telnyx::TexmlInitiateAICallParams::CustomHeader,
|
|
702
|
+
Telnyx::Internal::AnyHash
|
|
703
|
+
)
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
# The name of the custom header
|
|
707
|
+
sig { returns(String) }
|
|
708
|
+
attr_accessor :name
|
|
709
|
+
|
|
710
|
+
# The value of the custom header
|
|
711
|
+
sig { returns(String) }
|
|
712
|
+
attr_accessor :value
|
|
713
|
+
|
|
714
|
+
sig { params(name: String, value: String).returns(T.attached_class) }
|
|
715
|
+
def self.new(
|
|
716
|
+
# The name of the custom header
|
|
717
|
+
name:,
|
|
718
|
+
# The value of the custom header
|
|
719
|
+
value:
|
|
720
|
+
)
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
sig { override.returns({ name: String, value: String }) }
|
|
724
|
+
def to_hash
|
|
725
|
+
end
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
# Allows you to choose between Premium and Standard detections.
|
|
729
|
+
module DetectionMode
|
|
730
|
+
extend Telnyx::Internal::Type::Enum
|
|
731
|
+
|
|
732
|
+
TaggedSymbol =
|
|
733
|
+
T.type_alias do
|
|
734
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::DetectionMode)
|
|
735
|
+
end
|
|
736
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
737
|
+
|
|
738
|
+
PREMIUM =
|
|
739
|
+
T.let(
|
|
740
|
+
:Premium,
|
|
741
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::TaggedSymbol
|
|
742
|
+
)
|
|
743
|
+
REGULAR =
|
|
744
|
+
T.let(
|
|
745
|
+
:Regular,
|
|
746
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::TaggedSymbol
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
sig do
|
|
750
|
+
override.returns(
|
|
751
|
+
T::Array[
|
|
752
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::TaggedSymbol
|
|
753
|
+
]
|
|
754
|
+
)
|
|
755
|
+
end
|
|
756
|
+
def self.values
|
|
757
|
+
end
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
# Enables Answering Machine Detection.
|
|
761
|
+
module MachineDetection
|
|
762
|
+
extend Telnyx::Internal::Type::Enum
|
|
763
|
+
|
|
764
|
+
TaggedSymbol =
|
|
765
|
+
T.type_alias do
|
|
766
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::MachineDetection)
|
|
767
|
+
end
|
|
768
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
769
|
+
|
|
770
|
+
ENABLE =
|
|
771
|
+
T.let(
|
|
772
|
+
:Enable,
|
|
773
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::TaggedSymbol
|
|
774
|
+
)
|
|
775
|
+
DISABLE =
|
|
776
|
+
T.let(
|
|
777
|
+
:Disable,
|
|
778
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::TaggedSymbol
|
|
779
|
+
)
|
|
780
|
+
DETECT_MESSAGE_END =
|
|
781
|
+
T.let(
|
|
782
|
+
:DetectMessageEnd,
|
|
783
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::TaggedSymbol
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
sig do
|
|
787
|
+
override.returns(
|
|
788
|
+
T::Array[
|
|
789
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::TaggedSymbol
|
|
790
|
+
]
|
|
791
|
+
)
|
|
792
|
+
end
|
|
793
|
+
def self.values
|
|
794
|
+
end
|
|
795
|
+
end
|
|
796
|
+
|
|
797
|
+
# The number of channels in the final recording. Defaults to `mono`.
|
|
798
|
+
module RecordingChannels
|
|
799
|
+
extend Telnyx::Internal::Type::Enum
|
|
800
|
+
|
|
801
|
+
TaggedSymbol =
|
|
802
|
+
T.type_alias do
|
|
803
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::RecordingChannels)
|
|
804
|
+
end
|
|
805
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
806
|
+
|
|
807
|
+
MONO =
|
|
808
|
+
T.let(
|
|
809
|
+
:mono,
|
|
810
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::TaggedSymbol
|
|
811
|
+
)
|
|
812
|
+
DUAL =
|
|
813
|
+
T.let(
|
|
814
|
+
:dual,
|
|
815
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::TaggedSymbol
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
sig do
|
|
819
|
+
override.returns(
|
|
820
|
+
T::Array[
|
|
821
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::TaggedSymbol
|
|
822
|
+
]
|
|
823
|
+
)
|
|
824
|
+
end
|
|
825
|
+
def self.values
|
|
826
|
+
end
|
|
827
|
+
end
|
|
828
|
+
|
|
829
|
+
# HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
830
|
+
module RecordingStatusCallbackMethod
|
|
831
|
+
extend Telnyx::Internal::Type::Enum
|
|
832
|
+
|
|
833
|
+
TaggedSymbol =
|
|
834
|
+
T.type_alias do
|
|
835
|
+
T.all(
|
|
836
|
+
Symbol,
|
|
837
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod
|
|
838
|
+
)
|
|
839
|
+
end
|
|
840
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
841
|
+
|
|
842
|
+
GET =
|
|
843
|
+
T.let(
|
|
844
|
+
:GET,
|
|
845
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::TaggedSymbol
|
|
846
|
+
)
|
|
847
|
+
POST =
|
|
848
|
+
T.let(
|
|
849
|
+
:POST,
|
|
850
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::TaggedSymbol
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
sig do
|
|
854
|
+
override.returns(
|
|
855
|
+
T::Array[
|
|
856
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::TaggedSymbol
|
|
857
|
+
]
|
|
858
|
+
)
|
|
859
|
+
end
|
|
860
|
+
def self.values
|
|
861
|
+
end
|
|
862
|
+
end
|
|
863
|
+
|
|
864
|
+
# The audio track to record for the call. The default is `both`.
|
|
865
|
+
module RecordingTrack
|
|
866
|
+
extend Telnyx::Internal::Type::Enum
|
|
867
|
+
|
|
868
|
+
TaggedSymbol =
|
|
869
|
+
T.type_alias do
|
|
870
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::RecordingTrack)
|
|
871
|
+
end
|
|
872
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
873
|
+
|
|
874
|
+
INBOUND =
|
|
875
|
+
T.let(
|
|
876
|
+
:inbound,
|
|
877
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::TaggedSymbol
|
|
878
|
+
)
|
|
879
|
+
OUTBOUND =
|
|
880
|
+
T.let(
|
|
881
|
+
:outbound,
|
|
882
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::TaggedSymbol
|
|
883
|
+
)
|
|
884
|
+
BOTH =
|
|
885
|
+
T.let(
|
|
886
|
+
:both,
|
|
887
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::TaggedSymbol
|
|
888
|
+
)
|
|
889
|
+
|
|
890
|
+
sig do
|
|
891
|
+
override.returns(
|
|
892
|
+
T::Array[
|
|
893
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::TaggedSymbol
|
|
894
|
+
]
|
|
895
|
+
)
|
|
896
|
+
end
|
|
897
|
+
def self.values
|
|
898
|
+
end
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
# Defines the SIP region to be used for the call.
|
|
902
|
+
module SipRegion
|
|
903
|
+
extend Telnyx::Internal::Type::Enum
|
|
904
|
+
|
|
905
|
+
TaggedSymbol =
|
|
906
|
+
T.type_alias do
|
|
907
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::SipRegion)
|
|
908
|
+
end
|
|
909
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
910
|
+
|
|
911
|
+
US =
|
|
912
|
+
T.let(:US, Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol)
|
|
913
|
+
EUROPE =
|
|
914
|
+
T.let(
|
|
915
|
+
:Europe,
|
|
916
|
+
Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol
|
|
917
|
+
)
|
|
918
|
+
CANADA =
|
|
919
|
+
T.let(
|
|
920
|
+
:Canada,
|
|
921
|
+
Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol
|
|
922
|
+
)
|
|
923
|
+
AUSTRALIA =
|
|
924
|
+
T.let(
|
|
925
|
+
:Australia,
|
|
926
|
+
Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol
|
|
927
|
+
)
|
|
928
|
+
MIDDLE_EAST =
|
|
929
|
+
T.let(
|
|
930
|
+
:"Middle East",
|
|
931
|
+
Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol
|
|
932
|
+
)
|
|
933
|
+
|
|
934
|
+
sig do
|
|
935
|
+
override.returns(
|
|
936
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::SipRegion::TaggedSymbol]
|
|
937
|
+
)
|
|
938
|
+
end
|
|
939
|
+
def self.values
|
|
940
|
+
end
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
# HTTP request type used for `StatusCallback`.
|
|
944
|
+
module StatusCallbackMethod
|
|
945
|
+
extend Telnyx::Internal::Type::Enum
|
|
946
|
+
|
|
947
|
+
TaggedSymbol =
|
|
948
|
+
T.type_alias do
|
|
949
|
+
T.all(
|
|
950
|
+
Symbol,
|
|
951
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod
|
|
952
|
+
)
|
|
953
|
+
end
|
|
954
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
955
|
+
|
|
956
|
+
GET =
|
|
957
|
+
T.let(
|
|
958
|
+
:GET,
|
|
959
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::TaggedSymbol
|
|
960
|
+
)
|
|
961
|
+
POST =
|
|
962
|
+
T.let(
|
|
963
|
+
:POST,
|
|
964
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::TaggedSymbol
|
|
965
|
+
)
|
|
966
|
+
|
|
967
|
+
sig do
|
|
968
|
+
override.returns(
|
|
969
|
+
T::Array[
|
|
970
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::TaggedSymbol
|
|
971
|
+
]
|
|
972
|
+
)
|
|
973
|
+
end
|
|
974
|
+
def self.values
|
|
975
|
+
end
|
|
976
|
+
end
|
|
977
|
+
|
|
978
|
+
# Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
979
|
+
# `trim-silence`.
|
|
980
|
+
module Trim
|
|
981
|
+
extend Telnyx::Internal::Type::Enum
|
|
982
|
+
|
|
983
|
+
TaggedSymbol =
|
|
984
|
+
T.type_alias do
|
|
985
|
+
T.all(Symbol, Telnyx::TexmlInitiateAICallParams::Trim)
|
|
986
|
+
end
|
|
987
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
988
|
+
|
|
989
|
+
TRIM_SILENCE =
|
|
990
|
+
T.let(
|
|
991
|
+
:"trim-silence",
|
|
992
|
+
Telnyx::TexmlInitiateAICallParams::Trim::TaggedSymbol
|
|
993
|
+
)
|
|
994
|
+
DO_NOT_TRIM =
|
|
995
|
+
T.let(
|
|
996
|
+
:"do-not-trim",
|
|
997
|
+
Telnyx::TexmlInitiateAICallParams::Trim::TaggedSymbol
|
|
998
|
+
)
|
|
999
|
+
|
|
1000
|
+
sig do
|
|
1001
|
+
override.returns(
|
|
1002
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::Trim::TaggedSymbol]
|
|
1003
|
+
)
|
|
1004
|
+
end
|
|
1005
|
+
def self.values
|
|
1006
|
+
end
|
|
1007
|
+
end
|
|
1008
|
+
end
|
|
1009
|
+
end
|
|
1010
|
+
end
|