telnyx 5.99.0 → 5.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +5 -0
  5. data/lib/telnyx/models/ai/assistants/canary_deploy.rb +128 -7
  6. data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +131 -7
  7. data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
  8. data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
  9. data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
  10. data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
  11. data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
  12. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  13. data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
  14. data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
  15. data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
  16. data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
  17. data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
  18. data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
  19. data/lib/telnyx/models.rb +12 -0
  20. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
  21. data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
  22. data/lib/telnyx/resources/uac_connections.rb +256 -0
  23. data/lib/telnyx/version.rb +1 -1
  24. data/lib/telnyx.rb +14 -1
  25. data/rbi/telnyx/client.rbi +4 -0
  26. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
  27. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
  28. data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
  29. data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
  30. data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
  31. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
  32. data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
  33. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  34. data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
  35. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
  36. data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
  37. data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
  38. data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
  39. data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
  40. data/rbi/telnyx/models.rbi +12 -0
  41. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
  42. data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
  43. data/rbi/telnyx/resources/uac_connections.rbi +348 -0
  44. data/sig/telnyx/client.rbs +2 -0
  45. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
  46. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
  47. data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
  48. data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
  49. data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
  50. data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
  51. data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
  52. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  53. data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
  54. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
  55. data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
  56. data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
  57. data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
  58. data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
  59. data/sig/telnyx/models.rbs +12 -0
  60. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  61. data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
  62. data/sig/telnyx/resources/uac_connections.rbs +90 -0
  63. metadata +44 -5
  64. data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
  65. data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
  66. data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
