telnyx 5.119.0 → 5.121.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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +6 -0
  5. data/lib/telnyx/models/call_dial_params.rb +551 -1
  6. data/lib/telnyx/models/calls/action_answer_params.rb +556 -1
  7. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +2 -2
  8. data/lib/telnyx/models/calls/action_speak_params.rb +2 -2
  9. data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +411 -84
  10. data/lib/telnyx/models/conferences/action_speak_params.rb +2 -2
  11. data/lib/telnyx/models/voice_sdk_call_report_list_params.rb +56 -0
  12. data/lib/telnyx/models/voice_sdk_call_report_list_response.rb +385 -0
  13. data/lib/telnyx/models/voice_sdk_call_report_retrieve_params.rb +20 -0
  14. data/lib/telnyx/models/voice_sdk_call_report_retrieve_response.rb +390 -0
  15. data/lib/telnyx/models.rb +4 -0
  16. data/lib/telnyx/resources/calls/actions.rb +26 -8
  17. data/lib/telnyx/resources/calls.rb +3 -1
  18. data/lib/telnyx/resources/voice_sdk_call_reports.rb +71 -0
  19. data/lib/telnyx/version.rb +1 -1
  20. data/lib/telnyx.rb +5 -0
  21. data/rbi/telnyx/client.rbi +5 -0
  22. data/rbi/telnyx/models/call_dial_params.rbi +1273 -0
  23. data/rbi/telnyx/models/calls/action_answer_params.rbi +1279 -0
  24. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +4 -4
  25. data/rbi/telnyx/models/calls/action_speak_params.rbi +4 -4
  26. data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +928 -133
  27. data/rbi/telnyx/models/conferences/action_speak_params.rbi +4 -4
  28. data/rbi/telnyx/models/voice_sdk_call_report_list_params.rbi +108 -0
  29. data/rbi/telnyx/models/voice_sdk_call_report_list_response.rbi +774 -0
  30. data/rbi/telnyx/models/voice_sdk_call_report_retrieve_params.rbi +38 -0
  31. data/rbi/telnyx/models/voice_sdk_call_report_retrieve_response.rbi +782 -0
  32. data/rbi/telnyx/models.rbi +5 -0
  33. data/rbi/telnyx/resources/calls/actions.rbi +73 -24
  34. data/rbi/telnyx/resources/calls.rbi +9 -0
  35. data/rbi/telnyx/resources/conferences/actions.rbi +2 -2
  36. data/rbi/telnyx/resources/voice_sdk_call_reports.rbi +58 -0
  37. data/sig/telnyx/client.rbs +2 -0
  38. data/sig/telnyx/models/call_dial_params.rbs +440 -0
  39. data/sig/telnyx/models/calls/action_answer_params.rbs +440 -0
  40. data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +317 -51
  41. data/sig/telnyx/models/voice_sdk_call_report_list_params.rbs +57 -0
  42. data/sig/telnyx/models/voice_sdk_call_report_list_response.rbs +340 -0
  43. data/sig/telnyx/models/voice_sdk_call_report_retrieve_params.rbs +23 -0
  44. data/sig/telnyx/models/voice_sdk_call_report_retrieve_response.rbs +345 -0
  45. data/sig/telnyx/models.rbs +4 -0
  46. data/sig/telnyx/resources/calls/actions.rbs +12 -3
  47. data/sig/telnyx/resources/calls.rbs +1 -0
  48. data/sig/telnyx/resources/voice_sdk_call_reports.rbs +19 -0
  49. metadata +17 -2
