telnyx 5.111.0 → 5.113.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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/openai_create_response_params.rb +3 -3
  5. data/lib/telnyx/models/ai_create_response_params.rb +4 -4
  6. data/lib/telnyx/models/call_conversation_ended.rb +13 -1
  7. data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +542 -0
  8. data/lib/telnyx/models/calls/action_start_conversation_relay_response.rb +37 -0
  9. data/lib/telnyx/models/calls/action_stop_conversation_relay_params.rb +44 -0
  10. data/lib/telnyx/models/calls/action_stop_conversation_relay_response.rb +18 -0
  11. data/lib/telnyx/models/calls/transcription_engine_speechmatics_config.rb +100 -0
  12. data/lib/telnyx/models/calls/transcription_start_request.rb +6 -3
  13. data/lib/telnyx/models/fax.rb +7 -5
  14. data/lib/telnyx/models/fax_create_params.rb +7 -5
  15. data/lib/telnyx/models/fax_delivered.rb +3 -2
  16. data/lib/telnyx/models/fax_failed.rb +3 -2
  17. data/lib/telnyx/models/fax_media_processed.rb +3 -2
  18. data/lib/telnyx/models/fax_queued.rb +3 -2
  19. data/lib/telnyx/models/fax_sending_started.rb +3 -2
  20. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +62 -12
  21. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +18 -4
  22. data/lib/telnyx/resources/ai/openai.rb +1 -1
  23. data/lib/telnyx/resources/ai.rb +3 -3
  24. data/lib/telnyx/resources/calls/actions.rb +95 -1
  25. data/lib/telnyx/resources/faxes.rb +13 -1
  26. data/lib/telnyx/resources/texml.rb +4 -2
  27. data/lib/telnyx/version.rb +1 -1
  28. data/lib/telnyx.rb +5 -0
  29. data/rbi/telnyx/models/ai/openai_create_response_params.rbi +4 -4
  30. data/rbi/telnyx/models/ai_create_response_params.rbi +4 -4
  31. data/rbi/telnyx/models/call_conversation_ended.rbi +10 -0
  32. data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +1192 -0
  33. data/rbi/telnyx/models/calls/action_start_conversation_relay_response.rbi +95 -0
  34. data/rbi/telnyx/models/calls/action_stop_conversation_relay_params.rbi +72 -0
  35. data/rbi/telnyx/models/calls/action_stop_conversation_relay_response.rbi +39 -0
  36. data/rbi/telnyx/models/calls/transcription_engine_speechmatics_config.rbi +289 -0
  37. data/rbi/telnyx/models/calls/transcription_start_request.rbi +10 -0
  38. data/rbi/telnyx/models/fax.rbi +12 -8
  39. data/rbi/telnyx/models/fax_create_params.rbi +12 -8
  40. data/rbi/telnyx/models/fax_delivered.rbi +6 -4
  41. data/rbi/telnyx/models/fax_failed.rbi +6 -4
  42. data/rbi/telnyx/models/fax_media_processed.rbi +6 -4
  43. data/rbi/telnyx/models/fax_queued.rbi +6 -4
  44. data/rbi/telnyx/models/fax_sending_started.rbi +6 -4
  45. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +81 -9
  46. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +27 -3
  47. data/rbi/telnyx/resources/ai/openai.rbi +1 -1
  48. data/rbi/telnyx/resources/ai.rbi +2 -2
  49. data/rbi/telnyx/resources/calls/actions.rbi +146 -0
  50. data/rbi/telnyx/resources/faxes.rbi +18 -4
  51. data/rbi/telnyx/resources/texml.rbi +7 -1
  52. data/sig/telnyx/models/ai/openai_create_response_params.rbs +5 -5
  53. data/sig/telnyx/models/ai_create_response_params.rbs +5 -4
  54. data/sig/telnyx/models/call_conversation_ended.rbs +5 -0
  55. data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +455 -0
  56. data/sig/telnyx/models/calls/action_start_conversation_relay_response.rbs +45 -0
  57. data/sig/telnyx/models/calls/action_stop_conversation_relay_params.rbs +38 -0
  58. data/sig/telnyx/models/calls/action_stop_conversation_relay_response.rbs +20 -0
  59. data/sig/telnyx/models/calls/transcription_engine_speechmatics_config.rbs +114 -0
  60. data/sig/telnyx/models/calls/transcription_start_request.rbs +11 -1
  61. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +27 -3
  62. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +9 -1
  63. data/sig/telnyx/resources/ai/openai.rbs +1 -1
  64. data/sig/telnyx/resources/ai.rbs +1 -1
  65. data/sig/telnyx/resources/calls/actions.rbs +27 -0
  66. data/sig/telnyx/resources/texml.rbs +1 -0
  67. metadata +17 -2
