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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +7 -0
  5. data/lib/telnyx/internal/util.rb +18 -4
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
  7. data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
  10. data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
  11. data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
  12. data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
  13. data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
  14. data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
  15. data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
  16. data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
  17. data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
  18. data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
  19. data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
  20. data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
  21. data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
  22. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
  23. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
  24. data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
  25. data/lib/telnyx/models/verification.rb +1 -0
  26. data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
  27. data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
  28. data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
  29. data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
  30. data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
  31. data/lib/telnyx/models.rb +15 -0
  32. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
  33. data/lib/telnyx/resources/ai/assistants.rb +6 -2
  34. data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
  35. data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
  36. data/lib/telnyx/resources/texml.rb +106 -0
  37. data/lib/telnyx/resources/verifications.rb +28 -0
  38. data/lib/telnyx/resources/verify_profiles.rb +5 -2
  39. data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
  40. data/lib/telnyx/version.rb +1 -1
  41. data/lib/telnyx.rb +13 -0
  42. data/rbi/telnyx/client.rbi +6 -0
  43. data/rbi/telnyx/internal/util.rbi +8 -0
  44. data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
  45. data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
  46. data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
  47. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
  48. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
  49. data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
  50. data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
  51. data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
  52. data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
  53. data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
  54. data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
  55. data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
  56. data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
  57. data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
  58. data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
  59. data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
  60. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
  61. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
  62. data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
  63. data/rbi/telnyx/models/verification.rbi +1 -0
  64. data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
  65. data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
  66. data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
  67. data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
  68. data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
  69. data/rbi/telnyx/models.rbi +19 -10
  70. data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
  71. data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
  72. data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
  73. data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
  74. data/rbi/telnyx/resources/texml.rbi +164 -0
  75. data/rbi/telnyx/resources/verifications.rbi +23 -0
  76. data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
  77. data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
  78. data/sig/telnyx/client.rbs +2 -0
  79. data/sig/telnyx/internal/util.rbs +4 -0
  80. data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
  81. data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
  82. data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
  83. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
  84. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
  85. data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
  86. data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
  87. data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
  88. data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
  89. data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
  90. data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
  91. data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
  92. data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
  93. data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
  94. data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
  95. data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
  96. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
  97. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
  98. data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
  99. data/sig/telnyx/models/verification.rbs +2 -1
  100. data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
  101. data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
  102. data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
  103. data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
  104. data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
  105. data/sig/telnyx/models.rbs +14 -0
  106. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  107. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  108. data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
  109. data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
  110. data/sig/telnyx/resources/texml.rbs +44 -0
  111. data/sig/telnyx/resources/verifications.rbs +8 -0
  112. data/sig/telnyx/resources/verify_profiles.rbs +2 -0
  113. data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
  114. metadata +41 -2
@@ -19,1183 +19,3891 @@ module Telnyx
19
19
  sig { returns(String) }
20
20
  attr_accessor :account_sid
21
21
 
22
- # The ID of the TeXML Application.
23
- sig { returns(String) }
24
- attr_accessor :application_sid
25
-
26
- # The phone number of the party that initiated the call. Phone numbers are
27
- # formatted with a `+` and country code.
28
- sig { returns(String) }
29
- attr_accessor :from
30
-
31
- # The phone number of the called party. Phone numbers are formatted with a `+` and
32
- # country code.
33
- sig { returns(String) }
34
- attr_accessor :to
35
-
36
- # Select whether to perform answering machine detection in the background. By
37
- # default execution is blocked until Answering Machine Detection is completed.
38
- sig { returns(T.nilable(T::Boolean)) }
39
- attr_reader :async_amd
40
-
41
- sig { params(async_amd: T::Boolean).void }
42
- attr_writer :async_amd
43
-
44
- # URL destination for Telnyx to send AMD callback events to for the call.
45
- sig { returns(T.nilable(String)) }
46
- attr_reader :async_amd_status_callback
47
-
48
- sig { params(async_amd_status_callback: String).void }
49
- attr_writer :async_amd_status_callback
50
-
51
- # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
52
- # inherited from TeXML Application setting.
53
22
  sig do
54
23
  returns(
55
- T.nilable(
56
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol
24
+ T.any(
25
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL,
26
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml,
27
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault
57
28
  )
58
29
  )
59
30
  end
60
- attr_reader :async_amd_status_callback_method
31
+ attr_accessor :body
61
32
 
62
33
  sig do
63
34
  params(
64
- async_amd_status_callback_method:
65
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol
66
- ).void
35
+ account_sid: String,
36
+ body:
37
+ T.any(
38
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::OrHash,
39
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::OrHash,
40
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::OrHash
41
+ ),
42
+ request_options: Telnyx::RequestOptions::OrHash
43
+ ).returns(T.attached_class)
44
+ end
45
+ def self.new(account_sid:, body:, request_options: {})
67
46
  end
68
- attr_writer :async_amd_status_callback_method
69
47
 
70
- # To be used as the caller id name (SIP From Display Name) presented to the
71
- # destination (`To` number). The string should have a maximum of 128 characters,
72
- # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
73
- # ommited, the display name will be the same as the number in the `From` field.
74
- sig { returns(T.nilable(String)) }
75
- attr_reader :caller_id
48
+ sig do
49
+ override.returns(
50
+ {
51
+ account_sid: String,
52
+ body:
53
+ T.any(
54
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL,
55
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml,
56
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault
57
+ ),
58
+ request_options: Telnyx::RequestOptions
59
+ }
60
+ )
61
+ end
62
+ def to_hash
63
+ end
76
64
 
77
- sig { params(caller_id: String).void }
78
- attr_writer :caller_id
65
+ module Body
66
+ extend Telnyx::Internal::Type::Union
79
67
 
80
- # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
81
- # `true`.
82
- sig { returns(T.nilable(T::Boolean)) }
83
- attr_reader :cancel_playback_on_detect_message_end
68
+ Variants =
69
+ T.type_alias do
70
+ T.any(
71
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL,
72
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml,
73
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault
74
+ )
75
+ end
84
76
 
85
- sig { params(cancel_playback_on_detect_message_end: T::Boolean).void }
86
- attr_writer :cancel_playback_on_detect_message_end
77
+ class WithURL < Telnyx::Internal::Type::BaseModel
78
+ OrHash =
79
+ T.type_alias do
80
+ T.any(
81
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL,
82
+ Telnyx::Internal::AnyHash
83
+ )
84
+ end
85
+
86
+ # The URL from which Telnyx will retrieve the TeXML call instructions.
87
+ sig { returns(String) }
88
+ attr_accessor :url
89
+
90
+ # The ID of the TeXML Application.
91
+ sig { returns(T.nilable(String)) }
92
+ attr_reader :application_sid
93
+
94
+ sig { params(application_sid: String).void }
95
+ attr_writer :application_sid
96
+
97
+ # Select whether to perform answering machine detection in the background. By
98
+ # default execution is blocked until Answering Machine Detection is completed.
99
+ sig { returns(T.nilable(T::Boolean)) }
100
+ attr_reader :async_amd
101
+
102
+ sig { params(async_amd: T::Boolean).void }
103
+ attr_writer :async_amd
104
+
105
+ # URL destination for Telnyx to send AMD callback events to for the call.
106
+ sig { returns(T.nilable(String)) }
107
+ attr_reader :async_amd_status_callback
108
+
109
+ sig { params(async_amd_status_callback: String).void }
110
+ attr_writer :async_amd_status_callback
111
+
112
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
113
+ # inherited from TeXML Application setting.
114
+ sig do
115
+ returns(
116
+ T.nilable(
117
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::OrSymbol
118
+ )
119
+ )
120
+ end
121
+ attr_reader :async_amd_status_callback_method
87
122
 
88
- # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
89
- sig { returns(T.nilable(T::Boolean)) }
90
- attr_reader :cancel_playback_on_machine_detection
123
+ sig do
124
+ params(
125
+ async_amd_status_callback_method:
126
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::OrSymbol
127
+ ).void
128
+ end
129
+ attr_writer :async_amd_status_callback_method
91
130
 
92
- sig { params(cancel_playback_on_machine_detection: T::Boolean).void }
93
- attr_writer :cancel_playback_on_machine_detection
131
+ # To be used as the caller id name (SIP From Display Name) presented to the
132
+ # destination (`To` number). The string should have a maximum of 128 characters,
133
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
134
+ # ommited, the display name will be the same as the number in the `From` field.
135
+ sig { returns(T.nilable(String)) }
136
+ attr_reader :caller_id
94
137
 
95
- # Custom HTTP headers to be sent with the call. Each header should be an object
96
- # with 'name' and 'value' properties.
97
- sig do
98
- returns(
99
- T.nilable(
100
- T::Array[Telnyx::Texml::Accounts::CallCallsParams::CustomHeader]
101
- )
102
- )
103
- end
104
- attr_reader :custom_headers
138
+ sig { params(caller_id: String).void }
139
+ attr_writer :caller_id
105
140
 
106
- sig do
107
- params(
108
- custom_headers:
109
- T::Array[
110
- Telnyx::Texml::Accounts::CallCallsParams::CustomHeader::OrHash
111
- ]
112
- ).void
113
- end
114
- attr_writer :custom_headers
141
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
142
+ # `true`.
143
+ sig { returns(T.nilable(T::Boolean)) }
144
+ attr_reader :cancel_playback_on_detect_message_end
115
145
 
116
- # Allows you to chose between Premium and Standard detections.
117
- sig do
118
- returns(
119
- T.nilable(
120
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol
121
- )
122
- )
123
- end
124
- attr_reader :detection_mode
146
+ sig do
147
+ params(cancel_playback_on_detect_message_end: T::Boolean).void
148
+ end
149
+ attr_writer :cancel_playback_on_detect_message_end
125
150
 
126
- sig do
127
- params(
128
- detection_mode:
129
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol
130
- ).void
131
- end
132
- attr_writer :detection_mode
151
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
152
+ sig { returns(T.nilable(T::Boolean)) }
153
+ attr_reader :cancel_playback_on_machine_detection
133
154
 
134
- # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
135
- # `Url` is not responding.
136
- sig { returns(T.nilable(String)) }
137
- attr_reader :fallback_url
155
+ sig do
156
+ params(cancel_playback_on_machine_detection: T::Boolean).void
157
+ end
158
+ attr_writer :cancel_playback_on_machine_detection
159
+
160
+ # Custom HTTP headers to be sent with the call. Each header should be an object
161
+ # with 'name' and 'value' properties.
162
+ sig do
163
+ returns(
164
+ T.nilable(
165
+ T::Array[
166
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::CustomHeader
167
+ ]
168
+ )
169
+ )
170
+ end
171
+ attr_reader :custom_headers
172
+
173
+ sig do
174
+ params(
175
+ custom_headers:
176
+ T::Array[
177
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::CustomHeader::OrHash
178
+ ]
179
+ ).void
180
+ end
181
+ attr_writer :custom_headers
182
+
183
+ # Allows you to chose between Premium and Standard detections.
184
+ sig do
185
+ returns(
186
+ T.nilable(
187
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::OrSymbol
188
+ )
189
+ )
190
+ end
191
+ attr_reader :detection_mode
138
192
 
139
- sig { params(fallback_url: String).void }
140
- attr_writer :fallback_url
193
+ sig do
194
+ params(
195
+ detection_mode:
196
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::OrSymbol
197
+ ).void
198
+ end
199
+ attr_writer :detection_mode
200
+
201
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
202
+ # `Url` is not responding.
203
+ sig { returns(T.nilable(String)) }
204
+ attr_reader :fallback_url
205
+
206
+ sig { params(fallback_url: String).void }
207
+ attr_writer :fallback_url
208
+
209
+ # The phone number of the party that initiated the call. Phone numbers are
210
+ # formatted with a `+` and country code.
211
+ sig { returns(T.nilable(String)) }
212
+ attr_reader :from
213
+
214
+ sig { params(from: String).void }
215
+ attr_writer :from
216
+
217
+ # Enables Answering Machine Detection.
218
+ sig do
219
+ returns(
220
+ T.nilable(
221
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::OrSymbol
222
+ )
223
+ )
224
+ end
225
+ attr_reader :machine_detection
141
226
 
142
- # Enables Answering Machine Detection.
143
- sig do
144
- returns(
145
- T.nilable(
146
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol
147
- )
148
- )
149
- end
150
- attr_reader :machine_detection
227
+ sig do
228
+ params(
229
+ machine_detection:
230
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::OrSymbol
231
+ ).void
232
+ end
233
+ attr_writer :machine_detection
151
234
 
152
- sig do
153
- params(
154
- machine_detection:
155
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol
156
- ).void
157
- end
158
- attr_writer :machine_detection
235
+ # If initial silence duration is greater than this value, consider it a machine.
236
+ # Ignored when `premium` detection is used.
237
+ sig { returns(T.nilable(Integer)) }
238
+ attr_reader :machine_detection_silence_timeout
159
239
 
160
- # If initial silence duration is greater than this value, consider it a machine.
161
- # Ignored when `premium` detection is used.
162
- sig { returns(T.nilable(Integer)) }
163
- attr_reader :machine_detection_silence_timeout
240
+ sig { params(machine_detection_silence_timeout: Integer).void }
241
+ attr_writer :machine_detection_silence_timeout
164
242
 
165
- sig { params(machine_detection_silence_timeout: Integer).void }
166
- attr_writer :machine_detection_silence_timeout
243
+ # Silence duration threshold after a greeting message or voice for it be
244
+ # considered human. Ignored when `premium` detection is used.
245
+ sig { returns(T.nilable(Integer)) }
246
+ attr_reader :machine_detection_speech_end_threshold
167
247
 
168
- # Silence duration threshold after a greeting message or voice for it be
169
- # considered human. Ignored when `premium` detection is used.
170
- sig { returns(T.nilable(Integer)) }
171
- attr_reader :machine_detection_speech_end_threshold
248
+ sig do
249
+ params(machine_detection_speech_end_threshold: Integer).void
250
+ end
251
+ attr_writer :machine_detection_speech_end_threshold
252
+
253
+ # Maximum threshold of a human greeting. If greeting longer than this value,
254
+ # considered machine. Ignored when `premium` detection is used.
255
+ sig { returns(T.nilable(Integer)) }
256
+ attr_reader :machine_detection_speech_threshold
257
+
258
+ sig { params(machine_detection_speech_threshold: Integer).void }
259
+ attr_writer :machine_detection_speech_threshold
260
+
261
+ # Maximum timeout threshold in milliseconds for overall detection.
262
+ sig { returns(T.nilable(Integer)) }
263
+ attr_reader :machine_detection_timeout
264
+
265
+ sig { params(machine_detection_timeout: Integer).void }
266
+ attr_writer :machine_detection_timeout
267
+
268
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
269
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
270
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
271
+ # destinations.
272
+ sig do
273
+ returns(
274
+ T.nilable(
275
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::OrSymbol
276
+ )
277
+ )
278
+ end
279
+ attr_reader :media_encryption
172
280
 
173
- sig { params(machine_detection_speech_end_threshold: Integer).void }
174
- attr_writer :machine_detection_speech_end_threshold
281
+ sig do
282
+ params(
283
+ media_encryption:
284
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::OrSymbol
285
+ ).void
286
+ end
287
+ attr_writer :media_encryption
175
288
 
176
- # Maximum threshold of a human greeting. If greeting longer than this value,
177
- # considered machine. Ignored when `premium` detection is used.
178
- sig { returns(T.nilable(Integer)) }
179
- attr_reader :machine_detection_speech_threshold
289
+ # The list of comma-separated codecs to be offered on a call.
290
+ sig { returns(T.nilable(String)) }
291
+ attr_reader :preferred_codecs
180
292
 
181
- sig { params(machine_detection_speech_threshold: Integer).void }
182
- attr_writer :machine_detection_speech_threshold
293
+ sig { params(preferred_codecs: String).void }
294
+ attr_writer :preferred_codecs
183
295
 
184
- # Maximum timeout threshold in milliseconds for overall detection.
185
- sig { returns(T.nilable(Integer)) }
186
- attr_reader :machine_detection_timeout
296
+ # Whether to record the entire participant's call leg. Defaults to `false`.
297
+ sig { returns(T.nilable(T::Boolean)) }
298
+ attr_reader :record
187
299
 
188
- sig { params(machine_detection_timeout: Integer).void }
189
- attr_writer :machine_detection_timeout
300
+ sig { params(record: T::Boolean).void }
301
+ attr_writer :record
190
302
 
191
- # The list of comma-separated codecs to be offered on a call.
192
- sig { returns(T.nilable(String)) }
193
- attr_reader :preferred_codecs
303
+ # The number of channels in the final recording. Defaults to `mono`.
304
+ sig do
305
+ returns(
306
+ T.nilable(
307
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::OrSymbol
308
+ )
309
+ )
310
+ end
311
+ attr_reader :recording_channels
194
312
 
195
- sig { params(preferred_codecs: String).void }
196
- attr_writer :preferred_codecs
313
+ sig do
314
+ params(
315
+ recording_channels:
316
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::OrSymbol
317
+ ).void
318
+ end
319
+ attr_writer :recording_channels
320
+
321
+ # The URL the recording callbacks will be sent to.
322
+ sig { returns(T.nilable(String)) }
323
+ attr_reader :recording_status_callback
324
+
325
+ sig { params(recording_status_callback: String).void }
326
+ attr_writer :recording_status_callback
327
+
328
+ # The changes to the recording's state that should generate a call to
329
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
330
+ # Separate multiple values with a space. Defaults to `completed`.
331
+ sig { returns(T.nilable(String)) }
332
+ attr_reader :recording_status_callback_event
333
+
334
+ sig { params(recording_status_callback_event: String).void }
335
+ attr_writer :recording_status_callback_event
336
+
337
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
338
+ sig do
339
+ returns(
340
+ T.nilable(
341
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::OrSymbol
342
+ )
343
+ )
344
+ end
345
+ attr_reader :recording_status_callback_method
197
346
 
198
- # Whether to record the entire participant's call leg. Defaults to `false`.
199
- sig { returns(T.nilable(T::Boolean)) }
200
- attr_reader :record
347
+ sig do
348
+ params(
349
+ recording_status_callback_method:
350
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::OrSymbol
351
+ ).void
352
+ end
353
+ attr_writer :recording_status_callback_method
354
+
355
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
356
+ # silence is detected. The timer only starts when the speech is detected. Please
357
+ # note that the transcription is used to detect silence and the related charge
358
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
359
+ sig { returns(T.nilable(Integer)) }
360
+ attr_reader :recording_timeout
361
+
362
+ sig { params(recording_timeout: Integer).void }
363
+ attr_writer :recording_timeout
364
+
365
+ # The audio track to record for the call. The default is `both`.
366
+ sig do
367
+ returns(
368
+ T.nilable(
369
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::OrSymbol
370
+ )
371
+ )
372
+ end
373
+ attr_reader :recording_track
201
374
 
