telnyx 5.13.0 → 5.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b86651570452acaba364bdda2d70409a34bff8f0c4af9dfec303fa065fef789
4
- data.tar.gz: 314b389b25a77f66ae3960e864f9e3eee61c84b834414ed8c21dd01592091ef5
3
+ metadata.gz: 9da568419d4146b9adebaf6012dbdb28c4ad24798eb4024d89a885ddeecde0a7
4
+ data.tar.gz: 7227756ff99e22af95bef59d810f79400bcfe88ab316a6dcd846cfd4f7f37cef
5
5
  SHA512:
6
- metadata.gz: 3f42de8d4c2e831eff34a3b413650c18d5cbc072100d0f0da821e64c6ed72eb0aebcf671356353e20ff86a91d7474ae67bf3c4ac21a678112a13d59f567579d8
7
- data.tar.gz: cfa1c046ccbc7f6b37ced53d83daeb647f8141e2600445b734169a0605da8ee389066c519c1783adce3fb08988de2c46dc5a3276ec66eece155f4dd60664b521
6
+ metadata.gz: 16302aeadde52e34185dbd0a79c7c0b27d041accd5f7f3139ddcf2da856a8f723bf190c54d661bedcb934b944a51f07534f663ad90d0940e8104d082b26cb2b1
7
+ data.tar.gz: f6005d40c735e85253414afd176b0b13af991c37fc4e0d0857806c0c8ef2621160e801b5c9270e6525a552aa4c519829072929ef1a0b824eab33d7dd6a90f606
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.15.0 (2026-02-11)
4
+
5
+ Full Changelog: [v5.14.0...v5.15.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.14.0...v5.15.0)
6
+
7
+ ### Features
8
+
9
+ * Limit detection_mode enum to disabled and detect only ([a1095ec](https://github.com/team-telnyx/telnyx-ruby/commit/a1095ecb570f54320530b9223ea6bed3f38a2125))
10
+
11
+ ## 5.14.0 (2026-02-09)
12
+
13
+ Full Changelog: [v5.13.0...v5.14.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.13.0...v5.14.0)
14
+
15
+ ### Features
16
+
17
+ * AI-2078 Feature: API endpoint to disable AI assistant mid-conversation ([50628ff](https://github.com/team-telnyx/telnyx-ruby/commit/50628ff4e1a9d3b3ffef761e05673aeae1db3c57))
18
+
3
19
  ## 5.13.0 (2026-02-06)
4
20
 
5
21
  Full Changelog: [v5.12.0...v5.13.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.12.0...v5.13.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.13.0"
27
+ gem "telnyx", "~> 5.15.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -149,6 +149,14 @@ module Telnyx
149
149
  optional :custom_headers,
150
150
  -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AssistantTool::Transfer::Transfer::CustomHeader] }
151
151
 
152
+ # @!attribute voicemail_detection
153
+ # Configuration for voicemail detection (AMD - Answering Machine Detection) on the
154
+ # transferred call. Allows the assistant to detect when a voicemail system answers
155
+ # the transferred call and take appropriate action.
156
+ #
157
+ # @return [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection, nil]
158
+ optional :voicemail_detection, -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection }
159
+
152
160
  # @!attribute warm_transfer_instructions
153
161
  # Natural language instructions for your agent for how to provide context for the
154
162
  # transfer recipient.
@@ -156,7 +164,7 @@ module Telnyx
156
164
  # @return [String, nil]
157
165
  optional :warm_transfer_instructions, String
158
166
 
159
- # @!method initialize(from:, targets:, custom_headers: nil, warm_transfer_instructions: nil)
167
+ # @!method initialize(from:, targets:, custom_headers: nil, voicemail_detection: nil, warm_transfer_instructions: nil)
160
168
  # Some parameter documentations has been truncated, see
161
169
  # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer} for more details.
162
170
  #
@@ -166,6 +174,8 @@ module Telnyx
166
174
  #
167
175
  # @param custom_headers [Array<Telnyx::Models::AI::AssistantTool::Transfer::Transfer::CustomHeader>] Custom headers to be added to the SIP INVITE for the transfer command.
168
176
  #
177
+ # @param voicemail_detection [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection] Configuration for voicemail detection (AMD - Answering Machine Detection) on the
178
+ #
169
179
  # @param warm_transfer_instructions [String] Natural language instructions for your agent for how to provide context for the
170
180
 
171
181
  class Target < Telnyx::Internal::Type::BaseModel
@@ -211,6 +221,254 @@ module Telnyx
211
221
  #
212
222
  # @param value [String] The value of the header. Note that we support mustache templating for the value.
213
223
  end
224
+
225
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer#voicemail_detection
226
+ class VoicemailDetection < Telnyx::Internal::Type::BaseModel
227
+ # @!attribute detection_config
228
+ # Advanced AMD detection configuration parameters. All values are optional -
229
+ # Telnyx will use defaults if not specified.
230
+ #
231
+ # @return [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionConfig, nil]
232
+ optional :detection_config,
233
+ -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionConfig }
234
+
235
+ # @!attribute detection_mode
236
+ # The AMD detection mode to use. 'detect' enables answering machine detection
237
+ # (works best when warm transfer instructions are also set). 'disabled' turns off
238
+ # AMD detection.
239
+ #
240
+ # @return [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionMode, nil]
241
+ optional :detection_mode,
242
+ enum: -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionMode }
243
+
244
+ # @!attribute on_voicemail_detected
245
+ # Action to take when voicemail is detected on the transferred call.
246
+ #
247
+ # @return [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected, nil]
248
+ optional :on_voicemail_detected,
249
+ -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected }
250
+
251
+ # @!method initialize(detection_config: nil, detection_mode: nil, on_voicemail_detected: nil)
252
+ # Some parameter documentations has been truncated, see
253
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection} for
254
+ # more details.
255
+ #
256
+ # Configuration for voicemail detection (AMD - Answering Machine Detection) on the
257
+ # transferred call. Allows the assistant to detect when a voicemail system answers
258
+ # the transferred call and take appropriate action.
259
+ #
260
+ # @param detection_config [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionConfig] Advanced AMD detection configuration parameters. All values are optional - Telny
261
+ #
262
+ # @param detection_mode [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionMode] The AMD detection mode to use. 'detect' enables answering machine detection (wor
263
+ #
264
+ # @param on_voicemail_detected [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected] Action to take when voicemail is detected on the transferred call.
265
+
266
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection#detection_config
267
+ class DetectionConfig < Telnyx::Internal::Type::BaseModel
268
+ # @!attribute after_greeting_silence_millis
269
+ # Duration of silence after greeting detection before finalizing the result.
270
+ #
271
+ # @return [Integer, nil]
272
+ optional :after_greeting_silence_millis, Integer
273
+
274
+ # @!attribute between_words_silence_millis
275
+ # Maximum silence duration between words during greeting.
276
+ #
277
+ # @return [Integer, nil]
278
+ optional :between_words_silence_millis, Integer
279
+
280
+ # @!attribute greeting_duration_millis
281
+ # Expected duration of greeting speech.
282
+ #
283
+ # @return [Integer, nil]
284
+ optional :greeting_duration_millis, Integer
285
+
286
+ # @!attribute greeting_silence_duration_millis
287
+ # Duration of silence after the greeting to wait before considering the greeting
288
+ # complete.
289
+ #
290
+ # @return [Integer, nil]
291
+ optional :greeting_silence_duration_millis, Integer
292
+
293
+ # @!attribute greeting_total_analysis_time_millis
294
+ # Maximum time to spend analyzing the greeting.
295
+ #
296
+ # @return [Integer, nil]
297
+ optional :greeting_total_analysis_time_millis, Integer
298
+
299
+ # @!attribute initial_silence_millis
300
+ # Maximum silence duration at the start of the call before speech.
301
+ #
302
+ # @return [Integer, nil]
303
+ optional :initial_silence_millis, Integer
304
+
305
+ # @!attribute maximum_number_of_words
306
+ # Maximum number of words expected in a human greeting.
307
+ #
308
+ # @return [Integer, nil]
309
+ optional :maximum_number_of_words, Integer
310
+
311
+ # @!attribute maximum_word_length_millis
312
+ # Maximum duration of a single word.
313
+ #
314
+ # @return [Integer, nil]
315
+ optional :maximum_word_length_millis, Integer
316
+
317
+ # @!attribute min_word_length_millis
318
+ # Minimum duration for audio to be considered a word.
319
+ #
320
+ # @return [Integer, nil]
321
+ optional :min_word_length_millis, Integer
322
+
323
+ # @!attribute silence_threshold
324
+ # Audio level threshold for silence detection.
325
+ #
326
+ # @return [Integer, nil]
327
+ optional :silence_threshold, Integer
328
+
329
+ # @!attribute total_analysis_time_millis
330
+ # Total time allowed for AMD analysis.
331
+ #
332
+ # @return [Integer, nil]
333
+ optional :total_analysis_time_millis, Integer
334
+
335
+ # @!method initialize(after_greeting_silence_millis: nil, between_words_silence_millis: nil, greeting_duration_millis: nil, greeting_silence_duration_millis: nil, greeting_total_analysis_time_millis: nil, initial_silence_millis: nil, maximum_number_of_words: nil, maximum_word_length_millis: nil, min_word_length_millis: nil, silence_threshold: nil, total_analysis_time_millis: nil)
336
+ # Some parameter documentations has been truncated, see
337
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::DetectionConfig}
338
+ # for more details.
339
+ #
340
+ # Advanced AMD detection configuration parameters. All values are optional -
341
+ # Telnyx will use defaults if not specified.
342
+ #
343
+ # @param after_greeting_silence_millis [Integer] Duration of silence after greeting detection before finalizing the result.
344
+ #
345
+ # @param between_words_silence_millis [Integer] Maximum silence duration between words during greeting.
346
+ #
347
+ # @param greeting_duration_millis [Integer] Expected duration of greeting speech.
348
+ #
349
+ # @param greeting_silence_duration_millis [Integer] Duration of silence after the greeting to wait before considering the greeting c
350
+ #
351
+ # @param greeting_total_analysis_time_millis [Integer] Maximum time to spend analyzing the greeting.
352
+ #
353
+ # @param initial_silence_millis [Integer] Maximum silence duration at the start of the call before speech.
354
+ #
355
+ # @param maximum_number_of_words [Integer] Maximum number of words expected in a human greeting.
356
+ #
357
+ # @param maximum_word_length_millis [Integer] Maximum duration of a single word.
358
+ #
359
+ # @param min_word_length_millis [Integer] Minimum duration for audio to be considered a word.
360
+ #
361
+ # @param silence_threshold [Integer] Audio level threshold for silence detection.
362
+ #
363
+ # @param total_analysis_time_millis [Integer] Total time allowed for AMD analysis.
364
+ end
365
+
366
+ # The AMD detection mode to use. 'detect' enables answering machine detection
367
+ # (works best when warm transfer instructions are also set). 'disabled' turns off
368
+ # AMD detection.
369
+ #
370
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection#detection_mode
371
+ module DetectionMode
372
+ extend Telnyx::Internal::Type::Enum
373
+
374
+ DISABLED = :disabled
375
+ DETECT = :detect
376
+
377
+ # @!method self.values
378
+ # @return [Array<Symbol>]
379
+ end
380
+
381
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection#on_voicemail_detected
382
+ class OnVoicemailDetected < Telnyx::Internal::Type::BaseModel
383
+ # @!attribute action
384
+ # The action to take when voicemail is detected. 'stop_transfer' hangs up
385
+ # immediately. 'leave_message_and_stop_transfer' leaves a message then hangs up.
386
+ # 'continue_transfer' bridges the call despite voicemail detection.
387
+ #
388
+ # @return [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::Action, nil]
389
+ optional :action,
390
+ enum: -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::Action }
391
+
392
+ # @!attribute voicemail_message
393
+ # Configuration for the voicemail message to leave. Only applicable when action is
394
+ # 'leave_message_and_stop_transfer'.
395
+ #
396
+ # @return [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage, nil]
397
+ optional :voicemail_message,
398
+ -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage }
399
+
400
+ # @!method initialize(action: nil, voicemail_message: nil)
401
+ # Some parameter documentations has been truncated, see
402
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected}
403
+ # for more details.
404
+ #
405
+ # Action to take when voicemail is detected on the transferred call.
406
+ #
407
+ # @param action [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::Action] The action to take when voicemail is detected. 'stop_transfer' hangs up immediat
408
+ #
409
+ # @param voicemail_message [Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage] Configuration for the voicemail message to leave. Only applicable when action is
410
+
411
+ # The action to take when voicemail is detected. 'stop_transfer' hangs up
412
+ # immediately. 'leave_message_and_stop_transfer' leaves a message then hangs up.
413
+ # 'continue_transfer' bridges the call despite voicemail detection.
414
+ #
415
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected#action
416
+ module Action
417
+ extend Telnyx::Internal::Type::Enum
418
+
419
+ STOP_TRANSFER = :stop_transfer
420
+ LEAVE_MESSAGE_AND_STOP_TRANSFER = :leave_message_and_stop_transfer
421
+ CONTINUE_TRANSFER = :continue_transfer
422
+
423
+ # @!method self.values
424
+ # @return [Array<Symbol>]
425
+ end
426
+
427
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected#voicemail_message
428
+ class VoicemailMessage < Telnyx::Internal::Type::BaseModel
429
+ # @!attribute message
430
+ # The specific message to leave as voicemail (converted to speech). Only
431
+ # applicable when type is 'message'.
432
+ #
433
+ # @return [String, nil]
434
+ optional :message, String
435
+
436
+ # @!attribute type
437
+ # The type of voicemail message. Use 'message' to leave a specific TTS message, or
438
+ # 'warm_transfer_instructions' to play the warm transfer audio.
439
+ #
440
+ # @return [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type, nil]
441
+ optional :type,
442
+ enum: -> { Telnyx::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type }
443
+
444
+ # @!method initialize(message: nil, type: nil)
445
+ # Some parameter documentations has been truncated, see
446
+ # {Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage}
447
+ # for more details.
448
+ #
449
+ # Configuration for the voicemail message to leave. Only applicable when action is
450
+ # 'leave_message_and_stop_transfer'.
451
+ #
452
+ # @param message [String] The specific message to leave as voicemail (converted to speech). Only applicabl
453
+ #
454
+ # @param type [Symbol, Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage::Type] The type of voicemail message. Use 'message' to leave a specific TTS message, or
455
+
456
+ # The type of voicemail message. Use 'message' to leave a specific TTS message, or
457
+ # 'warm_transfer_instructions' to play the warm transfer audio.
458
+ #
459
+ # @see Telnyx::Models::AI::AssistantTool::Transfer::Transfer::VoicemailDetection::OnVoicemailDetected::VoicemailMessage#type
460
+ module Type
461
+ extend Telnyx::Internal::Type::Enum
462
+
463
+ MESSAGE = :message
464
+ WARM_TRANSFER_INSTRUCTIONS = :warm_transfer_instructions
465
+
466
+ # @!method self.values
467
+ # @return [Array<Symbol>]
468
+ end
469
+ end
470
+ end
471
+ end
214
472
  end
