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