telnyx 5.68.2 → 5.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +7 -0
- data/lib/telnyx/internal/util.rb +18 -4
- data/lib/telnyx/models/ai/assistant_create_params.rb +47 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +25 -5
- data/lib/telnyx/models/ai/assistant_update_params.rb +47 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +48 -1
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +70 -7
- data/lib/telnyx/models/ai/inference_embedding.rb +48 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +13 -1
- data/lib/telnyx/models/pronunciation_dict_create_params.rb +141 -0
- data/lib/telnyx/models/pronunciation_dict_create_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_delete_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_list_params.rb +30 -0
- data/lib/telnyx/models/pronunciation_dict_list_response.rb +190 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_params.rb +20 -0
- data/lib/telnyx/models/pronunciation_dict_retrieve_response.rb +207 -0
- data/lib/telnyx/models/pronunciation_dict_update_params.rb +144 -0
- data/lib/telnyx/models/pronunciation_dict_update_response.rb +207 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +1893 -547
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +514 -0
- data/lib/telnyx/models/texml_initiate_ai_call_response.rb +34 -0
- data/lib/telnyx/models/verification.rb +1 -0
- data/lib/telnyx/models/verification_trigger_whatsapp_verification_params.rb +46 -0
- data/lib/telnyx/models/verify_profile_create_params.rb +43 -1
- data/lib/telnyx/models/verify_profile_update_params.rb +43 -1
- data/lib/telnyx/models/whatsapp_message_content.rb +196 -1
- data/lib/telnyx/models/wireless_blocklist_update_params.rb +8 -21
- data/lib/telnyx/models.rb +15 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/pronunciation_dicts.rb +156 -0
- data/lib/telnyx/resources/texml/accounts/calls.rb +3 -84
- data/lib/telnyx/resources/texml.rb +106 -0
- data/lib/telnyx/resources/verifications.rb +28 -0
- data/lib/telnyx/resources/verify_profiles.rb +5 -2
- data/lib/telnyx/resources/wireless_blocklists.rb +5 -5
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +13 -0
- data/rbi/telnyx/client.rbi +6 -0
- data/rbi/telnyx/internal/util.rbi +8 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistant_tool.rbi +56 -5
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +130 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +132 -0
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +123 -10
- data/rbi/telnyx/models/ai/inference_embedding.rbi +130 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +13 -0
- data/rbi/telnyx/models/pronunciation_dict_create_params.rbi +246 -0
- data/rbi/telnyx/models/pronunciation_dict_create_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_delete_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_list_params.rbi +57 -0
- data/rbi/telnyx/models/pronunciation_dict_list_response.rbi +353 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_params.rbi +38 -0
- data/rbi/telnyx/models/pronunciation_dict_retrieve_response.rbi +398 -0
- data/rbi/telnyx/models/pronunciation_dict_update_params.rbi +268 -0
- data/rbi/telnyx/models/pronunciation_dict_update_response.rbi +398 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +3719 -1011
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +1010 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_response.rbi +58 -0
- data/rbi/telnyx/models/verification.rbi +1 -0
- data/rbi/telnyx/models/verification_trigger_whatsapp_verification_params.rbi +73 -0
- data/rbi/telnyx/models/verify_profile_create_params.rbi +85 -0
- data/rbi/telnyx/models/verify_profile_update_params.rbi +85 -0
- data/rbi/telnyx/models/whatsapp_message_content.rbi +492 -0
- data/rbi/telnyx/models/wireless_blocklist_update_params.rbi +6 -49
- data/rbi/telnyx/models.rbi +19 -10
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +4 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -0
- data/rbi/telnyx/resources/pronunciation_dicts.rbi +131 -0
- data/rbi/telnyx/resources/texml/accounts/calls.rbi +7 -163
- data/rbi/telnyx/resources/texml.rbi +164 -0
- data/rbi/telnyx/resources/verifications.rbi +23 -0
- data/rbi/telnyx/resources/verify_profiles.rbi +4 -0
- data/rbi/telnyx/resources/wireless_blocklists.rbi +3 -3
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/internal/util.rbs +4 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +17 -4
- data/sig/telnyx/models/ai/assistant_update_params.rbs +62 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +62 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +53 -3
- data/sig/telnyx/models/ai/inference_embedding.rbs +62 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/pronunciation_dict_create_params.rbs +97 -0
- data/sig/telnyx/models/pronunciation_dict_create_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_delete_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_list_params.rbs +32 -0
- data/sig/telnyx/models/pronunciation_dict_list_response.rbs +144 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_params.rbs +20 -0
- data/sig/telnyx/models/pronunciation_dict_retrieve_response.rbs +167 -0
- data/sig/telnyx/models/pronunciation_dict_update_params.rbs +108 -0
- data/sig/telnyx/models/pronunciation_dict_update_response.rbs +167 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +1368 -331
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +444 -0
- data/sig/telnyx/models/texml_initiate_ai_call_response.rbs +38 -0
- data/sig/telnyx/models/verification.rbs +2 -1
- data/sig/telnyx/models/verification_trigger_whatsapp_verification_params.rbs +43 -0
- data/sig/telnyx/models/verify_profile_create_params.rbs +43 -1
- data/sig/telnyx/models/verify_profile_update_params.rbs +43 -1
- data/sig/telnyx/models/whatsapp_message_content.rbs +205 -0
- data/sig/telnyx/models/wireless_blocklist_update_params.rbs +5 -25
- data/sig/telnyx/models.rbs +14 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/pronunciation_dicts.rbs +33 -0
- data/sig/telnyx/resources/texml/accounts/calls.rbs +1 -40
- data/sig/telnyx/resources/texml.rbs +44 -0
- data/sig/telnyx/resources/verifications.rbs +8 -0
- data/sig/telnyx/resources/verify_profiles.rbs +2 -0
- data/sig/telnyx/resources/wireless_blocklists.rbs +1 -1
- metadata +41 -2
|
@@ -43,6 +43,8 @@ module Telnyx
|
|
|
43
43
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
44
44
|
llm_api_key_ref: String,
|
|
45
45
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
46
|
+
observability_settings:
|
|
47
|
+
Telnyx::AI::AssistantCreateParams::ObservabilitySettings::OrHash,
|
|
46
48
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
47
49
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
48
50
|
tool_ids: T::Array[String],
|
|
@@ -100,6 +102,7 @@ module Telnyx
|
|
|
100
102
|
# work with this integration.
|
|
101
103
|
llm_api_key_ref: nil,
|
|
102
104
|
messaging_settings: nil,
|
|
105
|
+
observability_settings: nil,
|
|
103
106
|
privacy_settings: nil,
|
|
104
107
|
telephony_settings: nil,
|
|
105
108
|
tool_ids: nil,
|
|
@@ -150,6 +153,8 @@ module Telnyx
|
|
|
150
153
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
151
154
|
model: String,
|
|
152
155
|
name: String,
|
|
156
|
+
observability_settings:
|
|
157
|
+
Telnyx::AI::AssistantUpdateParams::ObservabilitySettings::OrHash,
|
|
153
158
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
154
159
|
promote_to_main: T::Boolean,
|
|
155
160
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
@@ -209,6 +214,7 @@ module Telnyx
|
|
|
209
214
|
# to see all of your available models,
|
|
210
215
|
model: nil,
|
|
211
216
|
name: nil,
|
|
217
|
+
observability_settings: nil,
|
|
212
218
|
privacy_settings: nil,
|
|
213
219
|
# Indicates whether the assistant should be promoted to the main version. Defaults
|
|
214
220
|
# to true.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
# Manage pronunciation dictionaries for text-to-speech synthesis. Dictionaries
|
|
6
|
+
# contain alias items (text replacement) and phoneme items (IPA pronunciation
|
|
7
|
+
# notation) that control how specific words are spoken.
|
|
8
|
+
class PronunciationDicts
|
|
9
|
+
# Create a new pronunciation dictionary for the authenticated organization. Each
|
|
10
|
+
# dictionary contains a list of items that control how specific words are spoken.
|
|
11
|
+
# Items can be alias type (text replacement) or phoneme type (IPA pronunciation
|
|
12
|
+
# notation).
|
|
13
|
+
#
|
|
14
|
+
# As an alternative to providing items directly as JSON, you can upload a
|
|
15
|
+
# dictionary file (PLS/XML or plain text format, max 1MB) using
|
|
16
|
+
# multipart/form-data. PLS files use the standard W3C Pronunciation Lexicon
|
|
17
|
+
# Specification XML format. Text files use a line-based format: `word=alias` for
|
|
18
|
+
# aliases, `word:/phoneme/` for IPA phonemes.
|
|
19
|
+
#
|
|
20
|
+
# Limits:
|
|
21
|
+
#
|
|
22
|
+
# - Maximum 50 dictionaries per organization
|
|
23
|
+
# - Maximum 100 items per dictionary
|
|
24
|
+
# - Text: max 200 characters
|
|
25
|
+
# - Alias/phoneme value: max 500 characters
|
|
26
|
+
# - File upload: max 1MB (1,048,576 bytes)
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
items:
|
|
30
|
+
T::Array[
|
|
31
|
+
T.any(
|
|
32
|
+
Telnyx::PronunciationDictCreateParams::Item::Alias::OrHash,
|
|
33
|
+
Telnyx::PronunciationDictCreateParams::Item::Phoneme::OrHash
|
|
34
|
+
)
|
|
35
|
+
],
|
|
36
|
+
name: String,
|
|
37
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
38
|
+
).returns(Telnyx::Models::PronunciationDictCreateResponse)
|
|
39
|
+
end
|
|
40
|
+
def create(
|
|
41
|
+
# List of pronunciation items (alias or phoneme type). At least one item is
|
|
42
|
+
# required.
|
|
43
|
+
items:,
|
|
44
|
+
# Human-readable name. Must be unique within the organization.
|
|
45
|
+
name:,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Retrieve a single pronunciation dictionary by ID.
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
id: String,
|
|
54
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
55
|
+
).returns(Telnyx::Models::PronunciationDictRetrieveResponse)
|
|
56
|
+
end
|
|
57
|
+
def retrieve(
|
|
58
|
+
# The UUID of the pronunciation dictionary.
|
|
59
|
+
id,
|
|
60
|
+
request_options: {}
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Update the name and/or items of an existing pronunciation dictionary. Uses
|
|
65
|
+
# optimistic locking — if the dictionary was modified concurrently, the request
|
|
66
|
+
# returns 409 Conflict.
|
|
67
|
+
sig do
|
|
68
|
+
params(
|
|
69
|
+
id: String,
|
|
70
|
+
items:
|
|
71
|
+
T::Array[
|
|
72
|
+
T.any(
|
|
73
|
+
Telnyx::PronunciationDictUpdateParams::Item::Alias::OrHash,
|
|
74
|
+
Telnyx::PronunciationDictUpdateParams::Item::Phoneme::OrHash
|
|
75
|
+
)
|
|
76
|
+
],
|
|
77
|
+
name: String,
|
|
78
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
79
|
+
).returns(Telnyx::Models::PronunciationDictUpdateResponse)
|
|
80
|
+
end
|
|
81
|
+
def update(
|
|
82
|
+
# The UUID of the pronunciation dictionary.
|
|
83
|
+
id,
|
|
84
|
+
# Updated list of pronunciation items (alias or phoneme type).
|
|
85
|
+
items: nil,
|
|
86
|
+
# Updated dictionary name.
|
|
87
|
+
name: nil,
|
|
88
|
+
request_options: {}
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# List all pronunciation dictionaries for the authenticated organization. Results
|
|
93
|
+
# are paginated using offset-based pagination.
|
|
94
|
+
sig do
|
|
95
|
+
params(
|
|
96
|
+
page_number: Integer,
|
|
97
|
+
page_size: Integer,
|
|
98
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
99
|
+
).returns(
|
|
100
|
+
Telnyx::Internal::DefaultFlatPagination[
|
|
101
|
+
Telnyx::Models::PronunciationDictListResponse
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def list(
|
|
106
|
+
# Page number (1-based). Defaults to 1.
|
|
107
|
+
page_number: nil,
|
|
108
|
+
# Number of results per page. Defaults to 20, maximum 250.
|
|
109
|
+
page_size: nil,
|
|
110
|
+
request_options: {}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Permanently delete a pronunciation dictionary.
|
|
115
|
+
sig do
|
|
116
|
+
params(id: String, request_options: Telnyx::RequestOptions::OrHash).void
|
|
117
|
+
end
|
|
118
|
+
def delete(
|
|
119
|
+
# The UUID of the pronunciation dictionary.
|
|
120
|
+
id,
|
|
121
|
+
request_options: {}
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# @api private
|
|
126
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
127
|
+
def self.new(client:)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -95,175 +95,19 @@ module Telnyx
|
|
|
95
95
|
sig do
|
|
96
96
|
params(
|
|
97
97
|
account_sid: String,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Telnyx::Texml::Accounts::CallCallsParams::AsyncAmdStatusCallbackMethod::OrSymbol,
|
|
105
|
-
caller_id: String,
|
|
106
|
-
cancel_playback_on_detect_message_end: T::Boolean,
|
|
107
|
-
cancel_playback_on_machine_detection: T::Boolean,
|
|
108
|
-
custom_headers:
|
|
109
|
-
T::Array[
|
|
110
|
-
Telnyx::Texml::Accounts::CallCallsParams::CustomHeader::OrHash
|
|
111
|
-
],
|
|
112
|
-
detection_mode:
|
|
113
|
-
Telnyx::Texml::Accounts::CallCallsParams::DetectionMode::OrSymbol,
|
|
114
|
-
fallback_url: String,
|
|
115
|
-
machine_detection:
|
|
116
|
-
Telnyx::Texml::Accounts::CallCallsParams::MachineDetection::OrSymbol,
|
|
117
|
-
machine_detection_silence_timeout: Integer,
|
|
118
|
-
machine_detection_speech_end_threshold: Integer,
|
|
119
|
-
machine_detection_speech_threshold: Integer,
|
|
120
|
-
machine_detection_timeout: Integer,
|
|
121
|
-
preferred_codecs: String,
|
|
122
|
-
record: T::Boolean,
|
|
123
|
-
recording_channels:
|
|
124
|
-
Telnyx::Texml::Accounts::CallCallsParams::RecordingChannels::OrSymbol,
|
|
125
|
-
recording_status_callback: String,
|
|
126
|
-
recording_status_callback_event: String,
|
|
127
|
-
recording_status_callback_method:
|
|
128
|
-
Telnyx::Texml::Accounts::CallCallsParams::RecordingStatusCallbackMethod::OrSymbol,
|
|
129
|
-
recording_timeout: Integer,
|
|
130
|
-
recording_track:
|
|
131
|
-
Telnyx::Texml::Accounts::CallCallsParams::RecordingTrack::OrSymbol,
|
|
132
|
-
send_recording_url: T::Boolean,
|
|
133
|
-
sip_auth_password: String,
|
|
134
|
-
sip_auth_username: String,
|
|
135
|
-
sip_region:
|
|
136
|
-
Telnyx::Texml::Accounts::CallCallsParams::SipRegion::OrSymbol,
|
|
137
|
-
status_callback: String,
|
|
138
|
-
status_callback_event:
|
|
139
|
-
Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackEvent::OrSymbol,
|
|
140
|
-
status_callback_method:
|
|
141
|
-
Telnyx::Texml::Accounts::CallCallsParams::StatusCallbackMethod::OrSymbol,
|
|
142
|
-
supervise_call_sid: String,
|
|
143
|
-
supervising_role:
|
|
144
|
-
Telnyx::Texml::Accounts::CallCallsParams::SupervisingRole::OrSymbol,
|
|
145
|
-
texml: String,
|
|
146
|
-
time_limit: Integer,
|
|
147
|
-
timeout_seconds: Integer,
|
|
148
|
-
trim: Telnyx::Texml::Accounts::CallCallsParams::Trim::OrSymbol,
|
|
149
|
-
url: String,
|
|
150
|
-
url_method:
|
|
151
|
-
Telnyx::Texml::Accounts::CallCallsParams::URLMethod::OrSymbol,
|
|
98
|
+
body:
|
|
99
|
+
T.any(
|
|
100
|
+
Telnyx::Texml::Accounts::CallCallsParams::Body::WithURL::OrHash,
|
|
101
|
+
Telnyx::Texml::Accounts::CallCallsParams::Body::WithTeXml::OrHash,
|
|
102
|
+
Telnyx::Texml::Accounts::CallCallsParams::Body::ApplicationDefault::OrHash
|
|
103
|
+
),
|
|
152
104
|
request_options: Telnyx::RequestOptions::OrHash
|
|
153
105
|
).returns(Telnyx::Models::Texml::Accounts::CallCallsResponse)
|
|
154
106
|
end
|
|
155
107
|
def calls(
|
|
156
108
|
# The id of the account the resource belongs to.
|
|
157
109
|
account_sid,
|
|
158
|
-
|
|
159
|
-
application_sid:,
|
|
160
|
-
# The phone number of the party that initiated the call. Phone numbers are
|
|
161
|
-
# formatted with a `+` and country code.
|
|
162
|
-
from:,
|
|
163
|
-
# The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
164
|
-
# country code.
|
|
165
|
-
to:,
|
|
166
|
-
# Select whether to perform answering machine detection in the background. By
|
|
167
|
-
# default execution is blocked until Answering Machine Detection is completed.
|
|
168
|
-
async_amd: nil,
|
|
169
|
-
# URL destination for Telnyx to send AMD callback events to for the call.
|
|
170
|
-
async_amd_status_callback: nil,
|
|
171
|
-
# HTTP request type used for `AsyncAmdStatusCallback`. The default value is
|
|
172
|
-
# inherited from TeXML Application setting.
|
|
173
|
-
async_amd_status_callback_method: nil,
|
|
174
|
-
# To be used as the caller id name (SIP From Display Name) presented to the
|
|
175
|
-
# destination (`To` number). The string should have a maximum of 128 characters,
|
|
176
|
-
# containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
177
|
-
# ommited, the display name will be the same as the number in the `From` field.
|
|
178
|
-
caller_id: nil,
|
|
179
|
-
# Whether to cancel ongoing playback on `greeting ended` detection. Defaults to
|
|
180
|
-
# `true`.
|
|
181
|
-
cancel_playback_on_detect_message_end: nil,
|
|
182
|
-
# Whether to cancel ongoing playback on `machine` detection. Defaults to `true`.
|
|
183
|
-
cancel_playback_on_machine_detection: nil,
|
|
184
|
-
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
185
|
-
# with 'name' and 'value' properties.
|
|
186
|
-
custom_headers: nil,
|
|
187
|
-
# Allows you to chose between Premium and Standard detections.
|
|
188
|
-
detection_mode: nil,
|
|
189
|
-
# A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
190
|
-
# `Url` is not responding.
|
|
191
|
-
fallback_url: nil,
|
|
192
|
-
# Enables Answering Machine Detection.
|
|
193
|
-
machine_detection: nil,
|
|
194
|
-
# If initial silence duration is greater than this value, consider it a machine.
|
|
195
|
-
# Ignored when `premium` detection is used.
|
|
196
|
-
machine_detection_silence_timeout: nil,
|
|
197
|
-
# Silence duration threshold after a greeting message or voice for it be
|
|
198
|
-
# considered human. Ignored when `premium` detection is used.
|
|
199
|
-
machine_detection_speech_end_threshold: nil,
|
|
200
|
-
# Maximum threshold of a human greeting. If greeting longer than this value,
|
|
201
|
-
# considered machine. Ignored when `premium` detection is used.
|
|
202
|
-
machine_detection_speech_threshold: nil,
|
|
203
|
-
# Maximum timeout threshold in milliseconds for overall detection.
|
|
204
|
-
machine_detection_timeout: nil,
|
|
205
|
-
# The list of comma-separated codecs to be offered on a call.
|
|
206
|
-
preferred_codecs: nil,
|
|
207
|
-
# Whether to record the entire participant's call leg. Defaults to `false`.
|
|
208
|
-
record: nil,
|
|
209
|
-
# The number of channels in the final recording. Defaults to `mono`.
|
|
210
|
-
recording_channels: nil,
|
|
211
|
-
# The URL the recording callbacks will be sent to.
|
|
212
|
-
recording_status_callback: nil,
|
|
213
|
-
# The changes to the recording's state that should generate a call to
|
|
214
|
-
# `RecoridngStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
215
|
-
# Separate multiple values with a space. Defaults to `completed`.
|
|
216
|
-
recording_status_callback_event: nil,
|
|
217
|
-
# HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
218
|
-
recording_status_callback_method: nil,
|
|
219
|
-
# The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
220
|
-
# silence is detected. The timer only starts when the speech is detected. Please
|
|
221
|
-
# note that the transcription is used to detect silence and the related charge
|
|
222
|
-
# will be applied. The minimum value is 0. The default value is 0 (infinite)
|
|
223
|
-
recording_timeout: nil,
|
|
224
|
-
# The audio track to record for the call. The default is `both`.
|
|
225
|
-
recording_track: nil,
|
|
226
|
-
# Whether to send RecordingUrl in webhooks.
|
|
227
|
-
send_recording_url: nil,
|
|
228
|
-
# The password to use for SIP authentication.
|
|
229
|
-
sip_auth_password: nil,
|
|
230
|
-
# The username to use for SIP authentication.
|
|
231
|
-
sip_auth_username: nil,
|
|
232
|
-
# Defines the SIP region to be used for the call.
|
|
233
|
-
sip_region: nil,
|
|
234
|
-
# URL destination for Telnyx to send status callback events to for the call.
|
|
235
|
-
status_callback: nil,
|
|
236
|
-
# The call events for which Telnyx should send a webhook. Multiple events can be
|
|
237
|
-
# defined when separated by a space.
|
|
238
|
-
status_callback_event: nil,
|
|
239
|
-
# HTTP request type used for `StatusCallback`.
|
|
240
|
-
status_callback_method: nil,
|
|
241
|
-
# The call control ID of the existing call to supervise. When provided, the
|
|
242
|
-
# created leg will be added to the specified call in supervising mode. Status
|
|
243
|
-
# callbacks and action callbacks will NOT be sent for the supervising leg.
|
|
244
|
-
supervise_call_sid: nil,
|
|
245
|
-
# The supervising role for the new leg. Determines the audio behavior: barge (hear
|
|
246
|
-
# both sides), whisper (only hear supervisor), monitor (hear both sides but
|
|
247
|
-
# supervisor muted). Default: barge
|
|
248
|
-
supervising_role: nil,
|
|
249
|
-
# TeXML to be used as instructions for the call. If provided, the call will
|
|
250
|
-
# execute these instructions instead of fetching from the Url.
|
|
251
|
-
texml: nil,
|
|
252
|
-
# The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
253
|
-
# maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
254
|
-
time_limit: nil,
|
|
255
|
-
# The number of seconds to wait for the called party to answer the call before the
|
|
256
|
-
# call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
257
|
-
# is 30 seconds.
|
|
258
|
-
timeout_seconds: nil,
|
|
259
|
-
# Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
260
|
-
# `trim-silence`.
|
|
261
|
-
trim: nil,
|
|
262
|
-
# The URL from which Telnyx will retrieve the TeXML call instructions.
|
|
263
|
-
url: nil,
|
|
264
|
-
# HTTP request type used for `Url`. The default value is inherited from TeXML
|
|
265
|
-
# Application setting.
|
|
266
|
-
url_method: nil,
|
|
110
|
+
body:,
|
|
267
111
|
request_options: {}
|
|
268
112
|
)
|
|
269
113
|
end
|
|
@@ -8,6 +8,170 @@ module Telnyx
|
|
|
8
8
|
sig { returns(Telnyx::Resources::Texml::Accounts) }
|
|
9
9
|
attr_reader :accounts
|
|
10
10
|
|
|
11
|
+
# Initiate an outbound AI call with warm-up support. Validates parameters, builds
|
|
12
|
+
# an internal TeXML with an AI Assistant configuration, encodes instructions into
|
|
13
|
+
# client state, and calls the dial API. The Twiml, Texml, and Url parameters are
|
|
14
|
+
# not allowed and will result in a 422 error.
|
|
15
|
+
sig do
|
|
16
|
+
params(
|
|
17
|
+
connection_id: String,
|
|
18
|
+
ai_assistant_id: String,
|
|
19
|
+
from: String,
|
|
20
|
+
to: String,
|
|
21
|
+
ai_assistant_dynamic_variables: T::Hash[Symbol, String],
|
|
22
|
+
ai_assistant_version: String,
|
|
23
|
+
async_amd: T::Boolean,
|
|
24
|
+
async_amd_status_callback: String,
|
|
25
|
+
async_amd_status_callback_method:
|
|
26
|
+
Telnyx::TexmlInitiateAICallParams::AsyncAmdStatusCallbackMethod::OrSymbol,
|
|
27
|
+
caller_id: String,
|
|
28
|
+
conversation_callback: String,
|
|
29
|
+
conversation_callback_method:
|
|
30
|
+
Telnyx::TexmlInitiateAICallParams::ConversationCallbackMethod::OrSymbol,
|
|
31
|
+
conversation_callbacks: T::Array[String],
|
|
32
|
+
custom_headers:
|
|
33
|
+
T::Array[Telnyx::TexmlInitiateAICallParams::CustomHeader::OrHash],
|
|
34
|
+
detection_mode:
|
|
35
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
36
|
+
machine_detection:
|
|
37
|
+
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
38
|
+
machine_detection_silence_timeout: Integer,
|
|
39
|
+
machine_detection_speech_end_threshold: Integer,
|
|
40
|
+
machine_detection_speech_threshold: Integer,
|
|
41
|
+
machine_detection_timeout: Integer,
|
|
42
|
+
passports: String,
|
|
43
|
+
preferred_codecs: String,
|
|
44
|
+
record: T::Boolean,
|
|
45
|
+
recording_channels:
|
|
46
|
+
Telnyx::TexmlInitiateAICallParams::RecordingChannels::OrSymbol,
|
|
47
|
+
recording_status_callback: String,
|
|
48
|
+
recording_status_callback_event: String,
|
|
49
|
+
recording_status_callback_method:
|
|
50
|
+
Telnyx::TexmlInitiateAICallParams::RecordingStatusCallbackMethod::OrSymbol,
|
|
51
|
+
recording_timeout: Integer,
|
|
52
|
+
recording_track:
|
|
53
|
+
Telnyx::TexmlInitiateAICallParams::RecordingTrack::OrSymbol,
|
|
54
|
+
send_recording_url: T::Boolean,
|
|
55
|
+
sip_auth_password: String,
|
|
56
|
+
sip_auth_username: String,
|
|
57
|
+
sip_region: Telnyx::TexmlInitiateAICallParams::SipRegion::OrSymbol,
|
|
58
|
+
status_callback: String,
|
|
59
|
+
status_callback_event: String,
|
|
60
|
+
status_callback_method:
|
|
61
|
+
Telnyx::TexmlInitiateAICallParams::StatusCallbackMethod::OrSymbol,
|
|
62
|
+
status_callbacks: T::Array[String],
|
|
63
|
+
time_limit: Integer,
|
|
64
|
+
timeout_seconds: Integer,
|
|
65
|
+
trim: Telnyx::TexmlInitiateAICallParams::Trim::OrSymbol,
|
|
66
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
67
|
+
).returns(Telnyx::Models::TexmlInitiateAICallResponse)
|
|
68
|
+
end
|
|
69
|
+
def initiate_ai_call(
|
|
70
|
+
# The ID of the TeXML connection to use for the call.
|
|
71
|
+
connection_id,
|
|
72
|
+
# The ID of the AI assistant to use for the call.
|
|
73
|
+
ai_assistant_id:,
|
|
74
|
+
# The phone number of the party initiating the call. Phone numbers are formatted
|
|
75
|
+
# with a `+` and country code.
|
|
76
|
+
from:,
|
|
77
|
+
# The phone number of the called party. Phone numbers are formatted with a `+` and
|
|
78
|
+
# country code.
|
|
79
|
+
to:,
|
|
80
|
+
# Key-value map of dynamic variables to pass to the AI assistant.
|
|
81
|
+
ai_assistant_dynamic_variables: nil,
|
|
82
|
+
# The version of the AI assistant to use.
|
|
83
|
+
ai_assistant_version: nil,
|
|
84
|
+
# Select whether to perform answering machine detection in the background. By
|
|
85
|
+
# default execution is blocked until Answering Machine Detection is completed.
|
|
86
|
+
async_amd: nil,
|
|
87
|
+
# URL destination for Telnyx to send AMD callback events to for the call.
|
|
88
|
+
async_amd_status_callback: nil,
|
|
89
|
+
# HTTP request type used for `AsyncAmdStatusCallback`.
|
|
90
|
+
async_amd_status_callback_method: nil,
|
|
91
|
+
# To be used as the caller id name (SIP From Display Name) presented to the
|
|
92
|
+
# destination (`To` number). The string should have a maximum of 128 characters,
|
|
93
|
+
# containing only letters, numbers, spaces, and `-_~!.+` special characters. If
|
|
94
|
+
# omitted, the display name will be the same as the number in the `From` field.
|
|
95
|
+
caller_id: nil,
|
|
96
|
+
# URL destination for Telnyx to send conversation callback events to.
|
|
97
|
+
conversation_callback: nil,
|
|
98
|
+
# HTTP request type used for `ConversationCallback`.
|
|
99
|
+
conversation_callback_method: nil,
|
|
100
|
+
# An array of URL destinations for conversation callback events.
|
|
101
|
+
conversation_callbacks: nil,
|
|
102
|
+
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
103
|
+
# with 'name' and 'value' properties.
|
|
104
|
+
custom_headers: nil,
|
|
105
|
+
# Allows you to choose between Premium and Standard detections.
|
|
106
|
+
detection_mode: nil,
|
|
107
|
+
# Enables Answering Machine Detection.
|
|
108
|
+
machine_detection: nil,
|
|
109
|
+
# If initial silence duration is greater than this value, consider it a machine.
|
|
110
|
+
# Ignored when `premium` detection is used.
|
|
111
|
+
machine_detection_silence_timeout: nil,
|
|
112
|
+
# Silence duration threshold after a greeting message or voice for it be
|
|
113
|
+
# considered human. Ignored when `premium` detection is used.
|
|
114
|
+
machine_detection_speech_end_threshold: nil,
|
|
115
|
+
# Maximum threshold of a human greeting. If greeting longer than this value,
|
|
116
|
+
# considered machine. Ignored when `premium` detection is used.
|
|
117
|
+
machine_detection_speech_threshold: nil,
|
|
118
|
+
# Maximum timeout threshold in milliseconds for overall detection.
|
|
119
|
+
machine_detection_timeout: nil,
|
|
120
|
+
# A string of passport identifiers to associate with the call.
|
|
121
|
+
passports: nil,
|
|
122
|
+
# The list of comma-separated codecs to be offered on a call.
|
|
123
|
+
preferred_codecs: nil,
|
|
124
|
+
# Whether to record the entire participant's call leg. Defaults to `false`.
|
|
125
|
+
record: nil,
|
|
126
|
+
# The number of channels in the final recording. Defaults to `mono`.
|
|
127
|
+
recording_channels: nil,
|
|
128
|
+
# The URL the recording callbacks will be sent to.
|
|
129
|
+
recording_status_callback: nil,
|
|
130
|
+
# The changes to the recording's state that should generate a call to
|
|
131
|
+
# `RecordingStatusCallback`. Can be: `in-progress`, `completed` and `absent`.
|
|
132
|
+
# Separate multiple values with a space. Defaults to `completed`.
|
|
133
|
+
recording_status_callback_event: nil,
|
|
134
|
+
# HTTP request type used for `RecordingStatusCallback`. Defaults to `POST`.
|
|
135
|
+
recording_status_callback_method: nil,
|
|
136
|
+
# The number of seconds that Telnyx will wait for the recording to be stopped if
|
|
137
|
+
# silence is detected. The timer only starts when the speech is detected. The
|
|
138
|
+
# minimum value is 0. The default value is 0 (infinite).
|
|
139
|
+
recording_timeout: nil,
|
|
140
|
+
# The audio track to record for the call. The default is `both`.
|
|
141
|
+
recording_track: nil,
|
|
142
|
+
# Whether to send RecordingUrl in webhooks.
|
|
143
|
+
send_recording_url: nil,
|
|
144
|
+
# The password to use for SIP authentication.
|
|
145
|
+
sip_auth_password: nil,
|
|
146
|
+
# The username to use for SIP authentication.
|
|
147
|
+
sip_auth_username: nil,
|
|
148
|
+
# Defines the SIP region to be used for the call.
|
|
149
|
+
sip_region: nil,
|
|
150
|
+
# URL destination for Telnyx to send status callback events to for the call.
|
|
151
|
+
status_callback: nil,
|
|
152
|
+
# The call events for which Telnyx should send a webhook. Multiple events can be
|
|
153
|
+
# defined when separated by a space. Valid values: initiated, ringing, answered,
|
|
154
|
+
# completed.
|
|
155
|
+
status_callback_event: nil,
|
|
156
|
+
# HTTP request type used for `StatusCallback`.
|
|
157
|
+
status_callback_method: nil,
|
|
158
|
+
# An array of URL destinations for Telnyx to send status callback events to for
|
|
159
|
+
# the call.
|
|
160
|
+
status_callbacks: nil,
|
|
161
|
+
# The maximum duration of the call in seconds. The minimum value is 30 and the
|
|
162
|
+
# maximum value is 14400 (4 hours). Default is 14400 seconds.
|
|
163
|
+
time_limit: nil,
|
|
164
|
+
# The number of seconds to wait for the called party to answer the call before the
|
|
165
|
+
# call is canceled. The minimum value is 5 and the maximum value is 120. Default
|
|
166
|
+
# is 30 seconds.
|
|
167
|
+
timeout_seconds: nil,
|
|
168
|
+
# Whether to trim any leading and trailing silence from the recording. Defaults to
|
|
169
|
+
# `trim-silence`.
|
|
170
|
+
trim: nil,
|
|
171
|
+
request_options: {}
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
|
|
11
175
|
# Create a TeXML secret which can be later used as a Dynamic Parameter for TeXML
|
|
12
176
|
# when using Mustache Templates in your TeXML. In your TeXML you will be able to
|
|
13
177
|
# use your secret name, and this name will be replaced by the actual secret value
|
|
@@ -96,6 +96,29 @@ module Telnyx
|
|
|
96
96
|
)
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# Trigger WhatsApp verification
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
phone_number: String,
|
|
103
|
+
verify_profile_id: String,
|
|
104
|
+
custom_code: T.nilable(String),
|
|
105
|
+
timeout_secs: Integer,
|
|
106
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
107
|
+
).returns(Telnyx::CreateVerificationResponse)
|
|
108
|
+
end
|
|
109
|
+
def trigger_whatsapp_verification(
|
|
110
|
+
# +E164 formatted phone number.
|
|
111
|
+
phone_number:,
|
|
112
|
+
# The identifier of the associated Verify profile.
|
|
113
|
+
verify_profile_id:,
|
|
114
|
+
# Send a self-generated numeric code to the end-user
|
|
115
|
+
custom_code: nil,
|
|
116
|
+
# The number of seconds the verification code is valid for.
|
|
117
|
+
timeout_secs: nil,
|
|
118
|
+
request_options: {}
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
99
122
|
# @api private
|
|
100
123
|
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
101
124
|
def self.new(client:)
|
|
@@ -15,6 +15,7 @@ module Telnyx
|
|
|
15
15
|
sms: Telnyx::VerifyProfileCreateParams::SMS::OrHash,
|
|
16
16
|
webhook_failover_url: String,
|
|
17
17
|
webhook_url: String,
|
|
18
|
+
whatsapp: Telnyx::VerifyProfileCreateParams::Whatsapp::OrHash,
|
|
18
19
|
request_options: Telnyx::RequestOptions::OrHash
|
|
19
20
|
).returns(Telnyx::VerifyProfileData)
|
|
20
21
|
end
|
|
@@ -27,6 +28,7 @@ module Telnyx
|
|
|
27
28
|
sms: nil,
|
|
28
29
|
webhook_failover_url: nil,
|
|
29
30
|
webhook_url: nil,
|
|
31
|
+
whatsapp: nil,
|
|
30
32
|
request_options: {}
|
|
31
33
|
)
|
|
32
34
|
end
|
|
@@ -57,6 +59,7 @@ module Telnyx
|
|
|
57
59
|
sms: Telnyx::VerifyProfileUpdateParams::SMS::OrHash,
|
|
58
60
|
webhook_failover_url: String,
|
|
59
61
|
webhook_url: String,
|
|
62
|
+
whatsapp: Telnyx::VerifyProfileUpdateParams::Whatsapp::OrHash,
|
|
60
63
|
request_options: Telnyx::RequestOptions::OrHash
|
|
61
64
|
).returns(Telnyx::VerifyProfileData)
|
|
62
65
|
end
|
|
@@ -71,6 +74,7 @@ module Telnyx
|
|
|
71
74
|
sms: nil,
|
|
72
75
|
webhook_failover_url: nil,
|
|
73
76
|
webhook_url: nil,
|
|
77
|
+
whatsapp: nil,
|
|
74
78
|
request_options: {}
|
|
75
79
|
)
|
|
76
80
|
end
|
|
@@ -41,17 +41,17 @@ module Telnyx
|
|
|
41
41
|
# Update a Wireless Blocklist.
|
|
42
42
|
sig do
|
|
43
43
|
params(
|
|
44
|
+
id: String,
|
|
44
45
|
name: String,
|
|
45
|
-
type: Telnyx::WirelessBlocklistUpdateParams::Type::OrSymbol,
|
|
46
46
|
values: T::Array[String],
|
|
47
47
|
request_options: Telnyx::RequestOptions::OrHash
|
|
48
48
|
).returns(Telnyx::Models::WirelessBlocklistUpdateResponse)
|
|
49
49
|
end
|
|
50
50
|
def update(
|
|
51
|
+
# Identifies the wireless blocklist.
|
|
52
|
+
id,
|
|
51
53
|
# The name of the Wireless Blocklist.
|
|
52
54
|
name: nil,
|
|
53
|
-
# The type of wireless blocklist.
|
|
54
|
-
type: nil,
|
|
55
55
|
# Values to block. The values here depend on the `type` of Wireless Blocklist.
|
|
56
56
|
values: nil,
|
|
57
57
|
request_options: {}
|
data/sig/telnyx/client.rbs
CHANGED
|
@@ -340,6 +340,8 @@ module Telnyx
|
|
|
340
340
|
|
|
341
341
|
attr_reader terms_of_service: Telnyx::Resources::TermsOfService
|
|
342
342
|
|
|
343
|
+
attr_reader pronunciation_dicts: Telnyx::Resources::PronunciationDicts
|
|
344
|
+
|
|
343
345
|
private def auth_headers: -> ::Hash[String, String]
|
|
344
346
|
|
|
345
347
|
private def bearer_auth: -> ::Hash[String, String]
|
|
@@ -45,8 +45,12 @@ module Telnyx
|
|
|
45
45
|
-> top?
|
|
46
46
|
} -> top?
|
|
47
47
|
|
|
48
|
+
RFC_3986_NOT_PCHARS: Regexp
|
|
49
|
+
|
|
48
50
|
def self?.uri_origin: (URI::Generic uri) -> String
|
|
49
51
|
|
|
52
|
+
def self?.encode_path: (String | Integer path) -> String
|
|
53
|
+
|
|
50
54
|
def self?.interpolate_path: (String | ::Array[String] path) -> String
|
|
51
55
|
|
|
52
56
|
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
|