@@ -0,0 +1,1465 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class UacConnectionCreateParams < Telnyx::Internal::Type::BaseModel
6
+ extend Telnyx::Internal::Type::RequestParameters::Converter
7
+ include Telnyx::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Telnyx::UacConnectionCreateParams, Telnyx::Internal::AnyHash)
12
+ end
13
+
14
+ # A user-assigned name to help manage the connection.
15
+ sig { returns(String) }
16
+ attr_accessor :connection_name
17
+
18
+ # Defaults to true
19
+ sig { returns(T.nilable(T::Boolean)) }
20
+ attr_reader :active
21
+
22
+ sig { params(active: T::Boolean).void }
23
+ attr_writer :active
24
+
25
+ # `Latency` directs Telnyx to route media through the site with the lowest
26
+ # round-trip time to the user's connection. Telnyx calculates this time using ICMP
27
+ # ping messages. This can be disabled by specifying a site to handle all media.
28
+ sig { returns(T.nilable(Telnyx::AnchorsiteOverride::OrSymbol)) }
29
+ attr_reader :anchorsite_override
30
+
31
+ sig do
32
+ params(anchorsite_override: Telnyx::AnchorsiteOverride::OrSymbol).void
33
+ end
34
+ attr_writer :anchorsite_override
35
+
36
+ # The uuid of the push credential for Android
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :android_push_credential_id
39
+
40
+ # Specifies if call cost webhooks should be sent for this connection.
41
+ sig { returns(T.nilable(T::Boolean)) }
42
+ attr_reader :call_cost_in_webhooks
43
+
44
+ sig { params(call_cost_in_webhooks: T::Boolean).void }
45
+ attr_writer :call_cost_in_webhooks
46
+
47
+ # When enabled, Telnyx will generate comfort noise when you place the call on
48
+ # hold. If disabled, you will need to generate comfort noise or on hold music to
49
+ # avoid RTP timeout.
50
+ sig { returns(T.nilable(T::Boolean)) }
51
+ attr_reader :default_on_hold_comfort_noise_enabled
52
+
53
+ sig { params(default_on_hold_comfort_noise_enabled: T::Boolean).void }
54
+ attr_writer :default_on_hold_comfort_noise_enabled
55
+
56
+ # Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
57
+ # digits sent to Telnyx will be accepted in all formats.
58
+ sig { returns(T.nilable(Telnyx::DtmfType::OrSymbol)) }
59
+ attr_reader :dtmf_type
60
+
61
+ sig { params(dtmf_type: Telnyx::DtmfType::OrSymbol).void }
62
+ attr_writer :dtmf_type
63
+
64
+ # Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG
65
+ # scenarios.
66
+ sig { returns(T.nilable(T::Boolean)) }
67
+ attr_reader :encode_contact_header_enabled
68
+
69
+ sig { params(encode_contact_header_enabled: T::Boolean).void }
70
+ attr_writer :encode_contact_header_enabled
71
+
72
+ # Enable use of SRTP for encryption. Cannot be set if the transport_portocol is
73
+ # TLS.
74
+ sig { returns(T.nilable(Telnyx::EncryptedMedia::OrSymbol)) }
75
+ attr_accessor :encrypted_media
76
+
77
+ # External SIP peer settings used by Telnyx when registering to your PBX and
78
+ # routing outbound calls.
79
+ sig do
80
+ returns(
81
+ T.nilable(Telnyx::UacConnectionCreateParams::ExternalUacSettings)
82
+ )
83
+ end
84
+ attr_reader :external_uac_settings
85
+
86
+ sig do
87
+ params(
88
+ external_uac_settings:
89
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::OrHash
90
+ ).void
91
+ end
92
+ attr_writer :external_uac_settings
93
+
94
+ # Inbound settings that can be supplied when creating or updating a UAC
95
+ # connection. The SIP subdomain fields returned in UAC connection responses are
96
+ # generated by Telnyx and are not accepted as request parameters.
97
+ sig { returns(T.nilable(Telnyx::UacConnectionCreateParams::Inbound)) }
98
+ attr_reader :inbound
99
+
100
+ sig do
101
+ params(inbound: Telnyx::UacConnectionCreateParams::Inbound::OrHash).void
102
+ end
103
+ attr_writer :inbound
104
+
105
+ # Internal Telnyx-side settings for a UAC connection.
106
+ sig do
107
+ returns(
108
+ T.nilable(Telnyx::UacConnectionCreateParams::InternalUacSettings)
109
+ )
110
+ end
111
+ attr_reader :internal_uac_settings
112
+
113
+ sig do
114
+ params(
115
+ internal_uac_settings:
116
+ Telnyx::UacConnectionCreateParams::InternalUacSettings::OrHash
117
+ ).void
118
+ end
119
+ attr_writer :internal_uac_settings
120
+
121
+ # The uuid of the push credential for Ios
122
+ sig { returns(T.nilable(String)) }
123
+ attr_accessor :ios_push_credential_id
124
+
125
+ # Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams
126
+ # of SIP Trunking calls. The feature is off unless enabled. You may define min and
127
+ # max values in msec for customized buffering behaviors. Larger values add latency
128
+ # but tolerate more jitter, while smaller values reduce latency but are more
129
+ # sensitive to jitter and reordering.
130
+ sig { returns(T.nilable(Telnyx::ConnectionJitterBuffer)) }
131
+ attr_reader :jitter_buffer
132
+
133
+ sig { params(jitter_buffer: Telnyx::ConnectionJitterBuffer::OrHash).void }
134
+ attr_writer :jitter_buffer
135
+
136
+ # Controls when noise suppression is applied to calls. When set to 'inbound',
137
+ # noise suppression is applied to incoming audio. When set to 'outbound', it's
138
+ # applied to outgoing audio. When set to 'both', it's applied in both directions.
139
+ # When set to 'disabled', noise suppression is turned off.
140
+ sig do
141
+ returns(
142
+ T.nilable(
143
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::OrSymbol
144
+ )
145
+ )
146
+ end
147
+ attr_reader :noise_suppression
148
+
149
+ sig do
150
+ params(
151
+ noise_suppression:
152
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::OrSymbol
153
+ ).void
154
+ end
155
+ attr_writer :noise_suppression
156
+
157
+ # Configuration options for noise suppression. These settings are stored
158
+ # regardless of the noise_suppression value, but only take effect when
159
+ # noise_suppression is not 'disabled'. If you disable noise suppression and later
160
+ # re-enable it, the previously configured settings will be used.
161
+ sig { returns(T.nilable(Telnyx::ConnectionNoiseSuppressionDetails)) }
162
+ attr_reader :noise_suppression_details
163
+
164
+ sig do
165
+ params(
166
+ noise_suppression_details:
167
+ Telnyx::ConnectionNoiseSuppressionDetails::OrHash
168
+ ).void
169
+ end
170
+ attr_writer :noise_suppression_details
171
+
172
+ # Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
173
+ # if both are on the Telnyx network. If this is disabled, Telnyx will be able to
174
+ # use T38 on just one leg of the call depending on each leg's settings.
175
+ sig { returns(T.nilable(T::Boolean)) }
176
+ attr_reader :onnet_t38_passthrough_enabled
177
+
178
+ sig { params(onnet_t38_passthrough_enabled: T::Boolean).void }
179
+ attr_writer :onnet_t38_passthrough_enabled
180
+
181
+ sig { returns(T.nilable(Telnyx::UacConnectionCreateParams::Outbound)) }
182
+ attr_reader :outbound
183
+
184
+ sig do
185
+ params(
186
+ outbound: Telnyx::UacConnectionCreateParams::Outbound::OrHash
187
+ ).void
188
+ end
189
+ attr_writer :outbound
190
+
191
+ # The password to be used as part of the credentials. Must be 8 to 128 characters
192
+ # long.
193
+ sig { returns(T.nilable(String)) }
194
+ attr_reader :password
195
+
196
+ sig { params(password: String).void }
197
+ attr_writer :password
198
+
199
+ sig { returns(T.nilable(Telnyx::ConnectionRtcpSettings)) }
200
+ attr_reader :rtcp_settings
201
+
202
+ sig { params(rtcp_settings: Telnyx::ConnectionRtcpSettings::OrHash).void }
203
+ attr_writer :rtcp_settings
204
+
205
+ # This feature enables inbound SIP URI calls to your Credential Auth Connection.
206
+ # If enabled for all (unrestricted) then anyone who calls the SIP URI
207
+ # <your-username>@telnyx.com will be connected to your Connection. You can also
208
+ # choose to allow only calls that are originated on any Connections under your
209
+ # account (internal).
210
+ sig do
211
+ returns(
212
+ T.nilable(
213
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::OrSymbol
214
+ )
215
+ )
216
+ end
217
+ attr_reader :sip_uri_calling_preference
218
+
219
+ sig do
220
+ params(
221
+ sip_uri_calling_preference:
222
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::OrSymbol
223
+ ).void
224
+ end
225
+ attr_writer :sip_uri_calling_preference
226
+
227
+ # Tags associated with the connection.
228
+ sig { returns(T.nilable(T::Array[String])) }
229
+ attr_reader :tags
230
+
231
+ sig { params(tags: T::Array[String]).void }
232
+ attr_writer :tags
233
+
234
+ # The user name to be used as part of the credentials. Must be 4-32 characters
235
+ # long and alphanumeric values only (no spaces or special characters).
236
+ sig { returns(T.nilable(String)) }
237
+ attr_reader :user_name
238
+
239
+ sig { params(user_name: String).void }
240
+ attr_writer :user_name
241
+
242
+ # Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -
243
+ # texml can only be set when the outbound object parameter call_parking_enabled is
244
+ # included and set to true.
245
+ sig do
246
+ returns(
247
+ T.nilable(
248
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::OrSymbol
249
+ )
250
+ )
251
+ end
252
+ attr_reader :webhook_api_version
253
+
254
+ sig do
255
+ params(
256
+ webhook_api_version:
257
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::OrSymbol
258
+ ).void
259
+ end
260
+ attr_writer :webhook_api_version
261
+
262
+ # The failover URL where webhooks related to this connection will be sent if
263
+ # sending to the primary URL fails. Must include a scheme, such as 'https'.
264
+ sig { returns(T.nilable(String)) }
265
+ attr_accessor :webhook_event_failover_url
266
+
267
+ # The URL where webhooks related to this connection will be sent. Must include a
268
+ # scheme, such as 'https'.
269
+ sig { returns(T.nilable(String)) }
270
+ attr_reader :webhook_event_url
271
+
272
+ sig { params(webhook_event_url: String).void }
273
+ attr_writer :webhook_event_url
274
+
275
+ # Specifies how many seconds to wait before timing out a webhook.
276
+ sig { returns(T.nilable(Integer)) }
277
+ attr_accessor :webhook_timeout_secs
278
+
279
+ sig do
280
+ params(
281
+ connection_name: String,
282
+ active: T::Boolean,
283
+ anchorsite_override: Telnyx::AnchorsiteOverride::OrSymbol,
284
+ android_push_credential_id: T.nilable(String),
285
+ call_cost_in_webhooks: T::Boolean,
286
+ default_on_hold_comfort_noise_enabled: T::Boolean,
287
+ dtmf_type: Telnyx::DtmfType::OrSymbol,
288
+ encode_contact_header_enabled: T::Boolean,
289
+ encrypted_media: T.nilable(Telnyx::EncryptedMedia::OrSymbol),
290
+ external_uac_settings:
291
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::OrHash,
292
+ inbound: Telnyx::UacConnectionCreateParams::Inbound::OrHash,
293
+ internal_uac_settings:
294
+ Telnyx::UacConnectionCreateParams::InternalUacSettings::OrHash,
295
+ ios_push_credential_id: T.nilable(String),
296
+ jitter_buffer: Telnyx::ConnectionJitterBuffer::OrHash,
297
+ noise_suppression:
298
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::OrSymbol,
299
+ noise_suppression_details:
300
+ Telnyx::ConnectionNoiseSuppressionDetails::OrHash,
301
+ onnet_t38_passthrough_enabled: T::Boolean,
302
+ outbound: Telnyx::UacConnectionCreateParams::Outbound::OrHash,
303
+ password: String,
304
+ rtcp_settings: Telnyx::ConnectionRtcpSettings::OrHash,
305
+ sip_uri_calling_preference:
306
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::OrSymbol,
307
+ tags: T::Array[String],
308
+ user_name: String,
309
+ webhook_api_version:
310
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::OrSymbol,
311
+ webhook_event_failover_url: T.nilable(String),
312
+ webhook_event_url: String,
313
+ webhook_timeout_secs: T.nilable(Integer),
314
+ request_options: Telnyx::RequestOptions::OrHash
315
+ ).returns(T.attached_class)
316
+ end
317
+ def self.new(
318
+ # A user-assigned name to help manage the connection.
319
+ connection_name:,
320
+ # Defaults to true
321
+ active: nil,
322
+ # `Latency` directs Telnyx to route media through the site with the lowest
323
+ # round-trip time to the user's connection. Telnyx calculates this time using ICMP
324
+ # ping messages. This can be disabled by specifying a site to handle all media.
325
+ anchorsite_override: nil,
326
+ # The uuid of the push credential for Android
327
+ android_push_credential_id: nil,
328
+ # Specifies if call cost webhooks should be sent for this connection.
329
+ call_cost_in_webhooks: nil,
330
+ # When enabled, Telnyx will generate comfort noise when you place the call on
331
+ # hold. If disabled, you will need to generate comfort noise or on hold music to
332
+ # avoid RTP timeout.
333
+ default_on_hold_comfort_noise_enabled: nil,
334
+ # Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF
335
+ # digits sent to Telnyx will be accepted in all formats.
336
+ dtmf_type: nil,
337
+ # Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG
338
+ # scenarios.
339
+ encode_contact_header_enabled: nil,
340
+ # Enable use of SRTP for encryption. Cannot be set if the transport_portocol is
341
+ # TLS.
342
+ encrypted_media: nil,
343
+ # External SIP peer settings used by Telnyx when registering to your PBX and
344
+ # routing outbound calls.
345
+ external_uac_settings: nil,
346
+ # Inbound settings that can be supplied when creating or updating a UAC
347
+ # connection. The SIP subdomain fields returned in UAC connection responses are
348
+ # generated by Telnyx and are not accepted as request parameters.
349
+ inbound: nil,
350
+ # Internal Telnyx-side settings for a UAC connection.
351
+ internal_uac_settings: nil,
352
+ # The uuid of the push credential for Ios
353
+ ios_push_credential_id: nil,
354
+ # Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams
355
+ # of SIP Trunking calls. The feature is off unless enabled. You may define min and
356
+ # max values in msec for customized buffering behaviors. Larger values add latency
357
+ # but tolerate more jitter, while smaller values reduce latency but are more
358
+ # sensitive to jitter and reordering.
359
+ jitter_buffer: nil,
360
+ # Controls when noise suppression is applied to calls. When set to 'inbound',
361
+ # noise suppression is applied to incoming audio. When set to 'outbound', it's
362
+ # applied to outgoing audio. When set to 'both', it's applied in both directions.
363
+ # When set to 'disabled', noise suppression is turned off.
364
+ noise_suppression: nil,
365
+ # Configuration options for noise suppression. These settings are stored
366
+ # regardless of the noise_suppression value, but only take effect when
367
+ # noise_suppression is not 'disabled'. If you disable noise suppression and later
368
+ # re-enable it, the previously configured settings will be used.
369
+ noise_suppression_details: nil,
370
+ # Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly
371
+ # if both are on the Telnyx network. If this is disabled, Telnyx will be able to
372
+ # use T38 on just one leg of the call depending on each leg's settings.
373
+ onnet_t38_passthrough_enabled: nil,
374
+ outbound: nil,
375
+ # The password to be used as part of the credentials. Must be 8 to 128 characters
376
+ # long.
377
+ password: nil,
378
+ rtcp_settings: nil,
379
+ # This feature enables inbound SIP URI calls to your Credential Auth Connection.
380
+ # If enabled for all (unrestricted) then anyone who calls the SIP URI
381
+ # <your-username>@telnyx.com will be connected to your Connection. You can also
382
+ # choose to allow only calls that are originated on any Connections under your
383
+ # account (internal).
384
+ sip_uri_calling_preference: nil,
385
+ # Tags associated with the connection.
386
+ tags: nil,
387
+ # The user name to be used as part of the credentials. Must be 4-32 characters
388
+ # long and alphanumeric values only (no spaces or special characters).
389
+ user_name: nil,
390
+ # Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -
391
+ # texml can only be set when the outbound object parameter call_parking_enabled is
392
+ # included and set to true.
393
+ webhook_api_version: nil,
394
+ # The failover URL where webhooks related to this connection will be sent if
395
+ # sending to the primary URL fails. Must include a scheme, such as 'https'.
396
+ webhook_event_failover_url: nil,
397
+ # The URL where webhooks related to this connection will be sent. Must include a
398
+ # scheme, such as 'https'.
399
+ webhook_event_url: nil,
400
+ # Specifies how many seconds to wait before timing out a webhook.
401
+ webhook_timeout_secs: nil,
402
+ request_options: {}
403
+ )
404
+ end
405
+
406
+ sig do
407
+ override.returns(
408
+ {
409
+ connection_name: String,
410
+ active: T::Boolean,
411
+ anchorsite_override: Telnyx::AnchorsiteOverride::OrSymbol,
412
+ android_push_credential_id: T.nilable(String),
413
+ call_cost_in_webhooks: T::Boolean,
414
+ default_on_hold_comfort_noise_enabled: T::Boolean,
415
+ dtmf_type: Telnyx::DtmfType::OrSymbol,
416
+ encode_contact_header_enabled: T::Boolean,
417
+ encrypted_media: T.nilable(Telnyx::EncryptedMedia::OrSymbol),
418
+ external_uac_settings:
419
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings,
420
+ inbound: Telnyx::UacConnectionCreateParams::Inbound,
421
+ internal_uac_settings:
422
+ Telnyx::UacConnectionCreateParams::InternalUacSettings,
423
+ ios_push_credential_id: T.nilable(String),
424
+ jitter_buffer: Telnyx::ConnectionJitterBuffer,
425
+ noise_suppression:
426
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::OrSymbol,
427
+ noise_suppression_details:
428
+ Telnyx::ConnectionNoiseSuppressionDetails,
429
+ onnet_t38_passthrough_enabled: T::Boolean,
430
+ outbound: Telnyx::UacConnectionCreateParams::Outbound,
431
+ password: String,
432
+ rtcp_settings: Telnyx::ConnectionRtcpSettings,
433
+ sip_uri_calling_preference:
434
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::OrSymbol,
435
+ tags: T::Array[String],
436
+ user_name: String,
437
+ webhook_api_version:
438
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::OrSymbol,
439
+ webhook_event_failover_url: T.nilable(String),
440
+ webhook_event_url: String,
441
+ webhook_timeout_secs: T.nilable(Integer),
442
+ request_options: Telnyx::RequestOptions
443
+ }
444
+ )
445
+ end
446
+ def to_hash
447
+ end
448
+
449
+ class ExternalUacSettings < Telnyx::Internal::Type::BaseModel
450
+ OrHash =
451
+ T.type_alias do
452
+ T.any(
453
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings,
454
+ Telnyx::Internal::AnyHash
455
+ )
456
+ end
457
+
458
+ # The authentication username used in SIP digest authentication. If not set, the
459
+ # Username value will be used.
460
+ sig { returns(T.nilable(String)) }
461
+ attr_accessor :auth_username
462
+
463
+ # The registration interval, in seconds, indicating how often the system refreshes
464
+ # the SIP registration with the external SIP peer.
465
+ sig { returns(T.nilable(Integer)) }
466
+ attr_accessor :expiration_sec
467
+
468
+ # The user portion of the SIP From header used in outbound requests. This controls
469
+ # the caller identity presented to the external SIP peer.
470
+ sig { returns(T.nilable(String)) }
471
+ attr_accessor :from_user
472
+
473
+ # An optional SIP proxy used to route outbound requests before reaching the
474
+ # external SIP peer.
475
+ sig { returns(T.nilable(String)) }
476
+ attr_accessor :outbound_proxy
477
+
478
+ # The SIP password used for digest authentication with the external SIP peer.
479
+ sig { returns(T.nilable(String)) }
480
+ attr_reader :password
481
+
482
+ sig { params(password: String).void }
483
+ attr_writer :password
484
+
485
+ # The SIP proxy address of the external SIP peer used for registrations and
486
+ # outbound call routing.
487
+ sig { returns(T.nilable(String)) }
488
+ attr_reader :proxy
489
+
490
+ sig { params(proxy: String).void }
491
+ attr_writer :proxy
492
+
493
+ # The transport protocol used for SIP signaling when communicating with the
494
+ # external SIP peer. One of UDP, TLS, or TCP.
495
+ sig do
496
+ returns(
497
+ T.nilable(
498
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::OrSymbol
499
+ )
500
+ )
501
+ end
502
+ attr_accessor :transport
503
+
504
+ # The SIP username used to authenticate with the external SIP peer for
505
+ # registrations and outbound calls. Must start with a letter or number and contain
506
+ # only letters, numbers, hyphens, and underscores.
507
+ sig { returns(T.nilable(String)) }
508
+ attr_reader :username
509
+
510
+ sig { params(username: String).void }
511
+ attr_writer :username
512
+
513
+ # External SIP peer settings used by Telnyx when registering to your PBX and
514
+ # routing outbound calls.
515
+ sig do
516
+ params(
517
+ auth_username: T.nilable(String),
518
+ expiration_sec: T.nilable(Integer),
519
+ from_user: T.nilable(String),
520
+ outbound_proxy: T.nilable(String),
521
+ password: String,
522
+ proxy: String,
523
+ transport:
524
+ T.nilable(
525
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::OrSymbol
526
+ ),
527
+ username: String
528
+ ).returns(T.attached_class)
529
+ end
530
+ def self.new(
531
+ # The authentication username used in SIP digest authentication. If not set, the
532
+ # Username value will be used.
533
+ auth_username: nil,
534
+ # The registration interval, in seconds, indicating how often the system refreshes
535
+ # the SIP registration with the external SIP peer.
536
+ expiration_sec: nil,
537
+ # The user portion of the SIP From header used in outbound requests. This controls
538
+ # the caller identity presented to the external SIP peer.
539
+ from_user: nil,
540
+ # An optional SIP proxy used to route outbound requests before reaching the
541
+ # external SIP peer.
542
+ outbound_proxy: nil,
543
+ # The SIP password used for digest authentication with the external SIP peer.
544
+ password: nil,
545
+ # The SIP proxy address of the external SIP peer used for registrations and
546
+ # outbound call routing.
547
+ proxy: nil,
548
+ # The transport protocol used for SIP signaling when communicating with the
549
+ # external SIP peer. One of UDP, TLS, or TCP.
550
+ transport: nil,
551
+ # The SIP username used to authenticate with the external SIP peer for
552
+ # registrations and outbound calls. Must start with a letter or number and contain
553
+ # only letters, numbers, hyphens, and underscores.
554
+ username: nil
555
+ )
556
+ end
557
+
558
+ sig do
559
+ override.returns(
560
+ {
561
+ auth_username: T.nilable(String),
562
+ expiration_sec: T.nilable(Integer),
563
+ from_user: T.nilable(String),
564
+ outbound_proxy: T.nilable(String),
565
+ password: String,
566
+ proxy: String,
567
+ transport:
568
+ T.nilable(
569
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::OrSymbol
570
+ ),
571
+ username: String
572
+ }
573
+ )
574
+ end
575
+ def to_hash
576
+ end
577
+
578
+ # The transport protocol used for SIP signaling when communicating with the
579
+ # external SIP peer. One of UDP, TLS, or TCP.
580
+ module Transport
581
+ extend Telnyx::Internal::Type::Enum
582
+
583
+ TaggedSymbol =
584
+ T.type_alias do
585
+ T.all(
586
+ Symbol,
587
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport
588
+ )
589
+ end
590
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
591
+
592
+ UDP =
593
+ T.let(
594
+ :UDP,
595
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::TaggedSymbol
596
+ )
597
+ TLS =
598
+ T.let(
599
+ :TLS,
600
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::TaggedSymbol
601
+ )
602
+ TCP =
603
+ T.let(
604
+ :TCP,
605
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::TaggedSymbol
606
+ )
607
+
608
+ sig do
609
+ override.returns(
610
+ T::Array[
611
+ Telnyx::UacConnectionCreateParams::ExternalUacSettings::Transport::TaggedSymbol
612
+ ]
613
+ )
614
+ end
615
+ def self.values
616
+ end
617
+ end
618
+ end
619
+
620
+ class Inbound < Telnyx::Internal::Type::BaseModel
621
+ OrHash =
622
+ T.type_alias do
623
+ T.any(
624
+ Telnyx::UacConnectionCreateParams::Inbound,
625
+ Telnyx::Internal::AnyHash
626
+ )
627
+ end
628
+
629
+ # This setting allows you to set the format with which the caller's number (ANI)
630
+ # is sent for inbound phone calls.
631
+ sig do
632
+ returns(
633
+ T.nilable(
634
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::OrSymbol
635
+ )
636
+ )
637
+ end
638
+ attr_reader :ani_number_format
639
+
640
+ sig do
641
+ params(
642
+ ani_number_format:
643
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::OrSymbol
644
+ ).void
645
+ end
646
+ attr_writer :ani_number_format
647
+
648
+ # When set, this will limit the total number of inbound calls to phone numbers
649
+ # associated with this connection.
650
+ sig { returns(T.nilable(Integer)) }
651
+ attr_reader :channel_limit
652
+
653
+ sig { params(channel_limit: Integer).void }
654
+ attr_writer :channel_limit
655
+
656
+ # Defines the list of codecs that Telnyx will send for inbound calls to a specific
657
+ # number on your portal account, in priority order. This only works when the
658
+ # Connection the number is assigned to uses Media Handling mode: default. OPUS and
659
+ # H.264 codecs are available only when using TCP or TLS transport for SIP.
660
+ sig { returns(T.nilable(T::Array[String])) }
661
+ attr_reader :codecs
662
+
663
+ sig { params(codecs: T::Array[String]).void }
664
+ attr_writer :codecs
665
+
666
+ # Default routing method to be used when a number is associated with the
667
+ # connection. Must be one of the routing method types or left blank, other values
668
+ # are not allowed.
669
+ sig do
670
+ returns(
671
+ T.nilable(
672
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::OrSymbol
673
+ )
674
+ )
675
+ end
676
+ attr_reader :default_routing_method
677
+
678
+ sig do
679
+ params(
680
+ default_routing_method:
681
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::OrSymbol
682
+ ).void
683
+ end
684
+ attr_writer :default_routing_method
685
+
686
+ sig do
687
+ returns(
688
+ T.nilable(
689
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::OrSymbol
690
+ )
691
+ )
692
+ end
693
+ attr_reader :dnis_number_format
694
+
695
+ sig do
696
+ params(
697
+ dnis_number_format:
698
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::OrSymbol
699
+ ).void
700
+ end
701
+ attr_writer :dnis_number_format
702
+
703
+ # Generate ringback tone through 183 session progress message with early media.
704
+ sig { returns(T.nilable(T::Boolean)) }
705
+ attr_reader :generate_ringback_tone
706
+
707
+ sig { params(generate_ringback_tone: T::Boolean).void }
708
+ attr_writer :generate_ringback_tone
709
+
710
+ # When set, inbound phone calls will receive ISUP parameters via SIP headers.
711
+ # (Only when available and only when using TCP or TLS transport.)
712
+ sig { returns(T.nilable(T::Boolean)) }
713
+ attr_reader :isup_headers_enabled
714
+
715
+ sig { params(isup_headers_enabled: T::Boolean).void }
716
+ attr_writer :isup_headers_enabled
717
+
718
+ # Enable PRACK messages as defined in RFC3262.
719
+ sig { returns(T.nilable(T::Boolean)) }
720
+ attr_reader :prack_enabled
721
+
722
+ sig { params(prack_enabled: T::Boolean).void }
723
+ attr_writer :prack_enabled
724
+
725
+ # When enabled the SIP Connection will receive the Identity header with
726
+ # Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP
727
+ # transport.
728
+ sig { returns(T.nilable(T::Boolean)) }
729
+ attr_reader :shaken_stir_enabled
730
+
731
+ sig { params(shaken_stir_enabled: T::Boolean).void }
732
+ attr_writer :shaken_stir_enabled
733
+
734
+ # When enabled, allows multiple devices to ring simultaneously on incoming calls.
735
+ sig do
736
+ returns(
737
+ T.nilable(
738
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::OrSymbol
739
+ )
740
+ )
741
+ end
742
+ attr_reader :simultaneous_ringing
743
+
744
+ sig do
745
+ params(
746
+ simultaneous_ringing:
747
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::OrSymbol
748
+ ).void
749
+ end
750
+ attr_writer :simultaneous_ringing
751
+
752
+ # Defaults to true.
753
+ sig { returns(T.nilable(T::Boolean)) }
754
+ attr_reader :sip_compact_headers_enabled
755
+
756
+ sig { params(sip_compact_headers_enabled: T::Boolean).void }
757
+ attr_writer :sip_compact_headers_enabled
758
+
759
+ # Time(sec) before aborting if connection is not made.
760
+ sig { returns(T.nilable(Integer)) }
761
+ attr_reader :timeout_1xx_secs
762
+
763
+ sig { params(timeout_1xx_secs: Integer).void }
764
+ attr_writer :timeout_1xx_secs
765
+
766
+ # Time(sec) before aborting if call is unanswered (min: 1, max: 600).
767
+ sig { returns(T.nilable(Integer)) }
768
+ attr_reader :timeout_2xx_secs
769
+
770
+ sig { params(timeout_2xx_secs: Integer).void }
771
+ attr_writer :timeout_2xx_secs
772
+
773
+ # Inbound settings that can be supplied when creating or updating a UAC
774
+ # connection. The SIP subdomain fields returned in UAC connection responses are
775
+ # generated by Telnyx and are not accepted as request parameters.
776
+ sig do
777
+ params(
778
+ ani_number_format:
779
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::OrSymbol,
780
+ channel_limit: Integer,
781
+ codecs: T::Array[String],
782
+ default_routing_method:
783
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::OrSymbol,
784
+ dnis_number_format:
785
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::OrSymbol,
786
+ generate_ringback_tone: T::Boolean,
787
+ isup_headers_enabled: T::Boolean,
788
+ prack_enabled: T::Boolean,
789
+ shaken_stir_enabled: T::Boolean,
790
+ simultaneous_ringing:
791
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::OrSymbol,
792
+ sip_compact_headers_enabled: T::Boolean,
793
+ timeout_1xx_secs: Integer,
794
+ timeout_2xx_secs: Integer
795
+ ).returns(T.attached_class)
796
+ end
797
+ def self.new(
798
+ # This setting allows you to set the format with which the caller's number (ANI)
799
+ # is sent for inbound phone calls.
800
+ ani_number_format: nil,
801
+ # When set, this will limit the total number of inbound calls to phone numbers
802
+ # associated with this connection.
803
+ channel_limit: nil,
804
+ # Defines the list of codecs that Telnyx will send for inbound calls to a specific
805
+ # number on your portal account, in priority order. This only works when the
806
+ # Connection the number is assigned to uses Media Handling mode: default. OPUS and
807
+ # H.264 codecs are available only when using TCP or TLS transport for SIP.
808
+ codecs: nil,
809
+ # Default routing method to be used when a number is associated with the
810
+ # connection. Must be one of the routing method types or left blank, other values
811
+ # are not allowed.
812
+ default_routing_method: nil,
813
+ dnis_number_format: nil,
814
+ # Generate ringback tone through 183 session progress message with early media.
815
+ generate_ringback_tone: nil,
816
+ # When set, inbound phone calls will receive ISUP parameters via SIP headers.
817
+ # (Only when available and only when using TCP or TLS transport.)
818
+ isup_headers_enabled: nil,
819
+ # Enable PRACK messages as defined in RFC3262.
820
+ prack_enabled: nil,
821
+ # When enabled the SIP Connection will receive the Identity header with
822
+ # Shaken/Stir data in the SIP INVITE message of inbound calls, even when using UDP
823
+ # transport.
824
+ shaken_stir_enabled: nil,
825
+ # When enabled, allows multiple devices to ring simultaneously on incoming calls.
826
+ simultaneous_ringing: nil,
827
+ # Defaults to true.
828
+ sip_compact_headers_enabled: nil,
829
+ # Time(sec) before aborting if connection is not made.
830
+ timeout_1xx_secs: nil,
831
+ # Time(sec) before aborting if call is unanswered (min: 1, max: 600).
832
+ timeout_2xx_secs: nil
833
+ )
834
+ end
835
+
836
+ sig do
837
+ override.returns(
838
+ {
839
+ ani_number_format:
840
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::OrSymbol,
841
+ channel_limit: Integer,
842
+ codecs: T::Array[String],
843
+ default_routing_method:
844
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::OrSymbol,
845
+ dnis_number_format:
846
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::OrSymbol,
847
+ generate_ringback_tone: T::Boolean,
848
+ isup_headers_enabled: T::Boolean,
849
+ prack_enabled: T::Boolean,
850
+ shaken_stir_enabled: T::Boolean,
851
+ simultaneous_ringing:
852
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::OrSymbol,
853
+ sip_compact_headers_enabled: T::Boolean,
854
+ timeout_1xx_secs: Integer,
855
+ timeout_2xx_secs: Integer
856
+ }
857
+ )
858
+ end
859
+ def to_hash
860
+ end
861
+
862
+ # This setting allows you to set the format with which the caller's number (ANI)
863
+ # is sent for inbound phone calls.
864
+ module AniNumberFormat
865
+ extend Telnyx::Internal::Type::Enum
866
+
867
+ TaggedSymbol =
868
+ T.type_alias do
869
+ T.all(
870
+ Symbol,
871
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat
872
+ )
873
+ end
874
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
875
+
876
+ PLUS_E_164 =
877
+ T.let(
878
+ :"+E.164",
879
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::TaggedSymbol
880
+ )
881
+ E_164 =
882
+ T.let(
883
+ :"E.164",
884
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::TaggedSymbol
885
+ )
886
+ PLUS_E_164_NATIONAL =
887
+ T.let(
888
+ :"+E.164-national",
889
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::TaggedSymbol
890
+ )
891
+ E_164_NATIONAL =
892
+ T.let(
893
+ :"E.164-national",
894
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::TaggedSymbol
895
+ )
896
+
897
+ sig do
898
+ override.returns(
899
+ T::Array[
900
+ Telnyx::UacConnectionCreateParams::Inbound::AniNumberFormat::TaggedSymbol
901
+ ]
902
+ )
903
+ end
904
+ def self.values
905
+ end
906
+ end
907
+
908
+ # Default routing method to be used when a number is associated with the
909
+ # connection. Must be one of the routing method types or left blank, other values
910
+ # are not allowed.
911
+ module DefaultRoutingMethod
912
+ extend Telnyx::Internal::Type::Enum
913
+
914
+ TaggedSymbol =
915
+ T.type_alias do
916
+ T.all(
917
+ Symbol,
918
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod
919
+ )
920
+ end
921
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
922
+
923
+ SEQUENTIAL =
924
+ T.let(
925
+ :sequential,
926
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::TaggedSymbol
927
+ )
928
+ ROUND_ROBIN =
929
+ T.let(
930
+ :"round-robin",
931
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::TaggedSymbol
932
+ )
933
+
934
+ sig do
935
+ override.returns(
936
+ T::Array[
937
+ Telnyx::UacConnectionCreateParams::Inbound::DefaultRoutingMethod::TaggedSymbol
938
+ ]
939
+ )
940
+ end
941
+ def self.values
942
+ end
943
+ end
944
+
945
+ module DnisNumberFormat
946
+ extend Telnyx::Internal::Type::Enum
947
+
948
+ TaggedSymbol =
949
+ T.type_alias do
950
+ T.all(
951
+ Symbol,
952
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat
953
+ )
954
+ end
955
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
956
+
957
+ PLUS_E164 =
958
+ T.let(
959
+ :"+e164",
960
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::TaggedSymbol
961
+ )
962
+ E164 =
963
+ T.let(
964
+ :e164,
965
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::TaggedSymbol
966
+ )
967
+ NATIONAL =
968
+ T.let(
969
+ :national,
970
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::TaggedSymbol
971
+ )
972
+ SIP_USERNAME =
973
+ T.let(
974
+ :sip_username,
975
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::TaggedSymbol
976
+ )
977
+
978
+ sig do
979
+ override.returns(
980
+ T::Array[
981
+ Telnyx::UacConnectionCreateParams::Inbound::DnisNumberFormat::TaggedSymbol
982
+ ]
983
+ )
984
+ end
985
+ def self.values
986
+ end
987
+ end
988
+
989
+ # When enabled, allows multiple devices to ring simultaneously on incoming calls.
990
+ module SimultaneousRinging
991
+ extend Telnyx::Internal::Type::Enum
992
+
993
+ TaggedSymbol =
994
+ T.type_alias do
995
+ T.all(
996
+ Symbol,
997
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging
998
+ )
999
+ end
1000
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1001
+
1002
+ DISABLED =
1003
+ T.let(
1004
+ :disabled,
1005
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::TaggedSymbol
1006
+ )
1007
+ ENABLED =
1008
+ T.let(
1009
+ :enabled,
1010
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::TaggedSymbol
1011
+ )
1012
+
1013
+ sig do
1014
+ override.returns(
1015
+ T::Array[
1016
+ Telnyx::UacConnectionCreateParams::Inbound::SimultaneousRinging::TaggedSymbol
1017
+ ]
1018
+ )
1019
+ end
1020
+ def self.values
1021
+ end
1022
+ end
1023
+ end
1024
+
1025
+ class InternalUacSettings < Telnyx::Internal::Type::BaseModel
1026
+ OrHash =
1027
+ T.type_alias do
1028
+ T.any(
1029
+ Telnyx::UacConnectionCreateParams::InternalUacSettings,
1030
+ Telnyx::Internal::AnyHash
1031
+ )
1032
+ end
1033
+
1034
+ # The SIP URI that Telnyx will call when handling an inbound request from the
1035
+ # external peer. Do not include a `sip:` prefix. The value must be in the format
1036
+ # `userinfo@[subdomain.]sip.telnyx.com` or
1037
+ # `userinfo@[subdomain.]sipdev.telnyx.com`; the userinfo portion may contain only
1038
+ # letters, digits, hyphens, and underscores.
1039
+ sig { returns(T.nilable(String)) }
1040
+ attr_reader :destination_uri
1041
+
1042
+ sig { params(destination_uri: String).void }
1043
+ attr_writer :destination_uri
1044
+
1045
+ # Internal Telnyx-side settings for a UAC connection.
1046
+ sig { params(destination_uri: String).returns(T.attached_class) }
1047
+ def self.new(
1048
+ # The SIP URI that Telnyx will call when handling an inbound request from the
1049
+ # external peer. Do not include a `sip:` prefix. The value must be in the format
1050
+ # `userinfo@[subdomain.]sip.telnyx.com` or
1051
+ # `userinfo@[subdomain.]sipdev.telnyx.com`; the userinfo portion may contain only
1052
+ # letters, digits, hyphens, and underscores.
1053
+ destination_uri: nil
1054
+ )
1055
+ end
1056
+
1057
+ sig { override.returns({ destination_uri: String }) }
1058
+ def to_hash
1059
+ end
1060
+ end
1061
+
1062
+ # Controls when noise suppression is applied to calls. When set to 'inbound',
1063
+ # noise suppression is applied to incoming audio. When set to 'outbound', it's
1064
+ # applied to outgoing audio. When set to 'both', it's applied in both directions.
1065
+ # When set to 'disabled', noise suppression is turned off.
1066
+ module NoiseSuppression
1067
+ extend Telnyx::Internal::Type::Enum
1068
+
1069
+ TaggedSymbol =
1070
+ T.type_alias do
1071
+ T.all(Symbol, Telnyx::UacConnectionCreateParams::NoiseSuppression)
1072
+ end
1073
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1074
+
1075
+ INBOUND =
1076
+ T.let(
1077
+ :inbound,
1078
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::TaggedSymbol
1079
+ )
1080
+ OUTBOUND =
1081
+ T.let(
1082
+ :outbound,
1083
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::TaggedSymbol
1084
+ )
1085
+ BOTH =
1086
+ T.let(
1087
+ :both,
1088
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::TaggedSymbol
1089
+ )
1090
+ DISABLED =
1091
+ T.let(
1092
+ :disabled,
1093
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::TaggedSymbol
1094
+ )
1095
+
1096
+ sig do
1097
+ override.returns(
1098
+ T::Array[
1099
+ Telnyx::UacConnectionCreateParams::NoiseSuppression::TaggedSymbol
1100
+ ]
1101
+ )
1102
+ end
1103
+ def self.values
1104
+ end
1105
+ end
1106
+
1107
+ class Outbound < Telnyx::Internal::Type::BaseModel
1108
+ OrHash =
1109
+ T.type_alias do
1110
+ T.any(
1111
+ Telnyx::UacConnectionCreateParams::Outbound,
1112
+ Telnyx::Internal::AnyHash
1113
+ )
1114
+ end
1115
+
1116
+ # Set a phone number as the ani_override value to override caller id number on
1117
+ # outbound calls.
1118
+ sig { returns(T.nilable(String)) }
1119
+ attr_reader :ani_override
1120
+
1121
+ sig { params(ani_override: String).void }
1122
+ attr_writer :ani_override
1123
+
1124
+ # Specifies when we apply your ani_override setting. Only applies when
1125
+ # ani_override is not blank.
1126
+ sig do
1127
+ returns(
1128
+ T.nilable(
1129
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::OrSymbol
1130
+ )
1131
+ )
1132
+ end
1133
+ attr_reader :ani_override_type
1134
+
1135
+ sig do
1136
+ params(
1137
+ ani_override_type:
1138
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::OrSymbol
1139
+ ).void
1140
+ end
1141
+ attr_writer :ani_override_type
1142
+
1143
+ # Forces all SIP calls originated on this connection to be "parked" instead of
1144
+ # "bridged" to the destination specified on the URI. Parked calls will return
1145
+ # ringback to the caller and will await for a Call Control command to define which
1146
+ # action will be taken next.
1147
+ sig { returns(T.nilable(T::Boolean)) }
1148
+ attr_accessor :call_parking_enabled
1149
+
1150
+ # When set, this will limit the total number of outbound calls to phone numbers
1151
+ # associated with this connection.
1152
+ sig { returns(T.nilable(Integer)) }
1153
+ attr_reader :channel_limit
1154
+
1155
+ sig { params(channel_limit: Integer).void }
1156
+ attr_writer :channel_limit
1157
+
1158
+ # Generate ringback tone through 183 session progress message with early media.
1159
+ sig { returns(T.nilable(T::Boolean)) }
1160
+ attr_reader :generate_ringback_tone
1161
+
1162
+ sig { params(generate_ringback_tone: T::Boolean).void }
1163
+ attr_writer :generate_ringback_tone
1164
+
1165
+ # When set, ringback will not wait for indication before sending ringback tone to
1166
+ # calling party.
1167
+ sig { returns(T.nilable(T::Boolean)) }
1168
+ attr_reader :instant_ringback_enabled
1169
+
1170
+ sig { params(instant_ringback_enabled: T::Boolean).void }
1171
+ attr_writer :instant_ringback_enabled
1172
+
1173
+ # A 2-character country code specifying the country whose national dialing rules
1174
+ # should be used. For example, if set to `US` then any US number can be dialed
1175
+ # without preprending +1 to the number. When left blank, Telnyx will try US and GB
1176
+ # dialing rules, in that order, by default.
1177
+ sig { returns(T.nilable(String)) }
1178
+ attr_reader :localization
1179
+
1180
+ sig { params(localization: String).void }
1181
+ attr_writer :localization
1182
+
1183
+ # Identifies the associated outbound voice profile.
1184
+ sig { returns(T.nilable(String)) }
1185
+ attr_reader :outbound_voice_profile_id
1186
+
1187
+ sig { params(outbound_voice_profile_id: String).void }
1188
+ attr_writer :outbound_voice_profile_id
1189
+
1190
+ # This setting only affects connections with Fax-type Outbound Voice Profiles. The
1191
+ # setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By
1192
+ # default, Telnyx will send the re-invite. If set to `customer`, the caller is
1193
+ # expected to send the t.38 reinvite.
1194
+ sig do
1195
+ returns(
1196
+ T.nilable(
1197
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::OrSymbol
1198
+ )
1199
+ )
1200
+ end
1201
+ attr_reader :t38_reinvite_source
1202
+
1203
+ sig do
1204
+ params(
1205
+ t38_reinvite_source:
1206
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::OrSymbol
1207
+ ).void
1208
+ end
1209
+ attr_writer :t38_reinvite_source
1210
+
1211
+ sig do
1212
+ params(
1213
+ ani_override: String,
1214
+ ani_override_type:
1215
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::OrSymbol,
1216
+ call_parking_enabled: T.nilable(T::Boolean),
1217
+ channel_limit: Integer,
1218
+ generate_ringback_tone: T::Boolean,
1219
+ instant_ringback_enabled: T::Boolean,
1220
+ localization: String,
1221
+ outbound_voice_profile_id: String,
1222
+ t38_reinvite_source:
1223
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::OrSymbol
1224
+ ).returns(T.attached_class)
1225
+ end
1226
+ def self.new(
1227
+ # Set a phone number as the ani_override value to override caller id number on
1228
+ # outbound calls.
1229
+ ani_override: nil,
1230
+ # Specifies when we apply your ani_override setting. Only applies when
1231
+ # ani_override is not blank.
1232
+ ani_override_type: nil,
1233
+ # Forces all SIP calls originated on this connection to be "parked" instead of
1234
+ # "bridged" to the destination specified on the URI. Parked calls will return
1235
+ # ringback to the caller and will await for a Call Control command to define which
1236
+ # action will be taken next.
1237
+ call_parking_enabled: nil,
1238
+ # When set, this will limit the total number of outbound calls to phone numbers
1239
+ # associated with this connection.
1240
+ channel_limit: nil,
1241
+ # Generate ringback tone through 183 session progress message with early media.
1242
+ generate_ringback_tone: nil,
1243
+ # When set, ringback will not wait for indication before sending ringback tone to
1244
+ # calling party.
1245
+ instant_ringback_enabled: nil,
1246
+ # A 2-character country code specifying the country whose national dialing rules
1247
+ # should be used. For example, if set to `US` then any US number can be dialed
1248
+ # without preprending +1 to the number. When left blank, Telnyx will try US and GB
1249
+ # dialing rules, in that order, by default.
1250
+ localization: nil,
1251
+ # Identifies the associated outbound voice profile.
1252
+ outbound_voice_profile_id: nil,
1253
+ # This setting only affects connections with Fax-type Outbound Voice Profiles. The
1254
+ # setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By
1255
+ # default, Telnyx will send the re-invite. If set to `customer`, the caller is
1256
+ # expected to send the t.38 reinvite.
1257
+ t38_reinvite_source: nil
1258
+ )
1259
+ end
1260
+
1261
+ sig do
1262
+ override.returns(
1263
+ {
1264
+ ani_override: String,
1265
+ ani_override_type:
1266
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::OrSymbol,
1267
+ call_parking_enabled: T.nilable(T::Boolean),
1268
+ channel_limit: Integer,
1269
+ generate_ringback_tone: T::Boolean,
1270
+ instant_ringback_enabled: T::Boolean,
1271
+ localization: String,
1272
+ outbound_voice_profile_id: String,
1273
+ t38_reinvite_source:
1274
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::OrSymbol
1275
+ }
1276
+ )
1277
+ end
1278
+ def to_hash
1279
+ end
1280
+
1281
+ # Specifies when we apply your ani_override setting. Only applies when
1282
+ # ani_override is not blank.
1283
+ module AniOverrideType
1284
+ extend Telnyx::Internal::Type::Enum
1285
+
1286
+ TaggedSymbol =
1287
+ T.type_alias do
1288
+ T.all(
1289
+ Symbol,
1290
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType
1291
+ )
1292
+ end
1293
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1294
+
1295
+ ALWAYS =
1296
+ T.let(
1297
+ :always,
1298
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::TaggedSymbol
1299
+ )
1300
+ NORMAL =
1301
+ T.let(
1302
+ :normal,
1303
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::TaggedSymbol
1304
+ )
1305
+ EMERGENCY =
1306
+ T.let(
1307
+ :emergency,
1308
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::TaggedSymbol
1309
+ )
1310
+
1311
+ sig do
1312
+ override.returns(
1313
+ T::Array[
1314
+ Telnyx::UacConnectionCreateParams::Outbound::AniOverrideType::TaggedSymbol
1315
+ ]
1316
+ )
1317
+ end
1318
+ def self.values
1319
+ end
1320
+ end
1321
+
1322
+ # This setting only affects connections with Fax-type Outbound Voice Profiles. The
1323
+ # setting dictates whether or not Telnyx sends a t.38 reinvite.<br/><br/> By
1324
+ # default, Telnyx will send the re-invite. If set to `customer`, the caller is
1325
+ # expected to send the t.38 reinvite.
1326
+ module T38ReinviteSource
1327
+ extend Telnyx::Internal::Type::Enum
1328
+
1329
+ TaggedSymbol =
1330
+ T.type_alias do
1331
+ T.all(
1332
+ Symbol,
1333
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource
1334
+ )
1335
+ end
1336
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1337
+
1338
+ TELNYX =
1339
+ T.let(
1340
+ :telnyx,
1341
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1342
+ )
1343
+ CUSTOMER =
1344
+ T.let(
1345
+ :customer,
1346
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1347
+ )
1348
+ DISABLED =
1349
+ T.let(
1350
+ :disabled,
1351
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1352
+ )
1353
+ PASSTHRU =
1354
+ T.let(
1355
+ :passthru,
1356
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1357
+ )
1358
+ CALLER_PASSTHRU =
1359
+ T.let(
1360
+ :"caller-passthru",
1361
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1362
+ )
1363
+ CALLEE_PASSTHRU =
1364
+ T.let(
1365
+ :"callee-passthru",
1366
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1367
+ )
1368
+
1369
+ sig do
1370
+ override.returns(
1371
+ T::Array[
1372
+ Telnyx::UacConnectionCreateParams::Outbound::T38ReinviteSource::TaggedSymbol
1373
+ ]
1374
+ )
1375
+ end
1376
+ def self.values
1377
+ end
1378
+ end
1379
+ end
1380
+
1381
+ # This feature enables inbound SIP URI calls to your Credential Auth Connection.
1382
+ # If enabled for all (unrestricted) then anyone who calls the SIP URI
1383
+ # <your-username>@telnyx.com will be connected to your Connection. You can also
1384
+ # choose to allow only calls that are originated on any Connections under your
1385
+ # account (internal).
1386
+ module SipUriCallingPreference
1387
+ extend Telnyx::Internal::Type::Enum
1388
+
1389
+ TaggedSymbol =
1390
+ T.type_alias do
1391
+ T.all(
1392
+ Symbol,
1393
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference
1394
+ )
1395
+ end
1396
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1397
+
1398
+ DISABLED =
1399
+ T.let(
1400
+ :disabled,
1401
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::TaggedSymbol
1402
+ )
1403
+ UNRESTRICTED =
1404
+ T.let(
1405
+ :unrestricted,
1406
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::TaggedSymbol
1407
+ )
1408
+ INTERNAL =
1409
+ T.let(
1410
+ :internal,
1411
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::TaggedSymbol
1412
+ )
1413
+
1414
+ sig do
1415
+ override.returns(
1416
+ T::Array[
1417
+ Telnyx::UacConnectionCreateParams::SipUriCallingPreference::TaggedSymbol
1418
+ ]
1419
+ )
1420
+ end
1421
+ def self.values
1422
+ end
1423
+ end
1424
+
1425
+ # Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -
1426
+ # texml can only be set when the outbound object parameter call_parking_enabled is
1427
+ # included and set to true.
1428
+ module WebhookAPIVersion
1429
+ extend Telnyx::Internal::Type::Enum
1430
+
1431
+ TaggedSymbol =
1432
+ T.type_alias do
1433
+ T.all(Symbol, Telnyx::UacConnectionCreateParams::WebhookAPIVersion)
1434
+ end
1435
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1436
+
1437
+ V1 =
1438
+ T.let(
1439
+ :"1",
1440
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::TaggedSymbol
1441
+ )
1442
+ V2 =
1443
+ T.let(
1444
+ :"2",
1445
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::TaggedSymbol
1446
+ )
1447
+ TEXML =
1448
+ T.let(
1449
+ :texml,
1450
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::TaggedSymbol
1451
+ )
1452
+
1453
+ sig do
1454
+ override.returns(
1455
+ T::Array[
1456
+ Telnyx::UacConnectionCreateParams::WebhookAPIVersion::TaggedSymbol
1457
+ ]
1458
+ )
1459
+ end
1460
+ def self.values
1461
+ end
1462
+ end
1463
+ end
1464
+ end
1465
+ end