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
|
@@ -222,8 +222,9 @@ module Telnyx
|
|
|
222
222
|
attr_writer :from
|
|
223
223
|
|
|
224
224
|
# The media_name used for the fax's media. Must point to a file previously
|
|
225
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
226
|
-
#
|
|
225
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
226
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
227
|
+
# media_url/contents can't be submitted together.
|
|
227
228
|
sig { returns(T.nilable(String)) }
|
|
228
229
|
attr_reader :media_name
|
|
229
230
|
|
|
@@ -297,8 +298,9 @@ module Telnyx
|
|
|
297
298
|
# The phone number, in E.164 format, the fax will be sent from.
|
|
298
299
|
from: nil,
|
|
299
300
|
# The media_name used for the fax's media. Must point to a file previously
|
|
300
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
301
|
-
#
|
|
301
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
302
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
303
|
+
# media_url/contents can't be submitted together.
|
|
302
304
|
media_name: nil,
|
|
303
305
|
# The original URL to the PDF used for the fax's media. If media_name was
|
|
304
306
|
# supplied, this is omitted
|
|
@@ -201,8 +201,9 @@ module Telnyx
|
|
|
201
201
|
attr_writer :from
|
|
202
202
|
|
|
203
203
|
# The media_name used for the fax's media. Must point to a file previously
|
|
204
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
205
|
-
#
|
|
204
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
205
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
206
|
+
# media_url/contents can't be submitted together.
|
|
206
207
|
sig { returns(T.nilable(String)) }
|
|
207
208
|
attr_reader :media_name
|
|
208
209
|
|
|
@@ -272,8 +273,9 @@ module Telnyx
|
|
|
272
273
|
# The phone number, in E.164 format, the fax will be sent from.
|
|
273
274
|
from: nil,
|
|
274
275
|
# The media_name used for the fax's media. Must point to a file previously
|
|
275
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
276
|
-
#
|
|
276
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
277
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
278
|
+
# media_url/contents can't be submitted together.
|
|
277
279
|
media_name: nil,
|
|
278
280
|
# The original URL to the PDF used for the fax's media. If media_name was
|
|
279
281
|
# supplied, this is omitted
|
|
@@ -222,8 +222,9 @@ module Telnyx
|
|
|
222
222
|
attr_writer :from
|
|
223
223
|
|
|
224
224
|
# The media_name used for the fax's media. Must point to a file previously
|
|
225
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
226
|
-
#
|
|
225
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
226
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
227
|
+
# media_url/contents can't be submitted together.
|
|
227
228
|
sig { returns(T.nilable(String)) }
|
|
228
229
|
attr_reader :media_name
|
|
229
230
|
|
|
@@ -297,8 +298,9 @@ module Telnyx
|
|
|
297
298
|
# The phone number, in E.164 format, the fax will be sent from.
|
|
298
299
|
from: nil,
|
|
299
300
|
# The media_name used for the fax's media. Must point to a file previously
|
|
300
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
301
|
-
#
|
|
301
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
302
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
303
|
+
# media_url/contents can't be submitted together.
|
|
302
304
|
media_name: nil,
|
|
303
305
|
# The original URL to the PDF used for the fax's media. If media_name was
|
|
304
306
|
# supplied, this is omitted
|
|
@@ -226,7 +226,9 @@ module Telnyx
|
|
|
226
226
|
sig { params(deepfake_detection_callback_url: String).void }
|
|
227
227
|
attr_writer :deepfake_detection_callback_url
|
|
228
228
|
|
|
229
|
-
# Allows you to
|
|
229
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
230
|
+
# detections. See
|
|
231
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
230
232
|
sig do
|
|
231
233
|
returns(
|
|
232
234
|
T.nilable(
|
|
@@ -278,6 +280,14 @@ module Telnyx
|
|
|
278
280
|
end
|
|
279
281
|
attr_writer :machine_detection
|
|
280
282
|
|
|
283
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
284
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
285
|
+
sig { returns(T.nilable(Integer)) }
|
|
286
|
+
attr_reader :machine_detection_prompt_end_timeout
|
|
287
|
+
|
|
288
|
+
sig { params(machine_detection_prompt_end_timeout: Integer).void }
|
|
289
|
+
attr_writer :machine_detection_prompt_end_timeout
|
|
290
|
+
|
|
281
291
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
282
292
|
# Ignored when `premium` detection is used.
|
|
283
293
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -630,6 +640,7 @@ module Telnyx
|
|
|
630
640
|
from: String,
|
|
631
641
|
machine_detection:
|
|
632
642
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithURL::MachineDetection::OrSymbol,
|
|
643
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
633
644
|
machine_detection_silence_timeout: Integer,
|
|
634
645
|
machine_detection_speech_end_threshold: Integer,
|
|
635
646
|
machine_detection_speech_threshold: Integer,
|
|
@@ -705,7 +716,9 @@ module Telnyx
|
|
|
705
716
|
# URL destination for Telnyx to send deepfake detection callback events to for the
|
|
706
717
|
# call.
|
|
707
718
|
deepfake_detection_callback_url: nil,
|
|
708
|
-
# Allows you to
|
|
719
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
720
|
+
# detections. See
|
|
721
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
709
722
|
detection_mode: nil,
|
|
710
723
|
# A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
711
724
|
# `Url` is not responding.
|
|
@@ -715,6 +728,9 @@ module Telnyx
|
|
|
715
728
|
from: nil,
|
|
716
729
|
# Enables Answering Machine Detection.
|
|
717
730
|
machine_detection: nil,
|
|
731
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
732
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
733
|
+
machine_detection_prompt_end_timeout: nil,
|
|
718
734
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
719
735
|
# Ignored when `premium` detection is used.
|
|
720
736
|
machine_detection_silence_timeout: nil,
|
|
@@ -822,6 +838,7 @@ module Telnyx
|
|
|
822
838
|
from: String,
|
|
823
839
|
machine_detection:
|
|
824
840
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithURL::MachineDetection::OrSymbol,
|
|
841
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
825
842
|
machine_detection_silence_timeout: Integer,
|
|
826
843
|
machine_detection_speech_end_threshold: Integer,
|
|
827
844
|
machine_detection_speech_threshold: Integer,
|
|
@@ -1002,7 +1019,9 @@ module Telnyx
|
|
|
1002
1019
|
end
|
|
1003
1020
|
end
|
|
1004
1021
|
|
|
1005
|
-
# Allows you to
|
|
1022
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
1023
|
+
# detections. See
|
|
1024
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
1006
1025
|
module DetectionMode
|
|
1007
1026
|
extend Telnyx::Internal::Type::Enum
|
|
1008
1027
|
|
|
@@ -1025,6 +1044,11 @@ module Telnyx
|
|
|
1025
1044
|
:Regular,
|
|
1026
1045
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithURL::DetectionMode::TaggedSymbol
|
|
1027
1046
|
)
|
|
1047
|
+
PREMIUM_CALL_SCREENING =
|
|
1048
|
+
T.let(
|
|
1049
|
+
:PremiumCallScreening,
|
|
1050
|
+
Telnyx::Texml::Accounts::CallCallsParams::Params::WithURL::DetectionMode::TaggedSymbol
|
|
1051
|
+
)
|
|
1028
1052
|
|
|
1029
1053
|
sig do
|
|
1030
1054
|
override.returns(
|
|
@@ -1629,7 +1653,9 @@ module Telnyx
|
|
|
1629
1653
|
sig { params(deepfake_detection_callback_url: String).void }
|
|
1630
1654
|
attr_writer :deepfake_detection_callback_url
|
|
1631
1655
|
|
|
1632
|
-
# Allows you to
|
|
1656
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
1657
|
+
# detections. See
|
|
1658
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
1633
1659
|
sig do
|
|
1634
1660
|
returns(
|
|
1635
1661
|
T.nilable(
|
|
@@ -1681,6 +1707,14 @@ module Telnyx
|
|
|
1681
1707
|
end
|
|
1682
1708
|
attr_writer :machine_detection
|
|
1683
1709
|
|
|
1710
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
1711
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
1712
|
+
sig { returns(T.nilable(Integer)) }
|
|
1713
|
+
attr_reader :machine_detection_prompt_end_timeout
|
|
1714
|
+
|
|
1715
|
+
sig { params(machine_detection_prompt_end_timeout: Integer).void }
|
|
1716
|
+
attr_writer :machine_detection_prompt_end_timeout
|
|
1717
|
+
|
|
1684
1718
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
1685
1719
|
# Ignored when `premium` detection is used.
|
|
1686
1720
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -2033,6 +2067,7 @@ module Telnyx
|
|
|
2033
2067
|
from: String,
|
|
2034
2068
|
machine_detection:
|
|
2035
2069
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithTeXml::MachineDetection::OrSymbol,
|
|
2070
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
2036
2071
|
machine_detection_silence_timeout: Integer,
|
|
2037
2072
|
machine_detection_speech_end_threshold: Integer,
|
|
2038
2073
|
machine_detection_speech_threshold: Integer,
|
|
@@ -2109,7 +2144,9 @@ module Telnyx
|
|
|
2109
2144
|
# URL destination for Telnyx to send deepfake detection callback events to for the
|
|
2110
2145
|
# call.
|
|
2111
2146
|
deepfake_detection_callback_url: nil,
|
|
2112
|
-
# Allows you to
|
|
2147
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
2148
|
+
# detections. See
|
|
2149
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
2113
2150
|
detection_mode: nil,
|
|
2114
2151
|
# A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
2115
2152
|
# `Url` is not responding.
|
|
@@ -2119,6 +2156,9 @@ module Telnyx
|
|
|
2119
2156
|
from: nil,
|
|
2120
2157
|
# Enables Answering Machine Detection.
|
|
2121
2158
|
machine_detection: nil,
|
|
2159
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
2160
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
2161
|
+
machine_detection_prompt_end_timeout: nil,
|
|
2122
2162
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
2123
2163
|
# Ignored when `premium` detection is used.
|
|
2124
2164
|
machine_detection_silence_timeout: nil,
|
|
@@ -2226,6 +2266,7 @@ module Telnyx
|
|
|
2226
2266
|
from: String,
|
|
2227
2267
|
machine_detection:
|
|
2228
2268
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithTeXml::MachineDetection::OrSymbol,
|
|
2269
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
2229
2270
|
machine_detection_silence_timeout: Integer,
|
|
2230
2271
|
machine_detection_speech_end_threshold: Integer,
|
|
2231
2272
|
machine_detection_speech_threshold: Integer,
|
|
@@ -2406,7 +2447,9 @@ module Telnyx
|
|
|
2406
2447
|
end
|
|
2407
2448
|
end
|
|
2408
2449
|
|
|
2409
|
-
# Allows you to
|
|
2450
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
2451
|
+
# detections. See
|
|
2452
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
2410
2453
|
module DetectionMode
|
|
2411
2454
|
extend Telnyx::Internal::Type::Enum
|
|
2412
2455
|
|
|
@@ -2429,6 +2472,11 @@ module Telnyx
|
|
|
2429
2472
|
:Regular,
|
|
2430
2473
|
Telnyx::Texml::Accounts::CallCallsParams::Params::WithTeXml::DetectionMode::TaggedSymbol
|
|
2431
2474
|
)
|
|
2475
|
+
PREMIUM_CALL_SCREENING =
|
|
2476
|
+
T.let(
|
|
2477
|
+
:PremiumCallScreening,
|
|
2478
|
+
Telnyx::Texml::Accounts::CallCallsParams::Params::WithTeXml::DetectionMode::TaggedSymbol
|
|
2479
|
+
)
|
|
2432
2480
|
|
|
2433
2481
|
sig do
|
|
2434
2482
|
override.returns(
|
|
@@ -3028,7 +3076,9 @@ module Telnyx
|
|
|
3028
3076
|
sig { params(deepfake_detection_callback_url: String).void }
|
|
3029
3077
|
attr_writer :deepfake_detection_callback_url
|
|
3030
3078
|
|
|
3031
|
-
# Allows you to
|
|
3079
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
3080
|
+
# detections. See
|
|
3081
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
3032
3082
|
sig do
|
|
3033
3083
|
returns(
|
|
3034
3084
|
T.nilable(
|
|
@@ -3080,6 +3130,14 @@ module Telnyx
|
|
|
3080
3130
|
end
|
|
3081
3131
|
attr_writer :machine_detection
|
|
3082
3132
|
|
|
3133
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
3134
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
3135
|
+
sig { returns(T.nilable(Integer)) }
|
|
3136
|
+
attr_reader :machine_detection_prompt_end_timeout
|
|
3137
|
+
|
|
3138
|
+
sig { params(machine_detection_prompt_end_timeout: Integer).void }
|
|
3139
|
+
attr_writer :machine_detection_prompt_end_timeout
|
|
3140
|
+
|
|
3083
3141
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
3084
3142
|
# Ignored when `premium` detection is used.
|
|
3085
3143
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -3434,6 +3492,7 @@ module Telnyx
|
|
|
3434
3492
|
from: String,
|
|
3435
3493
|
machine_detection:
|
|
3436
3494
|
Telnyx::Texml::Accounts::CallCallsParams::Params::ApplicationDefault::MachineDetection::OrSymbol,
|
|
3495
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
3437
3496
|
machine_detection_silence_timeout: Integer,
|
|
3438
3497
|
machine_detection_speech_end_threshold: Integer,
|
|
3439
3498
|
machine_detection_speech_threshold: Integer,
|
|
@@ -3508,7 +3567,9 @@ module Telnyx
|
|
|
3508
3567
|
# URL destination for Telnyx to send deepfake detection callback events to for the
|
|
3509
3568
|
# call.
|
|
3510
3569
|
deepfake_detection_callback_url: nil,
|
|
3511
|
-
# Allows you to
|
|
3570
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
3571
|
+
# detections. See
|
|
3572
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
3512
3573
|
detection_mode: nil,
|
|
3513
3574
|
# A failover URL for which Telnyx will retrieve the TeXML call instructions if the
|
|
3514
3575
|
# `Url` is not responding.
|
|
@@ -3518,6 +3579,9 @@ module Telnyx
|
|
|
3518
3579
|
from: nil,
|
|
3519
3580
|
# Enables Answering Machine Detection.
|
|
3520
3581
|
machine_detection: nil,
|
|
3582
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
3583
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
3584
|
+
machine_detection_prompt_end_timeout: nil,
|
|
3521
3585
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
3522
3586
|
# Ignored when `premium` detection is used.
|
|
3523
3587
|
machine_detection_silence_timeout: nil,
|
|
@@ -3625,6 +3689,7 @@ module Telnyx
|
|
|
3625
3689
|
from: String,
|
|
3626
3690
|
machine_detection:
|
|
3627
3691
|
Telnyx::Texml::Accounts::CallCallsParams::Params::ApplicationDefault::MachineDetection::OrSymbol,
|
|
3692
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
3628
3693
|
machine_detection_silence_timeout: Integer,
|
|
3629
3694
|
machine_detection_speech_end_threshold: Integer,
|
|
3630
3695
|
machine_detection_speech_threshold: Integer,
|
|
@@ -3806,7 +3871,9 @@ module Telnyx
|
|
|
3806
3871
|
end
|
|
3807
3872
|
end
|
|
3808
3873
|
|
|
3809
|
-
# Allows you to
|
|
3874
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
3875
|
+
# detections. See
|
|
3876
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
3810
3877
|
module DetectionMode
|
|
3811
3878
|
extend Telnyx::Internal::Type::Enum
|
|
3812
3879
|
|
|
@@ -3829,6 +3896,11 @@ module Telnyx
|
|
|
3829
3896
|
:Regular,
|
|
3830
3897
|
Telnyx::Texml::Accounts::CallCallsParams::Params::ApplicationDefault::DetectionMode::TaggedSymbol
|
|
3831
3898
|
)
|
|
3899
|
+
PREMIUM_CALL_SCREENING =
|
|
3900
|
+
T.let(
|
|
3901
|
+
:PremiumCallScreening,
|
|
3902
|
+
Telnyx::Texml::Accounts::CallCallsParams::Params::ApplicationDefault::DetectionMode::TaggedSymbol
|
|
3903
|
+
)
|
|
3832
3904
|
|
|
3833
3905
|
sig do
|
|
3834
3906
|
override.returns(
|
|
@@ -138,7 +138,9 @@ module Telnyx
|
|
|
138
138
|
end
|
|
139
139
|
attr_writer :custom_headers
|
|
140
140
|
|
|
141
|
-
# Allows you to choose between Premium and
|
|
141
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
142
|
+
# detections. See
|
|
143
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
142
144
|
sig do
|
|
143
145
|
returns(
|
|
144
146
|
T.nilable(Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol)
|
|
@@ -172,6 +174,14 @@ module Telnyx
|
|
|
172
174
|
end
|
|
173
175
|
attr_writer :machine_detection
|
|
174
176
|
|
|
177
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
178
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
179
|
+
sig { returns(T.nilable(Integer)) }
|
|
180
|
+
attr_reader :machine_detection_prompt_end_timeout
|
|
181
|
+
|
|
182
|
+
sig { params(machine_detection_prompt_end_timeout: Integer).void }
|
|
183
|
+
attr_writer :machine_detection_prompt_end_timeout
|
|
184
|
+
|
|
175
185
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
176
186
|
# Ignored when `premium` detection is used.
|
|
177
187
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -438,6 +448,7 @@ module Telnyx
|
|
|
438
448
|
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
439
449
|
machine_detection:
|
|
440
450
|
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
451
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
441
452
|
machine_detection_silence_timeout: Integer,
|
|
442
453
|
machine_detection_speech_end_threshold: Integer,
|
|
443
454
|
machine_detection_speech_threshold: Integer,
|
|
@@ -506,10 +517,15 @@ module Telnyx
|
|
|
506
517
|
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
507
518
|
# with 'name' and 'value' properties.
|
|
508
519
|
custom_headers: nil,
|
|
509
|
-
# Allows you to choose between Premium and
|
|
520
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
521
|
+
# detections. See
|
|
522
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
510
523
|
detection_mode: nil,
|
|
511
524
|
# Enables Answering Machine Detection.
|
|
512
525
|
machine_detection: nil,
|
|
526
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
527
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
528
|
+
machine_detection_prompt_end_timeout: nil,
|
|
513
529
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
514
530
|
# Ignored when `premium` detection is used.
|
|
515
531
|
machine_detection_silence_timeout: nil,
|
|
@@ -607,6 +623,7 @@ module Telnyx
|
|
|
607
623
|
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
608
624
|
machine_detection:
|
|
609
625
|
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
626
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
610
627
|
machine_detection_silence_timeout: Integer,
|
|
611
628
|
machine_detection_speech_end_threshold: Integer,
|
|
612
629
|
machine_detection_speech_threshold: Integer,
|
|
@@ -743,7 +760,9 @@ module Telnyx
|
|
|
743
760
|
end
|
|
744
761
|
end
|
|
745
762
|
|
|
746
|
-
# Allows you to choose between Premium and
|
|
763
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
764
|
+
# detections. See
|
|
765
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
747
766
|
module DetectionMode
|
|
748
767
|
extend Telnyx::Internal::Type::Enum
|
|
749
768
|
|
|
@@ -763,6 +782,11 @@ module Telnyx
|
|
|
763
782
|
:Regular,
|
|
764
783
|
Telnyx::TexmlInitiateAICallParams::DetectionMode::TaggedSymbol
|
|
765
784
|
)
|
|
785
|
+
PREMIUM_CALL_SCREENING =
|
|
786
|
+
T.let(
|
|
787
|
+
:PremiumCallScreening,
|
|
788
|
+
Telnyx::TexmlInitiateAICallParams::DetectionMode::TaggedSymbol
|
|
789
|
+
)
|
|
766
790
|
|
|
767
791
|
sig do
|
|
768
792
|
override.returns(
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -54,11 +54,11 @@ module Telnyx
|
|
|
54
54
|
# Conversation ID to leverage persistent conversations.
|
|
55
55
|
sig do
|
|
56
56
|
params(
|
|
57
|
-
|
|
57
|
+
params: T::Hash[Symbol, T.anything],
|
|
58
58
|
request_options: Telnyx::RequestOptions::OrHash
|
|
59
59
|
).returns(T::Hash[Symbol, T.anything])
|
|
60
60
|
end
|
|
61
|
-
def create_response(
|
|
61
|
+
def create_response(params:, request_options: {})
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
@@ -1270,6 +1270,129 @@ module Telnyx
|
|
|
1270
1270
|
)
|
|
1271
1271
|
end
|
|
1272
1272
|
|
|
1273
|
+
# Start a Conversation Relay session on an active call. Conversation Relay
|
|
1274
|
+
# connects the call audio to your WebSocket so your application can exchange
|
|
1275
|
+
# realtime messages with the caller while Telnyx handles speech recognition and
|
|
1276
|
+
# text-to-speech. Only one AI Assistant or Conversation Relay session can be
|
|
1277
|
+
# active on a call at a time.
|
|
1278
|
+
#
|
|
1279
|
+
# **Expected Webhooks:**
|
|
1280
|
+
#
|
|
1281
|
+
# - `call.conversation.ended` - Sent when the Conversation Relay session ends. If
|
|
1282
|
+
# the customer WebSocket disconnects, the webhook payload `reason` is
|
|
1283
|
+
# `customer_disconnect`.
|
|
1284
|
+
sig do
|
|
1285
|
+
params(
|
|
1286
|
+
call_control_id: String,
|
|
1287
|
+
assistant:
|
|
1288
|
+
Telnyx::Calls::ActionStartConversationRelayParams::Assistant::OrHash,
|
|
1289
|
+
client_state: String,
|
|
1290
|
+
command_id: String,
|
|
1291
|
+
conversation_relay_dtmf_detection: T::Boolean,
|
|
1292
|
+
conversation_relay_settings:
|
|
1293
|
+
Telnyx::Calls::ActionStartConversationRelayParams::ConversationRelaySettings::OrHash,
|
|
1294
|
+
conversation_relay_url: String,
|
|
1295
|
+
greeting: String,
|
|
1296
|
+
interruption_settings:
|
|
1297
|
+
Telnyx::Calls::ActionStartConversationRelayParams::InterruptionSettings::OrHash,
|
|
1298
|
+
language: String,
|
|
1299
|
+
languages:
|
|
1300
|
+
T::Array[
|
|
1301
|
+
Telnyx::Calls::ActionStartConversationRelayParams::Language::OrHash
|
|
1302
|
+
],
|
|
1303
|
+
transcription:
|
|
1304
|
+
Telnyx::Calls::ActionStartConversationRelayParams::Transcription::OrHash,
|
|
1305
|
+
transcription_language: String,
|
|
1306
|
+
tts_language: String,
|
|
1307
|
+
voice: String,
|
|
1308
|
+
voice_settings:
|
|
1309
|
+
T.any(
|
|
1310
|
+
Telnyx::Calls::ElevenLabsVoiceSettings::OrHash,
|
|
1311
|
+
Telnyx::Calls::TelnyxVoiceSettings::OrHash,
|
|
1312
|
+
Telnyx::Calls::AwsVoiceSettings::OrHash,
|
|
1313
|
+
Telnyx::AzureVoiceSettings::OrHash,
|
|
1314
|
+
Telnyx::RimeVoiceSettings::OrHash,
|
|
1315
|
+
Telnyx::ResembleVoiceSettings::OrHash,
|
|
1316
|
+
Telnyx::XaiVoiceSettings::OrHash
|
|
1317
|
+
),
|
|
1318
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
1319
|
+
).returns(Telnyx::Models::Calls::ActionStartConversationRelayResponse)
|
|
1320
|
+
end
|
|
1321
|
+
def start_conversation_relay(
|
|
1322
|
+
# Unique identifier and token for controlling the call
|
|
1323
|
+
call_control_id,
|
|
1324
|
+
# Custom parameters for the Conversation Relay session. Pass key-value data as
|
|
1325
|
+
# `assistant.dynamic_variables` to make it available to the relay session.
|
|
1326
|
+
assistant: nil,
|
|
1327
|
+
# Use this field to add state to subsequent webhooks. It must be a valid Base-64
|
|
1328
|
+
# encoded string.
|
|
1329
|
+
client_state: nil,
|
|
1330
|
+
# Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
1331
|
+
# the same `command_id` for the same `call_control_id`.
|
|
1332
|
+
command_id: nil,
|
|
1333
|
+
# Enable DTMF detection for the relay session.
|
|
1334
|
+
conversation_relay_dtmf_detection: nil,
|
|
1335
|
+
# Conversation Relay connection settings. This object is used by TeXML Call
|
|
1336
|
+
# Scripting's `<ConversationRelay>` verb. The `interruptible` and
|
|
1337
|
+
# `interruptible_greeting` fields are shorthand for
|
|
1338
|
+
# `interruption_settings.interruptible` and
|
|
1339
|
+
# `interruption_settings.interruptible_greeting`; use top-level
|
|
1340
|
+
# `interruption_settings` for the full interruption settings shape.
|
|
1341
|
+
conversation_relay_settings: nil,
|
|
1342
|
+
# WebSocket URL for your Conversation Relay server. Must start with `ws://` or
|
|
1343
|
+
# `wss://`.
|
|
1344
|
+
conversation_relay_url: nil,
|
|
1345
|
+
# Text played when the relay session starts.
|
|
1346
|
+
greeting: nil,
|
|
1347
|
+
# Settings for handling caller interruptions during Conversation Relay speech.
|
|
1348
|
+
interruption_settings: nil,
|
|
1349
|
+
# Default language for the relay session. This value is used for both
|
|
1350
|
+
# text-to-speech and speech recognition unless `tts_language` or
|
|
1351
|
+
# `transcription_language` are provided.
|
|
1352
|
+
language: nil,
|
|
1353
|
+
# Language-specific TTS and transcription settings. Use this when the relay
|
|
1354
|
+
# session needs per-language provider, voice, or speech model configuration.
|
|
1355
|
+
languages: nil,
|
|
1356
|
+
# Speech-to-text settings for Conversation Relay.
|
|
1357
|
+
transcription: nil,
|
|
1358
|
+
# Language to use for speech recognition. Overrides `language` for transcription
|
|
1359
|
+
# when provided.
|
|
1360
|
+
transcription_language: nil,
|
|
1361
|
+
# Language to use for text-to-speech. Overrides `language` for TTS when provided.
|
|
1362
|
+
tts_language: nil,
|
|
1363
|
+
# The voice to be used by the voice assistant. Currently we support ElevenLabs,
|
|
1364
|
+
# Telnyx and AWS voices.
|
|
1365
|
+
#
|
|
1366
|
+
# **Supported Providers:**
|
|
1367
|
+
#
|
|
1368
|
+
# - **AWS:** Use `AWS.Polly.<VoiceId>` (e.g., `AWS.Polly.Joanna`). For neural
|
|
1369
|
+
# voices, which provide more realistic, human-like speech, append `-Neural` to
|
|
1370
|
+
# the `VoiceId` (e.g., `AWS.Polly.Joanna-Neural`). Check the
|
|
1371
|
+
# [available voices](https://docs.aws.amazon.com/polly/latest/dg/available-voices.html)
|
|
1372
|
+
# for compatibility.
|
|
1373
|
+
# - **Azure:** Use `Azure.<VoiceId>. (e.g. Azure.en-CA-ClaraNeural,
|
|
1374
|
+
# Azure.en-CA-LiamNeural, Azure.en-US-BrianMultilingualNeural,
|
|
1375
|
+
# Azure.en-US-Ava:DragonHDLatestNeural. For a complete list of voices, go to
|
|
1376
|
+
# [Azure Voice Gallery](https://speech.microsoft.com/portal/voicegallery).)
|
|
1377
|
+
# - **ElevenLabs:** Use `ElevenLabs.<ModelId>.<VoiceId>` (e.g.,
|
|
1378
|
+
# `ElevenLabs.BaseModel.John`). The `ModelId` part is optional. To use
|
|
1379
|
+
# ElevenLabs, you must provide your ElevenLabs API key as an integration secret
|
|
1380
|
+
# under `"voice_settings": {"api_key_ref": "<secret_id>"}`. See
|
|
1381
|
+
# [integration secrets documentation](https://developers.telnyx.com/api/secrets-manager/integration-secrets/create-integration-secret)
|
|
1382
|
+
# for details. Check
|
|
1383
|
+
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1384
|
+
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
|
|
1385
|
+
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1386
|
+
# `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
|
|
1387
|
+
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1388
|
+
# `ara`, `rex`, `sal`, `leo`.
|
|
1389
|
+
voice: nil,
|
|
1390
|
+
# The settings associated with the voice selected
|
|
1391
|
+
voice_settings: nil,
|
|
1392
|
+
request_options: {}
|
|
1393
|
+
)
|
|
1394
|
+
end
|
|
1395
|
+
|
|
1273
1396
|
# Call forking allows you to stream the media from a call to a specific target in
|
|
1274
1397
|
# realtime. This stream can be used to enable realtime audio analysis to support a
|
|
1275
1398
|
# variety of use cases, including fraud detection, or the creation of AI-generated
|
|
@@ -1664,6 +1787,7 @@ module Telnyx
|
|
|
1664
1787
|
Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
|
|
1665
1788
|
Telnyx::Calls::TranscriptionEngineXaiConfig::OrHash,
|
|
1666
1789
|
Telnyx::Calls::TranscriptionEngineAssemblyaiConfig::OrHash,
|
|
1790
|
+
Telnyx::Calls::TranscriptionEngineSpeechmaticsConfig::OrHash,
|
|
1667
1791
|
Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
|
|
1668
1792
|
Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
|
|
1669
1793
|
Telnyx::Calls::DeepgramNova2Config::OrHash,
|
|
@@ -1716,6 +1840,28 @@ module Telnyx
|
|
|
1716
1840
|
)
|
|
1717
1841
|
end
|
|
1718
1842
|
|
|
1843
|
+
# Stop the active Conversation Relay session on a call.
|
|
1844
|
+
sig do
|
|
1845
|
+
params(
|
|
1846
|
+
call_control_id: String,
|
|
1847
|
+
client_state: String,
|
|
1848
|
+
command_id: String,
|
|
1849
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
1850
|
+
).returns(Telnyx::Models::Calls::ActionStopConversationRelayResponse)
|
|
1851
|
+
end
|
|
1852
|
+
def stop_conversation_relay(
|
|
1853
|
+
# Unique identifier and token for controlling the call
|
|
1854
|
+
call_control_id,
|
|
1855
|
+
# Use this field to add state to subsequent webhooks. It must be a valid Base-64
|
|
1856
|
+
# encoded string.
|
|
1857
|
+
client_state: nil,
|
|
1858
|
+
# Use this field to avoid duplicate commands. Telnyx will ignore any command with
|
|
1859
|
+
# the same `command_id` for the same `call_control_id`.
|
|
1860
|
+
command_id: nil,
|
|
1861
|
+
request_options: {}
|
|
1862
|
+
)
|
|
1863
|
+
end
|
|
1864
|
+
|
|
1719
1865
|
# Stop forking a call.
|
|
1720
1866
|
#
|
|
1721
1867
|
# **Expected Webhooks:**
|
|
@@ -12,6 +12,18 @@ module Telnyx
|
|
|
12
12
|
# is bigger than 50MB or has more than 350 pages it will fail with
|
|
13
13
|
# `file_size_limit_exceeded` and `page_count_limit_exceeded` respectively.
|
|
14
14
|
#
|
|
15
|
+
# **Supported file formats:**
|
|
16
|
+
#
|
|
17
|
+
# - PDF (`application/pdf`)
|
|
18
|
+
# - TIFF (`application/tiff`, `image/tiff`)
|
|
19
|
+
# - JPEG (`image/jpeg`)
|
|
20
|
+
# - PNG (`image/png`)
|
|
21
|
+
# - Microsoft Word `.doc` (`application/msword`)
|
|
22
|
+
# - Microsoft Word `.docx`
|
|
23
|
+
# (`application/vnd.openxmlformats-officedocument.wordprocessingml.document`)
|
|
24
|
+
# - Rich Text Format `.rtf` (`application/rtf`)
|
|
25
|
+
# - Plain text `.txt` (`text/plain`)
|
|
26
|
+
#
|
|
15
27
|
# **Expected Webhooks:**
|
|
16
28
|
#
|
|
17
29
|
# - `fax.queued`
|
|
@@ -59,11 +71,13 @@ module Telnyx
|
|
|
59
71
|
# number in the `from` field.
|
|
60
72
|
from_display_name: nil,
|
|
61
73
|
# The media_name used for the fax's media. Must point to a file previously
|
|
62
|
-
# uploaded to api.telnyx.com/v2/media by the same user/organization.
|
|
63
|
-
#
|
|
74
|
+
# uploaded to api.telnyx.com/v2/media by the same user/organization. Supported
|
|
75
|
+
# formats: PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, and TXT. media_name and
|
|
76
|
+
# media_url/contents can't be submitted together.
|
|
64
77
|
media_name: nil,
|
|
65
|
-
# The URL (or list of URLs) to the
|
|
66
|
-
# media_name/contents can't be
|
|
78
|
+
# The URL (or list of URLs) to the fax document. Supported formats: PDF, TIFF,
|
|
79
|
+
# JPEG, PNG, DOC, DOCX, RTF, and TXT. media_url and media_name/contents can't be
|
|
80
|
+
# submitted together.
|
|
67
81
|
media_url: nil,
|
|
68
82
|
# The flag to enable monochrome, true black and white fax results.
|
|
69
83
|
monochrome: nil,
|
|
@@ -46,6 +46,7 @@ module Telnyx
|
|
|
46
46
|
Telnyx::TexmlInitiateAICallParams::DetectionMode::OrSymbol,
|
|
47
47
|
machine_detection:
|
|
48
48
|
Telnyx::TexmlInitiateAICallParams::MachineDetection::OrSymbol,
|
|
49
|
+
machine_detection_prompt_end_timeout: Integer,
|
|
49
50
|
machine_detection_silence_timeout: Integer,
|
|
50
51
|
machine_detection_speech_end_threshold: Integer,
|
|
51
52
|
machine_detection_speech_threshold: Integer,
|
|
@@ -115,10 +116,15 @@ module Telnyx
|
|
|
115
116
|
# Custom HTTP headers to be sent with the call. Each header should be an object
|
|
116
117
|
# with 'name' and 'value' properties.
|
|
117
118
|
custom_headers: nil,
|
|
118
|
-
# Allows you to choose between Premium and
|
|
119
|
+
# Allows you to choose between Regular, Premium, and PremiumCallScreening
|
|
120
|
+
# detections. See
|
|
121
|
+
# https://developers.telnyx.com/docs/voice/programmable-voice/answering-machine-detection
|
|
119
122
|
detection_mode: nil,
|
|
120
123
|
# Enables Answering Machine Detection.
|
|
121
124
|
machine_detection: nil,
|
|
125
|
+
# Silence duration threshold after a call screening prompt before ending prompt
|
|
126
|
+
# detection, in milliseconds. Used when `DetectionMode` is `PremiumCallScreening`.
|
|
127
|
+
machine_detection_prompt_end_timeout: nil,
|
|
122
128
|
# If initial silence duration is greater than this value, consider it a machine.
|
|
123
129
|
# Ignored when `premium` detection is used.
|
|
124
130
|
machine_detection_silence_timeout: nil,
|