Class: Telnyx::Resources::SipRegistrationStatus

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

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:



42
43
44
# File 'lib/telnyx/resources/sip_registration_status.rb', line 42

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 state of a UAC connection: whether it is currently registered, when it last registered, and the last response Telnyx received from the registrar. Only ‘uac_external_credential` is supported today.

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 of the telephony credential to look up. Required when ‘credential_t

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

Returns:

See Also:



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/telnyx/resources/sip_registration_status.rb', line 27

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