215
473
  end
216
474
 
@@ -24,7 +24,12 @@ module Telnyx
24
24
 
25
25
  # @!attribute metadata
26
26
  # Metadata associated with the conversation. Telnyx provides several pieces of
27
- # metadata, but customers can also add their own.
27
+ # metadata, but customers can also add their own. The reserved field `ai_disabled`
28
+ # (boolean) can be set to `true` to prevent AI-generated responses on this
29
+ # conversation. When `ai_disabled` is `true`, calls to the chat endpoint will
30
+ # return a 400 error. Set to `false` or remove the field to re-enable AI
31
+ # responses. This is useful when a human agent needs to take over the conversation
32
+ # mid-stream (e.g., a technician stepping in while AI was messaging a resident).
28
33
  #
29
34
  # @return [Hash{Symbol=>String}]
30
35
  required :metadata, Telnyx::Internal::Type::HashOf[String]
@@ -9,7 +9,8 @@ module Telnyx
9
9
  include Telnyx::Internal::Type::RequestParameters
10
10
 
11
11
  # @!attribute metadata
12
- # Metadata associated with the conversation.
12
+ # Metadata associated with the conversation. Set `ai_disabled` to `true` to create
13
+ # the conversation with AI message responses disabled.
13
14
  #
14
15
  # @return [Hash{Symbol=>String}, nil]