202
- sig { params(record: T::Boolean).void }
203
- attr_writer :record
375
+ sig do
376
+ params(
377
+ recording_track:
378
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::OrSymbol
379
+ ).void
380
+ end
381
+ attr_writer :recording_track
204
382
 
205
- # The number of channels in the final recording. Defaults to `mono`.
206
- sig do
207
- returns(
208
- T.nilable(
209
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol
210
- )
211
- )
212
- end
213
- attr_reader :recording_channels
383
+ # Whether to send RecordingUrl in webhooks.
384
+ sig { returns(T.nilable(T::Boolean)) }
385
+ attr_reader :send_recording_url
214
386
 
215
- sig do
216
- params(
217
- recording_channels:
218
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol
219
- ).void
220
- end
221
- attr_writer :recording_channels
387
+ sig { params(send_recording_url: T::Boolean).void }
388
+ attr_writer :send_recording_url
222
389
 
223
- # The URL the recording callbacks will be sent to.
224
- sig { returns(T.nilable(String)) }
225
- attr_reader :recording_status_callback
390
+ # The password to use for SIP authentication.
391
+ sig { returns(T.nilable(String)) }
392
+ attr_reader :sip_auth_password
226
393
 
227
- sig { params(recording_status_callback: String).void }
228
- attr_writer :recording_status_callback
394
+ sig { params(sip_auth_password: String).void }
395
+ attr_writer :sip_auth_password
229
396
 
230
- # The changes to the recording's state that should generate a call to
231
- # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
232
- # Separate multiple values with a space. Defaults to `completed`.
233
- sig { returns(T.nilable(String)) }
234
- attr_reader :recording_status_callback_event
397
+ # The username to use for SIP authentication.
398
+ sig { returns(T.nilable(String)) }
399
+ attr_reader :sip_auth_username
235
400
 
236
- sig { params(recording_status_callback_event: String).void }
237
- attr_writer :recording_status_callback_event
401
+ sig { params(sip_auth_username: String).void }
402
+ attr_writer :sip_auth_username
238
403
 
239
- # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
240
- sig do
241
- returns(
242
- T.nilable(
243
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol
244
- )
245
- )
246
- end
247
- attr_reader :recording_status_callback_method
404
+ # Defines the SIP region to be used for the call.
405
+ sig do
406
+ returns(
407
+ T.nilable(
408
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::OrSymbol
409
+ )
410
+ )
411
+ end
412
+ attr_reader :sip_region
248
413
 
249
- sig do
250
- params(
251
- recording_status_callback_method:
252
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol
253
- ).void
254
- end
255
- attr_writer :recording_status_callback_method
414
+ sig do
415
+ params(
416
+ sip_region:
417
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::OrSymbol
418
+ ).void
419
+ end
420
+ attr_writer :sip_region
421
+
422
+ # URL destination for Telnyx to send status callback events to for the call.
423
+ sig { returns(T.nilable(String)) }
424
+ attr_reader :status_callback
425
+
426
+ sig { params(status_callback: String).void }
427
+ attr_writer :status_callback
428
+
429
+ # The call events for which Telnyx should send a webhook. Multiple events can be
430
+ # defined when separated by a space.
431
+ sig do
432
+ returns(
433
+ T.nilable(
434
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::OrSymbol
435
+ )
436
+ )
437
+ end
438
+ attr_reader :status_callback_event
256
439
 
257
- # The number of seconds that Telnyx will wait for the recording to be stopped if
258
- # silence is detected. The timer only starts when the speech is detected. Please
259
- # note that the transcription is used to detect silence and the related charge
260
- # will be applied. The minimum value is 0. The default value is 0 (infinite)
261
- sig { returns(T.nilable(Integer)) }
262
- attr_reader :recording_timeout
440
+ sig do
441
+ params(
442
+ status_callback_event:
443
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::OrSymbol
444
+ ).void
445
+ end
446
+ attr_writer :status_callback_event
447
+
448
+ # HTTP request type used for `StatusCallback`.
449
+ sig do
450
+ returns(
451
+ T.nilable(
452
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::OrSymbol
453
+ )
454
+ )
455
+ end
456
+ attr_reader :status_callback_method
263
457
 
264
- sig { params(recording_timeout: Integer).void }
265
- attr_writer :recording_timeout
458
+ sig do
459
+ params(
460
+ status_callback_method:
461
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::OrSymbol
462
+ ).void
463
+ end
464
+ attr_writer :status_callback_method
465
+
466
+ # The call control ID of the existing call to supervise. When provided, the
467
+ # created leg will be added to the specified call in supervising mode. Status
468
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
469
+ sig { returns(T.nilable(String)) }
470
+ attr_reader :supervise_call_sid
471
+
472
+ sig { params(supervise_call_sid: String).void }
473
+ attr_writer :supervise_call_sid
474
+
475
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
476
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
477
+ # supervisor muted). Default: barge
478
+ sig do
479
+ returns(
480
+ T.nilable(
481
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::OrSymbol
482
+ )
483
+ )
484
+ end
485
+ attr_reader :supervising_role
266
486
 
