Class: Telnyx::Resources::IPConnections

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/ip_connections.rb

Overview

IP connection operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ IPConnections

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 IPConnections.

Parameters:



224
225
226
# File 'lib/telnyx/resources/ip_connections.rb', line 224

def initialize(client:)
  @client = client
end

Instance Method Details

#create(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, inbound: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, rtcp_settings: nil, tags: nil, transport_protocol: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::IPConnectionCreateResponse

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

Creates an IP connection.

Parameters:

  • 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)
  • 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

  • inbound (Telnyx::Models::IPConnectionCreateParams::Inbound)
  • 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::IPConnectionCreateParams::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::OutboundIP)
  • rtcp_settings (Telnyx::Models::ConnectionRtcpSettings)
  • tags (Array<String>)

    Tags associated with the connection.

  • transport_protocol (Symbol, Telnyx::Models::IPConnectionCreateParams::TransportProtocol)

    One of UDP, TLS, or TCP. Applies only to connections with IP authentication or F

  • webhook_api_version (Symbol, Telnyx::Models::IPConnectionCreateParams::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:



65
66
67
68
69
70
71
72
73
74
# File 'lib/telnyx/resources/ip_connections.rb', line 65

def create(params = {})
  parsed, options = Telnyx::IPConnectionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "ip_connections",
    body: parsed,
    model: Telnyx::Models::IPConnectionCreateResponse,
    options: options
  )
end

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

Deletes an existing IP connection.

Parameters:

  • id (String)

    Identifies the type of resource.

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

Returns:

See Also:



212
213
214
215
216
217
218
219
# File 'lib/telnyx/resources/ip_connections.rb', line 212

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

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

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

Returns a list of your IP connections.

filter[connection_

Parameters:

Returns:

See Also:



188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/telnyx/resources/ip_connections.rb', line 188

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

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

Retrieves the details of an existing ip connection.

Parameters:

Returns:

See Also:



87
88
89
90
91
92
93
94
# File 'lib/telnyx/resources/ip_connections.rb', line 87

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["ip_connections/%1$s", id],
    model: Telnyx::Models::IPConnectionRetrieveResponse,
    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, inbound: nil, ios_push_credential_id: nil, jitter_buffer: nil, noise_suppression: nil, noise_suppression_details: nil, onnet_t38_passthrough_enabled: nil, outbound: nil, rtcp_settings: nil, tags: nil, transport_protocol: nil, webhook_api_version: nil, webhook_event_failover_url: nil, webhook_event_url: nil, webhook_timeout_secs: nil, request_options: {}) ⇒ Telnyx::Models::IPConnectionUpdateResponse

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

Updates settings of an existing IP connection.

Parameters:

  • id (String)

    Identifies the type of 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)
  • 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

  • inbound (Telnyx::Models::InboundIP)
  • 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::IPConnectionUpdateParams::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::OutboundIP)
  • rtcp_settings (Telnyx::Models::ConnectionRtcpSettings)
  • tags (Array<String>)

    Tags associated with the connection.

  • transport_protocol (Symbol, Telnyx::Models::IPConnectionUpdateParams::TransportProtocol)

    One of UDP, TLS, or TCP. Applies only to connections with IP authentication or F

  • webhook_api_version (Symbol, Telnyx::Models::IPConnectionUpdateParams::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:



156
157
158
159
160
161
162
163
164
165
# File 'lib/telnyx/resources/ip_connections.rb', line 156

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