@@ -110,7 +110,9 @@ module Telnyx
110
110
  api_name: :CustomHeaders
111
111
 
112
112
  # @!attribute detection_mode
113
- # Allows you to choose between Premium and Standard detections.
113
+ # Allows you to choose between Regular, Premium, and PremiumCallScreening
114
+ # detections. See
115
+ # https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
114
116
  #
115
117
  # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode, nil]
116
118
  optional :detection_mode,
@@ -125,6 +127,13 @@ module Telnyx
125
127
  enum: -> { Telnyx::TexmlInitiateAICallParams::MachineDetection },
126
128
  api_name: :MachineDetection
127
129
 
130
+ # @!attribute machine_detection_prompt_end_timeout
131
+ # Silence duration threshold after a call screening prompt before ending prompt
132
+ # detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
133
+ #
134
+ # @return [Integer, nil]
135
+ optional :machine_detection_prompt_end_timeout, Integer, api_name: :MachineDetectionPromptEndTimeout
136
+
128
137
  # @!attribute machine_detection_silence_timeout
129
138
  # If initial silence duration is greater than this value, consider it a machine.
130
139
  # Ignored when `premium` detection is used.
@@ -298,7 +307,7 @@ module Telnyx
298
307
  # @return [Symbol, Telnyx::Models::TexmlInitiateAICallParams::Trim, nil]
299
308
  optional :trim, enum: -> { Telnyx::TexmlInitiateAICallParams::Trim }, api_name: :Trim
300
309
 
301
- # @!method initialize(connection_id:, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {})
310
+ # @!method initialize(connection_id:, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_prompt_end_timeout: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {})
302
311
  # Some parameter documentations has been truncated, see
303
312
  # {Telnyx::Models::TexmlInitiateAICallParams} for more details.
304
313
  #
@@ -330,10 +339,12 @@ module Telnyx
330
339
  #
331
340
  # @param custom_headers [Array<Telnyx::Models::TexmlInitiateAICallParams::CustomHeader>] Custom HTTP headers to be sent with the call. Each header should be an object wi
332
341
  #
333
- # @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Premium and Standard detections.
342
+ # @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Regular, Premium, and PremiumCallScreening detectio
334
343
  #
335
344
  # @param machine_detection [Symbol, Telnyx::Models::TexmlInitiateAICallParams::MachineDetection] Enables Answering Machine Detection.
336
345
  #
346
+ # @param machine_detection_prompt_end_timeout [Integer] Silence duration threshold after a call screening prompt before ending prompt de
347
+ #
337
348
  # @param machine_detection_silence_timeout [Integer] If initial silence duration is greater than this value, consider it a machine. I
338
349
  #
339
350
  # @param machine_detection_speech_end_threshold [Integer] Silence duration threshold after a greeting message or voice for it be considere
@@ -425,12 +436,15 @@ module Telnyx
425
436
  # @param value [String] The value of the custom header
426
437
  end
427
438
 
428
- # Allows you to choose between Premium and Standard detections.
439
+ # Allows you to choose between Regular, Premium, and PremiumCallScreening
440
+ # detections. See
441
+ # https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
429
442
  module DetectionMode
430
443
  extend Telnyx::Internal::Type::Enum
431
444
 
432
445
  PREMIUM = :Premium
433
446
  REGULAR = :Regular
447
+ PREMIUM_CALL_SCREENING = :PremiumCallScreening
434
448
 
435
449
  # @!method self.values
436
450
  # @return [Array<Symbol>]
@@ -47,7 +47,7 @@ module Telnyx
47
47
  #
48
48
  # @param conversation [String] Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided, Te
49
49
  #
50
- # @param input [Object] The input items for this turn, using the OpenAI Responses API input format.
50
+ # @param input [Hash{Symbol=>Object}] The input items for this turn, using the OpenAI Responses API input format.
51
51
  #