@@ -0,0 +1,390 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ class VoiceSDKCallReportRetrieveResponseItem < Telnyx::Internal::Type::BaseModel
6
+ # @!attribute call_id
7
+ # Unique call identifier.
8
+ #
9
+ # @return [String, nil]
10
+ optional :call_id, String
11
+
12
+ # @!attribute call_report_id
13
+ # User-scoped storage grouping identifier derived from the authenticated user.
14
+ # This is not a unique per-call report identifier and may be shared by multiple
15
+ # calls for the same user.
16
+ #
17
+ # @return [String, nil]
18
+ optional :call_report_id, String
19
+
20
+ # @!attribute created_at
21
+ # Creation timestamp when present.
22
+ #
23
+ # @return [Time, nil]
24
+ optional :created_at, Time
25
+
26
+ # @!attribute flush_reason
27
+ # Reason the SDK flushed this stats report segment, for example an intermediate
28
+ # socket-close flush.
29
+ #
30
+ # @return [Hash{Symbol=>Object}, nil]
31
+ optional :flush_reason,
32
+ Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
33
+ api_name: :flushReason
34
+
35
+ # @!attribute logs
36
+ # Raw logs payload emitted by the Voice SDK and stored without normalization. Live
37
+ # responses commonly return an array of log entries, but object-shaped log
38
+ # payloads are also allowed for compatibility.
39
+ #
40
+ # @return [Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries, nil]
41
+ optional :logs, union: -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs }
42
+
43
+ # @!attribute organization_id
44
+ # Organization associated with the stored call report when provided by the Voice
45
+ # SDK reporting path.
46
+ #
47
+ # @return [String, nil]
48
+ optional :organization_id, String
49
+
50
+ # @!attribute segment
51
+ # Zero-based stats segment index when the SDK sends segmented or intermediate
52
+ # reports.
53
+ #
54
+ # @return [Integer, nil]
55
+ optional :segment, Integer
56
+
57
+ # @!attribute stats
58
+ # Raw stats payload emitted by the Voice SDK and stored without normalization. The
59
+ # exact shape can vary by SDK platform and version. Live responses commonly return
60
+ # an array of interval snapshots, but object-shaped stats payloads are also
61
+ # allowed for compatibility.
62
+ #
63
+ # @return [Array<Hash{Symbol=>Object}>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember1, nil]
64
+ optional :stats, union: -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats }
65
+
66
+ # @!attribute stored_at
67
+ # Time when the call report was stored.
68
+ #
69
+ # @return [Time, nil]
70
+ optional :stored_at, Time
71
+
72
+ # @!attribute summary
73
+ # High-level call metadata.
74
+ #
75
+ # @return [Hash{Symbol=>Object}, nil]
76
+ optional :summary, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
77
+
78
+ # @!attribute telnyx_leg_id
79
+ # Telnyx call leg identifier for correlating the report with call-control, SIP,
80
+ # and media troubleshooting data.
81
+ #
82
+ # @return [String, nil]
83
+ optional :telnyx_leg_id, String
84
+
85
+ # @!attribute telnyx_session_id
86
+ # Telnyx RTC session identifier for correlating the report with Voice SDK
87
+ # signaling and media-session logs.
88
+ #
89
+ # @return [String, nil]
90
+ optional :telnyx_session_id, String
91
+
92
+ # @!attribute user_agent
93
+ # Voice SDK user agent string reported by the client. This is the preferred
94
+ # SDK/platform/version dimension when present.
95
+ #
96
+ # @return [String, nil]
97
+ optional :user_agent, String
98
+
99
+ # @!attribute user_id
100
+ # Authenticated user that owns the call report.
101
+ #
102
+ # @return [String, nil]
103
+ optional :user_id, String
104
+
105
+ # @!attribute version
106
+ # Legacy SDK version value when the client reports one separately from the user
107
+ # agent.
108
+ #
109
+ # @return [String, nil]
110
+ optional :version, String
111
+
112
+ # @!attribute voice_sdk_id
113
+ # Voice SDK instance identifier.
114
+ #
115
+ # @return [String, nil]
116
+ optional :voice_sdk_id, String
117
+
118
+ # @!attribute voice_sdk_id_decoded
119
+ # Decoded Voice SDK identifier metadata emitted by voice-sdk-proxy when available.
120
+ #
121
+ # @return [Hash{Symbol=>Object}, nil]
122
+ optional :voice_sdk_id_decoded, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
123
+
124
+ # @!attribute voice_sdk_session_id
125
+ # Voice SDK session correlation identifier used to group stats segments for the
126
+ # same SDK session.
127
+ #
128
+ # @return [String, nil]
129
+ optional :voice_sdk_session_id, String
130
+
131
+ # @!method initialize(call_id: nil, call_report_id: nil, created_at: nil, flush_reason: nil, logs: nil, organization_id: nil, segment: nil, stats: nil, stored_at: nil, summary: nil, telnyx_leg_id: nil, telnyx_session_id: nil, user_agent: nil, user_id: nil, version: nil, voice_sdk_id: nil, voice_sdk_id_decoded: nil, voice_sdk_session_id: nil)
132
+ # Some parameter documentations has been truncated, see
133
+ # {Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem} for more details.
134
+ #
135
+ # A raw call report stats JSON payload. The schema is intentionally permissive
136
+ # because Voice SDK clients can add fields over time.
137
+ #
138
+ # @param call_id [String] Unique call identifier.
139
+ #
140
+ # @param call_report_id [String] User-scoped storage grouping identifier derived from the authenticated user. Thi
141
+ #
142
+ # @param created_at [Time] Creation timestamp when present.
143
+ #
144
+ # @param flush_reason [Hash{Symbol=>Object}] Reason the SDK flushed this stats report segment, for example an intermediate so
145
+ #
146
+ # @param logs [Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries] Raw logs payload emitted by the Voice SDK and stored without normalization. Live
147
+ #
148
+ # @param organization_id [String] Organization associated with the stored call report when provided by the Voice S
149
+ #
150
+ # @param segment [Integer] Zero-based stats segment index when the SDK sends segmented or intermediate repo
151
+ #
152
+ # @param stats [Array<Hash{Symbol=>Object}>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember1] Raw stats payload emitted by the Voice SDK and stored without normalization. The
153
+ #
154
+ # @param stored_at [Time] Time when the call report was stored.
155
+ #
156
+ # @param summary [Hash{Symbol=>Object}] High-level call metadata.
157
+ #
158
+ # @param telnyx_leg_id [String] Telnyx call leg identifier for correlating the report with call-control, SIP, an
159
+ #
160
+ # @param telnyx_session_id [String] Telnyx RTC session identifier for correlating the report with Voice SDK signalin
161
+ #
162
+ # @param user_agent [String] Voice SDK user agent string reported by the client. This is the preferred SDK/pl
163
+ #
164
+ # @param user_id [String] Authenticated user that owns the call report.
165
+ #
166
+ # @param version [String] Legacy SDK version value when the client reports one separately from the user ag
167
+ #
168
+ # @param voice_sdk_id [String] Voice SDK instance identifier.
169
+ #
170
+ # @param voice_sdk_id_decoded [Hash{Symbol=>Object}] Decoded Voice SDK identifier metadata emitted by voice-sdk-proxy when available.
171
+ #
172
+ # @param voice_sdk_session_id [String] Voice SDK session correlation identifier used to group stats segments for the sa
173
+
174
+ # Raw logs payload emitted by the Voice SDK and stored without normalization. Live
175
+ # responses commonly return an array of log entries, but object-shaped log
176
+ # payloads are also allowed for compatibility.
177
+ #
178
+ # @see Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem#logs
179
+ module Logs
180
+ extend Telnyx::Internal::Type::Union
181
+
182
+ # Raw log entries emitted by the Voice SDK.
183
+ variant -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0Array }
184
+
185
+ # Raw logs object emitted by the Voice SDK when logs are grouped under an entries field.
186
+ variant -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries }
187
+
188
+ class UnionMember0 < Telnyx::Internal::Type::BaseModel
189
+ # @!attribute context
190
+ # Raw structured context attached to the log entry.
191
+ #
192
+ # @return [Hash{Symbol=>Object}, nil]
193
+ optional :context, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
194
+
195
+ # @!attribute level
196
+ # Log level emitted by the SDK.
197
+ #
198
+ # @return [Symbol, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0::Level, nil]
199
+ optional :level,
200
+ enum: -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0::Level }
201
+
202
+ # @!attribute message
203
+ # Log message.
204
+ #
205
+ # @return [String, nil]
206
+ optional :message, String
207
+
208
+ # @!attribute timestamp
209
+ # Time when the log entry was emitted.
210
+ #
211
+ # @return [Time, nil]
212
+ optional :timestamp, Time
213
+
214
+ # @!method initialize(context: nil, level: nil, message: nil, timestamp: nil)
215
+ # A raw Voice SDK log entry. Additional SDK-specific fields may be present.
216
+ #
217
+ # @param context [Hash{Symbol=>Object}] Raw structured context attached to the log entry.
218
+ #
219
+ # @param level [Symbol, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0::Level] Log level emitted by the SDK.
220
+ #
221
+ # @param message [String] Log message.
222
+ #
223
+ # @param timestamp [Time] Time when the log entry was emitted.
224
+
225
+ # Log level emitted by the SDK.
226
+ #
227
+ # @see Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0#level
228
+ module Level
229
+ extend Telnyx::Internal::Type::Enum
230
+
231
+ DEBUG = :debug
232
+ INFO = :info
233
+ WARN = :warn
234
+ ERROR = :error
235
+
236
+ # @!method self.values
237
+ # @return [Array<Symbol>]
238
+ end
239
+ end
240
+
241
+ class Entries < Telnyx::Internal::Type::BaseModel
242
+ # @!attribute entries
243
+ # Raw log entries when the SDK groups logs under an entries field.
244
+ #
245
+ # @return [Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry>, nil]
246
+ optional :entries,
247
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry] }
248
+
249
+ # @!method initialize(entries: nil)
250
+ # Raw logs object emitted by the Voice SDK when logs are grouped under an entries
251
+ # field.
252
+ #
253
+ # @param entries [Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry>] Raw log entries when the SDK groups logs under an entries field.
254
+
255
+ class Entry < Telnyx::Internal::Type::BaseModel
256
+ # @!attribute context
257
+ # Raw structured context attached to the log entry.
258
+ #
259
+ # @return [Hash{Symbol=>Object}, nil]
260
+ optional :context, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
261
+
262
+ # @!attribute level
263
+ # Log level emitted by the SDK.
264
+ #
265
+ # @return [Symbol, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry::Level, nil]
266
+ optional :level,
267
+ enum: -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry::Level }
268
+
269
+ # @!attribute message
270
+ # Log message.
271
+ #
272
+ # @return [String, nil]
273
+ optional :message, String
274
+
275
+ # @!attribute timestamp
276
+ # Time when the log entry was emitted.
277
+ #
278
+ # @return [Time, nil]
279
+ optional :timestamp, Time
280
+
281
+ # @!method initialize(context: nil, level: nil, message: nil, timestamp: nil)
282
+ # A raw Voice SDK log entry. Additional SDK-specific fields may be present.
283
+ #
284
+ # @param context [Hash{Symbol=>Object}] Raw structured context attached to the log entry.
285
+ #
286
+ # @param level [Symbol, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry::Level] Log level emitted by the SDK.
287
+ #
288
+ # @param message [String] Log message.
289
+ #
290
+ # @param timestamp [Time] Time when the log entry was emitted.
291
+
292
+ # Log level emitted by the SDK.
293
+ #
294
+ # @see Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries::Entry#level
295
+ module Level
296
+ extend Telnyx::Internal::Type::Enum
297
+
298
+ DEBUG = :debug
299
+ INFO = :info
300
+ WARN = :warn
301
+ ERROR = :error
302
+
303
+ # @!method self.values
304
+ # @return [Array<Symbol>]
305
+ end
306
+ end
307
+ end
308
+
309
+ # @!method self.variants
310
+ # @return [Array(Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::Entries)]
311
+
312
+ # @type [Telnyx::Internal::Type::Converter]
313
+ UnionMember0Array =
314
+ Telnyx::Internal::Type::ArrayOf[-> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Logs::UnionMember0 }]
315
+ end
316
+
317
+ # Raw stats payload emitted by the Voice SDK and stored without normalization. The
318
+ # exact shape can vary by SDK platform and version. Live responses commonly return
319
+ # an array of interval snapshots, but object-shaped stats payloads are also
320
+ # allowed for compatibility.
321
+ #
322
+ # @see Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem#stats
323
+ module Stats
324
+ extend Telnyx::Internal::Type::Union
325
+
326
+ # Raw interval stats snapshots emitted by the Voice SDK.
327
+ variant -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember0Array }
328
+
329
+ # Raw stats object emitted by the Voice SDK.
330
+ variant -> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember1 }
331
+
332
+ class UnionMember1 < Telnyx::Internal::Type::BaseModel
333
+ # @!attribute audio
334
+ # Raw audio stats such as inbound/outbound packet, byte, jitter, packet-loss,
335
+ # bitrate, and audio-level metrics.
336
+ #
337
+ # @return [Hash{Symbol=>Object}, nil]
338
+ optional :audio, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
339
+
340
+ # @!attribute connection
341
+ # Raw connection stats such as round-trip time, packets, and bytes sent or
342
+ # received.
343
+ #
344
+ # @return [Hash{Symbol=>Object}, nil]
345
+ optional :connection, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
346
+
347
+ # @!attribute ice
348
+ # Raw ICE candidate-pair information, including selected pair, local/remote
349
+ # candidates, state, and nomination data when provided by the SDK.
350
+ #
351
+ # @return [Hash{Symbol=>Object}, nil]
352
+ optional :ice, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
353
+
354
+ # @!attribute transport
355
+ # Raw transport stats such as ICE state, DTLS state, SRTP cipher, TLS version, and
356
+ # selected-candidate-pair changes.
357
+ #
358
+ # @return [Hash{Symbol=>Object}, nil]
359
+ optional :transport, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
360
+
361
+ # @!method initialize(audio: nil, connection: nil, ice: nil, transport: nil)
362
+ # Some parameter documentations has been truncated, see
363
+ # {Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember1}
364
+ # for more details.
365
+ #
366
+ # Raw stats object emitted by the Voice SDK.
367
+ #
368
+ # @param audio [Hash{Symbol=>Object}] Raw audio stats such as inbound/outbound packet, byte, jitter, packet-loss, bitr
369
+ #
370
+ # @param connection [Hash{Symbol=>Object}] Raw connection stats such as round-trip time, packets, and bytes sent or receive
371
+ #
372
+ # @param ice [Hash{Symbol=>Object}] Raw ICE candidate-pair information, including selected pair, local/remote candid
373
+ #
374
+ # @param transport [Hash{Symbol=>Object}] Raw transport stats such as ICE state, DTLS state, SRTP cipher, TLS version, and
375
+ end
376
+
377
+ # @!method self.variants
378
+ # @return [Array(Array<Hash{Symbol=>Object}>, Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem::Stats::UnionMember1)]
379
+
380
+ # @type [Telnyx::Internal::Type::Converter]
381
+ UnionMember0Array =
382
+ Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]]
383
+ end
384
+ end
385
+
386
+ # @type [Telnyx::Internal::Type::Converter]
387
+ VoiceSDKCallReportRetrieveResponse =
388
+ Telnyx::Internal::Type::ArrayOf[-> { Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem }]
389
+ end
390
+ end
data/lib/telnyx/models.rb CHANGED
@@ -1777,6 +1777,10 @@ module Telnyx
1777
1777
 
