Class: Telnyx::Resources::UacConnections

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/uac_connections.rb,
lib/telnyx/resources/uac_connections/actions.rb

Overview

UAC connection operations

Defined Under Namespace

Classes: Actions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ UacConnections

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of UacConnections.

Parameters:



250
251
252
253
# File 'lib/telnyx/resources/uac_connections.rb', line 250

def initialize(client:)
  @client = client
  @actions = Telnyx::Resources::UacConnections::Actions.new(client: client)
end

Instance Attribute Details

#actionsTelnyx::Resources::UacConnections::Actions (readonly)

UAC connection operations



9
10
11
# File 'lib/telnyx/resources/uac_connections.rb', line 9

def actions
  @actions
end

Instance Method Details

#create(connection_name:, active: nil, anchorsite_override: nil, android_push_credential_id: nil, call_cost_in_webhooks: nil, default_on_hold_comfort_noise_enabled: nil, dtmf_type: nil, encode_contact_header_enabled: nil, encrypted_media: nil, external_uac_settings: nil, inbound: nil, internal_uac_settings: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, password: nil, rtcp_settings: nil, sip_uri_calling_preference: nil, tags: nil, user_name: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::UacConnectionCreateResponse

Some parameter documentations has been truncated, see Models::UacConnectionCreateParams for more details.

Creates a UAC connection. A UAC (User Agent Client) Connection registers Telnyx to your PBX — the opposite of a standard SIP trunk, where the PBX registers to Telnyx. Use UAC when your PBX doesn’t support outbound SIP registration or you need Telnyx to maintain the registration.