52
52
  # @param instructions [String] Optional system/developer instructions for the model. When used with a persisted
53
53
  #
@@ -55,9 +55,9 @@ module Telnyx
55
55
  # supported at the moment. Use the `conversation` parameter with a Telnyx
56
56
  # Conversation ID to leverage persistent conversations.
57
57
  #
58
- # @overload create_response(body:, request_options: {})
58
+ # @overload create_response(params:, request_options: {})
59
59
  #
60
- # @param body [Hash{Symbol=>Object}]
60
+ # @param params [Hash{Symbol=>Object}]
61
61
  # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
62
62
  #
63
63
  # @return [Hash{Symbol=>Object}]
@@ -68,7 +68,7 @@ module Telnyx
68
68
  @client.request(
69
69
  method: :post,
70
70
  path: "ai/responses",
71
- body: parsed[:body],
71
+ body: parsed[:params],
72
72
  model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
73
73
  options: options
74
74
  )
@@ -930,6 +930,71 @@ module Telnyx
930
930
  )
931
931
  end
932
932
 
933
+ # Some parameter documentations has been truncated, see
934
+ # {Telnyx::Models::Calls::ActionStartConversationRelayParams} for more details.
935
+ #
936
+ # Start a Conversation Relay session on an active call. Conversation Relay
937
+ # connects the call audio to your WebSocket so your application can exchange
938
+ # realtime messages with the caller while Telnyx handles speech recognition and
939
+ # text-to-speech. Only one AI Assistant or Conversation Relay session can be
940
+ # active on a call at a time.
941
+ #
942
+ # **Expected Webhooks:**
943
+ #
944
+ # - `call.conversation.ended` - Sent when the Conversation Relay session ends. If
945
+ # the customer WebSocket disconnects, the webhook payload `reason` is
946
+ # `customer_disconnect`.
947
+ #
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: {})
949
+ #
950
+ # @param call_control_id [String] Unique identifier and token for controlling the call
951
+ #
952
+ # @param assistant [Telnyx::Models::Calls::ActionStartConversationRelayParams::Assistant] Custom parameters for the Conversation Relay session. Pass key-value data as `as
953
+ #
954
+ # @param client_state [String] Use this field to add state to subsequent webhooks. It must be a valid Base-64 e
955
+ #
956
+ # @param command_id [String] Use this field to avoid duplicate commands. Telnyx will ignore any command with
957
+ #
958
+ # @param conversation_relay_dtmf_detection [Boolean] Enable DTMF detection for the relay session.
959
+ #
960
+ # @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object is used by TeXML Call Script
961
+ #
962
+ # @param conversation_relay_url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
963
+ #
964
+ # @param greeting [String] Text played when the relay session starts.
965
+ #
966
+ # @param interruption_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
967
+ #
968
+ # @param language [String] Default language for the relay session. This value is used for both text-to-spee
969
+ #
970
+ # @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Language-specific TTS and transcription settings. Use this when the relay sessio
971
+ #
972
+ # @param transcription [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription] Speech-to-text settings for Conversation Relay.
973
+ #
974
+ # @param transcription_language [String] Language to use for speech recognition. Overrides `language` for transcription w
975
+ #
976
+ # @param tts_language [String] Language to use for text-to-speech. Overrides `language` for TTS when provided.
977
+ #
978
+ # @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
979
+ #
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
981
+ #
982
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
983
+ #
984
+ # @return [Telnyx::Models::Calls::ActionStartConversationRelayResponse]
985
+ #
986
+ # @see Telnyx::Models::Calls::ActionStartConversationRelayParams
987
+ def start_conversation_relay(call_control_id, params = {})
988
+ parsed, options = Telnyx::Calls::ActionStartConversationRelayParams.dump_request(params)
989
+ @client.request(
990
+ method: :post,
991
+ path: ["calls/%1$s/actions/conversation_relay_start", call_control_id],
992
+ body: parsed,
993
+ model: Telnyx::Models::Calls::ActionStartConversationRelayResponse,
994
+ options: options
995
+ )
996
+ end
997
+
933
998
  # Some parameter documentations has been truncated, see
934
999
  # {Telnyx::Models::Calls::ActionStartForkingParams} for more details.
935
1000
  #