1778
1778
  VoiceDesignRetrieveParams = Telnyx::Models::VoiceDesignRetrieveParams
1779
1779
 
1780
+ VoiceSDKCallReportListParams = Telnyx::Models::VoiceSDKCallReportListParams
1781
+
1782
+ VoiceSDKCallReportRetrieveParams = Telnyx::Models::VoiceSDKCallReportRetrieveParams
1783
+
1780
1784
  WebhookAPIVersion = Telnyx::Models::WebhookAPIVersion
1781
1785
 
1782
1786
  WebhookDeliveryListParams = Telnyx::Models::WebhookDeliveryListParams
@@ -55,7 +55,7 @@ module Telnyx
55
55
  # When the `record` parameter is set to `record-from-answer`, the response will
56
56
  # include a `recording_id` field.
57
57
  #
58
- # @overload answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, custom_headers: nil, deepfake_detection: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
58
+ # @overload answer(call_control_id, assistant: nil, billing_group_id: nil, client_state: nil, command_id: nil, conversation_relay_config: nil, custom_headers: nil, deepfake_detection: nil, preferred_codecs: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_silence_when_idle: nil, sip_headers: nil, sound_modifications: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_track: nil, stream_url: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
59
59
  #
60
60
  # @param call_control_id [String] Unique identifier and token for controlling the call