Parameters:

  • connection_name (String)

    A user-assigned name to help manage the connection.

  • active (Boolean)

    Defaults to true

  • anchorsite_override (Symbol, Telnyx::Models::AnchorsiteOverride)

    ‘Latency` directs Telnyx to route media through the site with the lowest round-t

  • android_push_credential_id (String, nil)

    The uuid of the push credential for Android

  • call_cost_in_webhooks (Boolean)

    Specifies if call cost webhooks should be sent for this connection.

  • default_on_hold_comfort_noise_enabled (Boolean)

    When enabled, Telnyx will generate comfort noise when you place the call on hold

  • dtmf_type (Symbol, Telnyx::Models::DtmfType)

    Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF

  • encode_contact_header_enabled (Boolean)

    Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scen

  • encrypted_media (Symbol, Telnyx::Models::EncryptedMedia, nil)

    Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TL

  • external_uac_settings (Telnyx::Models::UacConnectionCreateParams::ExternalUacSettings)

    External SIP peer settings used by Telnyx when registering to your PBX and routi

  • inbound (Telnyx::Models::UacConnectionCreateParams::Inbound)

    Inbound settings that can be supplied when creating or updating a UAC connection

  • internal_uac_settings (Telnyx::Models::UacConnectionCreateParams::InternalUacSettings)

    Internal Telnyx-side settings for a UAC connection.

  • ios_push_credential_id (String, nil)

    The uuid of the push credential for Ios

  • jitter_buffer (Telnyx::Models::ConnectionJitterBuffer)

    Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams o

  • noise_suppression (Symbol, Telnyx::Models::UacConnectionCreateParams::NoiseSuppression)

    Controls when noise suppression is applied to calls. When set to ‘inbound’, nois

  • noise_suppression_details (Telnyx::Models::ConnectionNoiseSuppressionDetails)

    Configuration options for noise suppression. These settings are stored regardles

  • onnet_t38_passthrough_enabled (Boolean)

    Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly

  • outbound (Telnyx::Models::UacConnectionCreateParams::Outbound)
  • password (String)

    The password to be used as part of the credentials. Must be 8 to 128 characters

  • rtcp_settings (Telnyx::Models::ConnectionRtcpSettings)
  • sip_uri_calling_preference (Symbol, Telnyx::Models::UacConnectionCreateParams::SipUriCallingPreference)

    This feature enables inbound SIP URI calls to your Credential Auth Connection. I

  • tags (Array<String>)

    Tags associated with the connection.

  • user_name (String)

    The user name to be used as part of the credentials. Must be 4-32 characters lon

  • webhook_api_version (Symbol, Telnyx::Models::UacConnectionCreateParams::WebhookAPIVersion)

    Determines which webhook format will be used, Telnyx API v1, v2 or texml. Note -

  • webhook_event_failover_url (String, nil)

    The failover URL where webhooks related to this connection will be sent if sendi

  • webhook_event_url (String)

    The URL where webhooks related to this connection will be sent. Must include a s

  • webhook_timeout_secs (Integer, nil)

    Specifies how many seconds to wait before timing out a webhook.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



80
81
82
83
84
85
86
87
88
89
# File 'lib/telnyx/resources/uac_connections.rb', line 80

def create(params)
  parsed, options = Telnyx::UacConnectionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "uac_connections",
    body: parsed,
    model: Telnyx::Models::UacConnectionCreateResponse,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ Telnyx::Models::UacConnectionDeleteResponse

Deletes an existing UAC connection.

Parameters:

  • id (String)

    Identifies the resource.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



238
239
240
241
242
243
244
245
# File 'lib/telnyx/resources/uac_connections.rb', line 238

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["uac_connections/%1$s", id],
    model: Telnyx::Models::UacConnectionDeleteResponse,
    options: params[:request_options]
  )
end

#list(filter: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::UacConnectionListResponse>

Some parameter documentations has been truncated, see Models::UacConnectionListParams for more details.

Returns a list of your UAC connections. A UAC (User Agent Client) Connection registers Telnyx to your PBX — the opposite of a standard SIP trunk, where the PBX registers to Telnyx. Use UAC when your PBX doesn’t support outbound SIP registration or you need Telnyx to maintain the registration.

filter[connection_

Parameters:

Returns:

See Also:



214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/telnyx/resources/uac_connections.rb', line 214

def list(params = {})
  parsed, options = Telnyx::UacConnectionListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "uac_connections",
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::Models::UacConnectionListResponse,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::UacConnectionRetrieveResponse

Retrieves the details of an existing UAC connection.

Parameters:

  • id (String)

    Identifies the resource.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



102
103
104
105
106
107
108
109
# File 'lib/telnyx/resources/uac_connections.rb', line 102

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["uac_connections/%1$s", id],
    model: Telnyx::Models::UacConnectionRetrieveResponse,
    options: params[:request_options]
  )
end

#update(id, active: nil, anchorsite_override: nil, android_push_credential_id: nil, call_cost_in_webhooks: nil, connection_name: nil, default_on_hold_comfort_noise_enabled: nil, dtmf_type: nil, encode_contact_header_enabled: nil, encrypted_media: nil, external_uac_settings: nil, inbound: nil, internal_uac_settings: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, password: nil, rtcp_settings: nil, sip_uri_calling_preference: nil, tags: nil, user_name: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::UacConnectionUpdateResponse

Some parameter documentations has been truncated, see Models::UacConnectionUpdateParams for more details.

Updates settings of an existing UAC connection.

Parameters:

  • id (String)

    Identifies the resource.

  • active (Boolean)

    Defaults to true

  • anchorsite_override (Symbol, Telnyx::Models::AnchorsiteOverride)

    ‘Latency` directs Telnyx to route media through the site with the lowest round-t

  • android_push_credential_id (String, nil)

    The uuid of the push credential for Android

  • call_cost_in_webhooks (Boolean)

    Specifies if call cost webhooks should be sent for this connection.

  • connection_name (String)

    A user-assigned name to help manage the connection.

  • default_on_hold_comfort_noise_enabled (Boolean)

    When enabled, Telnyx will generate comfort noise when you place the call on hold

  • dtmf_type (Symbol, Telnyx::Models::DtmfType)

    Sets the type of DTMF digits sent from Telnyx to this Connection. Note that DTMF

  • encode_contact_header_enabled (Boolean)

    Encode the SIP contact header sent by Telnyx to avoid issues for NAT or ALG scen

  • encrypted_media (Symbol, Telnyx::Models::EncryptedMedia, nil)

    Enable use of SRTP for encryption. Cannot be set if the transport_portocol is TL

  • external_uac_settings (Telnyx::Models::UacConnectionUpdateParams::ExternalUacSettings)

    External SIP peer settings used by Telnyx when registering to your PBX and routi

  • inbound (Telnyx::Models::UacConnectionUpdateParams::Inbound)

    Inbound settings that can be supplied when creating or updating a UAC connection

  • internal_uac_settings (Telnyx::Models::UacConnectionUpdateParams::InternalUacSettings)

    Internal Telnyx-side settings for a UAC connection.

  • ios_push_credential_id (String, nil)

    The uuid of the push credential for Ios

  • jitter_buffer (Telnyx::Models::ConnectionJitterBuffer)

    Configuration options for Jitter Buffer. Enables Jitter Buffer for RTP streams o

  • noise_suppression (Symbol, Telnyx::Models::UacConnectionUpdateParams::NoiseSuppression)

    Controls when noise suppression is applied to calls. When set to ‘inbound’, nois

  • noise_suppression_details (Telnyx::Models::ConnectionNoiseSuppressionDetails)

    Configuration options for noise suppression. These settings are stored regardles

  • onnet_t38_passthrough_enabled (Boolean)

    Enable on-net T38 if you prefer the sender and receiver negotiating T38 directly

  • outbound (Telnyx::Models::UacConnectionUpdateParams::Outbound)
  • password (String)

    The password to be used as part of the credentials. Must be 8 to 128 characters

  • rtcp_settings (Telnyx::Models::ConnectionRtcpSettings)
  • sip_uri_calling_preference (Symbol, Telnyx::Models::UacConnectionUpdateParams::SipUriCallingPreference)

    This feature enables inbound SIP URI calls to your Credential Auth Connection. I

  • tags (Array<String>)

    Tags associated with the connection.

  • user_name (String)

    The user name to be used as part of the credentials. Must be 4-32 characters lon

  • webhook_api_version (Symbol, Telnyx::Models::UacConnectionUpdateParams::WebhookAPIVersion)

    Determines which webhook format will be used, Telnyx API v1 or v2.

  • webhook_event_failover_url (String, nil)

    The failover URL where webhooks related to this connection will be sent if sendi

  • webhook_event_url (String)

    The URL where webhooks related to this connection will be sent. Must include a s

  • webhook_timeout_secs (Integer, nil)

    Specifies how many seconds to wait before timing out a webhook.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



179
180
181
182
183
184
185
186
187
188
# File 'lib/telnyx/resources/uac_connections.rb', line 179

def update(id, params = {})
  parsed, options = Telnyx::UacConnectionUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["uac_connections/%1$s", id],
    body: parsed,
    model: Telnyx::Models::UacConnectionUpdateResponse,
    options: options
  )
end