@@ -1256,7 +1321,7 @@ module Telnyx
1256
1321
  #
1257
1322
  # @param transcription_engine [Symbol, Telnyx::Models::Calls::TranscriptionStartRequest::TranscriptionEngine] Engine to use for speech recognition. Legacy values `A` - `Google`, `B` - `Telny
1258
1323
  #
1259
- # @param transcription_engine_config [Telnyx::Models::Calls::TranscriptionEngineGoogleConfig, Telnyx::Models::Calls::TranscriptionEngineTelnyxConfig, Telnyx::Models::Calls::TranscriptionEngineAzureConfig, Telnyx::Models::Calls::TranscriptionEngineXaiConfig, Telnyx::Models::Calls::TranscriptionEngineAssemblyaiConfig, Telnyx::Models::Calls::TranscriptionEngineAConfig, Telnyx::Models::Calls::TranscriptionEngineBConfig, Telnyx::Models::Calls::DeepgramNova2Config, Telnyx::Models::Calls::DeepgramNova3Config]
1324
+ # @param transcription_engine_config [Telnyx::Models::Calls::TranscriptionEngineGoogleConfig, Telnyx::Models::Calls::TranscriptionEngineTelnyxConfig, Telnyx::Models::Calls::TranscriptionEngineAzureConfig, Telnyx::Models::Calls::TranscriptionEngineXaiConfig, Telnyx::Models::Calls::TranscriptionEngineAssemblyaiConfig, Telnyx::Models::Calls::TranscriptionEngineSpeechmaticsConfig, Telnyx::Models::Calls::TranscriptionEngineAConfig, Telnyx::Models::Calls::TranscriptionEngineBConfig, Telnyx::Models::Calls::DeepgramNova2Config, Telnyx::Models::Calls::DeepgramNova3Config]
1260
1325
  #
1261
1326
  # @param transcription_tracks [String] Indicates which leg of the call will be transcribed. Use `inbound` for the leg t
1262
1327
  #
@@ -1305,6 +1370,35 @@ module Telnyx
1305
1370
  )
1306
1371
  end
1307
1372
 
1373
+ # Some parameter documentations has been truncated, see
1374
+ # {Telnyx::Models::Calls::ActionStopConversationRelayParams} for more details.
1375
+ #
1376
+ # Stop the active Conversation Relay session on a call.
1377
+ #
1378
+ # @overload stop_conversation_relay(call_control_id, client_state: nil, command_id: nil, request_options: {})
1379
+ #
1380
+ # @param call_control_id [String] Unique identifier and token for controlling the call
1381
+ #
1382
+ # @param client_state [String] Use this field to add state to subsequent webhooks. It must be a valid Base-64 e
1383
+ #
1384
+ # @param command_id [String] Use this field to avoid duplicate commands. Telnyx will ignore any command with
1385
+ #
1386
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
1387
+ #
1388
+ # @return [Telnyx::Models::Calls::ActionStopConversationRelayResponse]
1389
+ #
1390
+ # @see Telnyx::Models::Calls::ActionStopConversationRelayParams
1391
+ def stop_conversation_relay(call_control_id, params = {})
1392
+ parsed, options = Telnyx::Calls::ActionStopConversationRelayParams.dump_request(params)
1393
+ @client.request(
1394
+ method: :post,
1395
+ path: ["calls/%1$s/actions/conversation_relay_stop", call_control_id],
1396
+ body: parsed,
1397
+ model: Telnyx::Models::Calls::ActionStopConversationRelayResponse,
1398
+ options: options
1399
+ )
1400
+ end
1401
+
1308
1402
  # Some parameter documentations has been truncated, see
1309
1403
  # {Telnyx::Models::Calls::ActionStopForkingParams} for more details.
1310
1404
  #
@@ -15,6 +15,18 @@ module Telnyx
15
15
  # is bigger than 50MB or has more than 350 pages it will fail with
16
16
  # `file_size_limit_exceeded` and `page_count_limit_exceeded` respectively.
17
17
  #