61
61
  #
@@ -67,6 +67,8 @@ module Telnyx
67
67
  #
68
68
  # @param command_id [String] Use this field to avoid duplicate commands. Telnyx will ignore any command with
69
69
  #
70
+ # @param conversation_relay_config [Telnyx::Models::Calls::ActionAnswerParams::ConversationRelayConfig] Starts a Conversation Relay session automatically when the answered/dialed call
71
+ #
70
72
  # @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE response.
71
73
  #
72
74
  # @param deepfake_detection [Telnyx::Models::Calls::ActionAnswerParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
@@ -945,7 +947,7 @@ module Telnyx
945
947
  # the customer WebSocket disconnects, the webhook payload `reason` is
946
948
  # `customer_disconnect`.
947
949
  #
948
- # @overload start_conversation_relay(call_control_id, assistant: nil, client_state: nil, command_id: nil, conversation_relay_dtmf_detection: nil, conversation_relay_settings: nil, conversation_relay_url: nil, greeting: nil, interruption_settings: nil, language: nil, languages: nil, transcription: nil, transcription_language: nil, tts_language: nil, voice: nil, voice_settings: nil, request_options: {})
950
+ # @overload start_conversation_relay(call_control_id, assistant: nil, client_state: nil, command_id: nil, conversation_relay_dtmf_detection: nil, conversation_relay_settings: nil, conversation_relay_url: nil, custom_parameters: nil, dtmf_detection: nil, greeting: nil, interruptible: nil, interruptible_greeting: nil, interruption_settings: nil, language: nil, languages: nil, provider: nil, structured_provider: nil, transcription: nil, transcription_engine: nil, transcription_engine_config: nil, tts_provider: nil, url: nil, voice: nil, voice_settings: nil, request_options: {})
949
951
  #