15
16
  optional :metadata, Telnyx::Internal::Type::HashOf[String]
@@ -20,7 +21,10 @@ module Telnyx
20
21
  optional :name, String
21
22
 
22
23
  # @!method initialize(metadata: nil, name: nil, request_options: {})
23
- # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation.
24
+ # Some parameter documentations has been truncated, see
25
+ # {Telnyx::Models::AI::ConversationCreateParams} for more details.
26
+ #
27
+ # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation. Set `ai_disabled` to `true` to create
24
28
  #
25
29
  # @param name [String]
26
30
  #
@@ -9,13 +9,18 @@ module Telnyx
9
9
  include Telnyx::Internal::Type::RequestParameters
10
10
 
11
11
  # @!attribute metadata
12
- # Metadata associated with the conversation.
12
+ # Metadata associated with the conversation. Set `ai_disabled` to `true` to stop
13
+ # AI from responding to messages (e.g., when a human agent takes over). Set to
14
+ # `false` to re-enable AI responses.
13
15
  #
14
16
  # @return [Hash{Symbol=>String}, nil]
15
17
  optional :metadata, Telnyx::Internal::Type::HashOf[String]
16
18
 
17
19
  # @!method initialize(metadata: nil, request_options: {})
18
- # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation.
20
+ # Some parameter documentations has been truncated, see
21
+ # {Telnyx::Models::AI::ConversationUpdateParams} for more details.
22
+ #
23
+ # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation. Set `ai_disabled` to `true` to stop A
19
24
  #