267
- # The audio track to record for the call. The default is `both`.
268
- sig do
269
- returns(
270
- T.nilable(
271
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol
487
+ sig do
488
+ params(
489
+ supervising_role:
490
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::OrSymbol
491
+ ).void
492
+ end
493
+ attr_writer :supervising_role
494
+
495
+ sig { returns(T.nilable(T.anything)) }
496
+ attr_reader :texml
497
+
498
+ sig { params(texml: T.anything).void }
499
+ attr_writer :texml
500
+
501
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
502
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
503
+ sig { returns(T.nilable(Integer)) }
504
+ attr_reader :time_limit
505
+
506
+ sig { params(time_limit: Integer).void }
507
+ attr_writer :time_limit
508
+
509
+ # The number of seconds to wait for the called party to answer the call before the
510
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
511
+ # is 30 seconds.
512
+ sig { returns(T.nilable(Integer)) }
513
+ attr_reader :timeout
514
+
515
+ sig { params(timeout: Integer).void }
516
+ attr_writer :timeout
517
+
518
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
519
+ # country code.
520
+ sig { returns(T.nilable(String)) }
521
+ attr_reader :to
522
+
523
+ sig { params(to: String).void }
524
+ attr_writer :to
525
+
526
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
527
+ # `trim-silence`.
528
+ sig do
529
+ returns(
530
+ T.nilable(
531
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::OrSymbol
532
+ )
533
+ )
534
+ end
535
+ attr_reader :trim
536
+
537
+ sig do
538
+ params(
539
+ trim:
540
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::OrSymbol
541
+ ).void
542
+ end
543
+ attr_writer :trim
544
+
545
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
546
+ # Application setting.
547
+ sig do
548
+ returns(
549
+ T.nilable(
550
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::OrSymbol
551
+ )
552
+ )
553
+ end
554
+ attr_reader :url_method
555
+
556
+ sig do
557
+ params(
558
+ url_method:
559
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::OrSymbol
560
+ ).void
561
+ end
562
+ attr_writer :url_method
563
+
564
+ sig do
565
+ params(
566
+ url: String,
567
+ application_sid: String,
568
+ async_amd: T::Boolean,
569
+ async_amd_status_callback: String,
570
+ async_amd_status_callback_method:
571
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::OrSymbol,
572
+ caller_id: String,
573
+ cancel_playback_on_detect_message_end: T::Boolean,
574
+ cancel_playback_on_machine_detection: T::Boolean,
575
+ custom_headers:
576
+ T::Array[
577
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::CustomHeader::OrHash
578
+ ],
579
+ detection_mode:
580
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::OrSymbol,
581
+ fallback_url: String,
582
+ from: String,
583
+ machine_detection:
584
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::OrSymbol,
585
+ machine_detection_silence_timeout: Integer,
586
+ machine_detection_speech_end_threshold: Integer,
587
+ machine_detection_speech_threshold: Integer,
588
+ machine_detection_timeout: Integer,
589
+ media_encryption:
590
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::OrSymbol,
591
+ preferred_codecs: String,
592
+ record: T::Boolean,
593
+ recording_channels:
594
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::OrSymbol,
595
+ recording_status_callback: String,
596
+ recording_status_callback_event: String,
597
+ recording_status_callback_method:
598
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::OrSymbol,
599
+ recording_timeout: Integer,
600
+ recording_track:
601
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::OrSymbol,
602
+ send_recording_url: T::Boolean,
603
+ sip_auth_password: String,
604
+ sip_auth_username: String,
605
+ sip_region:
606
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::OrSymbol,
607
+ status_callback: String,
608
+ status_callback_event:
609
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::OrSymbol,
610
+ status_callback_method:
611
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::OrSymbol,
612
+ supervise_call_sid: String,
613
+ supervising_role:
614
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::OrSymbol,
615
+ texml: T.anything,
616
+ time_limit: Integer,
617
+ timeout: Integer,
618
+ to: String,
619
+ trim:
620
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::OrSymbol,
621
+ url_method:
622
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::OrSymbol
623
+ ).returns(T.attached_class)
624
+ end
625
+ def self.new(
626
+ # The URL from which Telnyx will retrieve the TeXML call instructions.
627
+ url:,
628
+ # The ID of the TeXML Application.
629
+ application_sid: nil,
630
+ # Select whether to perform answering machine detection in the background. By
631
+ # default execution is blocked until Answering Machine Detection is completed.
632
+ async_amd: nil,
633
+ # URL destination for Telnyx to send AMD callback events to for the call.
634
+ async_amd_status_callback: nil,
635
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
636
+ # inherited from TeXML Application setting.
637
+ async_amd_status_callback_method: nil,
638
+ # To be used as the caller id name (SIP From Display Name) presented to the
639
+ # destination (`To` number). The string should have a maximum of 128 characters,
640
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
641
+ # ommited, the display name will be the same as the number in the `From` field.
642
+ caller_id: nil,
643
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
644
+ # `true`.
645
+ cancel_playback_on_detect_message_end: nil,
646
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
647
+ cancel_playback_on_machine_detection: nil,
648
+ # Custom HTTP headers to be sent with the call. Each header should be an object
649
+ # with 'name' and 'value' properties.
650
+ custom_headers: nil,
651
+ # Allows you to chose between Premium and Standard detections.
652
+ detection_mode: nil,
653
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
654
+ # `Url` is not responding.
655
+ fallback_url: nil,
656
+ # The phone number of the party that initiated the call. Phone numbers are
657
+ # formatted with a `+` and country code.
658
+ from: nil,
659
+ # Enables Answering Machine Detection.
660
+ machine_detection: nil,
661
+ # If initial silence duration is greater than this value, consider it a machine.
662
+ # Ignored when `premium` detection is used.
663
+ machine_detection_silence_timeout: nil,
664
+ # Silence duration threshold after a greeting message or voice for it be
665
+ # considered human. Ignored when `premium` detection is used.
666
+ machine_detection_speech_end_threshold: nil,
667
+ # Maximum threshold of a human greeting. If greeting longer than this value,
668
+ # considered machine. Ignored when `premium` detection is used.
669
+ machine_detection_speech_threshold: nil,
670
+ # Maximum timeout threshold in milliseconds for overall detection.
671
+ machine_detection_timeout: nil,
672
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
673
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
674
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
675
+ # destinations.
676
+ media_encryption: nil,
677
+ # The list of comma-separated codecs to be offered on a call.
678
+ preferred_codecs: nil,
679
+ # Whether to record the entire participant's call leg. Defaults to `false`.
680
+ record: nil,
681
+ # The number of channels in the final recording. Defaults to `mono`.
682
+ recording_channels: nil,
683
+ # The URL the recording callbacks will be sent to.
684
+ recording_status_callback: nil,
685
+ # The changes to the recording's state that should generate a call to
686
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
687
+ # Separate multiple values with a space. Defaults to `completed`.
688
+ recording_status_callback_event: nil,
689
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
690
+ recording_status_callback_method: nil,
691
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
692
+ # silence is detected. The timer only starts when the speech is detected. Please
693
+ # note that the transcription is used to detect silence and the related charge
694
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
695
+ recording_timeout: nil,
696
+ # The audio track to record for the call. The default is `both`.
697
+ recording_track: nil,
698
+ # Whether to send RecordingUrl in webhooks.
699
+ send_recording_url: nil,
700
+ # The password to use for SIP authentication.
701
+ sip_auth_password: nil,
702
+ # The username to use for SIP authentication.
703
+ sip_auth_username: nil,
704
+ # Defines the SIP region to be used for the call.
705
+ sip_region: nil,
706
+ # URL destination for Telnyx to send status callback events to for the call.
707
+ status_callback: nil,
708
+ # The call events for which Telnyx should send a webhook. Multiple events can be
709
+ # defined when separated by a space.
710
+ status_callback_event: nil,
711
+ # HTTP request type used for `StatusCallback`.
712
+ status_callback_method: nil,
713
+ # The call control ID of the existing call to supervise. When provided, the
714
+ # created leg will be added to the specified call in supervising mode. Status
715
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
716
+ supervise_call_sid: nil,
717
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
718
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
719
+ # supervisor muted). Default: barge
720
+ supervising_role: nil,
721
+ texml: nil,
722
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
723
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
724
+ time_limit: nil,
725
+ # The number of seconds to wait for the called party to answer the call before the
726
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
727
+ # is 30 seconds.
728
+ timeout: nil,
729
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
730
+ # country code.
731
+ to: nil,
732
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
733
+ # `trim-silence`.
734
+ trim: nil,
735
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
736
+ # Application setting.
737
+ url_method: nil
272
738
  )
273
- )
274
- end
275
- attr_reader :recording_track
739
+ end
276
740
 
277
- sig do
278
- params(
279
- recording_track:
280
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol
281
- ).void
282
- end
283
- attr_writer :recording_track
741
+ sig do
742
+ override.returns(
743
+ {
744
+ url: String,
745
+ application_sid: String,
746
+ async_amd: T::Boolean,
747
+ async_amd_status_callback: String,
748
+ async_amd_status_callback_method:
749
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::OrSymbol,
750
+ caller_id: String,
751
+ cancel_playback_on_detect_message_end: T::Boolean,
752
+ cancel_playback_on_machine_detection: T::Boolean,
753
+ custom_headers:
754
+ T::Array[
755
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::CustomHeader
756
+ ],
757
+ detection_mode:
758
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::OrSymbol,
759
+ fallback_url: String,
760
+ from: String,
761
+ machine_detection:
762
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::OrSymbol,
763
+ machine_detection_silence_timeout: Integer,
764
+ machine_detection_speech_end_threshold: Integer,
765
+ machine_detection_speech_threshold: Integer,
766
+ machine_detection_timeout: Integer,
767
+ media_encryption:
768
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::OrSymbol,
769
+ preferred_codecs: String,
770
+ record: T::Boolean,
771
+ recording_channels:
772
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::OrSymbol,
773
+ recording_status_callback: String,
774
+ recording_status_callback_event: String,
775
+ recording_status_callback_method:
776
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::OrSymbol,
777
+ recording_timeout: Integer,
778
+ recording_track:
779
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::OrSymbol,
780
+ send_recording_url: T::Boolean,
781
+ sip_auth_password: String,
782
+ sip_auth_username: String,
783
+ sip_region:
784
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::OrSymbol,
785
+ status_callback: String,
786
+ status_callback_event:
787
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::OrSymbol,
788
+ status_callback_method:
789
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::OrSymbol,
790
+ supervise_call_sid: String,
791
+ supervising_role:
792
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::OrSymbol,
793
+ texml: T.anything,
794
+ time_limit: Integer,
795
+ timeout: Integer,
796
+ to: String,
797
+ trim:
798
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::OrSymbol,
799
+ url_method:
800
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::OrSymbol
801
+ }
802
+ )
803
+ end
804
+ def to_hash
805
+ end
284
806
 
285
- # Whether to send RecordingUrl in webhooks.
286
- sig { returns(T.nilable(T::Boolean)) }
287
- attr_reader :send_recording_url
807
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
808
+ # inherited from TeXML Application setting.
809
+ module AsyncAmdStatusCallbackMethod
810
+ extend Telnyx::Internal::Type::Enum
811
+
812
+ TaggedSymbol =
813
+ T.type_alias do
814
+ T.all(
815
+ Symbol,
816
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod
817
+ )
818
+ end
819
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
820
+
821
+ GET =
822
+ T.let(
823
+ :GET,
824
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::TaggedSymbol
825
+ )
826
+ POST =
827
+ T.let(
828
+ :POST,
829
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::TaggedSymbol
830
+ )
831
+
832
+ sig do
833
+ override.returns(
834
+ T::Array[
835
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::AsyncAmdStatusCallbackMethod::TaggedSymbol
836
+ ]
837
+ )
838
+ end
839
+ def self.values
840
+ end
841
+ end
288
842
 
289
- sig { params(send_recording_url: T::Boolean).void }
290
- attr_writer :send_recording_url
843
+ class CustomHeader < Telnyx::Internal::Type::BaseModel
844
+ OrHash =
845
+ T.type_alias do
846
+ T.any(
847
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::CustomHeader,
848
+ Telnyx::Internal::AnyHash
849
+ )
850
+ end
851
+
852
+ # The name of the custom header
853
+ sig { returns(String) }
854
+ attr_accessor :name
855
+
856
+ # The value of the custom header
857
+ sig { returns(String) }
858
+ attr_accessor :value
859
+
860
+ sig do
861
+ params(name: String, value: String).returns(T.attached_class)
862
+ end
863
+ def self.new(
864
+ # The name of the custom header
865
+ name:,
866
+ # The value of the custom header
867
+ value:
868
+ )
869
+ end
291
870
 
292
- # The password to use for SIP authentication.
293
- sig { returns(T.nilable(String)) }
294
- attr_reader :sip_auth_password
871
+ sig { override.returns({ name: String, value: String }) }
872
+ def to_hash
873
+ end
874
+ end
295
875
 
296
- sig { params(sip_auth_password: String).void }
297
- attr_writer :sip_auth_password
876
+ # Allows you to chose between Premium and Standard detections.
877
+ module DetectionMode
878
+ extend Telnyx::Internal::Type::Enum
879
+
880
+ TaggedSymbol =
881
+ T.type_alias do
882
+ T.all(
883
+ Symbol,
884
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode
885
+ )
886
+ end
887
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
888
+
889
+ PREMIUM =
890
+ T.let(
891
+ :Premium,
892
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::TaggedSymbol
893
+ )
894
+ REGULAR =
895
+ T.let(
896
+ :Regular,
897
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::TaggedSymbol
898
+ )
899
+
900
+ sig do
901
+ override.returns(
902
+ T::Array[
903
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::DetectionMode::TaggedSymbol
904
+ ]
905
+ )
906
+ end
907
+ def self.values
908
+ end
909
+ end
298
910
 
299
- # The username to use for SIP authentication.
300
- sig { returns(T.nilable(String)) }
301
- attr_reader :sip_auth_username
911
+ # Enables Answering Machine Detection.
912
+ module MachineDetection
913
+ extend Telnyx::Internal::Type::Enum
914
+
915
+ TaggedSymbol =
916
+ T.type_alias do
917
+ T.all(
918
+ Symbol,
919
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection
920
+ )
921
+ end
922
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
923
+
924
+ ENABLE =
925
+ T.let(
926
+ :Enable,
927
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::TaggedSymbol
928
+ )
929
+ DISABLE =
930
+ T.let(
931
+ :Disable,
932
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::TaggedSymbol
933
+ )
934
+ DETECT_MESSAGE_END =
935
+ T.let(
936
+ :DetectMessageEnd,
937
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::TaggedSymbol
938
+ )
939
+
940
+ sig do
941
+ override.returns(
942
+ T::Array[
943
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MachineDetection::TaggedSymbol
944
+ ]
945
+ )
946
+ end
947
+ def self.values
948
+ end
949
+ end
302
950
 
303
- sig { params(sip_auth_username: String).void }
304
- attr_writer :sip_auth_username
951
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
952
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
953
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
954
+ # destinations.
955
+ module MediaEncryption
956
+ extend Telnyx::Internal::Type::Enum
957
+
958
+ TaggedSymbol =
959
+ T.type_alias do
960
+ T.all(
961
+ Symbol,
962
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption
963
+ )
964
+ end
965
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
966
+
967
+ DISABLED =
968
+ T.let(
969
+ :disabled,
970
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::TaggedSymbol
971
+ )
972
+ SRTP =
973
+ T.let(
974
+ :SRTP,
975
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::TaggedSymbol
976
+ )
977
+ DTLS =
978
+ T.let(
979
+ :DTLS,
980
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::TaggedSymbol
981
+ )
982
+
983
+ sig do
984
+ override.returns(
985
+ T::Array[
986
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::MediaEncryption::TaggedSymbol
987
+ ]
988
+ )
989
+ end
990
+ def self.values
991
+ end
992
+ end
305
993
 
306
- # Defines the SIP region to be used for the call.
307
- sig do
308
- returns(
309
- T.nilable(
310
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol
311
- )
312
- )
313
- end
314
- attr_reader :sip_region
994
+ # The number of channels in the final recording. Defaults to `mono`.
995
+ module RecordingChannels
996
+ extend Telnyx::Internal::Type::Enum
997
+
998
+ TaggedSymbol =
999
+ T.type_alias do
1000
+ T.all(
1001
+ Symbol,
1002
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels
1003
+ )
1004
+ end
1005
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1006
+
1007
+ MONO =
1008
+ T.let(
1009
+ :mono,
1010
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::TaggedSymbol
1011
+ )
1012
+ DUAL =
1013
+ T.let(
1014
+ :dual,
1015
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::TaggedSymbol
1016
+ )
1017
+
1018
+ sig do
1019
+ override.returns(
1020
+ T::Array[
1021
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingChannels::TaggedSymbol
1022
+ ]
1023
+ )
1024
+ end
1025
+ def self.values
1026
+ end
1027
+ end
315
1028
 
316
- sig do
317
- params(
318
- sip_region:
319
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol
320
- ).void
321
- end
322
- attr_writer :sip_region
1029
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
1030
+ module RecordingStatusCallbackMethod
1031
+ extend Telnyx::Internal::Type::Enum
1032
+
1033
+ TaggedSymbol =
1034
+ T.type_alias do
1035
+ T.all(
1036
+ Symbol,
1037
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod
1038
+ )
1039
+ end
1040
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1041
+
1042
+ GET =
1043
+ T.let(
1044
+ :GET,
1045
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::TaggedSymbol
1046
+ )
1047
+ POST =
1048
+ T.let(
1049
+ :POST,
1050
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::TaggedSymbol
1051
+ )
1052
+
1053
+ sig do
1054
+ override.returns(
1055
+ T::Array[
1056
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingStatusCallbackMethod::TaggedSymbol
1057
+ ]
1058
+ )
1059
+ end
1060
+ def self.values
1061
+ end
1062
+ end
323
1063
 
324
- # URL destination for Telnyx to send status callback events to for the call.
325
- sig { returns(T.nilable(String)) }
326
- attr_reader :status_callback
1064
+ # The audio track to record for the call. The default is `both`.
1065
+ module RecordingTrack
1066
+ extend Telnyx::Internal::Type::Enum
1067
+
1068
+ TaggedSymbol =
1069
+ T.type_alias do
1070
+ T.all(
1071
+ Symbol,
1072
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack
1073
+ )
1074
+ end
1075
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1076
+
1077
+ INBOUND =
1078
+ T.let(
1079
+ :inbound,
1080
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::TaggedSymbol
1081
+ )
1082
+ OUTBOUND =
1083
+ T.let(
1084
+ :outbound,
1085
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::TaggedSymbol
1086
+ )
1087
+ BOTH =
1088
+ T.let(
1089
+ :both,
1090
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::TaggedSymbol
1091
+ )
1092
+
1093
+ sig do
1094
+ override.returns(
1095
+ T::Array[
1096
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::RecordingTrack::TaggedSymbol
1097
+ ]
1098
+ )
1099
+ end
1100
+ def self.values
1101
+ end
1102
+ end
327
1103
 
328
- sig { params(status_callback: String).void }
329
- attr_writer :status_callback
1104
+ # Defines the SIP region to be used for the call.
1105
+ module SipRegion
1106
+ extend Telnyx::Internal::Type::Enum
1107
+
1108
+ TaggedSymbol =
1109
+ T.type_alias do
1110
+ T.all(
1111
+ Symbol,
1112
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion
1113
+ )
1114
+ end
1115
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1116
+
1117
+ US =
1118
+ T.let(
1119
+ :US,
1120
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1121
+ )
1122
+ EUROPE =
1123
+ T.let(
1124
+ :Europe,
1125
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1126
+ )
1127
+ CANADA =
1128
+ T.let(
1129
+ :Canada,
1130
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1131
+ )
1132
+ AUSTRALIA =
1133
+ T.let(
1134
+ :Australia,
1135
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1136
+ )
1137
+ MIDDLE_EAST =
1138
+ T.let(
1139
+ :"Middle East",
1140
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1141
+ )
1142
+
1143
+ sig do
1144
+ override.returns(
1145
+ T::Array[
1146
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SipRegion::TaggedSymbol
1147
+ ]
1148
+ )
1149
+ end
1150
+ def self.values
1151
+ end
1152
+ end
330
1153
 
331
- # The call events for which Telnyx should send a webhook. Multiple events can be
332
- # defined when separated by a space.
333
- sig do
334
- returns(
335
- T.nilable(
336
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol
337
- )
338
- )
339
- end
340
- attr_reader :status_callback_event
1154
+ # The call events for which Telnyx should send a webhook. Multiple events can be
1155
+ # defined when separated by a space.
1156
+ module StatusCallbackEvent
1157
+ extend Telnyx::Internal::Type::Enum
1158
+
1159
+ TaggedSymbol =
1160
+ T.type_alias do
1161
+ T.all(
1162
+ Symbol,
1163
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent
1164
+ )
1165
+ end
1166
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1167
+
1168
+ INITIATED =
1169
+ T.let(
1170
+ :initiated,
1171
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::TaggedSymbol
1172
+ )
1173
+ RINGING =
1174
+ T.let(
1175
+ :ringing,
1176
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::TaggedSymbol
1177
+ )
1178
+ ANSWERED =
1179
+ T.let(
1180
+ :answered,
1181
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::TaggedSymbol
1182
+ )
1183
+ COMPLETED =
1184
+ T.let(
1185
+ :completed,
1186
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::TaggedSymbol
1187
+ )
1188
+
1189
+ sig do
1190
+ override.returns(
1191
+ T::Array[
1192
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackEvent::TaggedSymbol
1193
+ ]
1194
+ )
1195
+ end
1196
+ def self.values
1197
+ end
1198
+ end
341
1199
 
342
- sig do
343
- params(
344
- status_callback_event:
345
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol
346
- ).void
347
- end
348
- attr_writer :status_callback_event
1200
+ # HTTP request type used for `StatusCallback`.
1201
+ module StatusCallbackMethod
1202
+ extend Telnyx::Internal::Type::Enum
1203
+
1204
+ TaggedSymbol =
1205
+ T.type_alias do
1206
+ T.all(
1207
+ Symbol,
1208
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod
1209
+ )
1210
+ end
1211
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1212
+
1213
+ GET =
1214
+ T.let(
1215
+ :GET,
1216
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::TaggedSymbol
1217
+ )
1218
+ POST =
1219
+ T.let(
1220
+ :POST,
1221
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::TaggedSymbol
1222
+ )
1223
+
1224
+ sig do
1225
+ override.returns(
1226
+ T::Array[
1227
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::StatusCallbackMethod::TaggedSymbol
1228
+ ]
1229
+ )
1230
+ end
1231
+ def self.values
1232
+ end
1233
+ end
349
1234
 
350
- # HTTP request type used for `StatusCallback`.
351
- sig do
352
- returns(
353
- T.nilable(
354
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol
355
- )
356
- )
357
- end
358
- attr_reader :status_callback_method
1235
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
1236
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
1237
+ # supervisor muted). Default: barge
1238
+ module SupervisingRole
1239
+ extend Telnyx::Internal::Type::Enum
1240
+
1241
+ TaggedSymbol =
1242
+ T.type_alias do
1243
+ T.all(
1244
+ Symbol,
1245
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole
1246
+ )
1247
+ end
1248
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1249
+
1250
+ BARGE =
1251
+ T.let(
1252
+ :barge,
1253
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::TaggedSymbol
1254
+ )
1255
+ WHISPER =
1256
+ T.let(
1257
+ :whisper,
1258
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::TaggedSymbol
1259
+ )
1260
+ MONITOR =
1261
+ T.let(
1262
+ :monitor,
1263
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::TaggedSymbol
1264
+ )
1265
+
1266
+ sig do
1267
+ override.returns(
1268
+ T::Array[
1269
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::SupervisingRole::TaggedSymbol
1270
+ ]
1271
+ )
1272
+ end
1273
+ def self.values
1274
+ end
1275
+ end
359
1276
 
360
- sig do
361
- params(
362
- status_callback_method:
363
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol
364
- ).void
365
- end
366
- attr_writer :status_callback_method
1277
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
1278
+ # `trim-silence`.
1279
+ module Trim
1280
+ extend Telnyx::Internal::Type::Enum
1281
+
1282
+ TaggedSymbol =
1283
+ T.type_alias do
1284
+ T.all(
1285
+ Symbol,
1286
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim
1287
+ )
1288
+ end
1289
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1290
+
1291
+ TRIM_SILENCE =
1292
+ T.let(
1293
+ :"trim-silence",
1294
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::TaggedSymbol
1295
+ )
1296
+ DO_NOT_TRIM =
1297
+ T.let(
1298
+ :"do-not-trim",
1299
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::TaggedSymbol
1300
+ )
1301
+
1302
+ sig do
1303
+ override.returns(
1304
+ T::Array[
1305
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::Trim::TaggedSymbol
1306
+ ]
1307
+ )
1308
+ end
1309
+ def self.values
1310
+ end
1311
+ end
367
1312
 
368
- # The call control ID of the existing call to supervise. When provided, the
369
- # created leg will be added to the specified call in supervising mode. Status
370
- # callbacks and action callbacks will NOT be sent for the supervising leg.
371
- sig { returns(T.nilable(String)) }
372
- attr_reader :supervise_call_sid
1313
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
1314
+ # Application setting.
1315
+ module URLMethod
1316
+ extend Telnyx::Internal::Type::Enum
1317
+
1318
+ TaggedSymbol =
1319
+ T.type_alias do
1320
+ T.all(
1321
+ Symbol,
1322
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod
1323
+ )
1324
+ end
1325
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1326
+
1327
+ GET =
1328
+ T.let(
1329
+ :GET,
1330
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::TaggedSymbol
1331
+ )
1332
+ POST =
1333
+ T.let(
1334
+ :POST,
1335
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::TaggedSymbol
1336
+ )
1337
+
1338
+ sig do
1339
+ override.returns(
1340
+ T::Array[
1341
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::URLMethod::TaggedSymbol
1342
+ ]
1343
+ )
1344
+ end
1345
+ def self.values
1346
+ end
1347
+ end
1348
+ end
373
1349
 
374
- sig { params(supervise_call_sid: String).void }
375
- attr_writer :supervise_call_sid
1350
+ class WithTeXml < Telnyx::Internal::Type::BaseModel
1351
+ OrHash =
1352
+ T.type_alias do
1353
+ T.any(
1354
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml,
1355
+ Telnyx::Internal::AnyHash
1356
+ )
1357
+ end
1358
+
1359
+ # TeXML to be used as instructions for the call. If provided, the call will
1360
+ # execute these instructions instead of fetching from the Url.
1361
+ sig { returns(String) }
1362
+ attr_accessor :texml
1363
+
1364
+ # The ID of the TeXML Application.
1365
+ sig { returns(T.nilable(String)) }
1366
+ attr_reader :application_sid
1367
+
1368
+ sig { params(application_sid: String).void }
1369
+ attr_writer :application_sid
1370
+
1371
+ # Select whether to perform answering machine detection in the background. By
1372
+ # default execution is blocked until Answering Machine Detection is completed.
1373
+ sig { returns(T.nilable(T::Boolean)) }
1374
+ attr_reader :async_amd
1375
+
1376
+ sig { params(async_amd: T::Boolean).void }
1377
+ attr_writer :async_amd
1378
+
1379
+ # URL destination for Telnyx to send AMD callback events to for the call.
1380
+ sig { returns(T.nilable(String)) }
1381
+ attr_reader :async_amd_status_callback
1382
+
1383
+ sig { params(async_amd_status_callback: String).void }
1384
+ attr_writer :async_amd_status_callback
1385
+
1386
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
1387
+ # inherited from TeXML Application setting.
1388
+ sig do
1389
+ returns(
1390
+ T.nilable(
1391
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::OrSymbol
1392
+ )
1393
+ )
1394
+ end
1395
+ attr_reader :async_amd_status_callback_method
376
1396
 
377
- # The supervising role for the new leg. Determines the audio behavior: barge (hear
378
- # both sides), whisper (only hear supervisor), monitor (hear both sides but
379
- # supervisor muted). Default: barge
380
- sig do
381
- returns(
382
- T.nilable(
383
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol
384
- )
385
- )
386
- end
387
- attr_reader :supervising_role
1397
+ sig do
1398
+ params(
1399
+ async_amd_status_callback_method:
1400
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::OrSymbol
1401
+ ).void
1402
+ end
1403
+ attr_writer :async_amd_status_callback_method
388
1404
 
389
- sig do
390
- params(
391
- supervising_role:
392
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol
393
- ).void
394
- end
395
- attr_writer :supervising_role
1405
+ # To be used as the caller id name (SIP From Display Name) presented to the
1406
+ # destination (`To` number). The string should have a maximum of 128 characters,
1407
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
1408
+ # ommited, the display name will be the same as the number in the `From` field.
1409
+ sig { returns(T.nilable(String)) }
1410
+ attr_reader :caller_id
396
1411
 
397
- # TeXML to be used as instructions for the call. If provided, the call will
398
- # execute these instructions instead of fetching from the Url.
399
- sig { returns(T.nilable(String)) }
400
- attr_reader :texml
1412
+ sig { params(caller_id: String).void }
1413
+ attr_writer :caller_id
401
1414
 
402
- sig { params(texml: String).void }
403
- attr_writer :texml
1415
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
1416
+ # `true`.
1417
+ sig { returns(T.nilable(T::Boolean)) }
1418
+ attr_reader :cancel_playback_on_detect_message_end
404
1419
 
405
- # The maximum duration of the call in seconds. The minimum value is 30 and the
406
- # maximum value is 14400 (4 hours). Default is 14400 seconds.
407
- sig { returns(T.nilable(Integer)) }
408
- attr_reader :time_limit
1420
+ sig do
1421
+ params(cancel_playback_on_detect_message_end: T::Boolean).void
1422
+ end
1423
+ attr_writer :cancel_playback_on_detect_message_end
409
1424
 
410
- sig { params(time_limit: Integer).void }
411
- attr_writer :time_limit
1425
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
1426
+ sig { returns(T.nilable(T::Boolean)) }
1427
+ attr_reader :cancel_playback_on_machine_detection
412
1428
 
413
- # The number of seconds to wait for the called party to answer the call before the
414
- # call is canceled. The minimum value is 5 and the maximum value is 120. Default
415
- # is 30 seconds.
416
- sig { returns(T.nilable(Integer)) }
417
- attr_reader :timeout_seconds
1429
+ sig do
1430
+ params(cancel_playback_on_machine_detection: T::Boolean).void
1431
+ end
1432
+ attr_writer :cancel_playback_on_machine_detection
1433
+
1434
+ # Custom HTTP headers to be sent with the call. Each header should be an object
1435
+ # with 'name' and 'value' properties.
1436
+ sig do
1437
+ returns(
1438
+ T.nilable(
1439
+ T::Array[
1440
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::CustomHeader
1441
+ ]
1442
+ )
1443
+ )
1444
+ end
1445
+ attr_reader :custom_headers
1446
+
1447
+ sig do
1448
+ params(
1449
+ custom_headers:
1450
+ T::Array[
1451
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::CustomHeader::OrHash
1452
+ ]
1453
+ ).void
1454
+ end
1455
+ attr_writer :custom_headers
1456
+
1457
+ # Allows you to chose between Premium and Standard detections.
1458
+ sig do
1459
+ returns(
1460
+ T.nilable(
1461
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::OrSymbol
1462
+ )
1463
+ )
1464
+ end
1465
+ attr_reader :detection_mode
418
1466
 
419
- sig { params(timeout_seconds: Integer).void }
420
- attr_writer :timeout_seconds
1467
+ sig do
1468
+ params(
1469
+ detection_mode:
1470
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::OrSymbol
1471
+ ).void
1472
+ end
1473
+ attr_writer :detection_mode
1474
+
1475
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
1476
+ # `Url` is not responding.
1477
+ sig { returns(T.nilable(String)) }
1478
+ attr_reader :fallback_url
1479
+
1480
+ sig { params(fallback_url: String).void }
1481
+ attr_writer :fallback_url
1482
+
1483
+ # The phone number of the party that initiated the call. Phone numbers are
1484
+ # formatted with a `+` and country code.
1485
+ sig { returns(T.nilable(String)) }
1486
+ attr_reader :from
1487
+
1488
+ sig { params(from: String).void }
1489
+ attr_writer :from
1490
+
1491
+ # Enables Answering Machine Detection.
1492
+ sig do
1493
+ returns(
1494
+ T.nilable(
1495
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::OrSymbol
1496
+ )
1497
+ )
1498
+ end
1499
+ attr_reader :machine_detection
421
1500
 
422
- # Whether to trim any leading and trailing silence from the recording. Defaults to
423
- # `trim-silence`.
424
- sig do
425
- returns(
426
- T.nilable(
427
- Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol
428
- )
429
- )
430
- end
431
- attr_reader :trim
1501
+ sig do
1502
+ params(
1503
+ machine_detection:
1504
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::OrSymbol
1505
+ ).void
1506
+ end
1507
+ attr_writer :machine_detection
432
1508
 
433
- sig do
434
- params(
435
- trim: Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol
436
- ).void
437
- end
438
- attr_writer :trim
1509
+ # If initial silence duration is greater than this value, consider it a machine.
1510
+ # Ignored when `premium` detection is used.
1511
+ sig { returns(T.nilable(Integer)) }
1512
+ attr_reader :machine_detection_silence_timeout
439
1513
 
440
- # The URL from which Telnyx will retrieve the TeXML call instructions.
441
- sig { returns(T.nilable(String)) }
442
- attr_reader :url
1514
+ sig { params(machine_detection_silence_timeout: Integer).void }
1515
+ attr_writer :machine_detection_silence_timeout
443
1516
 
444
- sig { params(url: String).void }
445
- attr_writer :url
1517
+ # Silence duration threshold after a greeting message or voice for it be
1518
+ # considered human. Ignored when `premium` detection is used.
1519
+ sig { returns(T.nilable(Integer)) }
1520
+ attr_reader :machine_detection_speech_end_threshold
446
1521
 
447
- # HTTP request type used for `Url`. The default value is inherited from TeXML
448
- # Application setting.
449
- sig do
450
- returns(
451
- T.nilable(
452
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol
453
- )
454
- )
455
- end
456
- attr_reader :url_method
1522
+ sig do
1523
+ params(machine_detection_speech_end_threshold: Integer).void
1524
+ end
1525
+ attr_writer :machine_detection_speech_end_threshold
1526
+
1527
+ # Maximum threshold of a human greeting. If greeting longer than this value,
1528
+ # considered machine. Ignored when `premium` detection is used.
1529
+ sig { returns(T.nilable(Integer)) }
1530
+ attr_reader :machine_detection_speech_threshold
1531
+
1532
+ sig { params(machine_detection_speech_threshold: Integer).void }
1533
+ attr_writer :machine_detection_speech_threshold
1534
+
1535
+ # Maximum timeout threshold in milliseconds for overall detection.
1536
+ sig { returns(T.nilable(Integer)) }
1537
+ attr_reader :machine_detection_timeout
1538
+
1539
+ sig { params(machine_detection_timeout: Integer).void }
1540
+ attr_writer :machine_detection_timeout
1541
+
1542
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
1543
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
1544
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
1545
+ # destinations.
1546
+ sig do
1547
+ returns(
1548
+ T.nilable(
1549
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::OrSymbol
1550
+ )
1551
+ )
1552
+ end
1553
+ attr_reader :media_encryption
457
1554
 
458
- sig do
459
- params(
460
- url_method:
461
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol
462
- ).void
463
- end
464
- attr_writer :url_method
1555
+ sig do
1556
+ params(
1557
+ media_encryption:
1558
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::OrSymbol
1559
+ ).void
1560
+ end
1561
+ attr_writer :media_encryption
465
1562
 
466
- sig do
467
- params(
468
- account_sid: String,
469
- application_sid: String,
470
- from: String,
471
- to: String,
472
- async_amd: T::Boolean,
473
- async_amd_status_callback: String,
474
- async_amd_status_callback_method:
475
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol,
476
- caller_id: String,
477
- cancel_playback_on_detect_message_end: T::Boolean,
478
- cancel_playback_on_machine_detection: T::Boolean,
479
- custom_headers:
480
- T::Array[
481
- Telnyx::Texml::Accounts::CallCallsParams::CustomHeader::OrHash
482
- ],
483
- detection_mode:
484
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol,
485
- fallback_url: String,
486
- machine_detection:
487
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol,
488
- machine_detection_silence_timeout: Integer,
489
- machine_detection_speech_end_threshold: Integer,
490
- machine_detection_speech_threshold: Integer,
491
- machine_detection_timeout: Integer,
492
- preferred_codecs: String,
493
- record: T::Boolean,
494
- recording_channels:
495
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol,
496
- recording_status_callback: String,
497
- recording_status_callback_event: String,
498
- recording_status_callback_method:
499
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol,
500
- recording_timeout: Integer,
501
- recording_track:
502
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol,
503
- send_recording_url: T::Boolean,
504
- sip_auth_password: String,
505
- sip_auth_username: String,
506
- sip_region:
507
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol,
508
- status_callback: String,
509
- status_callback_event:
510
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol,
511
- status_callback_method:
512
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol,
513
- supervise_call_sid: String,
514
- supervising_role:
515
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol,
516
- texml: String,
517
- time_limit: Integer,
518
- timeout_seconds: Integer,
519
- trim: Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol,
520
- url: String,
521
- url_method:
522
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol,
523
- request_options: Telnyx::RequestOptions::OrHash
524
- ).returns(T.attached_class)
525
- end
526
- def self.new(
527
- account_sid:,
528
- # The ID of the TeXML Application.
529
- application_sid:,
530
- # The phone number of the party that initiated the call. Phone numbers are
531
- # formatted with a `+` and country code.
532
- from:,
533
- # The phone number of the called party. Phone numbers are formatted with a `+` and
534
- # country code.
535
- to:,
536
- # Select whether to perform answering machine detection in the background. By
537
- # default execution is blocked until Answering Machine Detection is completed.
538
- async_amd: nil,
539
- # URL destination for Telnyx to send AMD callback events to for the call.
540
- async_amd_status_callback: nil,
541
- # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
542
- # inherited from TeXML Application setting.
543
- async_amd_status_callback_method: nil,
544
- # To be used as the caller id name (SIP From Display Name) presented to the
545
- # destination (`To` number). The string should have a maximum of 128 characters,
546
- # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
547
- # ommited, the display name will be the same as the number in the `From` field.
548
- caller_id: nil,
549
- # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
550
- # `true`.
551
- cancel_playback_on_detect_message_end: nil,
552
- # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
553
- cancel_playback_on_machine_detection: nil,
554
- # Custom HTTP headers to be sent with the call. Each header should be an object
555
- # with 'name' and 'value' properties.
556
- custom_headers: nil,
557
- # Allows you to chose between Premium and Standard detections.
558
- detection_mode: nil,
559
- # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
560
- # `Url` is not responding.
561
- fallback_url: nil,
562
- # Enables Answering Machine Detection.
563
- machine_detection: nil,
564
- # If initial silence duration is greater than this value, consider it a machine.
565
- # Ignored when `premium` detection is used.
566
- machine_detection_silence_timeout: nil,
567
- # Silence duration threshold after a greeting message or voice for it be
568
- # considered human. Ignored when `premium` detection is used.
569
- machine_detection_speech_end_threshold: nil,
570
- # Maximum threshold of a human greeting. If greeting longer than this value,
571
- # considered machine. Ignored when `premium` detection is used.
572
- machine_detection_speech_threshold: nil,
573
- # Maximum timeout threshold in milliseconds for overall detection.
574
- machine_detection_timeout: nil,
575
- # The list of comma-separated codecs to be offered on a call.
576
- preferred_codecs: nil,
577
- # Whether to record the entire participant's call leg. Defaults to `false`.
578
- record: nil,
579
- # The number of channels in the final recording. Defaults to `mono`.
580
- recording_channels: nil,
581
- # The URL the recording callbacks will be sent to.
582
- recording_status_callback: nil,
583
- # The changes to the recording's state that should generate a call to
584
- # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
585
- # Separate multiple values with a space. Defaults to `completed`.
586
- recording_status_callback_event: nil,
587
- # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
588
- recording_status_callback_method: nil,
589
- # The number of seconds that Telnyx will wait for the recording to be stopped if
590
- # silence is detected. The timer only starts when the speech is detected. Please
591
- # note that the transcription is used to detect silence and the related charge
592
- # will be applied. The minimum value is 0. The default value is 0 (infinite)
593
- recording_timeout: nil,
594
- # The audio track to record for the call. The default is `both`.
595
- recording_track: nil,
596
- # Whether to send RecordingUrl in webhooks.
597
- send_recording_url: nil,
598
- # The password to use for SIP authentication.
599
- sip_auth_password: nil,
600
- # The username to use for SIP authentication.
601
- sip_auth_username: nil,
602
- # Defines the SIP region to be used for the call.
603
- sip_region: nil,
604
- # URL destination for Telnyx to send status callback events to for the call.
605
- status_callback: nil,
606
- # The call events for which Telnyx should send a webhook. Multiple events can be
607
- # defined when separated by a space.
608
- status_callback_event: nil,
609
- # HTTP request type used for `StatusCallback`.
610
- status_callback_method: nil,
611
- # The call control ID of the existing call to supervise. When provided, the
612
- # created leg will be added to the specified call in supervising mode. Status
613
- # callbacks and action callbacks will NOT be sent for the supervising leg.
614
- supervise_call_sid: nil,
615
- # The supervising role for the new leg. Determines the audio behavior: barge (hear
616
- # both sides), whisper (only hear supervisor), monitor (hear both sides but
617
- # supervisor muted). Default: barge
618
- supervising_role: nil,
619
- # TeXML to be used as instructions for the call. If provided, the call will
620
- # execute these instructions instead of fetching from the Url.
621
- texml: nil,
622
- # The maximum duration of the call in seconds. The minimum value is 30 and the
623
- # maximum value is 14400 (4 hours). Default is 14400 seconds.
624
- time_limit: nil,
625
- # The number of seconds to wait for the called party to answer the call before the
626
- # call is canceled. The minimum value is 5 and the maximum value is 120. Default
627
- # is 30 seconds.
628
- timeout_seconds: nil,
629
- # Whether to trim any leading and trailing silence from the recording. Defaults to
630
- # `trim-silence`.
631
- trim: nil,
632
- # The URL from which Telnyx will retrieve the TeXML call instructions.
633
- url: nil,
634
- # HTTP request type used for `Url`. The default value is inherited from TeXML
635
- # Application setting.
636
- url_method: nil,
637
- request_options: {}
638
- )
639
- end
1563
+ # The list of comma-separated codecs to be offered on a call.
1564
+ sig { returns(T.nilable(String)) }
1565
+ attr_reader :preferred_codecs
640
1566
 
641
- sig do
642
- override.returns(
643
- {
644
- account_sid: String,
645
- application_sid: String,
646
- from: String,
647
- to: String,
648
- async_amd: T::Boolean,
649
- async_amd_status_callback: String,
650
- async_amd_status_callback_method:
651
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol,
652
- caller_id: String,
653
- cancel_playback_on_detect_message_end: T::Boolean,
654
- cancel_playback_on_machine_detection: T::Boolean,
655
- custom_headers:
656
- T::Array[
657
- Telnyx::Texml::Accounts::CallCallsParams::CustomHeader
658
- ],
659
- detection_mode:
660
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol,
661
- fallback_url: String,
662
- machine_detection:
663
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol,
664
- machine_detection_silence_timeout: Integer,
665
- machine_detection_speech_end_threshold: Integer,
666
- machine_detection_speech_threshold: Integer,
667
- machine_detection_timeout: Integer,
668
- preferred_codecs: String,
669
- record: T::Boolean,
670
- recording_channels:
671
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol,
672
- recording_status_callback: String,
673
- recording_status_callback_event: String,
674
- recording_status_callback_method:
675
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol,
676
- recording_timeout: Integer,
677
- recording_track:
678
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol,
679
- send_recording_url: T::Boolean,
680
- sip_auth_password: String,
681
- sip_auth_username: String,
682
- sip_region:
683
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol,
684
- status_callback: String,
685
- status_callback_event:
686
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol,
687
- status_callback_method:
688
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol,
689
- supervise_call_sid: String,
690
- supervising_role:
691
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol,
692
- texml: String,
693
- time_limit: Integer,
694
- timeout_seconds: Integer,
695
- trim: Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol,
696
- url: String,
697
- url_method:
698
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol,
699
- request_options: Telnyx::RequestOptions
700
- }
701
- )
702
- end
703
- def to_hash
704
- end
1567
+ sig { params(preferred_codecs: String).void }
1568
+ attr_writer :preferred_codecs
705
1569
 
706
- # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
707
- # inherited from TeXML Application setting.
708
- module AsyncAmdStatusCallbackMethod
709
- extend Telnyx::Internal::Type::Enum
1570
+ # Whether to record the entire participant's call leg. Defaults to `false`.
1571
+ sig { returns(T.nilable(T::Boolean)) }
1572
+ attr_reader :record
710
1573
 
711
- TaggedSymbol =
712
- T.type_alias do
713
- T.all(
714
- Symbol,
715
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod
1574
+ sig { params(record: T::Boolean).void }
1575
+ attr_writer :record
1576
+
1577
+ # The number of channels in the final recording. Defaults to `mono`.
1578
+ sig do
1579
+ returns(
1580
+ T.nilable(
1581
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::OrSymbol
1582
+ )
716
1583
  )
717
1584
  end
718
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1585
+ attr_reader :recording_channels
719
1586
 
720
- GET =
721
- T.let(
722
- :GET,
723
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
724
- )
725
- POST =
726
- T.let(
727
- :POST,
728
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
729
- )
730
-
731
- sig do
732
- override.returns(
733
- T::Array[
734
- Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::TaggedSymbol
735
- ]
736
- )
737
- end
738
- def self.values
739
- end
740
- end
1587
+ sig do
1588
+ params(
1589
+ recording_channels:
1590
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::OrSymbol
1591
+ ).void
1592
+ end
1593
+ attr_writer :recording_channels
1594
+
1595
+ # The URL the recording callbacks will be sent to.
1596
+ sig { returns(T.nilable(String)) }
1597
+ attr_reader :recording_status_callback
1598
+
1599
+ sig { params(recording_status_callback: String).void }
1600
+ attr_writer :recording_status_callback
1601
+
1602
+ # The changes to the recording's state that should generate a call to
1603
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
1604
+ # Separate multiple values with a space. Defaults to `completed`.
1605
+ sig { returns(T.nilable(String)) }
1606
+ attr_reader :recording_status_callback_event
1607
+
1608
+ sig { params(recording_status_callback_event: String).void }
1609
+ attr_writer :recording_status_callback_event
1610
+
1611
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
1612
+ sig do
1613
+ returns(
1614
+ T.nilable(
1615
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::OrSymbol
1616
+ )
1617
+ )
1618
+ end
1619
+ attr_reader :recording_status_callback_method
741
1620
 
742
- class CustomHeader < Telnyx::Internal::Type::BaseModel
743
- OrHash =
744
- T.type_alias do
745
- T.any(
746
- Telnyx::Texml::Accounts::CallCallsParams::CustomHeader,
747
- Telnyx::Internal::AnyHash
1621
+ sig do
1622
+ params(
1623
+ recording_status_callback_method:
1624
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::OrSymbol
1625
+ ).void
1626
+ end
1627
+ attr_writer :recording_status_callback_method
1628
+
1629
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
1630
+ # silence is detected. The timer only starts when the speech is detected. Please
1631
+ # note that the transcription is used to detect silence and the related charge
1632
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
1633
+ sig { returns(T.nilable(Integer)) }
1634
+ attr_reader :recording_timeout
1635
+
1636
+ sig { params(recording_timeout: Integer).void }
1637
+ attr_writer :recording_timeout
1638
+
1639
+ # The audio track to record for the call. The default is `both`.
1640
+ sig do
1641
+ returns(
1642
+ T.nilable(
1643
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::OrSymbol
1644
+ )
748
1645
  )
749
1646
  end
1647
+ attr_reader :recording_track
750
1648
 
751
- # The name of the custom header
752
- sig { returns(String) }
753
- attr_accessor :name
1649
+ sig do
1650
+ params(
1651
+ recording_track:
1652
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::OrSymbol
1653
+ ).void
1654
+ end
1655
+ attr_writer :recording_track
754
1656
 
755
- # The value of the custom header
756
- sig { returns(String) }
757
- attr_accessor :value
1657
+ # Whether to send RecordingUrl in webhooks.
1658
+ sig { returns(T.nilable(T::Boolean)) }
1659
+ attr_reader :send_recording_url
758
1660
 
759
- sig do
760
- params(name: String, value: String).returns(T.attached_class)
761
- end
762
- def self.new(
763
- # The name of the custom header
764
- name:,
765
- # The value of the custom header
766
- value:
767
- )
768
- end
1661
+ sig { params(send_recording_url: T::Boolean).void }
1662
+ attr_writer :send_recording_url
769
1663
 
770
- sig { override.returns({ name: String, value: String }) }
771
- def to_hash
772
- end
773
- end
1664
+ # The password to use for SIP authentication.
1665
+ sig { returns(T.nilable(String)) }
1666
+ attr_reader :sip_auth_password
774
1667
 
775
- # Allows you to chose between Premium and Standard detections.
776
- module DetectionMode
777
- extend Telnyx::Internal::Type::Enum
1668
+ sig { params(sip_auth_password: String).void }
1669
+ attr_writer :sip_auth_password
778
1670
 
779
- TaggedSymbol =
780
- T.type_alias do
781
- T.all(
782
- Symbol,
783
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode
1671
+ # The username to use for SIP authentication.
1672
+ sig { returns(T.nilable(String)) }
1673
+ attr_reader :sip_auth_username
1674
+
1675
+ sig { params(sip_auth_username: String).void }
1676
+ attr_writer :sip_auth_username
1677
+
1678
+ # Defines the SIP region to be used for the call.
1679
+ sig do
1680
+ returns(
1681
+ T.nilable(
1682
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::OrSymbol
1683
+ )
784
1684
  )
785
1685
  end
786
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1686
+ attr_reader :sip_region
787
1687
 
788
- PREMIUM =
789
- T.let(
790
- :Premium,
791
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::TaggedSymbol
792
- )
793
- REGULAR =
794
- T.let(
795
- :Regular,
796
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::TaggedSymbol
797
- )
1688
+ sig do
1689
+ params(
1690
+ sip_region:
1691
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::OrSymbol
1692
+ ).void
1693
+ end
1694
+ attr_writer :sip_region
1695
+
1696
+ # URL destination for Telnyx to send status callback events to for the call.
1697
+ sig { returns(T.nilable(String)) }
1698
+ attr_reader :status_callback
1699
+
1700
+ sig { params(status_callback: String).void }
1701
+ attr_writer :status_callback
1702
+
1703
+ # The call events for which Telnyx should send a webhook. Multiple events can be
1704
+ # defined when separated by a space.
1705
+ sig do
1706
+ returns(
1707
+ T.nilable(
1708
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::OrSymbol
1709
+ )
1710
+ )
1711
+ end
1712
+ attr_reader :status_callback_event
798
1713
 
799
- sig do
800
- override.returns(
801
- T::Array[
802
- Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::TaggedSymbol
803
- ]
804
- )
805
- end
806
- def self.values
807
- end
808
- end
1714
+ sig do
1715
+ params(
1716
+ status_callback_event:
1717
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::OrSymbol
1718
+ ).void
1719
+ end
1720
+ attr_writer :status_callback_event
1721
+
1722
+ # HTTP request type used for `StatusCallback`.
1723
+ sig do
1724
+ returns(
1725
+ T.nilable(
1726
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::OrSymbol
1727
+ )
1728
+ )
1729
+ end
1730
+ attr_reader :status_callback_method
809
1731
 
810
- # Enables Answering Machine Detection.
811
- module MachineDetection
812
- extend Telnyx::Internal::Type::Enum
1732
+ sig do
1733
+ params(
1734
+ status_callback_method:
1735
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::OrSymbol
1736
+ ).void
1737
+ end
1738
+ attr_writer :status_callback_method
1739
+
1740
+ # The call control ID of the existing call to supervise. When provided, the
1741
+ # created leg will be added to the specified call in supervising mode. Status
1742
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
1743
+ sig { returns(T.nilable(String)) }
1744
+ attr_reader :supervise_call_sid
1745
+
1746
+ sig { params(supervise_call_sid: String).void }
1747
+ attr_writer :supervise_call_sid
1748
+
1749
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
1750
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
1751
+ # supervisor muted). Default: barge
1752
+ sig do
1753
+ returns(
1754
+ T.nilable(
1755
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::OrSymbol
1756
+ )
1757
+ )
1758
+ end
1759
+ attr_reader :supervising_role
813
1760
 
814
- TaggedSymbol =
815
- T.type_alias do
816
- T.all(
817
- Symbol,
818
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection
1761
+ sig do
1762
+ params(
1763
+ supervising_role:
1764
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::OrSymbol
1765
+ ).void
1766
+ end
1767
+ attr_writer :supervising_role
1768
+
1769
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
1770
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
1771
+ sig { returns(T.nilable(Integer)) }
1772
+ attr_reader :time_limit
1773
+
1774
+ sig { params(time_limit: Integer).void }
1775
+ attr_writer :time_limit
1776
+
1777
+ # The number of seconds to wait for the called party to answer the call before the
1778
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
1779
+ # is 30 seconds.
1780
+ sig { returns(T.nilable(Integer)) }
1781
+ attr_reader :timeout
1782
+
1783
+ sig { params(timeout: Integer).void }
1784
+ attr_writer :timeout
1785
+
1786
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
1787
+ # country code.
1788
+ sig { returns(T.nilable(String)) }
1789
+ attr_reader :to
1790
+
1791
+ sig { params(to: String).void }
1792
+ attr_writer :to
1793
+
1794
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
1795
+ # `trim-silence`.
1796
+ sig do
1797
+ returns(
1798
+ T.nilable(
1799
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::OrSymbol
1800
+ )
819
1801
  )
820
1802
  end
821
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1803
+ attr_reader :trim
822
1804
 
823
- ENABLE =
824
- T.let(
825
- :Enable,
826
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::TaggedSymbol
827
- )
828
- DISABLE =
829
- T.let(
830
- :Disable,
831
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::TaggedSymbol
832
- )
833
- DETECT_MESSAGE_END =
834
- T.let(
835
- :DetectMessageEnd,
836
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::TaggedSymbol
837
- )
1805
+ sig do
1806
+ params(
1807
+ trim:
1808
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::OrSymbol
1809
+ ).void
1810
+ end
1811
+ attr_writer :trim
838
1812
 
839
- sig do
840
- override.returns(
841
- T::Array[
842
- Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::TaggedSymbol
843
- ]
844
- )
845
- end
846
- def self.values
847
- end
848
- end
1813
+ sig { returns(T.nilable(T.anything)) }
1814
+ attr_reader :url
849
1815
 
850
- # The number of channels in the final recording. Defaults to `mono`.
851
- module RecordingChannels
852
- extend Telnyx::Internal::Type::Enum
1816
+ sig { params(url: T.anything).void }
1817
+ attr_writer :url
853
1818
 
854
- TaggedSymbol =
855
- T.type_alias do
856
- T.all(
857
- Symbol,
858
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels
1819
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
1820
+ # Application setting.
1821
+ sig do
1822
+ returns(
1823
+ T.nilable(
1824
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::OrSymbol
1825
+ )
859
1826
  )
860
1827
  end
861
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1828
+ attr_reader :url_method
862
1829
 
863
- MONO =
864
- T.let(
865
- :mono,
866
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::TaggedSymbol
867
- )
868
- DUAL =
869
- T.let(
870
- :dual,
871
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::TaggedSymbol
1830
+ sig do
1831
+ params(
1832
+ url_method:
1833
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::OrSymbol
1834
+ ).void
1835
+ end
1836
+ attr_writer :url_method
1837
+
1838
+ sig do
1839
+ params(
1840
+ texml: String,
1841
+ application_sid: String,
1842
+ async_amd: T::Boolean,
1843
+ async_amd_status_callback: String,
1844
+ async_amd_status_callback_method:
1845
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::OrSymbol,
1846
+ caller_id: String,
1847
+ cancel_playback_on_detect_message_end: T::Boolean,
1848
+ cancel_playback_on_machine_detection: T::Boolean,
1849
+ custom_headers:
1850
+ T::Array[
1851
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::CustomHeader::OrHash
1852
+ ],
1853
+ detection_mode:
1854
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::OrSymbol,
1855
+ fallback_url: String,
1856
+ from: String,
1857
+ machine_detection:
1858
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::OrSymbol,
1859
+ machine_detection_silence_timeout: Integer,
1860
+ machine_detection_speech_end_threshold: Integer,
1861
+ machine_detection_speech_threshold: Integer,
1862
+ machine_detection_timeout: Integer,
1863
+ media_encryption:
1864
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::OrSymbol,
1865
+ preferred_codecs: String,
1866
+ record: T::Boolean,
1867
+ recording_channels:
1868
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::OrSymbol,
1869
+ recording_status_callback: String,
1870
+ recording_status_callback_event: String,
1871
+ recording_status_callback_method:
1872
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::OrSymbol,
1873
+ recording_timeout: Integer,
1874
+ recording_track:
1875
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::OrSymbol,
1876
+ send_recording_url: T::Boolean,
1877
+ sip_auth_password: String,
1878
+ sip_auth_username: String,
1879
+ sip_region:
1880
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::OrSymbol,
1881
+ status_callback: String,
1882
+ status_callback_event:
1883
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::OrSymbol,
1884
+ status_callback_method:
1885
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::OrSymbol,
1886
+ supervise_call_sid: String,
1887
+ supervising_role:
1888
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::OrSymbol,
1889
+ time_limit: Integer,
1890
+ timeout: Integer,
1891
+ to: String,
1892
+ trim:
1893
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::OrSymbol,
1894
+ url: T.anything,
1895
+ url_method:
1896
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::OrSymbol
1897
+ ).returns(T.attached_class)
1898
+ end
1899
+ def self.new(
1900
+ # TeXML to be used as instructions for the call. If provided, the call will
1901
+ # execute these instructions instead of fetching from the Url.
1902
+ texml:,
1903
+ # The ID of the TeXML Application.
1904
+ application_sid: nil,
1905
+ # Select whether to perform answering machine detection in the background. By
1906
+ # default execution is blocked until Answering Machine Detection is completed.
1907
+ async_amd: nil,
1908
+ # URL destination for Telnyx to send AMD callback events to for the call.
1909
+ async_amd_status_callback: nil,
1910
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
1911
+ # inherited from TeXML Application setting.
1912
+ async_amd_status_callback_method: nil,
1913
+ # To be used as the caller id name (SIP From Display Name) presented to the
1914
+ # destination (`To` number). The string should have a maximum of 128 characters,
1915
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
1916
+ # ommited, the display name will be the same as the number in the `From` field.
1917
+ caller_id: nil,
1918
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
1919
+ # `true`.
1920
+ cancel_playback_on_detect_message_end: nil,
1921
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
1922
+ cancel_playback_on_machine_detection: nil,
1923
+ # Custom HTTP headers to be sent with the call. Each header should be an object
1924
+ # with 'name' and 'value' properties.
1925
+ custom_headers: nil,
1926
+ # Allows you to chose between Premium and Standard detections.
1927
+ detection_mode: nil,
1928
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
1929
+ # `Url` is not responding.
1930
+ fallback_url: nil,
1931
+ # The phone number of the party that initiated the call. Phone numbers are
1932
+ # formatted with a `+` and country code.
1933
+ from: nil,
1934
+ # Enables Answering Machine Detection.
1935
+ machine_detection: nil,
1936
+ # If initial silence duration is greater than this value, consider it a machine.
1937
+ # Ignored when `premium` detection is used.
1938
+ machine_detection_silence_timeout: nil,
1939
+ # Silence duration threshold after a greeting message or voice for it be
1940
+ # considered human. Ignored when `premium` detection is used.
1941
+ machine_detection_speech_end_threshold: nil,
1942
+ # Maximum threshold of a human greeting. If greeting longer than this value,
1943
+ # considered machine. Ignored when `premium` detection is used.
1944
+ machine_detection_speech_threshold: nil,
1945
+ # Maximum timeout threshold in milliseconds for overall detection.
1946
+ machine_detection_timeout: nil,
1947
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
1948
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
1949
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
1950
+ # destinations.
1951
+ media_encryption: nil,
1952
+ # The list of comma-separated codecs to be offered on a call.
1953
+ preferred_codecs: nil,
1954
+ # Whether to record the entire participant's call leg. Defaults to `false`.
1955
+ record: nil,
1956
+ # The number of channels in the final recording. Defaults to `mono`.
1957
+ recording_channels: nil,
1958
+ # The URL the recording callbacks will be sent to.
1959
+ recording_status_callback: nil,
1960
+ # The changes to the recording's state that should generate a call to
1961
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
1962
+ # Separate multiple values with a space. Defaults to `completed`.
1963
+ recording_status_callback_event: nil,
1964
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
1965
+ recording_status_callback_method: nil,
1966
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
1967
+ # silence is detected. The timer only starts when the speech is detected. Please
1968
+ # note that the transcription is used to detect silence and the related charge
1969
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
1970
+ recording_timeout: nil,
1971
+ # The audio track to record for the call. The default is `both`.
1972
+ recording_track: nil,
1973
+ # Whether to send RecordingUrl in webhooks.
1974
+ send_recording_url: nil,
1975
+ # The password to use for SIP authentication.
1976
+ sip_auth_password: nil,
1977
+ # The username to use for SIP authentication.
1978
+ sip_auth_username: nil,
1979
+ # Defines the SIP region to be used for the call.
1980
+ sip_region: nil,
1981
+ # URL destination for Telnyx to send status callback events to for the call.
1982
+ status_callback: nil,
1983
+ # The call events for which Telnyx should send a webhook. Multiple events can be
1984
+ # defined when separated by a space.
1985
+ status_callback_event: nil,
1986
+ # HTTP request type used for `StatusCallback`.
1987
+ status_callback_method: nil,
1988
+ # The call control ID of the existing call to supervise. When provided, the
1989
+ # created leg will be added to the specified call in supervising mode. Status
1990
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
1991
+ supervise_call_sid: nil,
1992
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
1993
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
1994
+ # supervisor muted). Default: barge
1995
+ supervising_role: nil,
1996
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
1997
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
1998
+ time_limit: nil,
1999
+ # The number of seconds to wait for the called party to answer the call before the
2000
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
2001
+ # is 30 seconds.
2002
+ timeout: nil,
2003
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
2004
+ # country code.
2005
+ to: nil,
2006
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
2007
+ # `trim-silence`.
2008
+ trim: nil,
2009
+ url: nil,
2010
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
2011
+ # Application setting.
2012
+ url_method: nil
872
2013
  )
2014
+ end
873
2015
 
874
- sig do
875
- override.returns(
876
- T::Array[
877
- Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::TaggedSymbol
878
- ]
879
- )
880
- end
881
- def self.values
882
- end
883
- end
2016
+ sig do
2017
+ override.returns(
2018
+ {
2019
+ texml: String,
2020
+ application_sid: String,
2021
+ async_amd: T::Boolean,
2022
+ async_amd_status_callback: String,
2023
+ async_amd_status_callback_method:
2024
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::OrSymbol,
2025
+ caller_id: String,
2026
+ cancel_playback_on_detect_message_end: T::Boolean,
2027
+ cancel_playback_on_machine_detection: T::Boolean,
2028
+ custom_headers:
2029
+ T::Array[
2030
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::CustomHeader
2031
+ ],
2032
+ detection_mode:
2033
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::OrSymbol,
2034
+ fallback_url: String,
2035
+ from: String,
2036
+ machine_detection:
2037
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::OrSymbol,
2038
+ machine_detection_silence_timeout: Integer,
2039
+ machine_detection_speech_end_threshold: Integer,
2040
+ machine_detection_speech_threshold: Integer,
2041
+ machine_detection_timeout: Integer,
2042
+ media_encryption:
2043
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::OrSymbol,
2044
+ preferred_codecs: String,
2045
+ record: T::Boolean,
2046
+ recording_channels:
2047
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::OrSymbol,
2048
+ recording_status_callback: String,
2049
+ recording_status_callback_event: String,
2050
+ recording_status_callback_method:
2051
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::OrSymbol,
2052
+ recording_timeout: Integer,
2053
+ recording_track:
2054
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::OrSymbol,
2055
+ send_recording_url: T::Boolean,
2056
+ sip_auth_password: String,
2057
+ sip_auth_username: String,
2058
+ sip_region:
2059
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::OrSymbol,
2060
+ status_callback: String,
2061
+ status_callback_event:
2062
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::OrSymbol,
2063
+ status_callback_method:
2064
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::OrSymbol,
2065
+ supervise_call_sid: String,
2066
+ supervising_role:
2067
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::OrSymbol,
2068
+ time_limit: Integer,
2069
+ timeout: Integer,
2070
+ to: String,
2071
+ trim:
2072
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::OrSymbol,
2073
+ url: T.anything,
2074
+ url_method:
2075
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::OrSymbol
2076
+ }
2077
+ )
2078
+ end
2079
+ def to_hash
2080
+ end
884
2081
 
885
- # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
886
- module RecordingStatusCallbackMethod
887
- extend Telnyx::Internal::Type::Enum
2082
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
2083
+ # inherited from TeXML Application setting.
2084
+ module AsyncAmdStatusCallbackMethod
2085
+ extend Telnyx::Internal::Type::Enum
2086
+
2087
+ TaggedSymbol =
2088
+ T.type_alias do
2089
+ T.all(
2090
+ Symbol,
2091
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod
2092
+ )
2093
+ end
2094
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2095
+
2096
+ GET =
2097
+ T.let(
2098
+ :GET,
2099
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::TaggedSymbol
2100
+ )
2101
+ POST =
2102
+ T.let(
2103
+ :POST,
2104
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::TaggedSymbol
2105
+ )
2106
+
2107
+ sig do
2108
+ override.returns(
2109
+ T::Array[
2110
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::AsyncAmdStatusCallbackMethod::TaggedSymbol
2111
+ ]
2112
+ )
2113
+ end
2114
+ def self.values
2115
+ end
2116
+ end
888
2117
 
889
- TaggedSymbol =
890
- T.type_alias do
891
- T.all(
892
- Symbol,
893
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod
2118
+ class CustomHeader < Telnyx::Internal::Type::BaseModel
2119
+ OrHash =
2120
+ T.type_alias do
2121
+ T.any(
2122
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::CustomHeader,
2123
+ Telnyx::Internal::AnyHash
2124
+ )
2125
+ end
2126
+
2127
+ # The name of the custom header
2128
+ sig { returns(String) }
2129
+ attr_accessor :name
2130
+
2131
+ # The value of the custom header
2132
+ sig { returns(String) }
2133
+ attr_accessor :value
2134
+
2135
+ sig do
2136
+ params(name: String, value: String).returns(T.attached_class)
2137
+ end
2138
+ def self.new(
2139
+ # The name of the custom header
2140
+ name:,
2141
+ # The value of the custom header
2142
+ value:
894
2143
  )
2144
+ end
2145
+
2146
+ sig { override.returns({ name: String, value: String }) }
2147
+ def to_hash
2148
+ end
895
2149
  end
896
- OrSymbol = T.type_alias { T.any(Symbol, String) }
897
2150
 
898
- GET =
899
- T.let(
900
- :GET,
901
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::TaggedSymbol
902
- )
903
- POST =
904
- T.let(
905
- :POST,
906
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::TaggedSymbol
907
- )
2151
+ # Allows you to chose between Premium and Standard detections.
2152
+ module DetectionMode
2153
+ extend Telnyx::Internal::Type::Enum
2154
+
2155
+ TaggedSymbol =
2156
+ T.type_alias do
2157
+ T.all(
2158
+ Symbol,
2159
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode
2160
+ )
2161
+ end
2162
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2163
+
2164
+ PREMIUM =
2165
+ T.let(
2166
+ :Premium,
2167
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::TaggedSymbol
2168
+ )
2169
+ REGULAR =
2170
+ T.let(
2171
+ :Regular,
2172
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::TaggedSymbol
2173
+ )
2174
+
2175
+ sig do
2176
+ override.returns(
2177
+ T::Array[
2178
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::DetectionMode::TaggedSymbol
2179
+ ]
2180
+ )
2181
+ end
2182
+ def self.values
2183
+ end
2184
+ end
908
2185
 
909
- sig do
910
- override.returns(
911
- T::Array[
912
- Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::TaggedSymbol
913
- ]
914
- )
915
- end
916
- def self.values
2186
+ # Enables Answering Machine Detection.
2187
+ module MachineDetection
2188
+ extend Telnyx::Internal::Type::Enum
2189
+
2190
+ TaggedSymbol =
2191
+ T.type_alias do
2192
+ T.all(
2193
+ Symbol,
2194
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection
2195
+ )
2196
+ end
2197
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2198
+
2199
+ ENABLE =
2200
+ T.let(
2201
+ :Enable,
2202
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::TaggedSymbol
2203
+ )
2204
+ DISABLE =
2205
+ T.let(
2206
+ :Disable,
2207
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::TaggedSymbol
2208
+ )
2209
+ DETECT_MESSAGE_END =
2210
+ T.let(
2211
+ :DetectMessageEnd,
2212
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::TaggedSymbol
2213
+ )
2214
+
2215
+ sig do
2216
+ override.returns(
2217
+ T::Array[
2218
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MachineDetection::TaggedSymbol
2219
+ ]
2220
+ )
2221
+ end
2222
+ def self.values
2223
+ end
2224
+ end
2225
+
2226
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
2227
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
2228
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
2229
+ # destinations.
2230
+ module MediaEncryption
2231
+ extend Telnyx::Internal::Type::Enum
2232
+
2233
+ TaggedSymbol =
2234
+ T.type_alias do
2235
+ T.all(
2236
+ Symbol,
2237
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption
2238
+ )
2239
+ end
2240
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2241
+
2242
+ DISABLED =
2243
+ T.let(
2244
+ :disabled,
2245
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::TaggedSymbol
2246
+ )
2247
+ SRTP =
2248
+ T.let(
2249
+ :SRTP,
2250
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::TaggedSymbol
2251
+ )
2252
+ DTLS =
2253
+ T.let(
2254
+ :DTLS,
2255
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::TaggedSymbol
2256
+ )
2257
+
2258
+ sig do
2259
+ override.returns(
2260
+ T::Array[
2261
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::MediaEncryption::TaggedSymbol
2262
+ ]
2263
+ )
2264
+ end
2265
+ def self.values
2266
+ end
2267
+ end
2268
+
2269
+ # The number of channels in the final recording. Defaults to `mono`.
2270
+ module RecordingChannels
2271
+ extend Telnyx::Internal::Type::Enum
2272
+
2273
+ TaggedSymbol =
2274
+ T.type_alias do
2275
+ T.all(
2276
+ Symbol,
2277
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels
2278
+ )
2279
+ end
2280
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2281
+
2282
+ MONO =
2283
+ T.let(
2284
+ :mono,
2285
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::TaggedSymbol
2286
+ )
2287
+ DUAL =
2288
+ T.let(
2289
+ :dual,
2290
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::TaggedSymbol
2291
+ )
2292
+
2293
+ sig do
2294
+ override.returns(
2295
+ T::Array[
2296
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingChannels::TaggedSymbol
2297
+ ]
2298
+ )
2299
+ end
2300
+ def self.values
2301
+ end
2302
+ end
2303
+
2304
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
2305
+ module RecordingStatusCallbackMethod
2306
+ extend Telnyx::Internal::Type::Enum
2307
+
2308
+ TaggedSymbol =
2309
+ T.type_alias do
2310
+ T.all(
2311
+ Symbol,
2312
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod
2313
+ )
2314
+ end
2315
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2316
+
2317
+ GET =
2318
+ T.let(
2319
+ :GET,
2320
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::TaggedSymbol
2321
+ )
2322
+ POST =
2323
+ T.let(
2324
+ :POST,
2325
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::TaggedSymbol
2326
+ )
2327
+
2328
+ sig do
2329
+ override.returns(
2330
+ T::Array[
2331
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingStatusCallbackMethod::TaggedSymbol
2332
+ ]
2333
+ )
2334
+ end
2335
+ def self.values
2336
+ end
2337
+ end
2338
+
2339
+ # The audio track to record for the call. The default is `both`.
2340
+ module RecordingTrack
2341
+ extend Telnyx::Internal::Type::Enum
2342
+
2343
+ TaggedSymbol =
2344
+ T.type_alias do
2345
+ T.all(
2346
+ Symbol,
2347
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack
2348
+ )
2349
+ end
2350
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2351
+
2352
+ INBOUND =
2353
+ T.let(
2354
+ :inbound,
2355
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::TaggedSymbol
2356
+ )
2357
+ OUTBOUND =
2358
+ T.let(
2359
+ :outbound,
2360
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::TaggedSymbol
2361
+ )
2362
+ BOTH =
2363
+ T.let(
2364
+ :both,
2365
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::TaggedSymbol
2366
+ )
2367
+
2368
+ sig do
2369
+ override.returns(
2370
+ T::Array[
2371
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::RecordingTrack::TaggedSymbol
2372
+ ]
2373
+ )
2374
+ end
2375
+ def self.values
2376
+ end
2377
+ end
2378
+
2379
+ # Defines the SIP region to be used for the call.
2380
+ module SipRegion
2381
+ extend Telnyx::Internal::Type::Enum
2382
+
2383
+ TaggedSymbol =
2384
+ T.type_alias do
2385
+ T.all(
2386
+ Symbol,
2387
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion
2388
+ )
2389
+ end
2390
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2391
+
2392
+ US =
2393
+ T.let(
2394
+ :US,
2395
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2396
+ )
2397
+ EUROPE =
2398
+ T.let(
2399
+ :Europe,
2400
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2401
+ )
2402
+ CANADA =
2403
+ T.let(
2404
+ :Canada,
2405
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2406
+ )
2407
+ AUSTRALIA =
2408
+ T.let(
2409
+ :Australia,
2410
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2411
+ )
2412
+ MIDDLE_EAST =
2413
+ T.let(
2414
+ :"Middle East",
2415
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2416
+ )
2417
+
2418
+ sig do
2419
+ override.returns(
2420
+ T::Array[
2421
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SipRegion::TaggedSymbol
2422
+ ]
2423
+ )
2424
+ end
2425
+ def self.values
2426
+ end
2427
+ end
2428
+
2429
+ # The call events for which Telnyx should send a webhook. Multiple events can be
2430
+ # defined when separated by a space.
2431
+ module StatusCallbackEvent
2432
+ extend Telnyx::Internal::Type::Enum
2433
+
2434
+ TaggedSymbol =
2435
+ T.type_alias do
2436
+ T.all(
2437
+ Symbol,
2438
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent
2439
+ )
2440
+ end
2441
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2442
+
2443
+ INITIATED =
2444
+ T.let(
2445
+ :initiated,
2446
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::TaggedSymbol
2447
+ )
2448
+ RINGING =
2449
+ T.let(
2450
+ :ringing,
2451
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::TaggedSymbol
2452
+ )
2453
+ ANSWERED =
2454
+ T.let(
2455
+ :answered,
2456
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::TaggedSymbol
2457
+ )
2458
+ COMPLETED =
2459
+ T.let(
2460
+ :completed,
2461
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::TaggedSymbol
2462
+ )
2463
+
2464
+ sig do
2465
+ override.returns(
2466
+ T::Array[
2467
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackEvent::TaggedSymbol
2468
+ ]
2469
+ )
2470
+ end
2471
+ def self.values
2472
+ end
2473
+ end
2474
+
2475
+ # HTTP request type used for `StatusCallback`.
2476
+ module StatusCallbackMethod
2477
+ extend Telnyx::Internal::Type::Enum
2478
+
2479
+ TaggedSymbol =
2480
+ T.type_alias do
2481
+ T.all(
2482
+ Symbol,
2483
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod
2484
+ )
2485
+ end
2486
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2487
+
2488
+ GET =
2489
+ T.let(
2490
+ :GET,
2491
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::TaggedSymbol
2492
+ )
2493
+ POST =
2494
+ T.let(
2495
+ :POST,
2496
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::TaggedSymbol
2497
+ )
2498
+
2499
+ sig do
2500
+ override.returns(
2501
+ T::Array[
2502
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::StatusCallbackMethod::TaggedSymbol
2503
+ ]
2504
+ )
2505
+ end
2506
+ def self.values
2507
+ end
2508
+ end
2509
+
2510
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
2511
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
2512
+ # supervisor muted). Default: barge
2513
+ module SupervisingRole
2514
+ extend Telnyx::Internal::Type::Enum
2515
+
2516
+ TaggedSymbol =
2517
+ T.type_alias do
2518
+ T.all(
2519
+ Symbol,
2520
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole
2521
+ )
2522
+ end
2523
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2524
+
2525
+ BARGE =
2526
+ T.let(
2527
+ :barge,
2528
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::TaggedSymbol
2529
+ )
2530
+ WHISPER =
2531
+ T.let(
2532
+ :whisper,
2533
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::TaggedSymbol
2534
+ )
2535
+ MONITOR =
2536
+ T.let(
2537
+ :monitor,
2538
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::TaggedSymbol
2539
+ )
2540
+
2541
+ sig do
2542
+ override.returns(
2543
+ T::Array[
2544
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::SupervisingRole::TaggedSymbol
2545
+ ]
2546
+ )
2547
+ end
2548
+ def self.values
2549
+ end
2550
+ end
2551
+
2552
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
2553
+ # `trim-silence`.
2554
+ module Trim
2555
+ extend Telnyx::Internal::Type::Enum
2556
+
2557
+ TaggedSymbol =
2558
+ T.type_alias do
2559
+ T.all(
2560
+ Symbol,
2561
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim
2562
+ )
2563
+ end
2564
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2565
+
2566
+ TRIM_SILENCE =
2567
+ T.let(
2568
+ :"trim-silence",
2569
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::TaggedSymbol
2570
+ )
2571
+ DO_NOT_TRIM =
2572
+ T.let(
2573
+ :"do-not-trim",
2574
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::TaggedSymbol
2575
+ )
2576
+
2577
+ sig do
2578
+ override.returns(
2579
+ T::Array[
2580
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::Trim::TaggedSymbol
2581
+ ]
2582
+ )
2583
+ end
2584
+ def self.values
2585
+ end
2586
+ end
2587
+
2588
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
2589
+ # Application setting.
2590
+ module URLMethod
2591
+ extend Telnyx::Internal::Type::Enum
2592
+
2593
+ TaggedSymbol =
2594
+ T.type_alias do
2595
+ T.all(
2596
+ Symbol,
2597
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod
2598
+ )
2599
+ end
2600
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2601
+
2602
+ GET =
2603
+ T.let(
2604
+ :GET,
2605
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::TaggedSymbol
2606
+ )
2607
+ POST =
2608
+ T.let(
2609
+ :POST,
2610
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::TaggedSymbol
2611
+ )
2612
+
2613
+ sig do
2614
+ override.returns(
2615
+ T::Array[
2616
+ Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::URLMethod::TaggedSymbol
2617
+ ]
2618
+ )
2619
+ end
2620
+ def self.values
2621
+ end
2622
+ end
917
2623
  end
918
- end
919
2624
 
920
- # The audio track to record for the call. The default is `both`.
921
- module RecordingTrack
922
- extend Telnyx::Internal::Type::Enum
2625
+ class ApplicationDefault < Telnyx::Internal::Type::BaseModel
2626
+ OrHash =
2627
+ T.type_alias do
2628
+ T.any(
2629
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault,
2630
+ Telnyx::Internal::AnyHash
2631
+ )
2632
+ end
2633
+
2634
+ # The ID of the TeXML Application.
2635
+ sig { returns(T.nilable(String)) }
2636
+ attr_reader :application_sid
2637
+
2638
+ sig { params(application_sid: String).void }
2639
+ attr_writer :application_sid
2640
+
2641
+ # Select whether to perform answering machine detection in the background. By
2642
+ # default execution is blocked until Answering Machine Detection is completed.
2643
+ sig { returns(T.nilable(T::Boolean)) }
2644
+ attr_reader :async_amd
2645
+
2646
+ sig { params(async_amd: T::Boolean).void }
2647
+ attr_writer :async_amd
2648
+
2649
+ # URL destination for Telnyx to send AMD callback events to for the call.
2650
+ sig { returns(T.nilable(String)) }
2651
+ attr_reader :async_amd_status_callback
2652
+
2653
+ sig { params(async_amd_status_callback: String).void }
2654
+ attr_writer :async_amd_status_callback
2655
+
2656
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
2657
+ # inherited from TeXML Application setting.
2658
+ sig do
2659
+ returns(
2660
+ T.nilable(
2661
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::OrSymbol
2662
+ )
2663
+ )
2664
+ end
2665
+ attr_reader :async_amd_status_callback_method
2666
+
2667
+ sig do
2668
+ params(
2669
+ async_amd_status_callback_method:
2670
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::OrSymbol
2671
+ ).void
2672
+ end
2673
+ attr_writer :async_amd_status_callback_method
923
2674
 
924
- TaggedSymbol =
925
- T.type_alias do
926
- T.all(
927
- Symbol,
928
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack
2675
+ # To be used as the caller id name (SIP From Display Name) presented to the
2676
+ # destination (`To` number). The string should have a maximum of 128 characters,
2677
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
2678
+ # ommited, the display name will be the same as the number in the `From` field.
2679
+ sig { returns(T.nilable(String)) }
2680
+ attr_reader :caller_id
2681
+
2682
+ sig { params(caller_id: String).void }
2683
+ attr_writer :caller_id
2684
+
2685
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
2686
+ # `true`.
2687
+ sig { returns(T.nilable(T::Boolean)) }
2688
+ attr_reader :cancel_playback_on_detect_message_end
2689
+
2690
+ sig do
2691
+ params(cancel_playback_on_detect_message_end: T::Boolean).void
2692
+ end
2693
+ attr_writer :cancel_playback_on_detect_message_end
2694
+
2695
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
2696
+ sig { returns(T.nilable(T::Boolean)) }
2697
+ attr_reader :cancel_playback_on_machine_detection
2698
+
2699
+ sig do
2700
+ params(cancel_playback_on_machine_detection: T::Boolean).void
2701
+ end
2702
+ attr_writer :cancel_playback_on_machine_detection
2703
+
2704
+ # Custom HTTP headers to be sent with the call. Each header should be an object
2705
+ # with 'name' and 'value' properties.
2706
+ sig do
2707
+ returns(
2708
+ T.nilable(
2709
+ T::Array[
2710
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::CustomHeader
2711
+ ]
2712
+ )
2713
+ )
2714
+ end
2715
+ attr_reader :custom_headers
2716
+
2717
+ sig do
2718
+ params(
2719
+ custom_headers:
2720
+ T::Array[
2721
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::CustomHeader::OrHash
2722
+ ]
2723
+ ).void
2724
+ end
2725
+ attr_writer :custom_headers
2726
+
2727
+ # Allows you to chose between Premium and Standard detections.
2728
+ sig do
2729
+ returns(
2730
+ T.nilable(
2731
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::OrSymbol
2732
+ )
929
2733
  )
930
2734
  end
931
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2735
+ attr_reader :detection_mode
932
2736
 
933
- INBOUND =
934
- T.let(
935
- :inbound,
936
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::TaggedSymbol
937
- )
938
- OUTBOUND =
939
- T.let(
940
- :outbound,
941
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::TaggedSymbol
942
- )
943
- BOTH =
944
- T.let(
945
- :both,
946
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::TaggedSymbol
947
- )
2737
+ sig do
2738
+ params(
2739
+ detection_mode:
2740
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::OrSymbol
2741
+ ).void
2742
+ end
2743
+ attr_writer :detection_mode
2744
+
2745
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
2746
+ # `Url` is not responding.
2747
+ sig { returns(T.nilable(String)) }
2748
+ attr_reader :fallback_url
2749
+
2750
+ sig { params(fallback_url: String).void }
2751
+ attr_writer :fallback_url
2752
+
2753
+ # The phone number of the party that initiated the call. Phone numbers are
2754
+ # formatted with a `+` and country code.
2755
+ sig { returns(T.nilable(String)) }
2756
+ attr_reader :from
2757
+
2758
+ sig { params(from: String).void }
2759
+ attr_writer :from
2760
+
2761
+ # Enables Answering Machine Detection.
2762
+ sig do
2763
+ returns(
2764
+ T.nilable(
2765
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::OrSymbol
2766
+ )
2767
+ )
2768
+ end
2769
+ attr_reader :machine_detection
948
2770
 
949
- sig do
950
- override.returns(
951
- T::Array[
952
- Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::TaggedSymbol
953
- ]
954
- )
955
- end
956
- def self.values
957
- end
958
- end
2771
+ sig do
2772
+ params(
2773
+ machine_detection:
2774
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::OrSymbol
2775
+ ).void
2776
+ end
2777
+ attr_writer :machine_detection
959
2778
 
960
- # Defines the SIP region to be used for the call.
961
- module SipRegion
962
- extend Telnyx::Internal::Type::Enum
2779
+ # If initial silence duration is greater than this value, consider it a machine.
2780
+ # Ignored when `premium` detection is used.
2781
+ sig { returns(T.nilable(Integer)) }
2782
+ attr_reader :machine_detection_silence_timeout
963
2783
 
964
- TaggedSymbol =
965
- T.type_alias do
966
- T.all(
967
- Symbol,
968
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion
2784
+ sig { params(machine_detection_silence_timeout: Integer).void }
2785
+ attr_writer :machine_detection_silence_timeout
2786
+
2787
+ # Silence duration threshold after a greeting message or voice for it be
2788
+ # considered human. Ignored when `premium` detection is used.
2789
+ sig { returns(T.nilable(Integer)) }
2790
+ attr_reader :machine_detection_speech_end_threshold
2791
+
2792
+ sig do
2793
+ params(machine_detection_speech_end_threshold: Integer).void
2794
+ end
2795
+ attr_writer :machine_detection_speech_end_threshold
2796
+
2797
+ # Maximum threshold of a human greeting. If greeting longer than this value,
2798
+ # considered machine. Ignored when `premium` detection is used.
2799
+ sig { returns(T.nilable(Integer)) }
2800
+ attr_reader :machine_detection_speech_threshold
2801
+
2802
+ sig { params(machine_detection_speech_threshold: Integer).void }
2803
+ attr_writer :machine_detection_speech_threshold
2804
+
2805
+ # Maximum timeout threshold in milliseconds for overall detection.
2806
+ sig { returns(T.nilable(Integer)) }
2807
+ attr_reader :machine_detection_timeout
2808
+
2809
+ sig { params(machine_detection_timeout: Integer).void }
2810
+ attr_writer :machine_detection_timeout
2811
+
2812
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
2813
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
2814
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
2815
+ # destinations.
2816
+ sig do
2817
+ returns(
2818
+ T.nilable(
2819
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::OrSymbol
2820
+ )
969
2821
  )
970
2822
  end
971
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2823
+ attr_reader :media_encryption
972
2824
 
973
- US =
974
- T.let(
975
- :US,
976
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
977
- )
978
- EUROPE =
979
- T.let(
980
- :Europe,
981
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
982
- )
983
- CANADA =
984
- T.let(
985
- :Canada,
986
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
987
- )
988
- AUSTRALIA =
989
- T.let(
990
- :Australia,
991
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
992
- )
993
- MIDDLE_EAST =
994
- T.let(
995
- :"Middle East",
996
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
997
- )
2825
+ sig do
2826
+ params(
2827
+ media_encryption:
2828
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::OrSymbol
2829
+ ).void
2830
+ end
2831
+ attr_writer :media_encryption
998
2832
 
999
- sig do
1000
- override.returns(
1001
- T::Array[
1002
- Telnyx::Texml::Accounts::CallCallsParams::SipRegion::TaggedSymbol
1003
- ]
1004
- )
1005
- end
1006
- def self.values
1007
- end
1008
- end
2833
+ # The list of comma-separated codecs to be offered on a call.
2834
+ sig { returns(T.nilable(String)) }
2835
+ attr_reader :preferred_codecs
1009
2836
 
1010
- # The call events for which Telnyx should send a webhook. Multiple events can be
1011
- # defined when separated by a space.
1012
- module StatusCallbackEvent
1013
- extend Telnyx::Internal::Type::Enum
2837
+ sig { params(preferred_codecs: String).void }
2838
+ attr_writer :preferred_codecs
1014
2839
 
1015
- TaggedSymbol =
1016
- T.type_alias do
1017
- T.all(
1018
- Symbol,
1019
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent
2840
+ # Whether to record the entire participant's call leg. Defaults to `false`.
2841
+ sig { returns(T.nilable(T::Boolean)) }
2842
+ attr_reader :record
2843
+
2844
+ sig { params(record: T::Boolean).void }
2845
+ attr_writer :record
2846
+
2847
+ # The number of channels in the final recording. Defaults to `mono`.
2848
+ sig do
2849
+ returns(
2850
+ T.nilable(
2851
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::OrSymbol
2852
+ )
1020
2853
  )
1021
2854
  end
1022
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2855
+ attr_reader :recording_channels
1023
2856
 
1024
- INITIATED =
1025
- T.let(
1026
- :initiated,
1027
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::TaggedSymbol
1028
- )
1029
- RINGING =
1030
- T.let(
1031
- :ringing,
1032
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::TaggedSymbol
1033
- )
1034
- ANSWERED =
1035
- T.let(
1036
- :answered,
1037
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::TaggedSymbol
1038
- )
1039
- COMPLETED =
1040
- T.let(
1041
- :completed,
1042
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::TaggedSymbol
1043
- )
2857
+ sig do
2858
+ params(
2859
+ recording_channels:
2860
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::OrSymbol
2861
+ ).void
2862
+ end
2863
+ attr_writer :recording_channels
2864
+
2865
+ # The URL the recording callbacks will be sent to.
2866
+ sig { returns(T.nilable(String)) }
2867
+ attr_reader :recording_status_callback
2868
+
2869
+ sig { params(recording_status_callback: String).void }
2870
+ attr_writer :recording_status_callback
2871
+
2872
+ # The changes to the recording's state that should generate a call to
2873
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
2874
+ # Separate multiple values with a space. Defaults to `completed`.
2875
+ sig { returns(T.nilable(String)) }
2876
+ attr_reader :recording_status_callback_event
2877
+
2878
+ sig { params(recording_status_callback_event: String).void }
2879
+ attr_writer :recording_status_callback_event
2880
+
2881
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
2882
+ sig do
2883
+ returns(
2884
+ T.nilable(
2885
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::OrSymbol
2886
+ )
2887
+ )
2888
+ end
2889
+ attr_reader :recording_status_callback_method
1044
2890
 
1045
- sig do
1046
- override.returns(
1047
- T::Array[
1048
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::TaggedSymbol
1049
- ]
1050
- )
1051
- end
1052
- def self.values
1053
- end
1054
- end
2891
+ sig do
2892
+ params(
2893
+ recording_status_callback_method:
2894
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::OrSymbol
2895
+ ).void
2896
+ end
2897
+ attr_writer :recording_status_callback_method
2898
+
2899
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
2900
+ # silence is detected. The timer only starts when the speech is detected. Please
2901
+ # note that the transcription is used to detect silence and the related charge
2902
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
2903
+ sig { returns(T.nilable(Integer)) }
2904
+ attr_reader :recording_timeout
2905
+
2906
+ sig { params(recording_timeout: Integer).void }
2907
+ attr_writer :recording_timeout
2908
+
2909
+ # The audio track to record for the call. The default is `both`.
2910
+ sig do
2911
+ returns(
2912
+ T.nilable(
2913
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::OrSymbol
2914
+ )
2915
+ )
2916
+ end
2917
+ attr_reader :recording_track
1055
2918
 
1056
- # HTTP request type used for `StatusCallback`.
1057
- module StatusCallbackMethod
1058
- extend Telnyx::Internal::Type::Enum
2919
+ sig do
2920
+ params(
2921
+ recording_track:
2922
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::OrSymbol
2923
+ ).void
2924
+ end
2925
+ attr_writer :recording_track
1059
2926
 
1060
- TaggedSymbol =
1061
- T.type_alias do
1062
- T.all(
1063
- Symbol,
1064
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod
2927
+ # Whether to send RecordingUrl in webhooks.
2928
+ sig { returns(T.nilable(T::Boolean)) }
2929
+ attr_reader :send_recording_url
2930
+
2931
+ sig { params(send_recording_url: T::Boolean).void }
2932
+ attr_writer :send_recording_url
2933
+
2934
+ # The password to use for SIP authentication.
2935
+ sig { returns(T.nilable(String)) }
2936
+ attr_reader :sip_auth_password
2937
+
2938
+ sig { params(sip_auth_password: String).void }
2939
+ attr_writer :sip_auth_password
2940
+
2941
+ # The username to use for SIP authentication.
2942
+ sig { returns(T.nilable(String)) }
2943
+ attr_reader :sip_auth_username
2944
+
2945
+ sig { params(sip_auth_username: String).void }
2946
+ attr_writer :sip_auth_username
2947
+
2948
+ # Defines the SIP region to be used for the call.
2949
+ sig do
2950
+ returns(
2951
+ T.nilable(
2952
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::OrSymbol
2953
+ )
1065
2954
  )
1066
2955
  end
1067
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2956
+ attr_reader :sip_region
1068
2957
 
1069
- GET =
1070
- T.let(
1071
- :GET,
1072
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::TaggedSymbol
1073
- )
1074
- POST =
1075
- T.let(
1076
- :POST,
1077
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::TaggedSymbol
1078
- )
2958
+ sig do
2959
+ params(
2960
+ sip_region:
2961
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::OrSymbol
2962
+ ).void
2963
+ end
2964
+ attr_writer :sip_region
2965
+
2966
+ # URL destination for Telnyx to send status callback events to for the call.
2967
+ sig { returns(T.nilable(String)) }
2968
+ attr_reader :status_callback
2969
+
2970
+ sig { params(status_callback: String).void }
2971
+ attr_writer :status_callback
2972
+
2973
+ # The call events for which Telnyx should send a webhook. Multiple events can be
2974
+ # defined when separated by a space.
2975
+ sig do
2976
+ returns(
2977
+ T.nilable(
2978
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::OrSymbol
2979
+ )
2980
+ )
2981
+ end
2982
+ attr_reader :status_callback_event
1079
2983
 
1080
- sig do
1081
- override.returns(
1082
- T::Array[
1083
- Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::TaggedSymbol
1084
- ]
1085
- )
1086
- end
1087
- def self.values
1088
- end
1089
- end
2984
+ sig do
2985
+ params(
2986
+ status_callback_event:
2987
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::OrSymbol
2988
+ ).void
2989
+ end
2990
+ attr_writer :status_callback_event
2991
+
2992
+ # HTTP request type used for `StatusCallback`.
2993
+ sig do
2994
+ returns(
2995
+ T.nilable(
2996
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::OrSymbol
2997
+ )
2998
+ )
2999
+ end
3000
+ attr_reader :status_callback_method
1090
3001
 
1091
- # The supervising role for the new leg. Determines the audio behavior: barge (hear
1092
- # both sides), whisper (only hear supervisor), monitor (hear both sides but
1093
- # supervisor muted). Default: barge
1094
- module SupervisingRole
1095
- extend Telnyx::Internal::Type::Enum
3002
+ sig do
3003
+ params(
3004
+ status_callback_method:
3005
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::OrSymbol
3006
+ ).void
3007
+ end
3008
+ attr_writer :status_callback_method
3009
+
3010
+ # The call control ID of the existing call to supervise. When provided, the
3011
+ # created leg will be added to the specified call in supervising mode. Status
3012
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
3013
+ sig { returns(T.nilable(String)) }
3014
+ attr_reader :supervise_call_sid
3015
+
3016
+ sig { params(supervise_call_sid: String).void }
3017
+ attr_writer :supervise_call_sid
3018
+
3019
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
3020
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
3021
+ # supervisor muted). Default: barge
3022
+ sig do
3023
+ returns(
3024
+ T.nilable(
3025
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::OrSymbol
3026
+ )
3027
+ )
3028
+ end
3029
+ attr_reader :supervising_role
1096
3030
 
1097
- TaggedSymbol =
1098
- T.type_alias do
1099
- T.all(
1100
- Symbol,
1101
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole
3031
+ sig do
3032
+ params(
3033
+ supervising_role:
3034
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::OrSymbol
3035
+ ).void
3036
+ end
3037
+ attr_writer :supervising_role
3038
+
3039
+ sig { returns(T.nilable(T.anything)) }
3040
+ attr_reader :texml
3041
+
3042
+ sig { params(texml: T.anything).void }
3043
+ attr_writer :texml
3044
+
3045
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
3046
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
3047
+ sig { returns(T.nilable(Integer)) }
3048
+ attr_reader :time_limit
3049
+
3050
+ sig { params(time_limit: Integer).void }
3051
+ attr_writer :time_limit
3052
+
3053
+ # The number of seconds to wait for the called party to answer the call before the
3054
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
3055
+ # is 30 seconds.
3056
+ sig { returns(T.nilable(Integer)) }
3057
+ attr_reader :timeout
3058
+
3059
+ sig { params(timeout: Integer).void }
3060
+ attr_writer :timeout
3061
+
3062
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
3063
+ # country code.
3064
+ sig { returns(T.nilable(String)) }
3065
+ attr_reader :to
3066
+
3067
+ sig { params(to: String).void }
3068
+ attr_writer :to
3069
+
3070
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
3071
+ # `trim-silence`.
3072
+ sig do
3073
+ returns(
3074
+ T.nilable(
3075
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::OrSymbol
3076
+ )
1102
3077
  )
1103
3078
  end
1104
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3079
+ attr_reader :trim
1105
3080
 
1106
- BARGE =
1107
- T.let(
1108
- :barge,
1109
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::TaggedSymbol
1110
- )
1111
- WHISPER =
1112
- T.let(
1113
- :whisper,
1114
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::TaggedSymbol
1115
- )
1116
- MONITOR =
1117
- T.let(
1118
- :monitor,
1119
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::TaggedSymbol
1120
- )
3081
+ sig do
3082
+ params(
3083
+ trim:
3084
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::OrSymbol
3085
+ ).void
3086
+ end
3087
+ attr_writer :trim
1121
3088
 
1122
- sig do
1123
- override.returns(
1124
- T::Array[
1125
- Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::TaggedSymbol
1126
- ]
1127
- )
1128
- end
1129
- def self.values
1130
- end
1131
- end
3089
+ sig { returns(T.nilable(T.anything)) }
3090
+ attr_reader :url
1132
3091
 
1133
- # Whether to trim any leading and trailing silence from the recording. Defaults to
1134
- # `trim-silence`.
1135
- module Trim
1136
- extend Telnyx::Internal::Type::Enum
3092
+ sig { params(url: T.anything).void }
3093
+ attr_writer :url
1137
3094
 
1138
- TaggedSymbol =
1139
- T.type_alias do
1140
- T.all(Symbol, Telnyx::Texml::Accounts::CallCallsParams::Trim)
3095
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
3096
+ # Application setting.
3097
+ sig do
3098
+ returns(
3099
+ T.nilable(
3100
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::OrSymbol
3101
+ )
3102
+ )
1141
3103
  end
1142
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3104
+ attr_reader :url_method
1143
3105
 
1144
- TRIM_SILENCE =
1145
- T.let(
1146
- :"trim-silence",
1147
- Telnyx::Texml::Accounts::CallCallsParams::Trim::TaggedSymbol
1148
- )
1149
- DO_NOT_TRIM =
1150
- T.let(
1151
- :"do-not-trim",
1152
- Telnyx::Texml::Accounts::CallCallsParams::Trim::TaggedSymbol
3106
+ sig do
3107
+ params(
3108
+ url_method:
3109
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::OrSymbol
3110
+ ).void
3111
+ end
3112
+ attr_writer :url_method
3113
+
3114
+ sig do
3115
+ params(
3116
+ application_sid: String,
3117
+ async_amd: T::Boolean,
3118
+ async_amd_status_callback: String,
3119
+ async_amd_status_callback_method:
3120
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::OrSymbol,
3121
+ caller_id: String,
3122
+ cancel_playback_on_detect_message_end: T::Boolean,
3123
+ cancel_playback_on_machine_detection: T::Boolean,
3124
+ custom_headers:
3125
+ T::Array[
3126
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::CustomHeader::OrHash
3127
+ ],
3128
+ detection_mode:
3129
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::OrSymbol,
3130
+ fallback_url: String,
3131
+ from: String,
3132
+ machine_detection:
3133
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::OrSymbol,
3134
+ machine_detection_silence_timeout: Integer,
3135
+ machine_detection_speech_end_threshold: Integer,
3136
+ machine_detection_speech_threshold: Integer,
3137
+ machine_detection_timeout: Integer,
3138
+ media_encryption:
3139
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::OrSymbol,
3140
+ preferred_codecs: String,
3141
+ record: T::Boolean,
3142
+ recording_channels:
3143
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::OrSymbol,
3144
+ recording_status_callback: String,
3145
+ recording_status_callback_event: String,
3146
+ recording_status_callback_method:
3147
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::OrSymbol,
3148
+ recording_timeout: Integer,
3149
+ recording_track:
3150
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::OrSymbol,
3151
+ send_recording_url: T::Boolean,
3152
+ sip_auth_password: String,
3153
+ sip_auth_username: String,
3154
+ sip_region:
3155
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::OrSymbol,
3156
+ status_callback: String,
3157
+ status_callback_event:
3158
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::OrSymbol,
3159
+ status_callback_method:
3160
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::OrSymbol,
3161
+ supervise_call_sid: String,
3162
+ supervising_role:
3163
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::OrSymbol,
3164
+ texml: T.anything,
3165
+ time_limit: Integer,
3166
+ timeout: Integer,
3167
+ to: String,
3168
+ trim:
3169
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::OrSymbol,
3170
+ url: T.anything,
3171
+ url_method:
3172
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::OrSymbol
3173
+ ).returns(T.attached_class)
3174
+ end
3175
+ def self.new(
3176
+ # The ID of the TeXML Application.
3177
+ application_sid: nil,
3178
+ # Select whether to perform answering machine detection in the background. By
3179
+ # default execution is blocked until Answering Machine Detection is completed.
3180
+ async_amd: nil,
3181
+ # URL destination for Telnyx to send AMD callback events to for the call.
3182
+ async_amd_status_callback: nil,
3183
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
3184
+ # inherited from TeXML Application setting.
3185
+ async_amd_status_callback_method: nil,
3186
+ # To be used as the caller id name (SIP From Display Name) presented to the
3187
+ # destination (`To` number). The string should have a maximum of 128 characters,
3188
+ # containing only letters, numbers, spaces, and `-_~!.+` special characters. If
3189
+ # ommited, the display name will be the same as the number in the `From` field.
3190
+ caller_id: nil,
3191
+ # Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
3192
+ # `true`.
3193
+ cancel_playback_on_detect_message_end: nil,
3194
+ # Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
3195
+ cancel_playback_on_machine_detection: nil,
3196
+ # Custom HTTP headers to be sent with the call. Each header should be an object
3197
+ # with 'name' and 'value' properties.
3198
+ custom_headers: nil,
3199
+ # Allows you to chose between Premium and Standard detections.
3200
+ detection_mode: nil,
3201
+ # A failover URL for which Telnyx will retrieve the TeXML call instructions if the
3202
+ # `Url` is not responding.
3203
+ fallback_url: nil,
3204
+ # The phone number of the party that initiated the call. Phone numbers are
3205
+ # formatted with a `+` and country code.
3206
+ from: nil,
3207
+ # Enables Answering Machine Detection.
3208
+ machine_detection: nil,
3209
+ # If initial silence duration is greater than this value, consider it a machine.
3210
+ # Ignored when `premium` detection is used.
3211
+ machine_detection_silence_timeout: nil,
3212
+ # Silence duration threshold after a greeting message or voice for it be
3213
+ # considered human. Ignored when `premium` detection is used.
3214
+ machine_detection_speech_end_threshold: nil,
3215
+ # Maximum threshold of a human greeting. If greeting longer than this value,
3216
+ # considered machine. Ignored when `premium` detection is used.
3217
+ machine_detection_speech_threshold: nil,
3218
+ # Maximum timeout threshold in milliseconds for overall detection.
3219
+ machine_detection_timeout: nil,
3220
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
3221
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
3222
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
3223
+ # destinations.
3224
+ media_encryption: nil,
3225
+ # The list of comma-separated codecs to be offered on a call.
3226
+ preferred_codecs: nil,
3227
+ # Whether to record the entire participant's call leg. Defaults to `false`.
3228
+ record: nil,
3229
+ # The number of channels in the final recording. Defaults to `mono`.
3230
+ recording_channels: nil,
3231
+ # The URL the recording callbacks will be sent to.
3232
+ recording_status_callback: nil,
3233
+ # The changes to the recording's state that should generate a call to
3234
+ # `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
3235
+ # Separate multiple values with a space. Defaults to `completed`.
3236
+ recording_status_callback_event: nil,
3237
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
3238
+ recording_status_callback_method: nil,
3239
+ # The number of seconds that Telnyx will wait for the recording to be stopped if
3240
+ # silence is detected. The timer only starts when the speech is detected. Please
3241
+ # note that the transcription is used to detect silence and the related charge
3242
+ # will be applied. The minimum value is 0. The default value is 0 (infinite)
3243
+ recording_timeout: nil,
3244
+ # The audio track to record for the call. The default is `both`.
3245
+ recording_track: nil,
3246
+ # Whether to send RecordingUrl in webhooks.
3247
+ send_recording_url: nil,
3248
+ # The password to use for SIP authentication.
3249
+ sip_auth_password: nil,
3250
+ # The username to use for SIP authentication.
3251
+ sip_auth_username: nil,
3252
+ # Defines the SIP region to be used for the call.
3253
+ sip_region: nil,
3254
+ # URL destination for Telnyx to send status callback events to for the call.
3255
+ status_callback: nil,
3256
+ # The call events for which Telnyx should send a webhook. Multiple events can be
3257
+ # defined when separated by a space.
3258
+ status_callback_event: nil,
3259
+ # HTTP request type used for `StatusCallback`.
3260
+ status_callback_method: nil,
3261
+ # The call control ID of the existing call to supervise. When provided, the
3262
+ # created leg will be added to the specified call in supervising mode. Status
3263
+ # callbacks and action callbacks will NOT be sent for the supervising leg.
3264
+ supervise_call_sid: nil,
3265
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
3266
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
3267
+ # supervisor muted). Default: barge
3268
+ supervising_role: nil,
3269
+ texml: nil,
3270
+ # The maximum duration of the call in seconds. The minimum value is 30 and the
3271
+ # maximum value is 14400 (4 hours). Default is 14400 seconds.
3272
+ time_limit: nil,
3273
+ # The number of seconds to wait for the called party to answer the call before the
3274
+ # call is canceled. The minimum value is 5 and the maximum value is 120. Default
3275
+ # is 30 seconds.
3276
+ timeout: nil,
3277
+ # The phone number of the called party. Phone numbers are formatted with a `+` and
3278
+ # country code.
3279
+ to: nil,
3280
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
3281
+ # `trim-silence`.
3282
+ trim: nil,
3283
+ url: nil,
3284
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
3285
+ # Application setting.
3286
+ url_method: nil
1153
3287
  )
3288
+ end
1154
3289
 
1155
- sig do
1156
- override.returns(
1157
- T::Array[
1158
- Telnyx::Texml::Accounts::CallCallsParams::Trim::TaggedSymbol
1159
- ]
1160
- )
1161
- end
1162
- def self.values
1163
- end
1164
- end
3290
+ sig do
3291
+ override.returns(
3292
+ {
3293
+ application_sid: String,
3294
+ async_amd: T::Boolean,
3295
+ async_amd_status_callback: String,
3296
+ async_amd_status_callback_method:
3297
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::OrSymbol,
3298
+ caller_id: String,
3299
+ cancel_playback_on_detect_message_end: T::Boolean,
3300
+ cancel_playback_on_machine_detection: T::Boolean,
3301
+ custom_headers:
3302
+ T::Array[
3303
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::CustomHeader
3304
+ ],
3305
+ detection_mode:
3306
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::OrSymbol,
3307
+ fallback_url: String,
3308
+ from: String,
3309
+ machine_detection:
3310
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::OrSymbol,
3311
+ machine_detection_silence_timeout: Integer,
3312
+ machine_detection_speech_end_threshold: Integer,
3313
+ machine_detection_speech_threshold: Integer,
3314
+ machine_detection_timeout: Integer,
3315
+ media_encryption:
3316
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::OrSymbol,
3317
+ preferred_codecs: String,
3318
+ record: T::Boolean,
3319
+ recording_channels:
3320
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::OrSymbol,
3321
+ recording_status_callback: String,
3322
+ recording_status_callback_event: String,
3323
+ recording_status_callback_method:
3324
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::OrSymbol,
3325
+ recording_timeout: Integer,
3326
+ recording_track:
3327
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::OrSymbol,
3328
+ send_recording_url: T::Boolean,
3329
+ sip_auth_password: String,
3330
+ sip_auth_username: String,
3331
+ sip_region:
3332
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::OrSymbol,
3333
+ status_callback: String,
3334
+ status_callback_event:
3335
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::OrSymbol,
3336
+ status_callback_method:
3337
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::OrSymbol,
3338
+ supervise_call_sid: String,
3339
+ supervising_role:
3340
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::OrSymbol,
3341
+ texml: T.anything,
3342
+ time_limit: Integer,
3343
+ timeout: Integer,
3344
+ to: String,
3345
+ trim:
3346
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::OrSymbol,
3347
+ url: T.anything,
3348
+ url_method:
3349
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::OrSymbol
3350
+ }
3351
+ )
3352
+ end
3353
+ def to_hash
3354
+ end
1165
3355
 
1166
- # HTTP request type used for `Url`. The default value is inherited from TeXML
1167
- # Application setting.
1168
- module URLMethod
1169
- extend Telnyx::Internal::Type::Enum
3356
+ # HTTP request type used for `AsyncAmdStatusCallback`. The default value is
3357
+ # inherited from TeXML Application setting.
3358
+ module AsyncAmdStatusCallbackMethod
3359
+ extend Telnyx::Internal::Type::Enum
3360
+
3361
+ TaggedSymbol =
3362
+ T.type_alias do
3363
+ T.all(
3364
+ Symbol,
3365
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod
3366
+ )
3367
+ end
3368
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3369
+
3370
+ GET =
3371
+ T.let(
3372
+ :GET,
3373
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::TaggedSymbol
3374
+ )
3375
+ POST =
3376
+ T.let(
3377
+ :POST,
3378
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::TaggedSymbol
3379
+ )
3380
+
3381
+ sig do
3382
+ override.returns(
3383
+ T::Array[
3384
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::AsyncAmdStatusCallbackMethod::TaggedSymbol
3385
+ ]
3386
+ )
3387
+ end
3388
+ def self.values
3389
+ end
3390
+ end
1170
3391
 
1171
- TaggedSymbol =
1172
- T.type_alias do
1173
- T.all(
1174
- Symbol,
1175
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod
3392
+ class CustomHeader < Telnyx::Internal::Type::BaseModel
3393
+ OrHash =
3394
+ T.type_alias do
3395
+ T.any(
3396
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::CustomHeader,
3397
+ Telnyx::Internal::AnyHash
3398
+ )
3399
+ end
3400
+
3401
+ # The name of the custom header
3402
+ sig { returns(String) }
3403
+ attr_accessor :name
3404
+
3405
+ # The value of the custom header
3406
+ sig { returns(String) }
3407
+ attr_accessor :value
3408
+
3409
+ sig do
3410
+ params(name: String, value: String).returns(T.attached_class)
3411
+ end
3412
+ def self.new(
3413
+ # The name of the custom header
3414
+ name:,
3415
+ # The value of the custom header
3416
+ value:
1176
3417
  )
3418
+ end
3419
+
3420
+ sig { override.returns({ name: String, value: String }) }
3421
+ def to_hash
3422
+ end
1177
3423
  end
1178
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1179
3424
 
1180
- GET =
1181
- T.let(
1182
- :GET,
1183
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::TaggedSymbol
1184
- )
1185
- POST =
1186
- T.let(
1187
- :POST,
1188
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::TaggedSymbol
1189
- )
3425
+ # Allows you to chose between Premium and Standard detections.
3426
+ module DetectionMode
3427
+ extend Telnyx::Internal::Type::Enum
3428
+
3429
+ TaggedSymbol =
3430
+ T.type_alias do
3431
+ T.all(
3432
+ Symbol,
3433
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode
3434
+ )
3435
+ end
3436
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3437
+
3438
+ PREMIUM =
3439
+ T.let(
3440
+ :Premium,
3441
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::TaggedSymbol
3442
+ )
3443
+ REGULAR =
3444
+ T.let(
3445
+ :Regular,
3446
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::TaggedSymbol
3447
+ )
3448
+
3449
+ sig do
3450
+ override.returns(
3451
+ T::Array[
3452
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::DetectionMode::TaggedSymbol
3453
+ ]
3454
+ )
3455
+ end
3456
+ def self.values
3457
+ end
3458
+ end
3459
+
3460
+ # Enables Answering Machine Detection.
3461
+ module MachineDetection
3462
+ extend Telnyx::Internal::Type::Enum
3463
+
3464
+ TaggedSymbol =
3465
+ T.type_alias do
3466
+ T.all(
3467
+ Symbol,
3468
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection
3469
+ )
3470
+ end
3471
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3472
+
3473
+ ENABLE =
3474
+ T.let(
3475
+ :Enable,
3476
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::TaggedSymbol
3477
+ )
3478
+ DISABLE =
3479
+ T.let(
3480
+ :Disable,
3481
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::TaggedSymbol
3482
+ )
3483
+ DETECT_MESSAGE_END =
3484
+ T.let(
3485
+ :DetectMessageEnd,
3486
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::TaggedSymbol
3487
+ )
3488
+
3489
+ sig do
3490
+ override.returns(
3491
+ T::Array[
3492
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MachineDetection::TaggedSymbol
3493
+ ]
3494
+ )
3495
+ end
3496
+ def self.values
3497
+ end
3498
+ end
3499
+
3500
+ # Defines whether media should be encrypted on the call. When set to `SRTP`, the
3501
+ # call will use Secure Real-time Transport Protocol for media encryption. When set
3502
+ # to `DTLS`, the call will use DTLS for media encryption. Only supported for SIP
3503
+ # destinations.
3504
+ module MediaEncryption
3505
+ extend Telnyx::Internal::Type::Enum
3506
+
3507
+ TaggedSymbol =
3508
+ T.type_alias do
3509
+ T.all(
3510
+ Symbol,
3511
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption
3512
+ )
3513
+ end
3514
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3515
+
3516
+ DISABLED =
3517
+ T.let(
3518
+ :disabled,
3519
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::TaggedSymbol
3520
+ )
3521
+ SRTP =
3522
+ T.let(
3523
+ :SRTP,
3524
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::TaggedSymbol
3525
+ )
3526
+ DTLS =
3527
+ T.let(
3528
+ :DTLS,
3529
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::TaggedSymbol
3530
+ )
3531
+
3532
+ sig do
3533
+ override.returns(
3534
+ T::Array[
3535
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::MediaEncryption::TaggedSymbol
3536
+ ]
3537
+ )
3538
+ end
3539
+ def self.values
3540
+ end
3541
+ end
3542
+
3543
+ # The number of channels in the final recording. Defaults to `mono`.
3544
+ module RecordingChannels
3545
+ extend Telnyx::Internal::Type::Enum
3546
+
3547
+ TaggedSymbol =
3548
+ T.type_alias do
3549
+ T.all(
3550
+ Symbol,
3551
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels
3552
+ )
3553
+ end
3554
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3555
+
3556
+ MONO =
3557
+ T.let(
3558
+ :mono,
3559
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::TaggedSymbol
3560
+ )
3561
+ DUAL =
3562
+ T.let(
3563
+ :dual,
3564
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::TaggedSymbol
3565
+ )
3566
+
3567
+ sig do
3568
+ override.returns(
3569
+ T::Array[
3570
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingChannels::TaggedSymbol
3571
+ ]
3572
+ )
3573
+ end
3574
+ def self.values
3575
+ end
3576
+ end
3577
+
3578
+ # HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
3579
+ module RecordingStatusCallbackMethod
3580
+ extend Telnyx::Internal::Type::Enum
3581
+
3582
+ TaggedSymbol =
3583
+ T.type_alias do
3584
+ T.all(
3585
+ Symbol,
3586
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod
3587
+ )
3588
+ end
3589
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3590
+
3591
+ GET =
3592
+ T.let(
3593
+ :GET,
3594
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::TaggedSymbol
3595
+ )
3596
+ POST =
3597
+ T.let(
3598
+ :POST,
3599
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::TaggedSymbol
3600
+ )
3601
+
3602
+ sig do
3603
+ override.returns(
3604
+ T::Array[
3605
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingStatusCallbackMethod::TaggedSymbol
3606
+ ]
3607
+ )
3608
+ end
3609
+ def self.values
3610
+ end
3611
+ end
3612
+
3613
+ # The audio track to record for the call. The default is `both`.
3614
+ module RecordingTrack
3615
+ extend Telnyx::Internal::Type::Enum
3616
+
3617
+ TaggedSymbol =
3618
+ T.type_alias do
3619
+ T.all(
3620
+ Symbol,
3621
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack
3622
+ )
3623
+ end
3624
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3625
+
3626
+ INBOUND =
3627
+ T.let(
3628
+ :inbound,
3629
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::TaggedSymbol
3630
+ )
3631
+ OUTBOUND =
3632
+ T.let(
3633
+ :outbound,
3634
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::TaggedSymbol
3635
+ )
3636
+ BOTH =
3637
+ T.let(
3638
+ :both,
3639
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::TaggedSymbol
3640
+ )
3641
+
3642
+ sig do
3643
+ override.returns(
3644
+ T::Array[
3645
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::RecordingTrack::TaggedSymbol
3646
+ ]
3647
+ )
3648
+ end
3649
+ def self.values
3650
+ end
3651
+ end
3652
+
3653
+ # Defines the SIP region to be used for the call.
3654
+ module SipRegion
3655
+ extend Telnyx::Internal::Type::Enum
3656
+
3657
+ TaggedSymbol =
3658
+ T.type_alias do
3659
+ T.all(
3660
+ Symbol,
3661
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion
3662
+ )
3663
+ end
3664
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3665
+
3666
+ US =
3667
+ T.let(
3668
+ :US,
3669
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3670
+ )
3671
+ EUROPE =
3672
+ T.let(
3673
+ :Europe,
3674
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3675
+ )
3676
+ CANADA =
3677
+ T.let(
3678
+ :Canada,
3679
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3680
+ )
3681
+ AUSTRALIA =
3682
+ T.let(
3683
+ :Australia,
3684
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3685
+ )
3686
+ MIDDLE_EAST =
3687
+ T.let(
3688
+ :"Middle East",
3689
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3690
+ )
3691
+
3692
+ sig do
3693
+ override.returns(
3694
+ T::Array[
3695
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SipRegion::TaggedSymbol
3696
+ ]
3697
+ )
3698
+ end
3699
+ def self.values
3700
+ end
3701
+ end
3702
+
3703
+ # The call events for which Telnyx should send a webhook. Multiple events can be
3704
+ # defined when separated by a space.
3705
+ module StatusCallbackEvent
3706
+ extend Telnyx::Internal::Type::Enum
3707
+
3708
+ TaggedSymbol =
3709
+ T.type_alias do
3710
+ T.all(
3711
+ Symbol,
3712
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent
3713
+ )
3714
+ end
3715
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3716
+
3717
+ INITIATED =
3718
+ T.let(
3719
+ :initiated,
3720
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::TaggedSymbol
3721
+ )
3722
+ RINGING =
3723
+ T.let(
3724
+ :ringing,
3725
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::TaggedSymbol
3726
+ )
3727
+ ANSWERED =
3728
+ T.let(
3729
+ :answered,
3730
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::TaggedSymbol
3731
+ )
3732
+ COMPLETED =
3733
+ T.let(
3734
+ :completed,
3735
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::TaggedSymbol
3736
+ )
3737
+
3738
+ sig do
3739
+ override.returns(
3740
+ T::Array[
3741
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackEvent::TaggedSymbol
3742
+ ]
3743
+ )
3744
+ end
3745
+ def self.values
3746
+ end
3747
+ end
3748
+
3749
+ # HTTP request type used for `StatusCallback`.
3750
+ module StatusCallbackMethod
3751
+ extend Telnyx::Internal::Type::Enum
3752
+
3753
+ TaggedSymbol =
3754
+ T.type_alias do
3755
+ T.all(
3756
+ Symbol,
3757
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod
3758
+ )
3759
+ end
3760
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3761
+
3762
+ GET =
3763
+ T.let(
3764
+ :GET,
3765
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::TaggedSymbol
3766
+ )
3767
+ POST =
3768
+ T.let(
3769
+ :POST,
3770
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::TaggedSymbol
3771
+ )
3772
+
3773
+ sig do
3774
+ override.returns(
3775
+ T::Array[
3776
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::StatusCallbackMethod::TaggedSymbol
3777
+ ]
3778
+ )
3779
+ end
3780
+ def self.values
3781
+ end
3782
+ end
3783
+
3784
+ # The supervising role for the new leg. Determines the audio behavior: barge (hear
3785
+ # both sides), whisper (only hear supervisor), monitor (hear both sides but
3786
+ # supervisor muted). Default: barge
3787
+ module SupervisingRole
3788
+ extend Telnyx::Internal::Type::Enum
3789
+
3790
+ TaggedSymbol =
3791
+ T.type_alias do
3792
+ T.all(
3793
+ Symbol,
3794
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole
3795
+ )
3796
+ end
3797
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3798
+
3799
+ BARGE =
3800
+ T.let(
3801
+ :barge,
3802
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::TaggedSymbol
3803
+ )
3804
+ WHISPER =
3805
+ T.let(
3806
+ :whisper,
3807
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::TaggedSymbol
3808
+ )
3809
+ MONITOR =
3810
+ T.let(
3811
+ :monitor,
3812
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::TaggedSymbol
3813
+ )
3814
+
3815
+ sig do
3816
+ override.returns(
3817
+ T::Array[
3818
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::SupervisingRole::TaggedSymbol
3819
+ ]
3820
+ )
3821
+ end
3822
+ def self.values
3823
+ end
3824
+ end
3825
+
3826
+ # Whether to trim any leading and trailing silence from the recording. Defaults to
3827
+ # `trim-silence`.
3828
+ module Trim
3829
+ extend Telnyx::Internal::Type::Enum
3830
+
3831
+ TaggedSymbol =
3832
+ T.type_alias do
3833
+ T.all(
3834
+ Symbol,
3835
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim
3836
+ )
3837
+ end
3838
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3839
+
3840
+ TRIM_SILENCE =
3841
+ T.let(
3842
+ :"trim-silence",
3843
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::TaggedSymbol
3844
+ )
3845
+ DO_NOT_TRIM =
3846
+ T.let(
3847
+ :"do-not-trim",
3848
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::TaggedSymbol
3849
+ )
3850
+
3851
+ sig do
3852
+ override.returns(
3853
+ T::Array[
3854
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::Trim::TaggedSymbol
3855
+ ]
3856
+ )
3857
+ end
3858
+ def self.values
3859
+ end
3860
+ end
3861
+
3862
+ # HTTP request type used for `Url`. The default value is inherited from TeXML
3863
+ # Application setting.
3864
+ module URLMethod
3865
+ extend Telnyx::Internal::Type::Enum
3866
+
3867
+ TaggedSymbol =
3868
+ T.type_alias do
3869
+ T.all(
3870
+ Symbol,
3871
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod
3872
+ )
3873
+ end
3874
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
3875
+
3876
+ GET =
3877
+ T.let(
3878
+ :GET,
3879
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::TaggedSymbol
3880
+ )
3881
+ POST =
3882
+ T.let(
3883
+ :POST,
3884
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::TaggedSymbol
3885
+ )
3886
+
3887
+ sig do
3888
+ override.returns(
3889
+ T::Array[
3890
+ Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::URLMethod::TaggedSymbol
3891
+ ]
3892
+ )
3893
+ end
3894
+ def self.values
3895
+ end
3896
+ end
3897
+ end
1190
3898
 
1191
3899
  sig do
1192
3900
  override.returns(
1193
3901
  T::Array[
1194
- Telnyx::Texml::Accounts::CallCallsParams::URLMethod::TaggedSymbol
3902
+ Telnyx::Texml::Accounts::CallCallsParams::Body::Variants
1195
3903
  ]
1196
3904
  )
1197
3905
  end
1198
- def self.values
3906
+ def self.variants
1199
3907
  end
1200
3908
  end
1201
3909
  end