950
952
  # @param call_control_id [String] Unique identifier and token for controlling the call
951
953
  #
@@ -957,27 +959,43 @@ module Telnyx
957
959
  #
958
960
  # @param conversation_relay_dtmf_detection [Boolean] Enable DTMF detection for the relay session.
959
961
  #
960
- # @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object is used by TeXML Call Script
962
+ # @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object can provide `url`, `dtmf_det
961
963
  #
962
964
  # @param conversation_relay_url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
963
965
  #
966
+ # @param custom_parameters [Hash{Symbol=>Object}] Custom key-value parameters forwarded to the relay session as `assistant.dynamic
967
+ #
968
+ # @param dtmf_detection [Boolean] Public alias for `conversation_relay_dtmf_detection`. If both are present, this
969
+ #
964
970
  # @param greeting [String] Text played when the relay session starts.
965
971
  #
972
+ # @param interruptible [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
973
+ #
974
+ # @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
975
+ #
966
976
  # @param interruption_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
967
977
  #
968
978
  # @param language [String] Default language for the relay session. This value is used for both text-to-spee
969
979
  #
970
- # @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Language-specific TTS and transcription settings. Use this when the relay sessio
980
+ # @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Per-language TTS and transcription settings.
971
981
  #
972
- # @param transcription [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription] Speech-to-text settings for Conversation Relay.
982
+ # @param provider [String] Structured voice provider. Must be supplied together with `structured_provider`.
973
983
  #