20
25
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
21
26
  end
@@ -13,11 +13,14 @@ module Telnyx
13
13
  # @return [Telnyx::Resources::AI::Conversations::Messages]
14
14
  attr_reader :messages
15
15
 
16
+ # Some parameter documentations has been truncated, see
17
+ # {Telnyx::Models::AI::ConversationCreateParams} for more details.
18
+ #
16
19
  # Create a new AI Conversation.
17
20
  #
18
21
  # @overload create(metadata: nil, name: nil, request_options: {})
19
22
  #
20
- # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation.
23
+ # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation. Set `ai_disabled` to `true` to create
21
24
  #
22
25
  # @param name [String]
23
26
  #
@@ -57,13 +60,16 @@ module Telnyx
57
60
  )
58
61
  end
59
62
 
63
+ # Some parameter documentations has been truncated, see
64
+ # {Telnyx::Models::AI::ConversationUpdateParams} for more details.
65
+ #
60
66
  # Update metadata for a specific conversation.
61
67
  #
62
68
  # @overload update(conversation_id, metadata: nil, request_options: {})
63
69
  #
64
70
  # @param conversation_id [String] The ID of the conversation to update
65
71
  #
66
- # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation.
72
+ # @param metadata [Hash{Symbol=>String}] Metadata associated with the conversation. Set `ai_disabled` to `true` to stop A
67
73
  #
68
74
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
69
75
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.13.0"
4
+ VERSION = "5.15.0"
5
5
  end