18
+ # **Supported file formats:**
19
+ #
20
+ # - PDF (`application/pdf`)
21
+ # - TIFF (`application/tiff`, `image/tiff`)
22
+ # - JPEG (`image/jpeg`)
23
+ # - PNG (`image/png`)
24
+ # - Microsoft Word `.doc` (`application/msword`)
25
+ # - Microsoft Word `.docx`
26
+ # (`application/vnd.openxmlformats-officedocument.wordprocessingml.document`)
27
+ # - Rich Text Format `.rtf` (`application/rtf`)
28
+ # - Plain text `.txt` (`text/plain`)
29
+ #
18
30
  # **Expected Webhooks:**
19
31
  #
20
32
  # - `fax.queued`
@@ -39,7 +51,7 @@ module Telnyx
39
51
  #
40
52
  # @param media_name [String] The media_name used for the fax's media. Must point to a file previously uploade
41
53
  #
42
- # @param media_url [String] The URL (or list of URLs) to the PDF used for the fax's media. media_url and med
54
+ # @param media_url [String] The URL (or list of URLs) to the fax document. Supported formats: PDF, TIFF, JPE
43
55
  #
44
56
  # @param monochrome [Boolean] The flag to enable monochrome, true black and white fax results.
45
57
  #
@@ -27,7 +27,7 @@ module Telnyx
27
27
  # Recording, AMD, transcription, and deepfake detection callbacks are only sent
28
28
  # when those features are enabled.
29
29
  #
30
- # @overload initiate_ai_call(connection_id, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {})
30
+ # @overload initiate_ai_call(connection_id, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_prompt_end_timeout: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {})
31
31
  #
32
32
  # @param connection_id [String] The ID of the TeXML connection to use for the call.
33
33
  #
@@ -57,10 +57,12 @@ module Telnyx
57
57
  #
58
58
  # @param custom_headers [Array<Telnyx::Models::TexmlInitiateAICallParams::CustomHeader>] Custom HTTP headers to be sent with the call. Each header should be an object wi
59
59
  #
60
- # @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Premium and Standard detections.
60
+ # @param detection_mode [Symbol, Telnyx::Models::TexmlInitiateAICallParams::DetectionMode] Allows you to choose between Regular, Premium, and PremiumCallScreening detectio
61
61
  #
62
62
  # @param machine_detection [Symbol, Telnyx::Models::TexmlInitiateAICallParams::MachineDetection] Enables Answering Machine Detection.
63
63
  #
64
+ # @param machine_detection_prompt_end_timeout [Integer] Silence duration threshold after a call screening prompt before ending prompt de
65
+ #
64
66
  # @param machine_detection_silence_timeout [Integer] If initial silence duration is greater than this value, consider it a machine. I
65
67
  #
66
68
  # @param machine_detection_speech_end_threshold [Integer] Silence duration threshold after a greeting message or voice for it be considere
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.111.0"
4
+ VERSION = "5.113.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -605,6 +605,8 @@ require_relative "telnyx/models/calls/action_speak_params"
605
605
  require_relative "telnyx/models/calls/action_speak_response"
606
606
  require_relative "telnyx/models/calls/action_start_ai_assistant_params"
607
607
  require_relative "telnyx/models/calls/action_start_ai_assistant_response"
608
+ require_relative "telnyx/models/calls/action_start_conversation_relay_params"
609
+ require_relative "telnyx/models/calls/action_start_conversation_relay_response"
608
610
  require_relative "telnyx/models/calls/action_start_forking_params"
609
611
  require_relative "telnyx/models/calls/action_start_forking_response"
610
612
  require_relative "telnyx/models/calls/action_start_noise_suppression_params"
@@ -621,6 +623,8 @@ require_relative "telnyx/models/calls/action_start_transcription_params"
621
623
  require_relative "telnyx/models/calls/action_start_transcription_response"
622
624
  require_relative "telnyx/models/calls/action_stop_ai_assistant_params"
623
625
  require_relative "telnyx/models/calls/action_stop_ai_assistant_response"
626
+ require_relative "telnyx/models/calls/action_stop_conversation_relay_params"
627
+ require_relative "telnyx/models/calls/action_stop_conversation_relay_response"
624
628
  require_relative "telnyx/models/calls/action_stop_forking_params"
625
629
  require_relative "telnyx/models/calls/action_stop_forking_response"
626
630
  require_relative "telnyx/models/calls/action_stop_gather_params"
@@ -661,6 +665,7 @@ require_relative "telnyx/models/calls/transcription_engine_azure_config"
661
665
  require_relative "telnyx/models/calls/transcription_engine_b_config"