974
- # @param transcription_language [String] Language to use for speech recognition. Overrides `language` for transcription w
984
+ # @param structured_provider [Hash{Symbol=>Object}] Provider-specific structured voice settings. Must be supplied together with `pro
975
985
  #
976
- # @param tts_language [String] Language to use for text-to-speech. Overrides `language` for TTS when provided.
986
+ # @param transcription [Hash{Symbol=>Object}] Not supported for Conversation Relay start requests. Use `transcription_engine`
987
+ #
988
+ # @param transcription_engine [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
989
+ #
990
+ # @param transcription_engine_config [Hash{Symbol=>Object}] Engine-specific transcription settings for Conversation Relay. This accepts the
991
+ #
992
+ # @param tts_provider [String] Text-to-speech provider. If omitted, Telnyx derives it from `voice` or `provider
993
+ #
994
+ # @param url [String] Public alias for `conversation_relay_url`. Must start with `ws://` or `wss://`.
977
995
  #
978
996
  # @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
979
997
  #
980
- # @param voice_settings [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
998
+ # @param voice_settings [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::MinimaxVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::Calls::ActionStartConversationRelayParams::VoiceSettings::Inworld, Telnyx::Models::XaiVoiceSettings] The settings associated with the voice selected
981
999
  #
982
1000
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
983
1001
  #
