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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/openai_create_response_params.rb +3 -3
- data/lib/telnyx/models/ai_create_response_params.rb +4 -4
- data/lib/telnyx/models/call_conversation_ended.rb +13 -1
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +542 -0
- data/lib/telnyx/models/calls/action_start_conversation_relay_response.rb +37 -0
- data/lib/telnyx/models/calls/action_stop_conversation_relay_params.rb +44 -0
- data/lib/telnyx/models/calls/action_stop_conversation_relay_response.rb +18 -0
- data/lib/telnyx/models/calls/transcription_engine_speechmatics_config.rb +100 -0
- data/lib/telnyx/models/calls/transcription_start_request.rb +6 -3
- data/lib/telnyx/models/fax.rb +7 -5
- data/lib/telnyx/models/fax_create_params.rb +7 -5
- data/lib/telnyx/models/fax_delivered.rb +3 -2
- data/lib/telnyx/models/fax_failed.rb +3 -2
- data/lib/telnyx/models/fax_media_processed.rb +3 -2
- data/lib/telnyx/models/fax_queued.rb +3 -2
- data/lib/telnyx/models/fax_sending_started.rb +3 -2
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +62 -12
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +18 -4
- data/lib/telnyx/resources/ai/openai.rb +1 -1
- data/lib/telnyx/resources/ai.rb +3 -3
- data/lib/telnyx/resources/calls/actions.rb +95 -1
- data/lib/telnyx/resources/faxes.rb +13 -1
- data/lib/telnyx/resources/texml.rb +4 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +5 -0
- data/rbi/telnyx/models/ai/openai_create_response_params.rbi +4 -4
- data/rbi/telnyx/models/ai_create_response_params.rbi +4 -4
- data/rbi/telnyx/models/call_conversation_ended.rbi +10 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +1192 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_response.rbi +95 -0
- data/rbi/telnyx/models/calls/action_stop_conversation_relay_params.rbi +72 -0
- data/rbi/telnyx/models/calls/action_stop_conversation_relay_response.rbi +39 -0
- data/rbi/telnyx/models/calls/transcription_engine_speechmatics_config.rbi +289 -0
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +10 -0
- data/rbi/telnyx/models/fax.rbi +12 -8
- data/rbi/telnyx/models/fax_create_params.rbi +12 -8
- data/rbi/telnyx/models/fax_delivered.rbi +6 -4
- data/rbi/telnyx/models/fax_failed.rbi +6 -4
- data/rbi/telnyx/models/fax_media_processed.rbi +6 -4
- data/rbi/telnyx/models/fax_queued.rbi +6 -4
- data/rbi/telnyx/models/fax_sending_started.rbi +6 -4
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +81 -9
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +27 -3
- data/rbi/telnyx/resources/ai/openai.rbi +1 -1
- data/rbi/telnyx/resources/ai.rbi +2 -2
- data/rbi/telnyx/resources/calls/actions.rbi +146 -0
- data/rbi/telnyx/resources/faxes.rbi +18 -4
- data/rbi/telnyx/resources/texml.rbi +7 -1
- data/sig/telnyx/models/ai/openai_create_response_params.rbs +5 -5
- data/sig/telnyx/models/ai_create_response_params.rbs +5 -4
- data/sig/telnyx/models/call_conversation_ended.rbs +5 -0
- data/sig/telnyx/models/calls/action_start_conversation_relay_params.rbs +455 -0
- data/sig/telnyx/models/calls/action_start_conversation_relay_response.rbs +45 -0
- data/sig/telnyx/models/calls/action_stop_conversation_relay_params.rbs +38 -0
- data/sig/telnyx/models/calls/action_stop_conversation_relay_response.rbs +20 -0
- data/sig/telnyx/models/calls/transcription_engine_speechmatics_config.rbs +114 -0
- data/sig/telnyx/models/calls/transcription_start_request.rbs +11 -1
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +27 -3
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +9 -1
- data/sig/telnyx/resources/ai/openai.rbs +1 -1
- data/sig/telnyx/resources/ai.rbs +1 -1
- data/sig/telnyx/resources/calls/actions.rbs +27 -0
- data/sig/telnyx/resources/texml.rbs +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99fbf2a1571ce39b824564c7facf12fe91a1c46e8d684c239fa163e1b346892e
|
|
4
|
+
data.tar.gz: 23cfa6bbda065b16bf4acc6f1b646b1f743fb65d560fd448edc6cfb4197da4fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58ab3a7d04069ae546e9c046e02184347faa31ff1c24475593343b901e6ca28be7921c04680f9c2ca9eda9c980e1beef2ed46f09353fd32360eba51fbcd2dce8
|
|
7
|
+
data.tar.gz: c25ca773a203ea0b695337ba4dc08a451c0ca5915ab17cd6e8d247866144990a59d5eaab177ee4689a49f93674d0ef01a6773c541c4d32de1b5a2c1d1afbcbc0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.113.0 (2026-05-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.112.0...v5.113.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.112.0...v5.113.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add Speechmatics transcription engine to Call Control API ([a2e9a35](https://github.com/team-telnyx/telnyx-ruby/commit/a2e9a3538bbb3c20ddbaf29cf7685c45a2dd12d0))
|
|
10
|
+
* **api:** manual updates ([c04bcfc](https://github.com/team-telnyx/telnyx-ruby/commit/c04bcfcbe3536a42b8c29907f4fda054f864dea9))
|
|
11
|
+
* Document PremiumCallScreening detection mode ([59e5cc4](https://github.com/team-telnyx/telnyx-ruby/commit/59e5cc49d695e85b9dd52b594ba312fd46103146))
|
|
12
|
+
* Fix Conversation Relay expected webhook ([9207e59](https://github.com/team-telnyx/telnyx-ruby/commit/9207e59b39287b242995b437c2cde1f8dbaf7eb6))
|
|
13
|
+
* Update Conversation Relay start parameters ([8b3d719](https://github.com/team-telnyx/telnyx-ruby/commit/8b3d71908a08b7773e80143521dd1bb8a7001872))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Documentation
|
|
17
|
+
|
|
18
|
+
* add supported file formats to Send Fax endpoint ([b81adb8](https://github.com/team-telnyx/telnyx-ruby/commit/b81adb8bdf3c3b461e9149064347cfa222ab8c11))
|
|
19
|
+
|
|
20
|
+
## 5.112.0 (2026-05-14)
|
|
21
|
+
|
|
22
|
+
Full Changelog: [v5.111.0...v5.112.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.111.0...v5.112.0)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* Document Conversation Relay ([dc8eb44](https://github.com/team-telnyx/telnyx-ruby/commit/dc8eb44a33fec593d3a651cbe2553ded97e0e602))
|
|
27
|
+
|
|
3
28
|
## 5.111.0 (2026-05-13)
|
|
4
29
|
|
|
5
30
|
Full Changelog: [v5.110.1...v5.111.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.110.1...v5.111.0)
|
data/README.md
CHANGED
|
@@ -20,8 +20,8 @@ module Telnyx
|
|
|
20
20
|
# @!attribute input
|
|
21
21
|
# The input items for this turn, using the OpenAI Responses API input format.
|
|
22
22
|
#
|
|
23
|
-
# @return [Object, nil]
|
|
24
|
-
optional :input, Telnyx::Internal::Type::Unknown
|
|
23
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
24
|
+
optional :input, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
25
25
|
|
|
26
26
|
# @!attribute instructions
|
|
27
27
|
# Optional system/developer instructions for the model. When used with a persisted
|
|
@@ -51,7 +51,7 @@ module Telnyx
|
|
|
51
51
|
#
|
|
52
52
|
# @param conversation [String] Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided, Te
|
|
53
53
|
#
|
|
54
|
-
# @param input [Object] The input items for this turn, using the OpenAI Responses API input format.
|
|
54
|
+
# @param input [Hash{Symbol=>Object}] The input items for this turn, using the OpenAI Responses API input format.
|
|
55
55
|
#
|
|
56
56
|
# @param instructions [String] Optional system/developer instructions for the model. When used with a persisted
|
|
57
57
|
#
|
|
@@ -7,13 +7,13 @@ module Telnyx
|
|
|
7
7
|
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Telnyx::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!attribute
|
|
10
|
+
# @!attribute params
|
|
11
11
|
#
|
|
12
12
|
# @return [Hash{Symbol=>Object}]
|
|
13
|
-
required :
|
|
13
|
+
required :params, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
14
14
|
|
|
15
|
-
# @!method initialize(
|
|
16
|
-
# @param
|
|
15
|
+
# @!method initialize(params:, request_options: {})
|
|
16
|
+
# @param params [Hash{Symbol=>Object}]
|
|
17
17
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -131,6 +131,13 @@ module Telnyx
|
|
|
131
131
|
# @return [String, nil]
|
|
132
132
|
optional :llm_model, String
|
|
133
133
|
|
|
134
|
+
# @!attribute reason
|
|
135
|
+
# Reason the conversation ended. For Conversation Relay, `customer_disconnect`
|
|
136
|
+
# indicates that the customer WebSocket disconnected.
|
|
137
|
+
#
|
|
138
|
+
# @return [String, nil]
|
|
139
|
+
optional :reason, String, nil?: true
|
|
140
|
+
|
|
134
141
|
# @!attribute stt_model
|
|
135
142
|
# The speech-to-text model used in the conversation.
|
|
136
143
|
#
|
|
@@ -161,7 +168,10 @@ module Telnyx
|
|
|
161
168
|
# @return [String, nil]
|
|
162
169
|
optional :tts_voice_id, String
|
|
163
170
|
|
|
164
|
-
# @!method initialize(assistant_id: nil, call_control_id: nil, call_leg_id: nil, call_session_id: nil, calling_party_type: nil, client_state: nil, connection_id: nil, conversation_id: nil, duration_sec: nil, from: nil, llm_model: nil, stt_model: nil, to: nil, tts_model_id: nil, tts_provider: nil, tts_voice_id: nil)
|
|
171
|
+
# @!method initialize(assistant_id: nil, call_control_id: nil, call_leg_id: nil, call_session_id: nil, calling_party_type: nil, client_state: nil, connection_id: nil, conversation_id: nil, duration_sec: nil, from: nil, llm_model: nil, reason: nil, stt_model: nil, to: nil, tts_model_id: nil, tts_provider: nil, tts_voice_id: nil)
|
|
172
|
+
# Some parameter documentations has been truncated, see
|
|
173
|
+
# {Telnyx::Models::CallConversationEnded::Payload} for more details.
|
|
174
|
+
#
|
|
165
175
|
# @param assistant_id [String] Unique identifier of the assistant involved in the call.
|
|
166
176
|
#
|
|
167
177
|
# @param call_control_id [String] Call ID used to issue commands via Call Control API.
|
|
@@ -184,6 +194,8 @@ module Telnyx
|
|
|
184
194
|
#
|
|
185
195
|
# @param llm_model [String] The large language model used during the conversation.
|
|
186
196
|
#
|
|
197
|
+
# @param reason [String, nil] Reason the conversation ended. For Conversation Relay, `customer_disconnect` ind
|
|
198
|
+
#
|
|
187
199
|
# @param stt_model [String] The speech-to-text model used in the conversation.
|
|
188
200
|
#
|
|
189
201
|
# @param to [String] The callee's number or SIP address.
|
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Calls
|
|
6
|
+
# @see Telnyx::Resources::Calls::Actions#start_conversation_relay
|
|
7
|
+
class ActionStartConversationRelayParams < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute call_control_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :call_control_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute assistant
|
|
17
|
+
# Custom parameters for the Conversation Relay session. Pass key-value data as
|
|
18
|
+
# `assistant.dynamic_variables` to make it available to the relay session.
|
|
19
|
+
#
|
|
20
|
+
# @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::Assistant, nil]
|
|
21
|
+
optional :assistant, -> { Telnyx::Calls::ActionStartConversationRelayParams::Assistant }
|
|
22
|
+
|
|
23
|
+
# @!attribute client_state
|
|
24
|
+
# Use this field to add state to subsequent webhooks. It must be a valid Base-64
|
|
25
|
+
# encoded string.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :client_state, String
|
|
29
|
+
|
|
30
|
+
# @!attribute command_id
|
|
31
|
+
# Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
32
|
+
# the same `command_id` for the same `call_control_id`.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :command_id, String
|
|
36
|
+
|
|
37
|
+
# @!attribute conversation_relay_dtmf_detection
|
|
38
|
+
# Enable DTMF detection for the relay session.
|
|
39
|
+
#
|
|
40
|
+
# @return [Boolean, nil]
|
|
41
|
+
optional :conversation_relay_dtmf_detection, Telnyx::Internal::Type::Boolean
|
|
42
|
+
|
|
43
|
+
# @!attribute conversation_relay_settings
|
|
44
|
+
# Conversation Relay connection settings. This object is used by TeXML Call
|
|
45
|
+
# Scripting's `<ConversationRelay>` verb. The `interruptible` and
|
|
46
|
+
# `interruptible_greeting` fields are shorthand for
|
|
47
|
+
# `interruption_settings.interruptible` and
|
|
48
|
+
# `interruption_settings.interruptible_greeting`; use top-level
|
|
49
|
+
# `interruption_settings` for the full interruption settings shape.
|
|
50
|
+
#
|
|
51
|
+
# @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings, nil]
|
|
52
|
+
optional :conversation_relay_settings,
|
|
53
|
+
-> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings }
|
|
54
|
+
|
|
55
|
+
# @!attribute conversation_relay_url
|
|
56
|
+
# WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
57
|
+
# `wss://`.
|
|
58
|
+
#
|
|
59
|
+
# @return [String, nil]
|
|
60
|
+
optional :conversation_relay_url, String
|
|
61
|
+
|
|
62
|
+
# @!attribute greeting
|
|
63
|
+
# Text played when the relay session starts.
|
|
64
|
+
#
|
|
65
|
+
# @return [String, nil]
|
|
66
|
+
optional :greeting, String
|
|
67
|
+
|
|
68
|
+
# @!attribute interruption_settings
|
|
69
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
70
|
+
#
|
|
71
|
+
# @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings, nil]
|
|
72
|
+
optional :interruption_settings,
|
|
73
|
+
-> { Telnyx::Calls::ActionStartConversationRelayParams::InterruptionSettings }
|
|
74
|
+
|
|
75
|
+
# @!attribute language
|
|
76
|
+
# Default language for the relay session. This value is used for both
|
|
77
|
+
# text-to-speech and speech recognition unless `tts_language` or
|
|
78
|
+
# `transcription_language` are provided.
|
|
79
|
+
#
|
|
80
|
+
# @return [String, nil]
|
|
81
|
+
optional :language, String
|
|
82
|
+
|
|
83
|
+
# @!attribute languages
|
|
84
|
+
# Language-specific TTS and transcription settings. Use this when the relay
|
|
85
|
+
# session needs per-language provider, voice, or speech model configuration.
|
|
86
|
+
#
|
|
87
|
+
# @return [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>, nil]
|
|
88
|
+
optional :languages,
|
|
89
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Calls::ActionStartConversationRelayParams::Language] }
|
|
90
|
+
|
|
91
|
+
# @!attribute transcription
|
|
92
|
+
# Speech-to-text settings for Conversation Relay.
|
|
93
|
+
#
|
|
94
|
+
# @return [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription, nil]
|
|
95
|
+
optional :transcription, -> { Telnyx::Calls::ActionStartConversationRelayParams::Transcription }
|
|
96
|
+
|
|
97
|
+
# @!attribute transcription_language
|
|
98
|
+
# Language to use for speech recognition. Overrides `language` for transcription
|
|
99
|
+
# when provided.
|
|
100
|
+
#
|
|
101
|
+
# @return [String, nil]
|
|
102
|
+
optional :transcription_language, String
|
|
103
|
+
|
|
104
|
+
# @!attribute tts_language
|
|
105
|
+
# Language to use for text-to-speech. Overrides `language` for TTS when provided.
|
|
106
|
+
#
|
|
107
|
+
# @return [String, nil]
|
|
108
|
+
optional :tts_language, String
|
|
109
|
+
|
|
110
|
+
# @!attribute voice
|
|
111
|
+
# The voice to be used by the voice assistant. Currently we support ElevenLabs,
|
|
112
|
+
# Telnyx and AWS voices.
|
|
113
|
+
#
|
|
114
|
+
# **Supported Providers:**
|
|
115
|
+
#
|
|
116
|
+
# - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
|
|
117
|
+
# voices, which provide more realistic, human-like speech, append `-Neural` to
|
|
118
|
+
# the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
|
|
119
|
+
# [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
|
|
120
|
+
# for compatibility.
|
|
121
|
+
# - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
|
|
122
|
+
# Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
|
|
123
|
+
# Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
|
|
124
|
+
# [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
|
|
125
|
+
# - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
|
|
126
|
+
# `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
|
|
127
|
+
# ElevenLabs, you must provide your ElevenLabs API key as an integration secret
|
|
128
|
+
# under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
|
|
129
|
+
# [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
|
|
130
|
+
# for details. Check
|
|
131
|
+
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
132
|
+
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
133
|
+
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
134
|
+
# `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
|
|
135
|
+
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
136
|
+
# `ara`, `rex`, `sal`, `leo`.
|
|
137
|
+
#
|
|
138
|
+
# @return [String, nil]
|
|
139
|
+
optional :voice, String
|
|
140
|
+
|
|
141
|
+
# @!attribute voice_settings
|
|
142
|
+
# The settings associated with the voice selected
|
|
143
|
+
#
|
|
144
|
+
# @return [Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings, nil]
|
|
145
|
+
optional :voice_settings, union: -> { Telnyx::Calls::ActionStartConversationRelayParams::VoiceSettings }
|
|
146
|
+
|
|
147
|
+
# @!method initialize(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: {})
|
|
148
|
+
# Some parameter documentations has been truncated, see
|
|
149
|
+
# {Telnyx::Models::Calls::ActionStartConversationRelayParams} for more details.
|
|
150
|
+
#
|
|
151
|
+
# @param call_control_id [String]
|
|
152
|
+
#
|
|
153
|
+
# @param assistant [Telnyx::Models::Calls::ActionStartConversationRelayParams::Assistant] Custom parameters for the Conversation Relay session. Pass key-value data as `as
|
|
154
|
+
#
|
|
155
|
+
# @param client_state [String] Use this field to add state to subsequent webhooks. It must be a valid Base-64 e
|
|
156
|
+
#
|
|
157
|
+
# @param command_id [String] Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
158
|
+
#
|
|
159
|
+
# @param conversation_relay_dtmf_detection [Boolean] Enable DTMF detection for the relay session.
|
|
160
|
+
#
|
|
161
|
+
# @param conversation_relay_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings] Conversation Relay connection settings. This object is used by TeXML Call Script
|
|
162
|
+
#
|
|
163
|
+
# @param conversation_relay_url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
|
|
164
|
+
#
|
|
165
|
+
# @param greeting [String] Text played when the relay session starts.
|
|
166
|
+
#
|
|
167
|
+
# @param interruption_settings [Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings] Settings for handling caller interruptions during Conversation Relay speech.
|
|
168
|
+
#
|
|
169
|
+
# @param language [String] Default language for the relay session. This value is used for both text-to-spee
|
|
170
|
+
#
|
|
171
|
+
# @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::Language>] Language-specific TTS and transcription settings. Use this when the relay sessio
|
|
172
|
+
#
|
|
173
|
+
# @param transcription [Telnyx::Models::Calls::ActionStartConversationRelayParams::Transcription] Speech-to-text settings for Conversation Relay.
|
|
174
|
+
#
|
|
175
|
+
# @param transcription_language [String] Language to use for speech recognition. Overrides `language` for transcription w
|
|
176
|
+
#
|
|
177
|
+
# @param tts_language [String] Language to use for text-to-speech. Overrides `language` for TTS when provided.
|
|
178
|
+
#
|
|
179
|
+
# @param voice [String] The voice to be used by the voice assistant. Currently we support ElevenLabs, Te
|
|
180
|
+
#
|
|
181
|
+
# @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
|
|
182
|
+
#
|
|
183
|
+
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
184
|
+
|
|
185
|
+
class Assistant < Telnyx::Internal::Type::BaseModel
|
|
186
|
+
# @!attribute dynamic_variables
|
|
187
|
+
# Custom key-value parameters forwarded to the Conversation Relay session.
|
|
188
|
+
#
|
|
189
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
190
|
+
optional :dynamic_variables, Telnyx::Internal::Type::HashOf[String]
|
|
191
|
+
|
|
192
|
+
# @!method initialize(dynamic_variables: nil)
|
|
193
|
+
# Custom parameters for the Conversation Relay session. Pass key-value data as
|
|
194
|
+
# `assistant.dynamic_variables` to make it available to the relay session.
|
|
195
|
+
#
|
|
196
|
+
# @param dynamic_variables [Hash{Symbol=>String}] Custom key-value parameters forwarded to the Conversation Relay session.
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
class ConversationRelaySettings < Telnyx::Internal::Type::BaseModel
|
|
200
|
+
# @!attribute url
|
|
201
|
+
# WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
202
|
+
# `wss://`.
|
|
203
|
+
#
|
|
204
|
+
# @return [String]
|
|
205
|
+
required :url, String
|
|
206
|
+
|
|
207
|
+
# @!attribute dtmf_detection
|
|
208
|
+
# Whether to enable DTMF detection during the relay session.
|
|
209
|
+
#
|
|
210
|
+
# @return [Boolean, nil]
|
|
211
|
+
optional :dtmf_detection, Telnyx::Internal::Type::Boolean
|
|
212
|
+
|
|
213
|
+
# @!attribute interruptible
|
|
214
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
215
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
216
|
+
# only; `dtmf` allows DTMF only.
|
|
217
|
+
#
|
|
218
|
+
# @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Interruptible, nil]
|
|
219
|
+
optional :interruptible,
|
|
220
|
+
enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Interruptible }
|
|
221
|
+
|
|
222
|
+
# @!attribute interruptible_greeting
|
|
223
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
224
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
225
|
+
# only; `dtmf` allows DTMF only.
|
|
226
|
+
#
|
|
227
|
+
# @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::InterruptibleGreeting, nil]
|
|
228
|
+
optional :interruptible_greeting,
|
|
229
|
+
enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::InterruptibleGreeting }
|
|
230
|
+
|
|
231
|
+
# @!attribute languages
|
|
232
|
+
# Language-specific TTS and transcription settings.
|
|
233
|
+
#
|
|
234
|
+
# @return [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language>, nil]
|
|
235
|
+
optional :languages,
|
|
236
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language] }
|
|
237
|
+
|
|
238
|
+
# @!method initialize(url:, dtmf_detection: nil, interruptible: nil, interruptible_greeting: nil, languages: nil)
|
|
239
|
+
# Some parameter documentations has been truncated, see
|
|
240
|
+
# {Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings}
|
|
241
|
+
# for more details.
|
|
242
|
+
#
|
|
243
|
+
# Conversation Relay connection settings. This object is used by TeXML Call
|
|
244
|
+
# Scripting's `<ConversationRelay>` verb. The `interruptible` and
|
|
245
|
+
# `interruptible_greeting` fields are shorthand for
|
|
246
|
+
# `interruption_settings.interruptible` and
|
|
247
|
+
# `interruption_settings.interruptible_greeting`; use top-level
|
|
248
|
+
# `interruption_settings` for the full interruption settings shape.
|
|
249
|
+
#
|
|
250
|
+
# @param url [String] WebSocket URL for your Conversation Relay server. Must start with `ws://` or `ws
|
|
251
|
+
#
|
|
252
|
+
# @param dtmf_detection [Boolean] Whether to enable DTMF detection during the relay session.
|
|
253
|
+
#
|
|
254
|
+
# @param interruptible [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
|
|
255
|
+
#
|
|
256
|
+
# @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
|
|
257
|
+
#
|
|
258
|
+
# @param languages [Array<Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::Language>] Language-specific TTS and transcription settings.
|
|
259
|
+
|
|
260
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
261
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
262
|
+
# only; `dtmf` allows DTMF only.
|
|
263
|
+
#
|
|
264
|
+
# @see Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings#interruptible
|
|
265
|
+
module Interruptible
|
|
266
|
+
extend Telnyx::Internal::Type::Enum
|
|
267
|
+
|
|
268
|
+
NONE = :none
|
|
269
|
+
ANY = :any
|
|
270
|
+
SPEECH = :speech
|
|
271
|
+
DTMF = :dtmf
|
|
272
|
+
|
|
273
|
+
# @!method self.values
|
|
274
|
+
# @return [Array<Symbol>]
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
278
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
279
|
+
# only; `dtmf` allows DTMF only.
|
|
280
|
+
#
|
|
281
|
+
# @see Telnyx::Models::Calls::ActionStartConversationRelayParams::ConversationRelaySettings#interruptible_greeting
|
|
282
|
+
module InterruptibleGreeting
|
|
283
|
+
extend Telnyx::Internal::Type::Enum
|
|
284
|
+
|
|
285
|
+
NONE = :none
|
|
286
|
+
ANY = :any
|
|
287
|
+
SPEECH = :speech
|
|
288
|
+
DTMF = :dtmf
|
|
289
|
+
|
|
290
|
+
# @!method self.values
|
|
291
|
+
# @return [Array<Symbol>]
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
class Language < Telnyx::Internal::Type::BaseModel
|
|
295
|
+
# @!attribute code
|
|
296
|
+
# BCP 47 language code.
|
|
297
|
+
#
|
|
298
|
+
# @return [String, nil]
|
|
299
|
+
optional :code, String
|
|
300
|
+
|
|
301
|
+
# @!attribute speech_model
|
|
302
|
+
# Speech recognition model for this language.
|
|
303
|
+
#
|
|
304
|
+
# @return [String, nil]
|
|
305
|
+
optional :speech_model, String
|
|
306
|
+
|
|
307
|
+
# @!attribute transcription_provider
|
|
308
|
+
# Speech-to-text provider for this language.
|
|
309
|
+
#
|
|
310
|
+
# @return [String, nil]
|
|
311
|
+
optional :transcription_provider, String
|
|
312
|
+
|
|
313
|
+
# @!attribute tts_provider
|
|
314
|
+
# Text-to-speech provider for this language.
|
|
315
|
+
#
|
|
316
|
+
# @return [String, nil]
|
|
317
|
+
optional :tts_provider, String
|
|
318
|
+
|
|
319
|
+
# @!attribute voice
|
|
320
|
+
# Voice identifier for this language.
|
|
321
|
+
#
|
|
322
|
+
# @return [String, nil]
|
|
323
|
+
optional :voice, String
|
|
324
|
+
|
|
325
|
+
# @!method initialize(code: nil, speech_model: nil, transcription_provider: nil, tts_provider: nil, voice: nil)
|
|
326
|
+
# Language-specific speech and transcription settings for Conversation Relay.
|
|
327
|
+
#
|
|
328
|
+
# @param code [String] BCP 47 language code.
|
|
329
|
+
#
|
|
330
|
+
# @param speech_model [String] Speech recognition model for this language.
|
|
331
|
+
#
|
|
332
|
+
# @param transcription_provider [String] Speech-to-text provider for this language.
|
|
333
|
+
#
|
|
334
|
+
# @param tts_provider [String] Text-to-speech provider for this language.
|
|
335
|
+
#
|
|
336
|
+
# @param voice [String] Voice identifier for this language.
|
|
337
|
+
end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
class InterruptionSettings < Telnyx::Internal::Type::BaseModel
|
|
341
|
+
# @!attribute enable
|
|
342
|
+
# Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is
|
|
343
|
+
# equivalent to `interruptible=none`.
|
|
344
|
+
#
|
|
345
|
+
# @return [Boolean, nil]
|
|
346
|
+
optional :enable, Telnyx::Internal::Type::Boolean
|
|
347
|
+
|
|
348
|
+
# @!attribute interruptible
|
|
349
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
350
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
351
|
+
# only; `dtmf` allows DTMF only.
|
|
352
|
+
#
|
|
353
|
+
# @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::Interruptible, nil]
|
|
354
|
+
optional :interruptible,
|
|
355
|
+
enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::InterruptionSettings::Interruptible }
|
|
356
|
+
|
|
357
|
+
# @!attribute interruptible_greeting
|
|
358
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
359
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
360
|
+
# only; `dtmf` allows DTMF only.
|
|
361
|
+
#
|
|
362
|
+
# @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::InterruptibleGreeting, nil]
|
|
363
|
+
optional :interruptible_greeting,
|
|
364
|
+
enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::InterruptionSettings::InterruptibleGreeting }
|
|
365
|
+
|
|
366
|
+
# @!attribute welcome_greeting_interruptible
|
|
367
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
368
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
369
|
+
# only; `dtmf` allows DTMF only.
|
|
370
|
+
#
|
|
371
|
+
# @return [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::WelcomeGreetingInterruptible, nil]
|
|
372
|
+
optional :welcome_greeting_interruptible,
|
|
373
|
+
enum: -> { Telnyx::Calls::ActionStartConversationRelayParams::InterruptionSettings::WelcomeGreetingInterruptible }
|
|
374
|
+
|
|
375
|
+
# @!method initialize(enable: nil, interruptible: nil, interruptible_greeting: nil, welcome_greeting_interruptible: nil)
|
|
376
|
+
# Some parameter documentations has been truncated, see
|
|
377
|
+
# {Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings}
|
|
378
|
+
# for more details.
|
|
379
|
+
#
|
|
380
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
381
|
+
#
|
|
382
|
+
# @param enable [Boolean] Legacy boolean form. `true` is equivalent to `interruptible=any`; `false` is equ
|
|
383
|
+
#
|
|
384
|
+
# @param interruptible [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::Interruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
|
|
385
|
+
#
|
|
386
|
+
# @param interruptible_greeting [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::InterruptibleGreeting] Controls when caller input can interrupt assistant speech. `any` allows speech o
|
|
387
|
+
#
|
|
388
|
+
# @param welcome_greeting_interruptible [Symbol, Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings::WelcomeGreetingInterruptible] Controls when caller input can interrupt assistant speech. `any` allows speech o
|
|
389
|
+
|
|
390
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
391
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
392
|
+
# only; `dtmf` allows DTMF only.
|
|
393
|
+
#
|
|
394
|
+
# @see Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings#interruptible
|
|
395
|
+
module Interruptible
|
|
396
|
+
extend Telnyx::Internal::Type::Enum
|
|
397
|
+
|
|
398
|
+
NONE = :none
|
|
399
|
+
ANY = :any
|
|
400
|
+
SPEECH = :speech
|
|
401
|
+
DTMF = :dtmf
|
|
402
|
+
|
|
403
|
+
# @!method self.values
|
|
404
|
+
# @return [Array<Symbol>]
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
408
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
409
|
+
# only; `dtmf` allows DTMF only.
|
|
410
|
+
#
|
|
411
|
+
# @see Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings#interruptible_greeting
|
|
412
|
+
module InterruptibleGreeting
|
|
413
|
+
extend Telnyx::Internal::Type::Enum
|
|
414
|
+
|
|
415
|
+
NONE = :none
|
|
416
|
+
ANY = :any
|
|
417
|
+
SPEECH = :speech
|
|
418
|
+
DTMF = :dtmf
|
|
419
|
+
|
|
420
|
+
# @!method self.values
|
|
421
|
+
# @return [Array<Symbol>]
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Controls when caller input can interrupt assistant speech. `any` allows speech
|
|
425
|
+
# or DTMF interruptions; `none` disables interruptions; `speech` allows speech
|
|
426
|
+
# only; `dtmf` allows DTMF only.
|
|
427
|
+
#
|
|
428
|
+
# @see Telnyx::Models::Calls::ActionStartConversationRelayParams::InterruptionSettings#welcome_greeting_interruptible
|
|
429
|
+
module WelcomeGreetingInterruptible
|
|
430
|
+
extend Telnyx::Internal::Type::Enum
|
|
431
|
+
|
|
432
|
+
NONE = :none
|
|
433
|
+
ANY = :any
|
|
434
|
+
SPEECH = :speech
|
|
435
|
+
DTMF = :dtmf
|
|
436
|
+
|
|
437
|
+
# @!method self.values
|
|
438
|
+
# @return [Array<Symbol>]
|
|
439
|
+
end
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
class Language < Telnyx::Internal::Type::BaseModel
|
|
443
|
+
# @!attribute code
|
|
444
|
+
# BCP 47 language code.
|
|
445
|
+
#
|
|
446
|
+
# @return [String, nil]
|
|
447
|
+
optional :code, String
|
|
448
|
+
|
|
449
|
+
# @!attribute speech_model
|
|
450
|
+
# Speech recognition model for this language.
|
|
451
|
+
#
|
|
452
|
+
# @return [String, nil]
|
|
453
|
+
optional :speech_model, String
|
|
454
|
+
|
|
455
|
+
# @!attribute transcription_provider
|
|
456
|
+
# Speech-to-text provider for this language.
|
|
457
|
+
#
|
|
458
|
+
# @return [String, nil]
|
|
459
|
+
optional :transcription_provider, String
|
|
460
|
+
|
|
461
|
+
# @!attribute tts_provider
|
|
462
|
+
# Text-to-speech provider for this language.
|
|
463
|
+
#
|
|
464
|
+
# @return [String, nil]
|
|
465
|
+
optional :tts_provider, String
|
|
466
|
+
|
|
467
|
+
# @!attribute voice
|
|
468
|
+
# Voice identifier for this language.
|
|
469
|
+
#
|
|
470
|
+
# @return [String, nil]
|
|
471
|
+
optional :voice, String
|
|
472
|
+
|
|
473
|
+
# @!method initialize(code: nil, speech_model: nil, transcription_provider: nil, tts_provider: nil, voice: nil)
|
|
474
|
+
# Language-specific speech and transcription settings for Conversation Relay.
|
|
475
|
+
#
|
|
476
|
+
# @param code [String] BCP 47 language code.
|
|
477
|
+
#
|
|
478
|
+
# @param speech_model [String] Speech recognition model for this language.
|
|
479
|
+
#
|
|
480
|
+
# @param transcription_provider [String] Speech-to-text provider for this language.
|
|
481
|
+
#
|
|
482
|
+
# @param tts_provider [String] Text-to-speech provider for this language.
|
|
483
|
+
#
|
|
484
|
+
# @param voice [String] Voice identifier for this language.
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
class Transcription < Telnyx::Internal::Type::BaseModel
|
|
488
|
+
# @!attribute language
|
|
489
|
+
# Transcription language.
|
|
490
|
+
#
|
|
491
|
+
# @return [String, nil]
|
|
492
|
+
optional :language, String
|
|
493
|
+
|
|
494
|
+
# @!attribute model
|
|
495
|
+
# Transcription model to use.
|
|
496
|
+
#
|
|
497
|
+
# @return [String, nil]
|
|
498
|
+
optional :model, String
|
|
499
|
+
|
|
500
|
+
# @!attribute provider
|
|
501
|
+
# Transcription provider to use.
|
|
502
|
+
#
|
|
503
|
+
# @return [String, nil]
|
|
504
|
+
optional :provider, String
|
|
505
|
+
|
|
506
|
+
# @!method initialize(language: nil, model: nil, provider: nil)
|
|
507
|
+
# Speech-to-text settings for Conversation Relay.
|
|
508
|
+
#
|
|
509
|
+
# @param language [String] Transcription language.
|
|
510
|
+
#
|
|
511
|
+
# @param model [String] Transcription model to use.
|
|
512
|
+
#
|
|
513
|
+
# @param provider [String] Transcription provider to use.
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# The settings associated with the voice selected
|
|
517
|
+
module VoiceSettings
|
|
518
|
+
extend Telnyx::Internal::Type::Union
|
|
519
|
+
|
|
520
|
+
discriminator :type
|
|
521
|
+
|
|
522
|
+
variant :elevenlabs, -> { Telnyx::Calls::ElevenLabsVoiceSettings }
|
|
523
|
+
|
|
524
|
+
variant :telnyx, -> { Telnyx::Calls::TelnyxVoiceSettings }
|
|
525
|
+
|
|
526
|
+
variant :aws, -> { Telnyx::Calls::AwsVoiceSettings }
|
|
527
|
+
|
|
528
|
+
variant :azure, -> { Telnyx::AzureVoiceSettings }
|
|
529
|
+
|
|
530
|
+
variant :rime, -> { Telnyx::RimeVoiceSettings }
|
|
531
|
+
|
|
532
|
+
variant :resemble, -> { Telnyx::ResembleVoiceSettings }
|
|
533
|
+
|
|
534
|
+
variant :xai, -> { Telnyx::XaiVoiceSettings }
|
|
535
|
+
|
|
536
|
+
# @!method self.variants
|
|
537
|
+
# @return [Array(Telnyx::Models::Calls::ElevenLabsVoiceSettings, Telnyx::Models::Calls::TelnyxVoiceSettings, Telnyx::Models::Calls::AwsVoiceSettings, Telnyx::Models::AzureVoiceSettings, Telnyx::Models::RimeVoiceSettings, Telnyx::Models::ResembleVoiceSettings, Telnyx::Models::XaiVoiceSettings)]
|
|
538
|
+
end
|
|
539
|
+
end
|
|
540
|
+
end
|
|
541
|
+
end
|
|
542
|
+
end
|