Class: Telnyx::Resources::SipRegistrationStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/sip_registration_status.rb,
sig/telnyx/resources/sip_registration_status.rbs

Overview

UAC connection operations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SipRegistrationStatus

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

Parameters:



54
55
56
# File 'lib/telnyx/resources/sip_registration_status.rb', line 54

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(credential_type:, connection_id: nil, username: nil, request_options: {}) ⇒ Telnyx::Models::SipRegistrationStatusRetrieveResponse

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

Returns the live SIP registration status for a Telnyx endpoint: whether it is currently registered, when the current registration expires, and the last response Telnyx received from the registrar.

The endpoint supports three credential types, selected with the credential_type query parameter. Each type is keyed by a different identifier:

credential_type Keyed by Use case
uac_external_credential connection_id A UAC (SIP attach) connection that registers to an external PBX.
telephony_credential username An ephemeral, one-time-use telephony credential.
sip_credential_connection username A traditional SIP credential connection that registers directly to Telnyx.

The authenticated account is taken from your API key; you can only read the registration status of connections and credentials your account owns.

Parameters:

  • credential_type (Symbol, Telnyx::Models::SipRegistrationStatusRetrieveParams::CredentialType)

    The kind of credential to look up. uac_external_credential is keyed by `connec

  • connection_id (String)

    Identifier of the UAC connection to look up. Required when credential_type is

  • username (String)

    SIP username to look up. Required when credential_type is `telephony_credentia

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

Returns:

See Also:



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/telnyx/resources/sip_registration_status.rb', line 39

def retrieve(params)
  parsed, options = Telnyx::SipRegistrationStatusRetrieveParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "sip_registration_status",
    query: query,
    model: Telnyx::Models::SipRegistrationStatusRetrieveResponse,
    options: options
  )
end