@@ -35,7 +35,7 @@ module Telnyx
35
35
  # When the `record` parameter is set to `record-from-answer`, the response will
36
36
  # include a `recording_id` field.
37
37
  #
38
- # @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
38
+ # @overload dial(connection_id:, from:, to:, answering_machine_detection: nil, answering_machine_detection_config: nil, assistant: nil, audio_url: nil, billing_group_id: nil, bridge_intent: nil, bridge_on_answer: nil, client_state: nil, command_id: nil, conference_config: nil, conversation_relay_config: nil, custom_headers: nil, deepfake_detection: nil, dialogflow_config: nil, enable_dialogflow: nil, from_display_name: nil, link_to: nil, media_encryption: nil, media_name: nil, park_after_unbridge: nil, preferred_codecs: nil, prevent_double_bridge: nil, privacy: nil, record: nil, record_channels: nil, record_custom_file_name: nil, record_format: nil, record_max_length: nil, record_timeout_secs: nil, record_track: nil, record_trim: nil, send_digits_on_answer: nil, send_silence_when_idle: nil, sip_auth_password: nil, sip_auth_username: nil, sip_headers: nil, sip_region: nil, sip_transport_protocol: nil, sound_modifications: nil, stream_auth_token: nil, stream_bidirectional_codec: nil, stream_bidirectional_mode: nil, stream_bidirectional_sampling_rate: nil, stream_bidirectional_target_legs: nil, stream_codec: nil, stream_establish_before_call_originate: nil, stream_track: nil, stream_url: nil, supervise_call_control_id: nil, supervisor_role: nil, time_limit_secs: nil, timeout_secs: nil, transcription: nil, transcription_config: nil, webhook_retries_policies: nil, webhook_url: nil, webhook_url_method: nil, webhook_urls: nil, webhook_urls_method: nil, request_options: {})
39
39
  #
40
40
  # @param connection_id [String] The ID of the Call Control App (formerly ID of the connection) to be used when d
41
41
  #
@@ -63,6 +63,8 @@ module Telnyx
63
63
  #
64
64
  # @param conference_config [Telnyx::Models::CallDialParams::ConferenceConfig] Optional configuration parameters to dial new participant into a conference.
65
65
  #
66
+ # @param conversation_relay_config [Telnyx::Models::CallDialParams::ConversationRelayConfig] Starts a Conversation Relay session automatically when the answered/dialed call
67
+ #
66
68
  # @param custom_headers [Array<Telnyx::Models::CustomSipHeader>] Custom headers to be added to the SIP INVITE.
67
69
  #
