telnyx 5.164.0 → 5.166.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +4 -5
- data/lib/telnyx/lib/webhook_verification.rb +54 -155
- data/lib/telnyx/lib.rb +3 -1
- data/lib/telnyx/models/ai/assistant_tool.rb +14 -1
- data/lib/telnyx/models/ai/transcription_settings.rb +20 -15
- data/lib/telnyx/models/ai/transcription_settings_config.rb +35 -10
- data/lib/telnyx/models/call_dial_params.rb +13 -1
- data/lib/telnyx/models/calls/action_transfer_params.rb +13 -1
- data/lib/telnyx/models/connection_rtcp_settings.rb +3 -3
- data/lib/telnyx/models/credential_connections/action_check_registration_status_response.rb +12 -12
- data/lib/telnyx/models/external_requirements/sub_number_order_retrieve_params.rb +28 -0
- data/lib/telnyx/models/external_requirements/sub_number_order_retrieve_response.rb +104 -0
- data/lib/telnyx/models/external_requirements/sub_number_order_update_params.rb +69 -0
- data/lib/telnyx/models/external_requirements/sub_number_order_update_response.rb +66 -0
- data/lib/telnyx/models/outbound_voice_profile.rb +14 -14
- data/lib/telnyx/models/outbound_voice_profile_create_params.rb +14 -14
- data/lib/telnyx/models/outbound_voice_profile_update_params.rb +14 -14
- data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +12 -12
- data/lib/telnyx/models.rb +2 -2
- data/lib/telnyx/resources/calls/actions.rb +3 -1
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/credential_connections/actions.rb +3 -3
- data/lib/telnyx/resources/external_requirements/sub_number_orders.rb +99 -0
- data/lib/telnyx/resources/external_requirements.rb +19 -0
- data/lib/telnyx/resources/outbound_voice_profiles.rb +2 -2
- data/lib/telnyx/resources/uac_connections/actions.rb +3 -3
- data/lib/telnyx/resources/webhooks.rb +1 -1
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +6 -4
- data/rbi/telnyx/client.rbi +3 -4
- data/rbi/telnyx/models/ai/assistant_tool.rbi +21 -0
- data/rbi/telnyx/models/ai/transcription_settings.rbi +40 -28
- data/rbi/telnyx/models/ai/transcription_settings_config.rbi +52 -12
- data/rbi/telnyx/models/call_dial_params.rbi +19 -0
- data/rbi/telnyx/models/calls/action_transfer_params.rbi +19 -0
- data/rbi/telnyx/models/connection_rtcp_settings.rbi +4 -4
- data/rbi/telnyx/models/credential_connections/action_check_registration_status_response.rbi +18 -36
- data/rbi/telnyx/models/external_requirements/sub_number_order_retrieve_params.rbi +52 -0
- data/rbi/telnyx/models/external_requirements/sub_number_order_retrieve_response.rbi +248 -0
- data/rbi/telnyx/models/external_requirements/sub_number_order_update_params.rbi +119 -0
- data/rbi/telnyx/models/external_requirements/sub_number_order_update_response.rbi +159 -0
- data/rbi/telnyx/models/outbound_voice_profile.rbi +18 -18
- data/rbi/telnyx/models/outbound_voice_profile_create_params.rbi +18 -18
- data/rbi/telnyx/models/outbound_voice_profile_update_params.rbi +18 -18
- data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +18 -36
- data/rbi/telnyx/models.rbi +2 -3
- data/rbi/telnyx/resources/calls/actions.rbi +7 -0
- data/rbi/telnyx/resources/calls.rbi +7 -0
- data/rbi/telnyx/resources/credential_connections/actions.rbi +3 -3
- data/rbi/telnyx/resources/external_requirements/sub_number_orders.rbi +71 -0
- data/rbi/telnyx/resources/external_requirements.rbi +16 -0
- data/rbi/telnyx/resources/outbound_voice_profiles.rbi +4 -4
- data/rbi/telnyx/resources/uac_connections/actions.rbi +3 -3
- data/sig/telnyx/client.rbs +2 -2
- data/sig/telnyx/models/ai/assistant_tool.rbs +7 -0
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -0
- data/sig/telnyx/models/ai/transcription_settings_config.rbs +14 -0
- data/sig/telnyx/models/call_dial_params.rbs +7 -0
- data/sig/telnyx/models/calls/action_transfer_params.rbs +7 -0
- data/sig/telnyx/models/credential_connections/action_check_registration_status_response.rbs +24 -36
- data/sig/telnyx/models/external_requirements/sub_number_order_retrieve_params.rbs +30 -0
- data/sig/telnyx/models/external_requirements/sub_number_order_retrieve_response.rbs +110 -0
- data/sig/telnyx/models/external_requirements/sub_number_order_update_params.rbs +50 -0
- data/sig/telnyx/models/external_requirements/sub_number_order_update_response.rbs +75 -0
- data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +24 -36
- data/sig/telnyx/models.rbs +2 -2
- data/sig/telnyx/resources/calls/actions.rbs +1 -0
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/external_requirements/sub_number_orders.rbs +22 -0
- data/sig/telnyx/resources/external_requirements.rbs +9 -0
- metadata +20 -26
- data/lib/telnyx/lib/webhooks_ed25519.rb +0 -63
- data/lib/telnyx/models/sip_registration_status_retrieve_params.rb +0 -59
- data/lib/telnyx/models/sip_registration_status_retrieve_response.rb +0 -214
- data/lib/telnyx/resources/sip_registration_status.rb +0 -59
- data/rbi/telnyx/models/sip_registration_status_retrieve_params.rbi +0 -124
- data/rbi/telnyx/models/sip_registration_status_retrieve_response.rbi +0 -416
- data/rbi/telnyx/resources/sip_registration_status.rbi +0 -52
- data/sig/telnyx/models/sip_registration_status_retrieve_params.rbs +0 -55
- data/sig/telnyx/models/sip_registration_status_retrieve_response.rbs +0 -195
- data/sig/telnyx/resources/sip_registration_status.rbs +0 -14
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
# UAC connection operations
|
|
6
|
-
class SipRegistrationStatus
|
|
7
|
-
# Some parameter documentations has been truncated, see
|
|
8
|
-
# {Telnyx::Models::SipRegistrationStatusRetrieveParams} for more details.
|
|
9
|
-
#
|
|
10
|
-
# Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
11
|
-
# currently registered, when the current registration expires, and the last
|
|
12
|
-
# response Telnyx received from the registrar.
|
|
13
|
-
#
|
|
14
|
-
# The endpoint supports three credential types, selected with the
|
|
15
|
-
# `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
16
|
-
#
|
|
17
|
-
# | `credential_type` | Keyed by | Use case |
|
|
18
|
-
# | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
19
|
-
# | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
20
|
-
# | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
21
|
-
# | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
22
|
-
#
|
|
23
|
-
# The authenticated account is taken from your API key; you can only read the
|
|
24
|
-
# registration status of connections and credentials your account owns.
|
|
25
|
-
#
|
|
26
|
-
# @overload retrieve(credential_type:, connection_id: nil, username: nil, request_options: {})
|
|
27
|
-
#
|
|
28
|
-
# @param credential_type [Symbol, Telnyx::Models::SipRegistrationStatusRetrieveParams::CredentialType] The kind of credential to look up. `uac_external_credential` is keyed by `connec
|
|
29
|
-
#
|
|
30
|
-
# @param connection_id [String] Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
31
|
-
#
|
|
32
|
-
# @param username [String] SIP username to look up. Required when `credential_type` is `telephony_credentia
|
|
33
|
-
#
|
|
34
|
-
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
|
-
#
|
|
36
|
-
# @return [Telnyx::Models::SipRegistrationStatusRetrieveResponse]
|
|
37
|
-
#
|
|
38
|
-
# @see Telnyx::Models::SipRegistrationStatusRetrieveParams
|
|
39
|
-
def retrieve(params)
|
|
40
|
-
parsed, options = Telnyx::SipRegistrationStatusRetrieveParams.dump_request(params)
|
|
41
|
-
query = Telnyx::Internal::Util.encode_query_params(parsed)
|
|
42
|
-
@client.request(
|
|
43
|
-
method: :get,
|
|
44
|
-
path: "sip_registration_status",
|
|
45
|
-
query: query,
|
|
46
|
-
model: Telnyx::Models::SipRegistrationStatusRetrieveResponse,
|
|
47
|
-
options: options
|
|
48
|
-
)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# @api private
|
|
52
|
-
#
|
|
53
|
-
# @param client [Telnyx::Client]
|
|
54
|
-
def initialize(client:)
|
|
55
|
-
@client = client
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
class SipRegistrationStatusRetrieveParams < 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(
|
|
12
|
-
Telnyx::SipRegistrationStatusRetrieveParams,
|
|
13
|
-
Telnyx::Internal::AnyHash
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# The kind of credential to look up. `uac_external_credential` is keyed by
|
|
18
|
-
# `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
19
|
-
# keyed by `username`.
|
|
20
|
-
sig do
|
|
21
|
-
returns(
|
|
22
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::OrSymbol
|
|
23
|
-
)
|
|
24
|
-
end
|
|
25
|
-
attr_accessor :credential_type
|
|
26
|
-
|
|
27
|
-
# Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
28
|
-
# `uac_external_credential`.
|
|
29
|
-
sig { returns(T.nilable(String)) }
|
|
30
|
-
attr_reader :connection_id
|
|
31
|
-
|
|
32
|
-
sig { params(connection_id: String).void }
|
|
33
|
-
attr_writer :connection_id
|
|
34
|
-
|
|
35
|
-
# SIP username to look up. Required when `credential_type` is
|
|
36
|
-
# `telephony_credential` or `sip_credential_connection`.
|
|
37
|
-
sig { returns(T.nilable(String)) }
|
|
38
|
-
attr_reader :username
|
|
39
|
-
|
|
40
|
-
sig { params(username: String).void }
|
|
41
|
-
attr_writer :username
|
|
42
|
-
|
|
43
|
-
sig do
|
|
44
|
-
params(
|
|
45
|
-
credential_type:
|
|
46
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::OrSymbol,
|
|
47
|
-
connection_id: String,
|
|
48
|
-
username: String,
|
|
49
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
50
|
-
).returns(T.attached_class)
|
|
51
|
-
end
|
|
52
|
-
def self.new(
|
|
53
|
-
# The kind of credential to look up. `uac_external_credential` is keyed by
|
|
54
|
-
# `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
55
|
-
# keyed by `username`.
|
|
56
|
-
credential_type:,
|
|
57
|
-
# Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
58
|
-
# `uac_external_credential`.
|
|
59
|
-
connection_id: nil,
|
|
60
|
-
# SIP username to look up. Required when `credential_type` is
|
|
61
|
-
# `telephony_credential` or `sip_credential_connection`.
|
|
62
|
-
username: nil,
|
|
63
|
-
request_options: {}
|
|
64
|
-
)
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
sig do
|
|
68
|
-
override.returns(
|
|
69
|
-
{
|
|
70
|
-
credential_type:
|
|
71
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::OrSymbol,
|
|
72
|
-
connection_id: String,
|
|
73
|
-
username: String,
|
|
74
|
-
request_options: Telnyx::RequestOptions
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
end
|
|
78
|
-
def to_hash
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# The kind of credential to look up. `uac_external_credential` is keyed by
|
|
82
|
-
# `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
83
|
-
# keyed by `username`.
|
|
84
|
-
module CredentialType
|
|
85
|
-
extend Telnyx::Internal::Type::Enum
|
|
86
|
-
|
|
87
|
-
TaggedSymbol =
|
|
88
|
-
T.type_alias do
|
|
89
|
-
T.all(
|
|
90
|
-
Symbol,
|
|
91
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
95
|
-
|
|
96
|
-
UAC_EXTERNAL_CREDENTIAL =
|
|
97
|
-
T.let(
|
|
98
|
-
:uac_external_credential,
|
|
99
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::TaggedSymbol
|
|
100
|
-
)
|
|
101
|
-
TELEPHONY_CREDENTIAL =
|
|
102
|
-
T.let(
|
|
103
|
-
:telephony_credential,
|
|
104
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::TaggedSymbol
|
|
105
|
-
)
|
|
106
|
-
SIP_CREDENTIAL_CONNECTION =
|
|
107
|
-
T.let(
|
|
108
|
-
:sip_credential_connection,
|
|
109
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::TaggedSymbol
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
sig do
|
|
113
|
-
override.returns(
|
|
114
|
-
T::Array[
|
|
115
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::TaggedSymbol
|
|
116
|
-
]
|
|
117
|
-
)
|
|
118
|
-
end
|
|
119
|
-
def self.values
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
end
|
|
124
|
-
end
|
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Models
|
|
5
|
-
class SipRegistrationStatusRetrieveResponse < Telnyx::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse,
|
|
10
|
-
Telnyx::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Identifier of the connection associated with the credential.
|
|
15
|
-
sig { returns(T.nilable(String)) }
|
|
16
|
-
attr_reader :connection_id
|
|
17
|
-
|
|
18
|
-
sig { params(connection_id: String).void }
|
|
19
|
-
attr_writer :connection_id
|
|
20
|
-
|
|
21
|
-
# Human-readable connection name.
|
|
22
|
-
sig { returns(T.nilable(String)) }
|
|
23
|
-
attr_reader :connection_name
|
|
24
|
-
|
|
25
|
-
sig { params(connection_name: String).void }
|
|
26
|
-
attr_writer :connection_name
|
|
27
|
-
|
|
28
|
-
# The credential type that was looked up.
|
|
29
|
-
sig do
|
|
30
|
-
returns(
|
|
31
|
-
T.nilable(
|
|
32
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol
|
|
33
|
-
)
|
|
34
|
-
)
|
|
35
|
-
end
|
|
36
|
-
attr_reader :credential_type
|
|
37
|
-
|
|
38
|
-
sig do
|
|
39
|
-
params(
|
|
40
|
-
credential_type:
|
|
41
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::OrSymbol
|
|
42
|
-
).void
|
|
43
|
-
end
|
|
44
|
-
attr_writer :credential_type
|
|
45
|
-
|
|
46
|
-
# SIP username used for the registration.
|
|
47
|
-
sig { returns(T.nilable(String)) }
|
|
48
|
-
attr_reader :credential_username
|
|
49
|
-
|
|
50
|
-
sig { params(credential_username: String).void }
|
|
51
|
-
attr_writer :credential_username
|
|
52
|
-
|
|
53
|
-
# SIP response from the last registration attempt.
|
|
54
|
-
sig { returns(T.nilable(String)) }
|
|
55
|
-
attr_accessor :last_registration_response
|
|
56
|
-
|
|
57
|
-
# True if the endpoint is currently registered.
|
|
58
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
59
|
-
attr_reader :registered
|
|
60
|
-
|
|
61
|
-
sig { params(registered: T::Boolean).void }
|
|
62
|
-
attr_writer :registered
|
|
63
|
-
|
|
64
|
-
# Detailed registration information reported by the registrar. The populated
|
|
65
|
-
# fields depend on `credential_type`: UAC external credentials report
|
|
66
|
-
# `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
67
|
-
# telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
68
|
-
# `transport`, and `last_modified`. All types report `expires`.
|
|
69
|
-
sig do
|
|
70
|
-
returns(
|
|
71
|
-
T.nilable(
|
|
72
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationDetails
|
|
73
|
-
)
|
|
74
|
-
)
|
|
75
|
-
end
|
|
76
|
-
attr_reader :sip_registration_details
|
|
77
|
-
|
|
78
|
-
sig do
|
|
79
|
-
params(
|
|
80
|
-
sip_registration_details:
|
|
81
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationDetails::OrHash
|
|
82
|
-
).void
|
|
83
|
-
end
|
|
84
|
-
attr_writer :sip_registration_details
|
|
85
|
-
|
|
86
|
-
# Human-readable registration status derived from the registrar state.
|
|
87
|
-
sig do
|
|
88
|
-
returns(
|
|
89
|
-
T.nilable(
|
|
90
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
91
|
-
)
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
attr_reader :sip_registration_status
|
|
95
|
-
|
|
96
|
-
sig do
|
|
97
|
-
params(
|
|
98
|
-
sip_registration_status:
|
|
99
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::OrSymbol
|
|
100
|
-
).void
|
|
101
|
-
end
|
|
102
|
-
attr_writer :sip_registration_status
|
|
103
|
-
|
|
104
|
-
sig do
|
|
105
|
-
params(
|
|
106
|
-
connection_id: String,
|
|
107
|
-
connection_name: String,
|
|
108
|
-
credential_type:
|
|
109
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::OrSymbol,
|
|
110
|
-
credential_username: String,
|
|
111
|
-
last_registration_response: T.nilable(String),
|
|
112
|
-
registered: T::Boolean,
|
|
113
|
-
sip_registration_details:
|
|
114
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationDetails::OrHash,
|
|
115
|
-
sip_registration_status:
|
|
116
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::OrSymbol
|
|
117
|
-
).returns(T.attached_class)
|
|
118
|
-
end
|
|
119
|
-
def self.new(
|
|
120
|
-
# Identifier of the connection associated with the credential.
|
|
121
|
-
connection_id: nil,
|
|
122
|
-
# Human-readable connection name.
|
|
123
|
-
connection_name: nil,
|
|
124
|
-
# The credential type that was looked up.
|
|
125
|
-
credential_type: nil,
|
|
126
|
-
# SIP username used for the registration.
|
|
127
|
-
credential_username: nil,
|
|
128
|
-
# SIP response from the last registration attempt.
|
|
129
|
-
last_registration_response: nil,
|
|
130
|
-
# True if the endpoint is currently registered.
|
|
131
|
-
registered: nil,
|
|
132
|
-
# Detailed registration information reported by the registrar. The populated
|
|
133
|
-
# fields depend on `credential_type`: UAC external credentials report
|
|
134
|
-
# `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
135
|
-
# telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
136
|
-
# `transport`, and `last_modified`. All types report `expires`.
|
|
137
|
-
sip_registration_details: nil,
|
|
138
|
-
# Human-readable registration status derived from the registrar state.
|
|
139
|
-
sip_registration_status: nil
|
|
140
|
-
)
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
sig do
|
|
144
|
-
override.returns(
|
|
145
|
-
{
|
|
146
|
-
connection_id: String,
|
|
147
|
-
connection_name: String,
|
|
148
|
-
credential_type:
|
|
149
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol,
|
|
150
|
-
credential_username: String,
|
|
151
|
-
last_registration_response: T.nilable(String),
|
|
152
|
-
registered: T::Boolean,
|
|
153
|
-
sip_registration_details:
|
|
154
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationDetails,
|
|
155
|
-
sip_registration_status:
|
|
156
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
157
|
-
}
|
|
158
|
-
)
|
|
159
|
-
end
|
|
160
|
-
def to_hash
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# The credential type that was looked up.
|
|
164
|
-
module CredentialType
|
|
165
|
-
extend Telnyx::Internal::Type::Enum
|
|
166
|
-
|
|
167
|
-
TaggedSymbol =
|
|
168
|
-
T.type_alias do
|
|
169
|
-
T.all(
|
|
170
|
-
Symbol,
|
|
171
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType
|
|
172
|
-
)
|
|
173
|
-
end
|
|
174
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
175
|
-
|
|
176
|
-
UAC_EXTERNAL_CREDENTIAL =
|
|
177
|
-
T.let(
|
|
178
|
-
:uac_external_credential,
|
|
179
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol
|
|
180
|
-
)
|
|
181
|
-
TELEPHONY_CREDENTIAL =
|
|
182
|
-
T.let(
|
|
183
|
-
:telephony_credential,
|
|
184
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol
|
|
185
|
-
)
|
|
186
|
-
SIP_CREDENTIAL_CONNECTION =
|
|
187
|
-
T.let(
|
|
188
|
-
:sip_credential_connection,
|
|
189
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol
|
|
190
|
-
)
|
|
191
|
-
|
|
192
|
-
sig do
|
|
193
|
-
override.returns(
|
|
194
|
-
T::Array[
|
|
195
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::CredentialType::TaggedSymbol
|
|
196
|
-
]
|
|
197
|
-
)
|
|
198
|
-
end
|
|
199
|
-
def self.values
|
|
200
|
-
end
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
class SipRegistrationDetails < Telnyx::Internal::Type::BaseModel
|
|
204
|
-
OrHash =
|
|
205
|
-
T.type_alias do
|
|
206
|
-
T.any(
|
|
207
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationDetails,
|
|
208
|
-
Telnyx::Internal::AnyHash
|
|
209
|
-
)
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# Number of authentication retries on the last attempt (uac_external_credential).
|
|
213
|
-
sig { returns(T.nilable(Integer)) }
|
|
214
|
-
attr_reader :auth_retries
|
|
215
|
-
|
|
216
|
-
sig { params(auth_retries: Integer).void }
|
|
217
|
-
attr_writer :auth_retries
|
|
218
|
-
|
|
219
|
-
# Unix timestamp when the current registration expires.
|
|
220
|
-
sig { returns(T.nilable(Integer)) }
|
|
221
|
-
attr_reader :expires
|
|
222
|
-
|
|
223
|
-
sig { params(expires: Integer).void }
|
|
224
|
-
attr_writer :expires
|
|
225
|
-
|
|
226
|
-
# Count of consecutive registration failures (uac_external_credential).
|
|
227
|
-
sig { returns(T.nilable(Integer)) }
|
|
228
|
-
attr_reader :failures
|
|
229
|
-
|
|
230
|
-
sig { params(failures: Integer).void }
|
|
231
|
-
attr_writer :failures
|
|
232
|
-
|
|
233
|
-
# Timestamp when the registration was last modified (telephony_credential and
|
|
234
|
-
# sip_credential_connection).
|
|
235
|
-
sig { returns(T.nilable(String)) }
|
|
236
|
-
attr_reader :last_modified
|
|
237
|
-
|
|
238
|
-
sig { params(last_modified: String).void }
|
|
239
|
-
attr_writer :last_modified
|
|
240
|
-
|
|
241
|
-
# Unix timestamp of the next scheduled registration action
|
|
242
|
-
# (uac_external_credential).
|
|
243
|
-
sig { returns(T.nilable(Integer)) }
|
|
244
|
-
attr_reader :next_action_at
|
|
245
|
-
|
|
246
|
-
sig { params(next_action_at: Integer).void }
|
|
247
|
-
attr_writer :next_action_at
|
|
248
|
-
|
|
249
|
-
# SIP URI user@host of the registered contact (uac_external_credential).
|
|
250
|
-
sig { returns(T.nilable(String)) }
|
|
251
|
-
attr_reader :sip_uri_user_host
|
|
252
|
-
|
|
253
|
-
sig { params(sip_uri_user_host: String).void }
|
|
254
|
-
attr_writer :sip_uri_user_host
|
|
255
|
-
|
|
256
|
-
# Transport used for the registration, e.g. UDP/TCP/TLS (telephony_credential and
|
|
257
|
-
# sip_credential_connection).
|
|
258
|
-
sig { returns(T.nilable(String)) }
|
|
259
|
-
attr_reader :transport
|
|
260
|
-
|
|
261
|
-
sig { params(transport: String).void }
|
|
262
|
-
attr_writer :transport
|
|
263
|
-
|
|
264
|
-
# IP address of the registered user agent (telephony_credential and
|
|
265
|
-
# sip_credential_connection).
|
|
266
|
-
sig { returns(T.nilable(String)) }
|
|
267
|
-
attr_reader :ua_ip
|
|
268
|
-
|
|
269
|
-
sig { params(ua_ip: String).void }
|
|
270
|
-
attr_writer :ua_ip
|
|
271
|
-
|
|
272
|
-
# Port of the registered user agent (telephony_credential and
|
|
273
|
-
# sip_credential_connection).
|
|
274
|
-
sig { returns(T.nilable(Integer)) }
|
|
275
|
-
attr_reader :ua_port
|
|
276
|
-
|
|
277
|
-
sig { params(ua_port: Integer).void }
|
|
278
|
-
attr_writer :ua_port
|
|
279
|
-
|
|
280
|
-
# Registration uptime reported by the registrar (uac_external_credential).
|
|
281
|
-
sig { returns(T.nilable(Integer)) }
|
|
282
|
-
attr_reader :uptime
|
|
283
|
-
|
|
284
|
-
sig { params(uptime: Integer).void }
|
|
285
|
-
attr_writer :uptime
|
|
286
|
-
|
|
287
|
-
# Detailed registration information reported by the registrar. The populated
|
|
288
|
-
# fields depend on `credential_type`: UAC external credentials report
|
|
289
|
-
# `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
290
|
-
# telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
291
|
-
# `transport`, and `last_modified`. All types report `expires`.
|
|
292
|
-
sig do
|
|
293
|
-
params(
|
|
294
|
-
auth_retries: Integer,
|
|
295
|
-
expires: Integer,
|
|
296
|
-
failures: Integer,
|
|
297
|
-
last_modified: String,
|
|
298
|
-
next_action_at: Integer,
|
|
299
|
-
sip_uri_user_host: String,
|
|
300
|
-
transport: String,
|
|
301
|
-
ua_ip: String,
|
|
302
|
-
ua_port: Integer,
|
|
303
|
-
uptime: Integer
|
|
304
|
-
).returns(T.attached_class)
|
|
305
|
-
end
|
|
306
|
-
def self.new(
|
|
307
|
-
# Number of authentication retries on the last attempt (uac_external_credential).
|
|
308
|
-
auth_retries: nil,
|
|
309
|
-
# Unix timestamp when the current registration expires.
|
|
310
|
-
expires: nil,
|
|
311
|
-
# Count of consecutive registration failures (uac_external_credential).
|
|
312
|
-
failures: nil,
|
|
313
|
-
# Timestamp when the registration was last modified (telephony_credential and
|
|
314
|
-
# sip_credential_connection).
|
|
315
|
-
last_modified: nil,
|
|
316
|
-
# Unix timestamp of the next scheduled registration action
|
|
317
|
-
# (uac_external_credential).
|
|
318
|
-
next_action_at: nil,
|
|
319
|
-
# SIP URI user@host of the registered contact (uac_external_credential).
|
|
320
|
-
sip_uri_user_host: nil,
|
|
321
|
-
# Transport used for the registration, e.g. UDP/TCP/TLS (telephony_credential and
|
|
322
|
-
# sip_credential_connection).
|
|
323
|
-
transport: nil,
|
|
324
|
-
# IP address of the registered user agent (telephony_credential and
|
|
325
|
-
# sip_credential_connection).
|
|
326
|
-
ua_ip: nil,
|
|
327
|
-
# Port of the registered user agent (telephony_credential and
|
|
328
|
-
# sip_credential_connection).
|
|
329
|
-
ua_port: nil,
|
|
330
|
-
# Registration uptime reported by the registrar (uac_external_credential).
|
|
331
|
-
uptime: nil
|
|
332
|
-
)
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
sig do
|
|
336
|
-
override.returns(
|
|
337
|
-
{
|
|
338
|
-
auth_retries: Integer,
|
|
339
|
-
expires: Integer,
|
|
340
|
-
failures: Integer,
|
|
341
|
-
last_modified: String,
|
|
342
|
-
next_action_at: Integer,
|
|
343
|
-
sip_uri_user_host: String,
|
|
344
|
-
transport: String,
|
|
345
|
-
ua_ip: String,
|
|
346
|
-
ua_port: Integer,
|
|
347
|
-
uptime: Integer
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
end
|
|
351
|
-
def to_hash
|
|
352
|
-
end
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
# Human-readable registration status derived from the registrar state.
|
|
356
|
-
module SipRegistrationStatus
|
|
357
|
-
extend Telnyx::Internal::Type::Enum
|
|
358
|
-
|
|
359
|
-
TaggedSymbol =
|
|
360
|
-
T.type_alias do
|
|
361
|
-
T.all(
|
|
362
|
-
Symbol,
|
|
363
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus
|
|
364
|
-
)
|
|
365
|
-
end
|
|
366
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
367
|
-
|
|
368
|
-
UNREGISTERING =
|
|
369
|
-
T.let(
|
|
370
|
-
:unregistering,
|
|
371
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
372
|
-
)
|
|
373
|
-
CONNECTION_DISABLED =
|
|
374
|
-
T.let(
|
|
375
|
-
:connection_disabled,
|
|
376
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
377
|
-
)
|
|
378
|
-
STANDBY =
|
|
379
|
-
T.let(
|
|
380
|
-
:standby,
|
|
381
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
382
|
-
)
|
|
383
|
-
FAILED =
|
|
384
|
-
T.let(
|
|
385
|
-
:failed,
|
|
386
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
387
|
-
)
|
|
388
|
-
TRYING =
|
|
389
|
-
T.let(
|
|
390
|
-
:trying,
|
|
391
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
392
|
-
)
|
|
393
|
-
REGISTERED =
|
|
394
|
-
T.let(
|
|
395
|
-
:registered,
|
|
396
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
397
|
-
)
|
|
398
|
-
UNKNOWN =
|
|
399
|
-
T.let(
|
|
400
|
-
:unknown,
|
|
401
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
402
|
-
)
|
|
403
|
-
|
|
404
|
-
sig do
|
|
405
|
-
override.returns(
|
|
406
|
-
T::Array[
|
|
407
|
-
Telnyx::Models::SipRegistrationStatusRetrieveResponse::SipRegistrationStatus::TaggedSymbol
|
|
408
|
-
]
|
|
409
|
-
)
|
|
410
|
-
end
|
|
411
|
-
def self.values
|
|
412
|
-
end
|
|
413
|
-
end
|
|
414
|
-
end
|
|
415
|
-
end
|
|
416
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Telnyx
|
|
4
|
-
module Resources
|
|
5
|
-
# UAC connection operations
|
|
6
|
-
class SipRegistrationStatus
|
|
7
|
-
# Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
8
|
-
# currently registered, when the current registration expires, and the last
|
|
9
|
-
# response Telnyx received from the registrar.
|
|
10
|
-
#
|
|
11
|
-
# The endpoint supports three credential types, selected with the
|
|
12
|
-
# `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
13
|
-
#
|
|
14
|
-
# | `credential_type` | Keyed by | Use case |
|
|
15
|
-
# | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
16
|
-
# | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
17
|
-
# | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
18
|
-
# | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
19
|
-
#
|
|
20
|
-
# The authenticated account is taken from your API key; you can only read the
|
|
21
|
-
# registration status of connections and credentials your account owns.
|
|
22
|
-
sig do
|
|
23
|
-
params(
|
|
24
|
-
credential_type:
|
|
25
|
-
Telnyx::SipRegistrationStatusRetrieveParams::CredentialType::OrSymbol,
|
|
26
|
-
connection_id: String,
|
|
27
|
-
username: String,
|
|
28
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
29
|
-
).returns(Telnyx::Models::SipRegistrationStatusRetrieveResponse)
|
|
30
|
-
end
|
|
31
|
-
def retrieve(
|
|
32
|
-
# The kind of credential to look up. `uac_external_credential` is keyed by
|
|
33
|
-
# `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
34
|
-
# keyed by `username`.
|
|
35
|
-
credential_type:,
|
|
36
|
-
# Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
37
|
-
# `uac_external_credential`.
|
|
38
|
-
connection_id: nil,
|
|
39
|
-
# SIP username to look up. Required when `credential_type` is
|
|
40
|
-
# `telephony_credential` or `sip_credential_connection`.
|
|
41
|
-
username: nil,
|
|
42
|
-
request_options: {}
|
|
43
|
-
)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# @api private
|
|
47
|
-
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
48
|
-
def self.new(client:)
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
module Telnyx
|
|
2
|
-
module Models
|
|
3
|
-
type sip_registration_status_retrieve_params =
|
|
4
|
-
{
|
|
5
|
-
credential_type: Telnyx::Models::SipRegistrationStatusRetrieveParams::credential_type,
|
|
6
|
-
connection_id: String,
|
|
7
|
-
username: String
|
|
8
|
-
}
|
|
9
|
-
& Telnyx::Internal::Type::request_parameters
|
|
10
|
-
|
|
11
|
-
class SipRegistrationStatusRetrieveParams < Telnyx::Internal::Type::BaseModel
|
|
12
|
-
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
13
|
-
include Telnyx::Internal::Type::RequestParameters
|
|
14
|
-
|
|
15
|
-
attr_accessor credential_type: Telnyx::Models::SipRegistrationStatusRetrieveParams::credential_type
|
|
16
|
-
|
|
17
|
-
attr_reader connection_id: String?
|
|
18
|
-
|
|
19
|
-
def connection_id=: (String) -> String
|
|
20
|
-
|
|
21
|
-
attr_reader username: String?
|
|
22
|
-
|
|
23
|
-
def username=: (String) -> String
|
|
24
|
-
|
|
25
|
-
def initialize: (
|
|
26
|
-
credential_type: Telnyx::Models::SipRegistrationStatusRetrieveParams::credential_type,
|
|
27
|
-
?connection_id: String,
|
|
28
|
-
?username: String,
|
|
29
|
-
?request_options: Telnyx::request_opts
|
|
30
|
-
) -> void
|
|
31
|
-
|
|
32
|
-
def to_hash: -> {
|
|
33
|
-
credential_type: Telnyx::Models::SipRegistrationStatusRetrieveParams::credential_type,
|
|
34
|
-
connection_id: String,
|
|
35
|
-
username: String,
|
|
36
|
-
request_options: Telnyx::RequestOptions
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
type credential_type =
|
|
40
|
-
:uac_external_credential
|
|
41
|
-
| :telephony_credential
|
|
42
|
-
| :sip_credential_connection
|
|
43
|
-
|
|
44
|
-
module CredentialType
|
|
45
|
-
extend Telnyx::Internal::Type::Enum
|
|
46
|
-
|
|
47
|
-
UAC_EXTERNAL_CREDENTIAL: :uac_external_credential
|
|
48
|
-
TELEPHONY_CREDENTIAL: :telephony_credential
|
|
49
|
-
SIP_CREDENTIAL_CONNECTION: :sip_credential_connection
|
|
50
|
-
|
|
51
|
-
def self?.values: -> ::Array[Telnyx::Models::SipRegistrationStatusRetrieveParams::credential_type]
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|