662
666
  require_relative "telnyx/models/calls/transcription_engine_deepgram_config"
663
667
  require_relative "telnyx/models/calls/transcription_engine_google_config"
668
+ require_relative "telnyx/models/calls/transcription_engine_speechmatics_config"
664
669
  require_relative "telnyx/models/calls/transcription_engine_telnyx_config"
665
670
  require_relative "telnyx/models/calls/transcription_engine_xai_config"
666
671
  require_relative "telnyx/models/call_siprec_failed"
@@ -26,10 +26,10 @@ module Telnyx
26
26
  attr_writer :conversation
27
27
 
28
28
  # The input items for this turn, using the OpenAI Responses API input format.
29
- sig { returns(T.nilable(T.anything)) }
29
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
30
30
  attr_reader :input
31
31
 
32
- sig { params(input: T.anything).void }
32
+ sig { params(input: T::Hash[Symbol, T.anything]).void }
33
33
  attr_writer :input
34
34
 
35
35
  # Optional system/developer instructions for the model. When used with a persisted
@@ -60,7 +60,7 @@ module Telnyx
60
60
  sig do
61
61
  params(
62
62
  conversation: String,
63
- input: T.anything,
63
+ input: T::Hash[Symbol, T.anything],
64
64
  instructions: String,
65
65
  model: String,
66
66
  stream: T::Boolean,
@@ -93,7 +93,7 @@ module Telnyx
93
93
  override.returns(
94
94
  {
95
95
  conversation: String,
96
- input: T.anything,
96
+ input: T::Hash[Symbol, T.anything],
97
97
  instructions: String,
98
98
  model: String,
99
99
  stream: T::Boolean,
@@ -12,21 +12,21 @@ module Telnyx
12
12
  end
13
13
 
14
14
  sig { returns(T::Hash[Symbol, T.anything]) }
15
- attr_accessor :body
15
+ attr_accessor :params
16
16
 
17
17
  sig do
18
18
  params(
19
- body: T::Hash[Symbol, T.anything],
19
+ params: T::Hash[Symbol, T.anything],
20
20
  request_options: Telnyx::RequestOptions::OrHash
21
21
  ).returns(T.attached_class)
22
22
  end
23
- def self.new(body:, request_options: {})
23
+ def self.new(params:, request_options: {})
24
24
  end
25
25
 
26
26
  sig do
27
27
  override.returns(
28
28
  {
29
- body: T::Hash[Symbol, T.anything],
29
+ params: T::Hash[Symbol, T.anything],
30
30
  request_options: Telnyx::RequestOptions
31
31
  }
32
32
  )
@@ -229,6 +229,11 @@ module Telnyx
229
229
  sig { params(llm_model: String).void }
230
230
  attr_writer :llm_model
231
231
 
232
+ # Reason the conversation ended. For Conversation Relay, `customer_disconnect`
233
+ # indicates that the customer WebSocket disconnected.
234
+ sig { returns(T.nilable(String)) }
235
+ attr_accessor :reason
236
+
232
237
  # The speech-to-text model used in the conversation.
233
238
  sig { returns(T.nilable(String)) }
234
239
  attr_reader :stt_model
@@ -278,6 +283,7 @@ module Telnyx
278
283
  duration_sec: Integer,
279
284
  from: String,
280
285
  llm_model: String,
286
+ reason: T.nilable(String),
281
287
  stt_model: String,
282
288
  to: String,
283
289
  tts_model_id: String,
@@ -308,6 +314,9 @@ module Telnyx
308
314
  from: nil,
309
315
  # The large language model used during the conversation.
310
316
  llm_model: nil,
317
+ # Reason the conversation ended. For Conversation Relay, `customer_disconnect`
318
+ # indicates that the customer WebSocket disconnected.
319
+ reason: nil,
311
320
  # The speech-to-text model used in the conversation.
312
321
  stt_model: nil,
313
322
  # The callee's number or SIP address.
@@ -336,6 +345,7 @@ module Telnyx
336
345
  duration_sec: Integer,
337
346
  from: String,
338
347
  llm_model: String,
348
+ reason: T.nilable(String),
339
349
  stt_model: String,
340
350
  to: String,
341
351
  tts_model_id: String,