68
70
  # @param deepfake_detection [Telnyx::Models::CallDialParams::DeepfakeDetection] Enables deepfake detection on the call. When enabled, audio from the remote part
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Resources
5
+ # Retrieve raw Voice SDK call report stats payloads for WebRTC call
6
+ # troubleshooting.
7
+ class VoiceSDKCallReports
8
+ # Returns raw call report stats JSON payloads stored for the authenticated user
9
+ # and `call_id`. The user is derived from Telnyx authentication, not from request
10
+ # parameters.
11
+ #
12
+ # @overload retrieve(call_id, request_options: {})
13
+ #
14
+ # @param call_id [String] Call identifier used to retrieve reports owned by the authenticated user.
15
+ #
16
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
17
+ #
18
+ # @return [Array<Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem>]
19
+ #
20
+ # @see Telnyx::Models::VoiceSDKCallReportRetrieveParams
21
+ def retrieve(call_id, params = {})
22
+ @client.request(
23
+ method: :get,
24
+ path: ["voice_sdk_call_reports/%1$s", call_id],
25
+ model: Telnyx::Internal::Type::ArrayOf[Telnyx::Models::VoiceSDKCallReportRetrieveResponseItem],
26
+ options: params[:request_options]
27
+ )
28
+ end
29
+
30
+ # Some parameter documentations has been truncated, see
31
+ # {Telnyx::Models::VoiceSDKCallReportListParams} for more details.
32
+ #
33
+ # Returns paginated raw call report stats JSON payloads stored for the
34
+ # authenticated user. The user is derived from Telnyx authentication, not from
35
+ # request parameters.
36
+ #
37
+ # @overload list(page_number: nil, page_size: nil, sort: nil, request_options: {})
38
+ #
39
+ # @param page_number [Integer]
40
+ #
41
+ # @param page_size [Integer]
42
+ #
43
+ # @param sort [Symbol, Telnyx::Models::VoiceSDKCallReportListParams::Sort] Set the order of the results by creation date. `asc` and `created_at` sort oldes
44
+ #
45
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
46
+ #
47
+ # @return [Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::VoiceSDKCallReportListResponse>]
48
+ #
49
+ # @see Telnyx::Models::VoiceSDKCallReportListParams
50
+ def list(params = {})
51
+ parsed, options = Telnyx::VoiceSDKCallReportListParams.dump_request(params)
52
+ query = Telnyx::Internal::Util.encode_query_params(parsed)
53
+ @client.request(
54
+ method: :get,
55
+ path: "voice_sdk_call_reports",
56
+ query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
57
+ page: Telnyx::Internal::DefaultFlatPagination,
58
+ model: Telnyx::Models::VoiceSDKCallReportListResponse,
59
+ options: options
60
+ )
61
+ end
62
+
63
+ # @api private
64
+ #
65
+ # @param client [Telnyx::Client]
66
+ def initialize(client:)
67
+ @client = client
68
+ end
69
+ end
70
+ end
71
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.119.0"
4
+ VERSION = "5.121.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -2327,6 +2327,10 @@ require_relative "telnyx/models/voice_design_rename_params"
2327
2327
  require_relative "telnyx/models/voice_design_rename_response"
2328
2328
  require_relative "telnyx/models/voice_design_retrieve_params"
2329
2329
  require_relative "telnyx/models/voice_design_retrieve_response"
2330
+ require_relative "telnyx/models/voice_sdk_call_report_list_params"
2331
+ require_relative "telnyx/models/voice_sdk_call_report_list_response"
2332
+ require_relative "telnyx/models/voice_sdk_call_report_retrieve_params"
2333
+ require_relative "telnyx/models/voice_sdk_call_report_retrieve_response"
2330
2334
  require_relative "telnyx/models/webhook_api_version"
2331
2335
  require_relative "telnyx/models/webhook_delivery_list_params"
2332
2336
  require_relative "telnyx/models/webhook_delivery_list_response"
@@ -2741,6 +2745,7 @@ require_relative "telnyx/resources/virtual_cross_connects"
2741
2745
  require_relative "telnyx/resources/virtual_cross_connects_coverage"
2742
2746
  require_relative "telnyx/resources/voice_clones"
2743
2747
  require_relative "telnyx/resources/voice_designs"
2748
+ require_relative "telnyx/resources/voice_sdk_call_reports"
2744
2749
  require_relative "telnyx/resources/webhook_deliveries"
2745
2750
  require_relative "telnyx/resources/webhooks"
2746
2751
  require_relative "telnyx/resources/well_known"
@@ -658,6 +658,11 @@ module Telnyx
658
658
  sig { returns(Telnyx::Resources::UacConnections) }
659
659
  attr_reader :uac_connections
660
660
 
661
+ # Retrieve raw Voice SDK call report stats payloads for WebRTC call
662
+ # troubleshooting.
663
+ sig { returns(Telnyx::Resources::VoiceSDKCallReports) }
664
+ attr_reader :voice_sdk_call_reports
665
+
661
666
  # @api private
662
667
  sig { override.returns(T::Hash[String, String]) }
663
668
  private def auth_headers